From 64a33a2c15e5c1c8b1cd9d8831ae1251a3a7c0d2 Mon Sep 17 00:00:00 2001 From: "Ch.-David Blot" Date: Wed, 12 Nov 2025 14:39:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20chore:=20revive=20this?= =?UTF-8?q?=20sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/release-build.sh | 4 +- .github/workflows/build.yml | 11 +- .github/workflows/cred-scan.yml | 15 +- .github/workflows/github-sanity-scan.yml | 7 +- .github/workflows/publish.yml | 11 +- .github/workflows/pull-request.yml | 21 +- .osc-api-patches/outscale-yaml.patch | 91 - ...ive-basePath-priority-if-set-by-user.patch | 47 - .../2022-12-15-add_exception_conf.patch | 471 --- .../2022-12-06-1-configfile-support.patch | 865 ----- .../2022-12-06-2-configenv-support.patch | 107 - .../before-format/2022-12-07-basic-auth.patch | 49 - .reuse/dep5 | 2 +- Makefile | 60 +- README.md.template | 841 ----- docs/AcceptNetPeeringRequest.md | 14 - docs/AcceptNetPeeringResponse.md | 14 - docs/AccepterNet.md | 16 - docs/AccessKey.md | 18 - docs/AccessKeyApi.md | 383 -- docs/AccessKeySecretKey.md | 19 - docs/AccessLog.md | 17 - docs/Account.md | 28 - docs/AccountApi.md | 358 -- docs/ApiAccessPolicy.md | 15 - docs/ApiAccessPolicyApi.md | 164 - docs/ApiAccessRule.md | 18 - docs/ApiAccessRuleApi.md | 308 -- docs/ApiLogApi.md | 78 - docs/ApplicationStickyCookiePolicy.md | 15 - docs/BackendVmHealth.md | 17 - docs/BlockDeviceMappingCreated.md | 15 - docs/BlockDeviceMappingImage.md | 16 - docs/BlockDeviceMappingVmCreation.md | 17 - docs/BlockDeviceMappingVmUpdate.md | 17 - docs/BsuCreated.md | 17 - docs/BsuToCreate.md | 18 - docs/BsuToUpdateVm.md | 15 - docs/Ca.md | 16 - docs/CaApi.md | 308 -- docs/Catalog.md | 14 - docs/CatalogApi.md | 148 - docs/CatalogEntry.md | 21 - docs/Catalogs.md | 26 - docs/CheckAuthenticationRequest.md | 15 - docs/CheckAuthenticationResponse.md | 13 - docs/ClientGateway.md | 19 - docs/ClientGatewayApi.md | 218 -- docs/ConsumptionEntry.md | 26 - docs/CreateAccessKeyRequest.md | 15 - docs/CreateAccessKeyResponse.md | 14 - docs/CreateAccountRequest.md | 27 - docs/CreateAccountResponse.md | 14 - docs/CreateApiAccessRuleRequest.md | 17 - docs/CreateApiAccessRuleResponse.md | 14 - docs/CreateCaRequest.md | 15 - docs/CreateCaResponse.md | 14 - docs/CreateClientGatewayRequest.md | 16 - docs/CreateClientGatewayResponse.md | 14 - docs/CreateDhcpOptionsRequest.md | 17 - docs/CreateDhcpOptionsResponse.md | 14 - docs/CreateDirectLinkInterfaceRequest.md | 15 - docs/CreateDirectLinkInterfaceResponse.md | 14 - docs/CreateDirectLinkRequest.md | 16 - docs/CreateDirectLinkResponse.md | 14 - docs/CreateFlexibleGpuRequest.md | 17 - docs/CreateFlexibleGpuResponse.md | 14 - docs/CreateImageExportTaskRequest.md | 15 - docs/CreateImageExportTaskResponse.md | 14 - docs/CreateImageRequest.md | 24 - docs/CreateImageResponse.md | 14 - docs/CreateInternetServiceRequest.md | 13 - docs/CreateInternetServiceResponse.md | 14 - docs/CreateKeypairRequest.md | 15 - docs/CreateKeypairResponse.md | 14 - docs/CreateListenerRuleRequest.md | 16 - docs/CreateListenerRuleResponse.md | 14 - docs/CreateLoadBalancerListenersRequest.md | 15 - docs/CreateLoadBalancerListenersResponse.md | 14 - docs/CreateLoadBalancerPolicyRequest.md | 18 - docs/CreateLoadBalancerPolicyResponse.md | 14 - docs/CreateLoadBalancerRequest.md | 21 - docs/CreateLoadBalancerResponse.md | 14 - docs/CreateLoadBalancerTagsRequest.md | 15 - docs/CreateLoadBalancerTagsResponse.md | 13 - docs/CreateNatServiceRequest.md | 16 - docs/CreateNatServiceResponse.md | 14 - docs/CreateNetAccessPointRequest.md | 16 - docs/CreateNetAccessPointResponse.md | 14 - docs/CreateNetPeeringRequest.md | 15 - docs/CreateNetPeeringResponse.md | 14 - docs/CreateNetRequest.md | 15 - docs/CreateNetResponse.md | 14 - docs/CreateNicRequest.md | 17 - docs/CreateNicResponse.md | 14 - docs/CreatePublicIpRequest.md | 13 - docs/CreatePublicIpResponse.md | 14 - docs/CreateRouteRequest.md | 20 - docs/CreateRouteResponse.md | 14 - docs/CreateRouteTableRequest.md | 14 - docs/CreateRouteTableResponse.md | 14 - docs/CreateSecurityGroupRequest.md | 16 - docs/CreateSecurityGroupResponse.md | 14 - docs/CreateSecurityGroupRuleRequest.md | 22 - docs/CreateSecurityGroupRuleResponse.md | 14 - docs/CreateServerCertificateRequest.md | 18 - docs/CreateServerCertificateResponse.md | 14 - docs/CreateSnapshotExportTaskRequest.md | 15 - docs/CreateSnapshotExportTaskResponse.md | 14 - docs/CreateSnapshotRequest.md | 19 - docs/CreateSnapshotResponse.md | 14 - docs/CreateSubnetRequest.md | 16 - docs/CreateSubnetResponse.md | 14 - docs/CreateTagsRequest.md | 15 - docs/CreateTagsResponse.md | 13 - docs/CreateVirtualGatewayRequest.md | 14 - docs/CreateVirtualGatewayResponse.md | 14 - docs/CreateVmGroupRequest.md | 31 - docs/CreateVmGroupResponse.md | 14 - docs/CreateVmTemplateRequest.md | 32 - docs/CreateVmTemplateResponse.md | 14 - docs/CreateVmsRequest.md | 43 - docs/CreateVmsResponse.md | 14 - docs/CreateVolumeRequest.md | 18 - docs/CreateVolumeResponse.md | 14 - docs/CreateVpnConnectionRequest.md | 17 - docs/CreateVpnConnectionResponse.md | 14 - docs/CreateVpnConnectionRouteRequest.md | 15 - docs/CreateVpnConnectionRouteResponse.md | 13 - docs/DeleteAccessKeyRequest.md | 15 - docs/DeleteAccessKeyResponse.md | 13 - docs/DeleteApiAccessRuleRequest.md | 14 - docs/DeleteApiAccessRuleResponse.md | 13 - docs/DeleteCaRequest.md | 14 - docs/DeleteCaResponse.md | 13 - docs/DeleteClientGatewayRequest.md | 14 - docs/DeleteClientGatewayResponse.md | 13 - docs/DeleteDhcpOptionsRequest.md | 14 - docs/DeleteDhcpOptionsResponse.md | 13 - docs/DeleteDirectLinkInterfaceRequest.md | 14 - docs/DeleteDirectLinkInterfaceResponse.md | 13 - docs/DeleteDirectLinkRequest.md | 14 - docs/DeleteDirectLinkResponse.md | 13 - docs/DeleteExportTaskRequest.md | 14 - docs/DeleteExportTaskResponse.md | 13 - docs/DeleteFlexibleGpuRequest.md | 14 - docs/DeleteFlexibleGpuResponse.md | 13 - docs/DeleteImageRequest.md | 14 - docs/DeleteImageResponse.md | 13 - docs/DeleteInternetServiceRequest.md | 14 - docs/DeleteInternetServiceResponse.md | 13 - docs/DeleteKeypairRequest.md | 14 - docs/DeleteKeypairResponse.md | 13 - docs/DeleteListenerRuleRequest.md | 14 - docs/DeleteListenerRuleResponse.md | 13 - docs/DeleteLoadBalancerListenersRequest.md | 15 - docs/DeleteLoadBalancerListenersResponse.md | 14 - docs/DeleteLoadBalancerPolicyRequest.md | 15 - docs/DeleteLoadBalancerPolicyResponse.md | 14 - docs/DeleteLoadBalancerRequest.md | 14 - docs/DeleteLoadBalancerResponse.md | 13 - docs/DeleteLoadBalancerTagsRequest.md | 15 - docs/DeleteLoadBalancerTagsResponse.md | 13 - docs/DeleteNatServiceRequest.md | 14 - docs/DeleteNatServiceResponse.md | 13 - docs/DeleteNetAccessPointRequest.md | 14 - docs/DeleteNetAccessPointResponse.md | 13 - docs/DeleteNetPeeringRequest.md | 14 - docs/DeleteNetPeeringResponse.md | 13 - docs/DeleteNetRequest.md | 14 - docs/DeleteNetResponse.md | 13 - docs/DeleteNicRequest.md | 14 - docs/DeleteNicResponse.md | 13 - docs/DeletePublicIpRequest.md | 15 - docs/DeletePublicIpResponse.md | 13 - docs/DeleteRouteRequest.md | 15 - docs/DeleteRouteResponse.md | 14 - docs/DeleteRouteTableRequest.md | 14 - docs/DeleteRouteTableResponse.md | 13 - docs/DeleteSecurityGroupRequest.md | 15 - docs/DeleteSecurityGroupResponse.md | 13 - docs/DeleteSecurityGroupRuleRequest.md | 22 - docs/DeleteSecurityGroupRuleResponse.md | 14 - docs/DeleteServerCertificateRequest.md | 14 - docs/DeleteServerCertificateResponse.md | 13 - docs/DeleteSnapshotRequest.md | 14 - docs/DeleteSnapshotResponse.md | 13 - docs/DeleteSubnetRequest.md | 14 - docs/DeleteSubnetResponse.md | 13 - docs/DeleteTagsRequest.md | 15 - docs/DeleteTagsResponse.md | 13 - docs/DeleteVirtualGatewayRequest.md | 14 - docs/DeleteVirtualGatewayResponse.md | 13 - docs/DeleteVmGroupRequest.md | 14 - docs/DeleteVmGroupResponse.md | 13 - docs/DeleteVmTemplateRequest.md | 14 - docs/DeleteVmTemplateResponse.md | 13 - docs/DeleteVmsRequest.md | 14 - docs/DeleteVmsResponse.md | 14 - docs/DeleteVolumeRequest.md | 14 - docs/DeleteVolumeResponse.md | 13 - docs/DeleteVpnConnectionRequest.md | 14 - docs/DeleteVpnConnectionResponse.md | 13 - docs/DeleteVpnConnectionRouteRequest.md | 15 - docs/DeleteVpnConnectionRouteResponse.md | 13 - docs/DeregisterVmsInLoadBalancerRequest.md | 15 - docs/DeregisterVmsInLoadBalancerResponse.md | 13 - docs/DhcpOptionApi.md | 218 -- docs/DhcpOptionsSet.md | 20 - docs/DirectLink.md | 20 - docs/DirectLinkApi.md | 218 -- docs/DirectLinkInterface.md | 20 - docs/DirectLinkInterfaceApi.md | 288 -- docs/DirectLinkInterfaces.md | 27 - docs/ErrorResponse.md | 14 - docs/Errors.md | 16 - docs/FiltersAccessKeys.md | 15 - docs/FiltersApiAccessRule.md | 18 - docs/FiltersApiLog.md | 22 - docs/FiltersCa.md | 16 - docs/FiltersCatalogs.md | 16 - docs/FiltersClientGateway.md | 21 - docs/FiltersDhcpOptions.md | 22 - docs/FiltersDirectLink.md | 14 - docs/FiltersDirectLinkInterface.md | 15 - docs/FiltersExportTask.md | 14 - docs/FiltersFlexibleGpu.md | 20 - docs/FiltersImage.md | 37 - docs/FiltersInternetService.md | 19 - docs/FiltersKeypair.md | 16 - docs/FiltersListenerRule.md | 14 - docs/FiltersLoadBalancer.md | 14 - docs/FiltersNatService.md | 21 - docs/FiltersNet.md | 21 - docs/FiltersNetAccessPoint.md | 20 - docs/FiltersNetPeering.md | 26 - docs/FiltersNic.md | 42 - docs/FiltersProductType.md | 14 - docs/FiltersPublicIp.md | 24 - docs/FiltersQuota.md | 17 - docs/FiltersRouteTable.md | 30 - docs/FiltersSecurityGroup.md | 34 - docs/FiltersServerCertificate.md | 14 - docs/FiltersService.md | 15 - docs/FiltersSnapshot.md | 28 - docs/FiltersSubnet.md | 22 - docs/FiltersSubregion.md | 16 - docs/FiltersTag.md | 17 - docs/FiltersVirtualGateway.md | 21 - docs/FiltersVm.md | 77 - docs/FiltersVmGroup.md | 23 - docs/FiltersVmTemplate.md | 25 - docs/FiltersVmType.md | 22 - docs/FiltersVmsState.md | 20 - docs/FiltersVolume.md | 28 - docs/FiltersVpnConnection.md | 24 - docs/FlexibleGpu.md | 20 - docs/FlexibleGpuApi.md | 491 --- docs/FlexibleGpuCatalog.md | 18 - docs/HealthCheck.md | 20 - docs/Image.md | 30 - docs/ImageApi.md | 440 --- docs/ImageExportTask.md | 20 - docs/InternetService.md | 17 - docs/InternetServiceApi.md | 373 -- docs/Keypair.md | 16 - docs/KeypairApi.md | 228 -- docs/KeypairCreated.md | 17 - docs/LinkFlexibleGpuRequest.md | 15 - docs/LinkFlexibleGpuResponse.md | 13 - docs/LinkInternetServiceRequest.md | 15 - docs/LinkInternetServiceResponse.md | 13 - .../LinkLoadBalancerBackendMachinesRequest.md | 16 - ...LinkLoadBalancerBackendMachinesResponse.md | 13 - docs/LinkNic.md | 19 - docs/LinkNicLight.md | 17 - docs/LinkNicRequest.md | 16 - docs/LinkNicResponse.md | 14 - docs/LinkNicToUpdate.md | 15 - docs/LinkPrivateIpsRequest.md | 17 - docs/LinkPrivateIpsResponse.md | 13 - docs/LinkPublicIp.md | 18 - docs/LinkPublicIpLightForVm.md | 16 - docs/LinkPublicIpRequest.md | 19 - docs/LinkPublicIpResponse.md | 14 - docs/LinkRouteTable.md | 18 - docs/LinkRouteTableRequest.md | 15 - docs/LinkRouteTableResponse.md | 14 - docs/LinkVirtualGatewayRequest.md | 15 - docs/LinkVirtualGatewayResponse.md | 14 - docs/LinkVolumeRequest.md | 16 - docs/LinkVolumeResponse.md | 13 - docs/LinkedVolume.md | 18 - docs/Listener.md | 19 - docs/ListenerApi.md | 428 --- docs/ListenerForCreation.md | 18 - docs/ListenerRule.md | 21 - docs/ListenerRuleForCreation.md | 18 - docs/LoadBalancer.md | 31 - docs/LoadBalancerApi.md | 848 ----- docs/LoadBalancerLight.md | 15 - docs/LoadBalancerPolicyApi.md | 148 - docs/LoadBalancerStickyCookiePolicy.md | 15 - docs/LoadBalancerTag.md | 16 - docs/Location.md | 15 - docs/LocationApi.md | 71 - docs/Log.md | 29 - docs/MaintenanceEvent.md | 17 - docs/NatService.md | 20 - docs/NatServiceApi.md | 227 -- docs/Net.md | 19 - docs/NetAccessPoint.md | 19 - docs/NetAccessPointApi.md | 351 -- docs/NetApi.md | 301 -- docs/NetPeering.md | 19 - docs/NetPeeringApi.md | 376 -- docs/NetPeeringState.md | 15 - docs/NetToVirtualGatewayLink.md | 15 - docs/Nic.md | 28 - docs/NicApi.md | 592 ---- docs/NicForVmCreation.md | 21 - docs/NicLight.md | 26 - docs/OsuApiKey.md | 15 - docs/OsuExportImageExportTask.md | 17 - docs/OsuExportSnapshotExportTask.md | 16 - docs/OsuExportToCreate.md | 18 - docs/PermissionsOnResource.md | 15 - docs/PermissionsOnResourceCreation.md | 15 - docs/Phase1Options.md | 22 - docs/Phase2Options.md | 18 - docs/Placement.md | 15 - docs/PrivateIp.md | 17 - docs/PrivateIpLight.md | 15 - docs/PrivateIpLightForVm.md | 17 - docs/ProductType.md | 16 - docs/ProductTypeApi.md | 141 - docs/PublicCatalogApi.md | 71 - docs/PublicIp.md | 21 - docs/PublicIpApi.md | 436 --- docs/PublicIpLight.md | 15 - docs/Quota.md | 20 - docs/QuotaApi.md | 78 - docs/QuotaTypes.md | 15 - docs/ReadAccessKeysRequest.md | 15 - docs/ReadAccessKeysResponse.md | 14 - docs/ReadAccountsRequest.md | 13 - docs/ReadAccountsResponse.md | 14 - docs/ReadAdminPasswordRequest.md | 14 - docs/ReadAdminPasswordResponse.md | 15 - docs/ReadApiAccessPolicyRequest.md | 13 - docs/ReadApiAccessPolicyResponse.md | 14 - docs/ReadApiAccessRulesRequest.md | 14 - docs/ReadApiAccessRulesResponse.md | 14 - docs/ReadApiLogsRequest.md | 17 - docs/ReadApiLogsResponse.md | 15 - docs/ReadCasRequest.md | 14 - docs/ReadCasResponse.md | 14 - docs/ReadCatalogRequest.md | 13 - docs/ReadCatalogResponse.md | 14 - docs/ReadCatalogsRequest.md | 14 - docs/ReadCatalogsResponse.md | 14 - docs/ReadClientGatewaysRequest.md | 16 - docs/ReadClientGatewaysResponse.md | 15 - docs/ReadConsoleOutputRequest.md | 14 - docs/ReadConsoleOutputResponse.md | 15 - docs/ReadConsumptionAccountRequest.md | 17 - docs/ReadConsumptionAccountResponse.md | 15 - docs/ReadDhcpOptionsRequest.md | 16 - docs/ReadDhcpOptionsResponse.md | 15 - docs/ReadDirectLinkInterfacesRequest.md | 16 - docs/ReadDirectLinkInterfacesResponse.md | 15 - docs/ReadDirectLinksRequest.md | 16 - docs/ReadDirectLinksResponse.md | 15 - docs/ReadFlexibleGpuCatalogRequest.md | 13 - docs/ReadFlexibleGpuCatalogResponse.md | 14 - docs/ReadFlexibleGpusRequest.md | 14 - docs/ReadFlexibleGpusResponse.md | 14 - docs/ReadImageExportTasksRequest.md | 16 - docs/ReadImageExportTasksResponse.md | 15 - docs/ReadImagesRequest.md | 16 - docs/ReadImagesResponse.md | 15 - docs/ReadInternetServicesRequest.md | 16 - docs/ReadInternetServicesResponse.md | 15 - docs/ReadKeypairsRequest.md | 16 - docs/ReadKeypairsResponse.md | 15 - docs/ReadListenerRulesRequest.md | 14 - docs/ReadListenerRulesResponse.md | 14 - docs/ReadLoadBalancerTagsRequest.md | 14 - docs/ReadLoadBalancerTagsResponse.md | 14 - docs/ReadLoadBalancersRequest.md | 14 - docs/ReadLoadBalancersResponse.md | 14 - docs/ReadLocationsRequest.md | 15 - docs/ReadLocationsResponse.md | 15 - docs/ReadNatServicesRequest.md | 16 - docs/ReadNatServicesResponse.md | 15 - docs/ReadNetAccessPointServicesRequest.md | 16 - docs/ReadNetAccessPointServicesResponse.md | 15 - docs/ReadNetAccessPointsRequest.md | 16 - docs/ReadNetAccessPointsResponse.md | 15 - docs/ReadNetPeeringsRequest.md | 16 - docs/ReadNetPeeringsResponse.md | 15 - docs/ReadNetsRequest.md | 16 - docs/ReadNetsResponse.md | 15 - docs/ReadNicsRequest.md | 14 - docs/ReadNicsResponse.md | 14 - docs/ReadProductTypesRequest.md | 16 - docs/ReadProductTypesResponse.md | 15 - docs/ReadPublicCatalogRequest.md | 13 - docs/ReadPublicCatalogResponse.md | 14 - docs/ReadPublicIpRangesRequest.md | 15 - docs/ReadPublicIpRangesResponse.md | 15 - docs/ReadPublicIpsRequest.md | 16 - docs/ReadPublicIpsResponse.md | 15 - docs/ReadQuotasRequest.md | 16 - docs/ReadQuotasResponse.md | 15 - docs/ReadRegionsRequest.md | 13 - docs/ReadRegionsResponse.md | 14 - docs/ReadRouteTablesRequest.md | 16 - docs/ReadRouteTablesResponse.md | 15 - docs/ReadSecretAccessKeyRequest.md | 14 - docs/ReadSecretAccessKeyResponse.md | 14 - docs/ReadSecurityGroupsRequest.md | 16 - docs/ReadSecurityGroupsResponse.md | 15 - docs/ReadServerCertificatesRequest.md | 14 - docs/ReadServerCertificatesResponse.md | 14 - docs/ReadSnapshotExportTasksRequest.md | 16 - docs/ReadSnapshotExportTasksResponse.md | 15 - docs/ReadSnapshotsRequest.md | 16 - docs/ReadSnapshotsResponse.md | 15 - docs/ReadSubnetsRequest.md | 16 - docs/ReadSubnetsResponse.md | 15 - docs/ReadSubregionsRequest.md | 16 - docs/ReadSubregionsResponse.md | 15 - docs/ReadTagsRequest.md | 16 - docs/ReadTagsResponse.md | 15 - docs/ReadVirtualGatewaysRequest.md | 16 - docs/ReadVirtualGatewaysResponse.md | 15 - docs/ReadVmGroupsRequest.md | 14 - docs/ReadVmGroupsResponse.md | 14 - docs/ReadVmTemplatesRequest.md | 14 - docs/ReadVmTemplatesResponse.md | 14 - docs/ReadVmTypesRequest.md | 16 - docs/ReadVmTypesResponse.md | 15 - docs/ReadVmsHealthRequest.md | 15 - docs/ReadVmsHealthResponse.md | 14 - docs/ReadVmsRequest.md | 16 - docs/ReadVmsResponse.md | 15 - docs/ReadVmsStateRequest.md | 17 - docs/ReadVmsStateResponse.md | 15 - docs/ReadVolumesRequest.md | 16 - docs/ReadVolumesResponse.md | 15 - docs/ReadVpnConnectionsRequest.md | 16 - docs/ReadVpnConnectionsResponse.md | 15 - docs/RebootVmsRequest.md | 14 - docs/RebootVmsResponse.md | 13 - docs/Region.md | 15 - docs/RegionApi.md | 71 - docs/RegisterVmsInLoadBalancerRequest.md | 15 - docs/RegisterVmsInLoadBalancerResponse.md | 13 - docs/RejectNetPeeringRequest.md | 14 - docs/RejectNetPeeringResponse.md | 13 - docs/ResourceLoadBalancerTag.md | 14 - docs/ResourceTag.md | 15 - docs/ResponseContext.md | 14 - docs/Route.md | 24 - docs/RouteApi.md | 227 -- docs/RouteLight.md | 16 - docs/RoutePropagatingVirtualGateway.md | 14 - docs/RouteTable.md | 19 - docs/RouteTableApi.md | 446 --- docs/ScaleDownVmGroupRequest.md | 15 - docs/ScaleDownVmGroupResponse.md | 13 - docs/ScaleUpVmGroupRequest.md | 15 - docs/ScaleUpVmGroupResponse.md | 13 - docs/SecurityGroup.md | 21 - docs/SecurityGroupApi.md | 227 -- docs/SecurityGroupLight.md | 15 - docs/SecurityGroupRule.md | 19 - docs/SecurityGroupRuleApi.md | 154 - docs/SecurityGroupsMember.md | 16 - docs/ServerCertificate.md | 19 - docs/ServerCertificateApi.md | 288 -- docs/Service.md | 16 - docs/Snapshot.md | 24 - docs/SnapshotApi.md | 440 --- docs/SnapshotExportTask.md | 20 - docs/SourceNet.md | 16 - docs/SourceSecurityGroup.md | 15 - docs/StartVmsRequest.md | 14 - docs/StartVmsResponse.md | 14 - docs/StateComment.md | 15 - docs/StopVmsRequest.md | 15 - docs/StopVmsResponse.md | 14 - docs/Subnet.md | 21 - docs/SubnetApi.md | 301 -- docs/Subregion.md | 17 - docs/SubregionApi.md | 78 - docs/Tag.md | 17 - docs/TagApi.md | 227 -- docs/TaskApi.md | 78 - docs/UnlinkFlexibleGpuRequest.md | 14 - docs/UnlinkFlexibleGpuResponse.md | 13 - docs/UnlinkInternetServiceRequest.md | 15 - docs/UnlinkInternetServiceResponse.md | 13 - ...nlinkLoadBalancerBackendMachinesRequest.md | 16 - ...linkLoadBalancerBackendMachinesResponse.md | 13 - docs/UnlinkNicRequest.md | 14 - docs/UnlinkNicResponse.md | 13 - docs/UnlinkPrivateIpsRequest.md | 15 - docs/UnlinkPrivateIpsResponse.md | 13 - docs/UnlinkPublicIpRequest.md | 15 - docs/UnlinkPublicIpResponse.md | 13 - docs/UnlinkRouteTableRequest.md | 14 - docs/UnlinkRouteTableResponse.md | 13 - docs/UnlinkVirtualGatewayRequest.md | 15 - docs/UnlinkVirtualGatewayResponse.md | 13 - docs/UnlinkVolumeRequest.md | 15 - docs/UnlinkVolumeResponse.md | 13 - docs/UpdateAccessKeyRequest.md | 17 - docs/UpdateAccessKeyResponse.md | 14 - docs/UpdateAccountRequest.md | 26 - docs/UpdateAccountResponse.md | 14 - docs/UpdateApiAccessPolicyRequest.md | 15 - docs/UpdateApiAccessPolicyResponse.md | 14 - docs/UpdateApiAccessRuleRequest.md | 18 - docs/UpdateApiAccessRuleResponse.md | 14 - docs/UpdateCaRequest.md | 15 - docs/UpdateCaResponse.md | 14 - docs/UpdateDirectLinkInterfaceRequest.md | 23 - docs/UpdateDirectLinkInterfaceResponse.md | 14 - docs/UpdateFlexibleGpuRequest.md | 15 - docs/UpdateFlexibleGpuResponse.md | 14 - docs/UpdateImageRequest.md | 16 - docs/UpdateImageResponse.md | 14 - docs/UpdateListenerRuleRequest.md | 16 - docs/UpdateListenerRuleResponse.md | 14 - docs/UpdateLoadBalancerRequest.md | 22 - docs/UpdateLoadBalancerResponse.md | 14 - docs/UpdateNetAccessPointRequest.md | 16 - docs/UpdateNetAccessPointResponse.md | 14 - docs/UpdateNetRequest.md | 15 - docs/UpdateNetResponse.md | 14 - docs/UpdateNicRequest.md | 17 - docs/UpdateNicResponse.md | 14 - docs/UpdateRoutePropagationRequest.md | 16 - docs/UpdateRoutePropagationResponse.md | 14 - docs/UpdateRouteRequest.md | 20 - docs/UpdateRouteResponse.md | 14 - docs/UpdateServerCertificateRequest.md | 16 - docs/UpdateServerCertificateResponse.md | 14 - docs/UpdateSnapshotRequest.md | 15 - docs/UpdateSnapshotResponse.md | 14 - docs/UpdateSubnetRequest.md | 15 - docs/UpdateSubnetResponse.md | 14 - docs/UpdateVmGroupRequest.md | 18 - docs/UpdateVmGroupResponse.md | 14 - docs/UpdateVmRequest.md | 35 - docs/UpdateVmResponse.md | 14 - docs/UpdateVmTemplateRequest.md | 17 - docs/UpdateVmTemplateResponse.md | 14 - docs/UpdateVolumeRequest.md | 17 - docs/UpdateVolumeResponse.md | 14 - docs/UpdateVpnConnectionRequest.md | 17 - docs/UpdateVpnConnectionResponse.md | 14 - docs/VgwTelemetry.md | 18 - docs/VirtualGateway.md | 18 - docs/VirtualGatewayApi.md | 428 --- docs/Vm.md | 47 - docs/VmApi.md | 801 ----- docs/VmGroup.md | 48 - docs/VmGroupApi.md | 446 --- docs/VmState.md | 16 - docs/VmStates.md | 17 - docs/VmTemplate.md | 34 - docs/VmTemplateApi.md | 288 -- docs/VmType.md | 23 - docs/Volume.md | 23 - docs/VolumeApi.md | 446 --- docs/VpnConnection.md | 24 - docs/VpnConnectionApi.md | 431 --- docs/VpnOptions.md | 16 - docs/With.md | 29 - examples/config_env/pom.xml | 4 +- .../java/io/github/outscale/example/App.java | 21 +- examples/config_file/pom.xml | 4 +- .../java/io/github/outscale/example/App.java | 4 +- examples/password_auth/pom.xml | 4 +- .../java/io/github/outscale/example/App.java | 8 +- examples/region/pom.xml | 4 +- .../java/io/github/outscale/example/App.java | 4 +- examples/vm/pom.xml | 6 +- .../java/io/github/outscale/example/App.java | 2 +- examples/volumes/pom.xml | 4 +- .../java/io/github/outscale/example/App.java | 2 +- gen.yml | 7 - pom.xml | 831 ++--- src/main/AndroidManifest.xml | 3 - .../osc_sdk_java/client/ApiCallback.java | 59 - .../osc_sdk_java/client/ApiException.java | 186 - .../osc_sdk_java/client/ApiResponse.java | 73 - .../osc_sdk_java/client/Configuration.java | 38 - .../osc_sdk_java/client/ConfigurationEnv.java | 33 +- .../client/ConfigurationInitializer.java | 41 + .../client/GzipRequestInterceptor.java | 87 - .../outscale/osc_sdk_java/client/JSON.java | 2198 ------------ .../outscale/osc_sdk_java/client/Pair.java | 56 - .../outscale/osc_sdk_java/client/Profile.java | 97 +- .../client/ProgressRequestBody.java | 71 - .../client/ProgressResponseBody.java | 68 - .../osc_sdk_java/client/StringUtil.java | 81 - .../osc_sdk_java/client/api/AccessKeyApi.java | 756 ---- .../osc_sdk_java/client/api/AccountApi.java | 758 ---- .../client/api/ApiAccessPolicyApi.java | 367 -- .../client/api/ApiAccessRuleApi.java | 621 ---- .../osc_sdk_java/client/api/ApiLogApi.java | 200 -- .../osc_sdk_java/client/api/CaApi.java | 593 ---- .../osc_sdk_java/client/api/CatalogApi.java | 337 -- .../client/api/ClientGatewayApi.java | 482 --- .../client/api/DedicatedGroupApi.java | 669 ---- .../client/api/DhcpOptionApi.java | 481 --- .../client/api/DirectLinkApi.java | 481 --- .../client/api/DirectLinkInterfaceApi.java | 633 ---- .../client/api/FlexibleGpuApi.java | 1039 ------ .../osc_sdk_java/client/api/ImageApi.java | 928 ----- .../client/api/InternetServiceApi.java | 820 ----- .../osc_sdk_java/client/api/KeypairApi.java | 518 --- .../osc_sdk_java/client/api/ListenerApi.java | 911 ----- .../client/api/LoadBalancerApi.java | 1767 ---------- .../client/api/LoadBalancerPolicyApi.java | 349 -- .../osc_sdk_java/client/api/LocationApi.java | 203 -- .../client/api/NatServiceApi.java | 517 --- .../client/api/NetAccessPointApi.java | 766 ---- .../osc_sdk_java/client/api/NetApi.java | 645 ---- .../client/api/NetPeeringApi.java | 831 ----- .../osc_sdk_java/client/api/NicApi.java | 1230 ------- .../osc_sdk_java/client/api/PolicyApi.java | 2719 --------------- .../client/api/ProductTypeApi.java | 343 -- .../client/api/PublicCatalogApi.java | 204 -- .../osc_sdk_java/client/api/PublicIpApi.java | 953 ----- .../osc_sdk_java/client/api/QuotaApi.java | 197 -- .../osc_sdk_java/client/api/RegionApi.java | 200 -- .../osc_sdk_java/client/api/RouteApi.java | 506 --- .../client/api/RouteTableApi.java | 969 ------ .../client/api/SecurityGroupApi.java | 518 --- .../client/api/SecurityGroupRuleApi.java | 373 -- .../client/api/ServerCertificateApi.java | 632 ---- .../osc_sdk_java/client/api/SnapshotApi.java | 949 ----- .../osc_sdk_java/client/api/SubnetApi.java | 663 ---- .../osc_sdk_java/client/api/SubregionApi.java | 203 -- .../osc_sdk_java/client/api/TagApi.java | 497 --- .../osc_sdk_java/client/api/TaskApi.java | 204 -- .../osc_sdk_java/client/api/UserApi.java | 593 ---- .../osc_sdk_java/client/api/UserGroupApi.java | 1175 ------- .../client/api/VirtualGatewayApi.java | 901 ----- .../osc_sdk_java/client/api/VmApi.java | 1659 --------- .../osc_sdk_java/client/api/VmGroupApi.java | 965 ----- .../client/api/VmTemplateApi.java | 620 ---- .../osc_sdk_java/client/api/VolumeApi.java | 952 ----- .../client/api/VpnConnectionApi.java | 917 ----- .../osc_sdk_java/client/auth/AWS4Auth.java | 83 - .../osc_sdk_java/client/auth/ApiKeyAuth.java | 84 - .../client/auth/Authentication.java | 41 - .../client/auth/HttpBasicAuth.java | 65 - .../client/auth/HttpBearerAuth.java | 71 - .../client/model/AbstractOpenApiSchema.java | 146 - .../client/model/AcceptNetPeeringRequest.java | 237 -- .../model/AcceptNetPeeringResponse.java | 228 -- .../client/model/AccepterNet.java | 269 -- .../osc_sdk_java/client/model/AccessKey.java | 321 -- .../client/model/AccessKeySecretKey.java | 360 -- .../osc_sdk_java/client/model/AccessLog.java | 294 -- .../osc_sdk_java/client/model/Account.java | 729 ---- .../model/AddUserToUserGroupRequest.java | 345 -- .../model/AddUserToUserGroupResponse.java | 196 -- .../client/model/ApiAccessPolicy.java | 232 -- .../client/model/ApiAccessRule.java | 368 -- .../model/ApplicationStickyCookiePolicy.java | 241 -- .../client/model/BackendVmHealth.java | 309 -- .../model/BlockDeviceMappingCreated.java | 231 -- .../client/model/BlockDeviceMappingImage.java | 275 -- .../model/BlockDeviceMappingVmCreation.java | 315 -- .../model/BlockDeviceMappingVmUpdate.java | 311 -- .../osc_sdk_java/client/model/BsuCreated.java | 294 -- .../client/model/BsuToCreate.java | 328 -- .../client/model/BsuToUpdateVm.java | 228 -- .../osc_sdk_java/client/model/Ca.java | 269 -- .../osc_sdk_java/client/model/Catalog.java | 219 -- .../client/model/CatalogEntry.java | 445 --- .../osc_sdk_java/client/model/Catalogs.java | 359 -- .../model/CheckAuthenticationRequest.java | 273 -- .../model/CheckAuthenticationResponse.java | 196 -- .../client/model/ClientGateway.java | 393 --- .../client/model/ConsumptionEntry.java | 609 ---- .../client/model/CreateAccessKeyRequest.java | 259 -- .../client/model/CreateAccessKeyResponse.java | 228 -- .../client/model/CreateAccountRequest.java | 734 ---- .../client/model/CreateAccountResponse.java | 227 -- .../model/CreateApiAccessRuleRequest.java | 362 -- .../model/CreateApiAccessRuleResponse.java | 229 -- .../client/model/CreateCaRequest.java | 273 -- .../client/model/CreateCaResponse.java | 227 -- .../model/CreateClientGatewayRequest.java | 306 -- .../model/CreateClientGatewayResponse.java | 229 -- .../model/CreateDedicatedGroupRequest.java | 302 -- .../model/CreateDedicatedGroupResponse.java | 233 -- .../model/CreateDhcpOptionsRequest.java | 375 -- .../model/CreateDhcpOptionsResponse.java | 228 -- .../CreateDirectLinkInterfaceRequest.java | 278 -- .../CreateDirectLinkInterfaceResponse.java | 241 -- .../client/model/CreateDirectLinkRequest.java | 310 -- .../model/CreateDirectLinkResponse.java | 228 -- .../model/CreateFlexibleGpuRequest.java | 342 -- .../model/CreateFlexibleGpuResponse.java | 228 -- .../model/CreateImageExportTaskRequest.java | 272 -- .../model/CreateImageExportTaskResponse.java | 235 -- .../client/model/CreateImageRequest.java | 642 ---- .../client/model/CreateImageResponse.java | 227 -- .../model/CreateInternetServiceRequest.java | 195 -- .../model/CreateInternetServiceResponse.java | 235 -- .../client/model/CreateKeypairRequest.java | 274 -- .../client/model/CreateKeypairResponse.java | 227 -- .../model/CreateListenerRuleRequest.java | 311 -- .../model/CreateListenerRuleResponse.java | 228 -- .../CreateLoadBalancerListenersRequest.java | 297 -- .../CreateLoadBalancerListenersResponse.java | 237 -- .../CreateLoadBalancerPolicyRequest.java | 394 --- .../CreateLoadBalancerPolicyResponse.java | 234 -- .../model/CreateLoadBalancerRequest.java | 566 --- .../model/CreateLoadBalancerResponse.java | 228 -- .../model/CreateLoadBalancerTagsRequest.java | 307 -- .../model/CreateLoadBalancerTagsResponse.java | 201 -- .../client/model/CreateNatServiceRequest.java | 310 -- .../model/CreateNatServiceResponse.java | 228 -- .../model/CreateNetAccessPointRequest.java | 319 -- .../model/CreateNetAccessPointResponse.java | 233 -- .../client/model/CreateNetPeeringRequest.java | 273 -- .../model/CreateNetPeeringResponse.java | 228 -- .../client/model/CreateNetRequest.java | 275 -- .../client/model/CreateNetResponse.java | 227 -- .../client/model/CreateNicRequest.java | 377 -- .../client/model/CreateNicResponse.java | 227 -- .../client/model/CreatePolicyRequest.java | 347 -- .../client/model/CreatePolicyResponse.java | 227 -- .../model/CreatePolicyVersionRequest.java | 278 -- .../model/CreatePolicyVersionResponse.java | 229 -- .../model/CreateProductTypeRequest.java | 273 -- .../model/CreateProductTypeResponse.java | 228 -- .../client/model/CreatePublicIpRequest.java | 190 - .../client/model/CreatePublicIpResponse.java | 227 -- .../client/model/CreateRouteRequest.java | 463 --- .../client/model/CreateRouteResponse.java | 227 -- .../client/model/CreateRouteTableRequest.java | 237 -- .../model/CreateRouteTableResponse.java | 228 -- .../model/CreateSecurityGroupRequest.java | 317 -- .../model/CreateSecurityGroupResponse.java | 228 -- .../model/CreateSecurityGroupRuleRequest.java | 577 --- .../CreateSecurityGroupRuleResponse.java | 234 -- .../model/CreateServerCertificateRequest.java | 393 --- .../CreateServerCertificateResponse.java | 237 -- .../CreateSnapshotExportTaskRequest.java | 273 -- .../CreateSnapshotExportTaskResponse.java | 240 -- .../client/model/CreateSnapshotRequest.java | 415 --- .../client/model/CreateSnapshotResponse.java | 227 -- .../client/model/CreateSubnetRequest.java | 313 -- .../client/model/CreateSubnetResponse.java | 227 -- .../client/model/CreateTagsRequest.java | 298 -- .../client/model/CreateTagsResponse.java | 195 -- .../client/model/CreateUserGroupRequest.java | 272 -- .../client/model/CreateUserGroupResponse.java | 228 -- .../client/model/CreateUserRequest.java | 276 -- .../client/model/CreateUserResponse.java | 227 -- .../model/CreateVirtualGatewayRequest.java | 237 -- .../model/CreateVirtualGatewayResponse.java | 232 -- .../client/model/CreateVmGroupRequest.java | 586 ---- .../client/model/CreateVmGroupResponse.java | 227 -- .../client/model/CreateVmTemplateRequest.java | 595 ---- .../model/CreateVmTemplateResponse.java | 228 -- .../client/model/CreateVmsRequest.java | 1043 ------ .../client/model/CreateVmsResponse.java | 253 -- .../client/model/CreateVolumeRequest.java | 371 -- .../client/model/CreateVolumeResponse.java | 227 -- .../model/CreateVpnConnectionRequest.java | 343 -- .../model/CreateVpnConnectionResponse.java | 228 -- .../CreateVpnConnectionRouteRequest.java | 282 -- .../CreateVpnConnectionRouteResponse.java | 202 -- .../client/model/DedicatedGroup.java | 425 --- .../client/model/DeleteAccessKeyRequest.java | 273 -- .../client/model/DeleteAccessKeyResponse.java | 196 -- .../model/DeleteApiAccessRuleRequest.java | 237 -- .../model/DeleteApiAccessRuleResponse.java | 196 -- .../client/model/DeleteCaRequest.java | 236 -- .../client/model/DeleteCaResponse.java | 195 -- .../model/DeleteClientGatewayRequest.java | 237 -- .../model/DeleteClientGatewayResponse.java | 196 -- .../model/DeleteDedicatedGroupRequest.java | 265 -- .../model/DeleteDedicatedGroupResponse.java | 200 -- .../model/DeleteDhcpOptionsRequest.java | 237 -- .../model/DeleteDhcpOptionsResponse.java | 196 -- .../DeleteDirectLinkInterfaceRequest.java | 246 -- .../DeleteDirectLinkInterfaceResponse.java | 203 -- .../client/model/DeleteDirectLinkRequest.java | 237 -- .../model/DeleteDirectLinkResponse.java | 196 -- .../client/model/DeleteExportTaskRequest.java | 237 -- .../model/DeleteExportTaskResponse.java | 196 -- .../model/DeleteFlexibleGpuRequest.java | 237 -- .../model/DeleteFlexibleGpuResponse.java | 196 -- .../client/model/DeleteImageRequest.java | 236 -- .../client/model/DeleteImageResponse.java | 195 -- .../model/DeleteInternetServiceRequest.java | 244 -- .../model/DeleteInternetServiceResponse.java | 201 -- .../client/model/DeleteKeypairRequest.java | 236 -- .../client/model/DeleteKeypairResponse.java | 195 -- .../model/DeleteListenerRuleRequest.java | 238 -- .../model/DeleteListenerRuleResponse.java | 196 -- .../DeleteLoadBalancerListenersRequest.java | 298 -- .../DeleteLoadBalancerListenersResponse.java | 237 -- .../DeleteLoadBalancerPolicyRequest.java | 279 -- .../DeleteLoadBalancerPolicyResponse.java | 234 -- .../model/DeleteLoadBalancerRequest.java | 238 -- .../model/DeleteLoadBalancerResponse.java | 196 -- .../model/DeleteLoadBalancerTagsRequest.java | 307 -- .../model/DeleteLoadBalancerTagsResponse.java | 201 -- .../client/model/DeleteNatServiceRequest.java | 237 -- .../model/DeleteNatServiceResponse.java | 196 -- .../model/DeleteNetAccessPointRequest.java | 238 -- .../model/DeleteNetAccessPointResponse.java | 200 -- .../client/model/DeleteNetPeeringRequest.java | 237 -- .../model/DeleteNetPeeringResponse.java | 196 -- .../client/model/DeleteNetRequest.java | 236 -- .../client/model/DeleteNetResponse.java | 195 -- .../client/model/DeleteNicRequest.java | 236 -- .../client/model/DeleteNicResponse.java | 195 -- .../client/model/DeletePolicyRequest.java | 237 -- .../client/model/DeletePolicyResponse.java | 195 -- .../model/DeletePolicyVersionRequest.java | 246 -- .../model/DeletePolicyVersionResponse.java | 196 -- .../client/model/DeletePublicIpRequest.java | 263 -- .../client/model/DeletePublicIpResponse.java | 195 -- .../client/model/DeleteRouteRequest.java | 274 -- .../client/model/DeleteRouteResponse.java | 227 -- .../client/model/DeleteRouteTableRequest.java | 237 -- .../model/DeleteRouteTableResponse.java | 196 -- .../model/DeleteSecurityGroupRequest.java | 267 -- .../model/DeleteSecurityGroupResponse.java | 196 -- .../model/DeleteSecurityGroupRuleRequest.java | 567 --- .../DeleteSecurityGroupRuleResponse.java | 234 -- .../model/DeleteServerCertificateRequest.java | 242 -- .../DeleteServerCertificateResponse.java | 202 -- .../client/model/DeleteSnapshotRequest.java | 236 -- .../client/model/DeleteSnapshotResponse.java | 195 -- .../client/model/DeleteSubnetRequest.java | 236 -- .../client/model/DeleteSubnetResponse.java | 195 -- .../client/model/DeleteTagsRequest.java | 299 -- .../client/model/DeleteTagsResponse.java | 195 -- .../model/DeleteUserGroupPolicyRequest.java | 313 -- .../model/DeleteUserGroupPolicyResponse.java | 201 -- .../client/model/DeleteUserGroupRequest.java | 300 -- .../client/model/DeleteUserGroupResponse.java | 196 -- .../client/model/DeleteUserRequest.java | 236 -- .../client/model/DeleteUserResponse.java | 195 -- .../model/DeleteVirtualGatewayRequest.java | 238 -- .../model/DeleteVirtualGatewayResponse.java | 200 -- .../client/model/DeleteVmGroupRequest.java | 236 -- .../client/model/DeleteVmGroupResponse.java | 195 -- .../client/model/DeleteVmTemplateRequest.java | 237 -- .../model/DeleteVmTemplateResponse.java | 196 -- .../client/model/DeleteVmsRequest.java | 248 -- .../client/model/DeleteVmsResponse.java | 253 -- .../client/model/DeleteVolumeRequest.java | 236 -- .../client/model/DeleteVolumeResponse.java | 195 -- .../model/DeleteVpnConnectionRequest.java | 237 -- .../model/DeleteVpnConnectionResponse.java | 196 -- .../DeleteVpnConnectionRouteRequest.java | 283 -- .../DeleteVpnConnectionRouteResponse.java | 202 -- .../DeregisterVmsInLoadBalancerRequest.java | 293 -- .../DeregisterVmsInLoadBalancerResponse.java | 205 -- .../client/model/DhcpOptionsSet.java | 462 --- .../osc_sdk_java/client/model/DirectLink.java | 419 --- .../client/model/DirectLinkInterface.java | 427 --- .../client/model/DirectLinkInterfaces.java | 673 ---- .../client/model/ErrorResponse.java | 252 -- .../osc_sdk_java/client/model/Errors.java | 270 -- .../client/model/FiltersAccessKeys.java | 252 -- .../client/model/FiltersApiAccessRule.java | 385 -- .../client/model/FiltersApiLog.java | 548 --- .../osc_sdk_java/client/model/FiltersCa.java | 295 -- .../client/model/FiltersCatalogs.java | 253 -- .../client/model/FiltersClientGateway.java | 529 --- .../client/model/FiltersDedicatedGroup.java | 343 -- .../client/model/FiltersDhcpOptions.java | 562 --- .../client/model/FiltersDirectLink.java | 208 -- .../model/FiltersDirectLinkInterface.java | 259 -- .../client/model/FiltersExportTask.java | 208 -- .../client/model/FiltersFlexibleGpu.java | 467 --- .../client/model/FiltersImage.java | 1269 ------- .../client/model/FiltersInternetService.java | 434 --- .../client/model/FiltersKeypair.java | 300 -- .../client/model/FiltersListenerRule.java | 211 -- .../client/model/FiltersLoadBalancer.java | 211 -- .../client/model/FiltersNatService.java | 520 --- .../osc_sdk_java/client/model/FiltersNet.java | 505 --- .../client/model/FiltersNetAccessPoint.java | 480 --- .../client/model/FiltersNetPeering.java | 771 ---- .../osc_sdk_java/client/model/FiltersNic.java | 1483 -------- .../client/model/FiltersProductType.java | 208 -- .../client/model/FiltersPublicIp.java | 662 ---- .../client/model/FiltersQuota.java | 342 -- .../client/model/FiltersRouteTable.java | 950 ----- .../client/model/FiltersSecurityGroup.java | 1203 ------- .../model/FiltersServerCertificate.java | 209 -- .../client/model/FiltersService.java | 251 -- .../client/model/FiltersSnapshot.java | 812 ----- .../client/model/FiltersSubnet.java | 573 --- .../client/model/FiltersSubregion.java | 296 -- .../osc_sdk_java/client/model/FiltersTag.java | 348 -- .../client/model/FiltersUserGroup.java | 244 -- .../client/model/FiltersVirtualGateway.java | 533 --- .../osc_sdk_java/client/model/FiltersVm.java | 3100 ----------------- .../client/model/FiltersVmGroup.java | 615 ---- .../client/model/FiltersVmTemplate.java | 708 ---- .../client/model/FiltersVmType.java | 555 --- .../client/model/FiltersVmsState.java | 505 --- .../client/model/FiltersVolume.java | 843 ----- .../client/model/FiltersVpnConnection.java | 662 ---- .../client/model/FlexibleGpu.java | 416 --- .../client/model/FlexibleGpuCatalog.java | 328 -- .../client/model/HealthCheck.java | 396 --- .../osc_sdk_java/client/model/Image.java | 832 ----- .../client/model/ImageExportTask.java | 425 --- .../client/model/InlinePolicy.java | 236 -- .../client/model/InternetService.java | 332 -- .../osc_sdk_java/client/model/Keypair.java | 274 -- .../client/model/KeypairCreated.java | 312 -- .../client/model/LinkFlexibleGpuRequest.java | 272 -- .../client/model/LinkFlexibleGpuResponse.java | 196 -- .../model/LinkInternetServiceRequest.java | 276 -- .../model/LinkInternetServiceResponse.java | 196 -- ...inkLoadBalancerBackendMachinesRequest.java | 340 -- ...nkLoadBalancerBackendMachinesResponse.java | 209 -- .../LinkManagedPolicyToUserGroupRequest.java | 283 -- .../LinkManagedPolicyToUserGroupResponse.java | 206 -- .../osc_sdk_java/client/model/LinkNic.java | 365 -- .../client/model/LinkNicLight.java | 293 -- .../client/model/LinkNicRequest.java | 301 -- .../client/model/LinkNicResponse.java | 231 -- .../client/model/LinkNicToUpdate.java | 232 -- .../client/model/LinkPolicyRequest.java | 273 -- .../client/model/LinkPolicyResponse.java | 195 -- .../client/model/LinkPrivateIpsRequest.java | 345 -- .../client/model/LinkPrivateIpsResponse.java | 195 -- .../client/model/LinkPublicIp.java | 345 -- .../client/model/LinkPublicIpLightForVm.java | 273 -- .../client/model/LinkPublicIpRequest.java | 409 --- .../client/model/LinkPublicIpResponse.java | 231 -- .../client/model/LinkRouteTable.java | 334 -- .../client/model/LinkRouteTableRequest.java | 272 -- .../client/model/LinkRouteTableResponse.java | 232 -- .../model/LinkVirtualGatewayRequest.java | 274 -- .../model/LinkVirtualGatewayResponse.java | 236 -- .../client/model/LinkVolumeRequest.java | 312 -- .../client/model/LinkVolumeResponse.java | 195 -- .../client/model/LinkedPolicy.java | 329 -- .../client/model/LinkedVolume.java | 337 -- .../osc_sdk_java/client/model/Listener.java | 389 --- .../client/model/ListenerForCreation.java | 356 -- .../client/model/ListenerRule.java | 449 --- .../client/model/ListenerRuleForCreation.java | 351 -- .../client/model/LoadBalancer.java | 957 ----- .../client/model/LoadBalancerLight.java | 238 -- .../model/LoadBalancerStickyCookiePolicy.java | 237 -- .../client/model/LoadBalancerTag.java | 271 -- .../osc_sdk_java/client/model/Location.java | 233 -- .../osc_sdk_java/client/model/Log.java | 708 ---- .../client/model/MaintenanceEvent.java | 291 -- .../osc_sdk_java/client/model/NatService.java | 455 --- .../osc_sdk_java/client/model/Net.java | 402 --- .../client/model/NetAccessPoint.java | 409 --- .../osc_sdk_java/client/model/NetPeering.java | 398 --- .../client/model/NetPeeringState.java | 235 -- .../client/model/NetToVirtualGatewayLink.java | 236 -- .../osc_sdk_java/client/model/Nic.java | 764 ---- .../client/model/NicForVmCreation.java | 477 --- .../osc_sdk_java/client/model/NicLight.java | 672 ---- .../osc_sdk_java/client/model/OsuApiKey.java | 233 -- .../model/OsuExportImageExportTask.java | 317 -- .../model/OsuExportSnapshotExportTask.java | 281 -- .../client/model/OsuExportToCreate.java | 348 -- .../client/model/PermissionsOnResource.java | 239 -- .../model/PermissionsOnResourceCreation.java | 235 -- .../client/model/Phase1Options.java | 526 --- .../client/model/Phase2Options.java | 381 -- .../osc_sdk_java/client/model/Placement.java | 234 -- .../osc_sdk_java/client/model/Policy.java | 506 --- .../client/model/PolicyVersion.java | 293 -- .../osc_sdk_java/client/model/PrivateIp.java | 293 -- .../client/model/PrivateIpLight.java | 225 -- .../client/model/PrivateIpLightForVm.java | 294 -- .../client/model/ProductType.java | 269 -- .../osc_sdk_java/client/model/PublicIp.java | 473 --- .../client/model/PublicIpLight.java | 233 -- .../model/PutUserGroupPolicyRequest.java | 348 -- .../model/PutUserGroupPolicyResponse.java | 196 -- .../osc_sdk_java/client/model/Quota.java | 405 --- .../osc_sdk_java/client/model/QuotaTypes.java | 255 -- .../client/model/ReadAccessKeysRequest.java | 259 -- .../client/model/ReadAccessKeysResponse.java | 253 -- .../client/model/ReadAccountsRequest.java | 190 - .../client/model/ReadAccountsResponse.java | 253 -- .../model/ReadAdminPasswordRequest.java | 237 -- .../model/ReadAdminPasswordResponse.java | 268 -- .../model/ReadApiAccessPolicyRequest.java | 191 - .../model/ReadApiAccessPolicyResponse.java | 230 -- .../model/ReadApiAccessRulesRequest.java | 223 -- .../model/ReadApiAccessRulesResponse.java | 255 -- .../client/model/ReadApiLogsRequest.java | 319 -- .../client/model/ReadApiLogsResponse.java | 289 -- .../client/model/ReadCasRequest.java | 221 -- .../client/model/ReadCasResponse.java | 253 -- .../client/model/ReadCatalogRequest.java | 190 - .../client/model/ReadCatalogResponse.java | 227 -- .../client/model/ReadCatalogsRequest.java | 222 -- .../client/model/ReadCatalogsResponse.java | 253 -- .../model/ReadClientGatewaysRequest.java | 281 -- .../model/ReadClientGatewaysResponse.java | 284 -- .../model/ReadConsoleOutputRequest.java | 237 -- .../model/ReadConsoleOutputResponse.java | 269 -- .../model/ReadConsumptionAccountRequest.java | 332 -- .../model/ReadConsumptionAccountResponse.java | 322 -- .../model/ReadDedicatedGroupsRequest.java | 281 -- .../model/ReadDedicatedGroupsResponse.java | 286 -- .../client/model/ReadDhcpOptionsRequest.java | 280 -- .../client/model/ReadDhcpOptionsResponse.java | 285 -- .../ReadDirectLinkInterfacesRequest.java | 287 -- .../ReadDirectLinkInterfacesResponse.java | 298 -- .../client/model/ReadDirectLinksRequest.java | 280 -- .../client/model/ReadDirectLinksResponse.java | 283 -- .../model/ReadFlexibleGpuCatalogRequest.java | 196 -- .../model/ReadFlexibleGpuCatalogResponse.java | 267 -- .../client/model/ReadFlexibleGpusRequest.java | 223 -- .../model/ReadFlexibleGpusResponse.java | 254 -- .../model/ReadImageExportTasksRequest.java | 281 -- .../model/ReadImageExportTasksResponse.java | 291 -- .../client/model/ReadImagesRequest.java | 280 -- .../client/model/ReadImagesResponse.java | 282 -- .../model/ReadInternetServicesRequest.java | 281 -- .../model/ReadInternetServicesResponse.java | 291 -- .../client/model/ReadKeypairsRequest.java | 280 -- .../client/model/ReadKeypairsResponse.java | 282 -- .../model/ReadLinkedPoliciesFilters.java | 199 -- .../model/ReadLinkedPoliciesRequest.java | 326 -- .../model/ReadLinkedPoliciesResponse.java | 343 -- .../model/ReadListenerRulesRequest.java | 223 -- .../model/ReadListenerRulesResponse.java | 255 -- .../model/ReadLoadBalancerTagsRequest.java | 252 -- .../model/ReadLoadBalancerTagsResponse.java | 258 -- .../model/ReadLoadBalancersRequest.java | 223 -- .../model/ReadLoadBalancersResponse.java | 255 -- .../client/model/ReadLocationsRequest.java | 248 -- .../client/model/ReadLocationsResponse.java | 282 -- ...nagedPoliciesLinkedToUserGroupRequest.java | 345 -- ...agedPoliciesLinkedToUserGroupResponse.java | 367 -- .../client/model/ReadNatServicesRequest.java | 280 -- .../client/model/ReadNatServicesResponse.java | 283 -- .../ReadNetAccessPointServicesRequest.java | 289 -- .../ReadNetAccessPointServicesResponse.java | 291 -- .../model/ReadNetAccessPointsRequest.java | 281 -- .../model/ReadNetAccessPointsResponse.java | 286 -- .../client/model/ReadNetPeeringsRequest.java | 280 -- .../client/model/ReadNetPeeringsResponse.java | 283 -- .../client/model/ReadNetsRequest.java | 280 -- .../client/model/ReadNetsResponse.java | 282 -- .../client/model/ReadNicsRequest.java | 222 -- .../client/model/ReadNicsResponse.java | 253 -- .../client/model/ReadPoliciesFilters.java | 310 -- .../client/model/ReadPoliciesRequest.java | 279 -- .../client/model/ReadPoliciesResponse.java | 342 -- .../client/model/ReadPolicyRequest.java | 209 -- .../client/model/ReadPolicyResponse.java | 227 -- .../model/ReadPolicyVersionRequest.java | 246 -- .../model/ReadPolicyVersionResponse.java | 228 -- .../model/ReadPolicyVersionsRequest.java | 267 -- .../model/ReadPolicyVersionsResponse.java | 312 -- .../client/model/ReadProductTypesRequest.java | 281 -- .../model/ReadProductTypesResponse.java | 283 -- .../model/ReadPublicCatalogRequest.java | 191 - .../model/ReadPublicCatalogResponse.java | 228 -- .../model/ReadPublicIpRangesRequest.java | 249 -- .../model/ReadPublicIpRangesResponse.java | 271 -- .../client/model/ReadPublicIpsRequest.java | 280 -- .../client/model/ReadPublicIpsResponse.java | 282 -- .../client/model/ReadQuotasRequest.java | 280 -- .../client/model/ReadQuotasResponse.java | 282 -- .../client/model/ReadRegionsRequest.java | 190 - .../client/model/ReadRegionsResponse.java | 253 -- .../client/model/ReadRouteTablesRequest.java | 280 -- .../client/model/ReadRouteTablesResponse.java | 283 -- .../model/ReadSecretAccessKeyRequest.java | 237 -- .../model/ReadSecretAccessKeyResponse.java | 229 -- .../model/ReadSecurityGroupsRequest.java | 281 -- .../model/ReadSecurityGroupsResponse.java | 284 -- .../model/ReadServerCertificatesRequest.java | 228 -- .../model/ReadServerCertificatesResponse.java | 266 -- .../model/ReadSnapshotExportTasksRequest.java | 287 -- .../ReadSnapshotExportTasksResponse.java | 297 -- .../client/model/ReadSnapshotsRequest.java | 280 -- .../client/model/ReadSnapshotsResponse.java | 282 -- .../client/model/ReadSubnetsRequest.java | 280 -- .../client/model/ReadSubnetsResponse.java | 282 -- .../client/model/ReadSubregionsRequest.java | 280 -- .../client/model/ReadSubregionsResponse.java | 282 -- .../client/model/ReadTagsRequest.java | 280 -- .../client/model/ReadTagsResponse.java | 282 -- .../model/ReadUserGroupPoliciesRequest.java | 334 -- .../model/ReadUserGroupPoliciesResponse.java | 350 -- .../model/ReadUserGroupPolicyRequest.java | 309 -- .../model/ReadUserGroupPolicyResponse.java | 229 -- .../client/model/ReadUserGroupRequest.java | 272 -- .../client/model/ReadUserGroupResponse.java | 285 -- .../model/ReadUserGroupsPerUserRequest.java | 277 -- .../model/ReadUserGroupsPerUserResponse.java | 259 -- .../client/model/ReadUserGroupsRequest.java | 279 -- .../client/model/ReadUserGroupsResponse.java | 342 -- .../client/model/ReadUsersRequest.java | 190 - .../client/model/ReadUsersResponse.java | 253 -- .../model/ReadVirtualGatewaysRequest.java | 281 -- .../model/ReadVirtualGatewaysResponse.java | 286 -- .../client/model/ReadVmGroupsRequest.java | 222 -- .../client/model/ReadVmGroupsResponse.java | 253 -- .../client/model/ReadVmTemplatesRequest.java | 222 -- .../client/model/ReadVmTemplatesResponse.java | 254 -- .../client/model/ReadVmTypesRequest.java | 280 -- .../client/model/ReadVmTypesResponse.java | 282 -- .../client/model/ReadVmsHealthRequest.java | 282 -- .../client/model/ReadVmsHealthResponse.java | 255 -- .../client/model/ReadVmsRequest.java | 279 -- .../client/model/ReadVmsResponse.java | 282 -- .../client/model/ReadVmsStateRequest.java | 310 -- .../client/model/ReadVmsStateResponse.java | 282 -- .../client/model/ReadVolumesRequest.java | 280 -- .../client/model/ReadVolumesResponse.java | 282 -- .../model/ReadVpnConnectionsRequest.java | 281 -- .../model/ReadVpnConnectionsResponse.java | 284 -- .../client/model/RebootVmsRequest.java | 248 -- .../client/model/RebootVmsResponse.java | 195 -- .../osc_sdk_java/client/model/Region.java | 233 -- .../RegisterVmsInLoadBalancerRequest.java | 292 -- .../RegisterVmsInLoadBalancerResponse.java | 203 -- .../client/model/RejectNetPeeringRequest.java | 237 -- .../model/RejectNetPeeringResponse.java | 196 -- .../model/RemoveUserFromUserGroupRequest.java | 350 -- .../RemoveUserFromUserGroupResponse.java | 202 -- .../client/model/ResourceLoadBalancerTag.java | 209 -- .../client/model/ResourceTag.java | 243 -- .../client/model/ResponseContext.java | 198 -- .../osc_sdk_java/client/model/Route.java | 576 --- .../osc_sdk_java/client/model/RouteLight.java | 274 -- .../model/RoutePropagatingVirtualGateway.java | 206 -- .../osc_sdk_java/client/model/RouteTable.java | 475 --- .../client/model/ScaleDownVmGroupRequest.java | 266 -- .../model/ScaleDownVmGroupResponse.java | 196 -- .../client/model/ScaleUpVmGroupRequest.java | 265 -- .../client/model/ScaleUpVmGroupResponse.java | 195 -- .../client/model/SecurityGroup.java | 522 --- .../client/model/SecurityGroupLight.java | 237 -- .../client/model/SecurityGroupRule.java | 420 --- .../client/model/SecurityGroupsMember.java | 275 -- .../client/model/ServerCertificate.java | 365 -- .../osc_sdk_java/client/model/Service.java | 279 -- .../model/SetDefaultPolicyVersionRequest.java | 251 -- .../SetDefaultPolicyVersionResponse.java | 202 -- .../osc_sdk_java/client/model/Snapshot.java | 570 --- .../client/model/SnapshotExportTask.java | 425 --- .../osc_sdk_java/client/model/SourceNet.java | 269 -- .../client/model/SourceSecurityGroup.java | 246 -- .../client/model/StartVmsRequest.java | 248 -- .../client/model/StartVmsResponse.java | 253 -- .../client/model/StateComment.java | 233 -- .../client/model/StopVmsRequest.java | 275 -- .../client/model/StopVmsResponse.java | 253 -- .../osc_sdk_java/client/model/Subnet.java | 469 --- .../osc_sdk_java/client/model/Subregion.java | 305 -- .../osc_sdk_java/client/model/Tag.java | 305 -- .../model/UnlinkFlexibleGpuRequest.java | 237 -- .../model/UnlinkFlexibleGpuResponse.java | 196 -- .../model/UnlinkInternetServiceRequest.java | 280 -- .../model/UnlinkInternetServiceResponse.java | 201 -- ...inkLoadBalancerBackendMachinesRequest.java | 342 -- ...nkLoadBalancerBackendMachinesResponse.java | 209 -- ...linkManagedPolicyFromUserGroupRequest.java | 286 -- ...inkManagedPolicyFromUserGroupResponse.java | 209 -- .../client/model/UnlinkNicRequest.java | 236 -- .../client/model/UnlinkNicResponse.java | 195 -- .../client/model/UnlinkPolicyRequest.java | 273 -- .../client/model/UnlinkPolicyResponse.java | 195 -- .../client/model/UnlinkPrivateIpsRequest.java | 285 -- .../model/UnlinkPrivateIpsResponse.java | 196 -- .../client/model/UnlinkPublicIpRequest.java | 264 -- .../client/model/UnlinkPublicIpResponse.java | 195 -- .../client/model/UnlinkRouteTableRequest.java | 237 -- .../model/UnlinkRouteTableResponse.java | 196 -- .../model/UnlinkVirtualGatewayRequest.java | 274 -- .../model/UnlinkVirtualGatewayResponse.java | 200 -- .../client/model/UnlinkVolumeRequest.java | 265 -- .../client/model/UnlinkVolumeResponse.java | 195 -- .../client/model/UpdateAccessKeyRequest.java | 343 -- .../client/model/UpdateAccessKeyResponse.java | 228 -- .../client/model/UpdateAccountRequest.java | 687 ---- .../client/model/UpdateAccountResponse.java | 227 -- .../model/UpdateApiAccessPolicyRequest.java | 281 -- .../model/UpdateApiAccessPolicyResponse.java | 235 -- .../model/UpdateApiAccessRuleRequest.java | 407 --- .../model/UpdateApiAccessRuleResponse.java | 229 -- .../client/model/UpdateCaRequest.java | 272 -- .../client/model/UpdateCaResponse.java | 227 -- .../model/UpdateDedicatedGroupRequest.java | 273 -- .../model/UpdateDedicatedGroupResponse.java | 233 -- .../UpdateDirectLinkInterfaceRequest.java | 324 -- .../UpdateDirectLinkInterfaceResponse.java | 241 -- .../model/UpdateFlexibleGpuRequest.java | 267 -- .../model/UpdateFlexibleGpuResponse.java | 228 -- .../client/model/UpdateImageRequest.java | 309 -- .../client/model/UpdateImageResponse.java | 227 -- .../model/UpdateListenerRuleRequest.java | 331 -- .../model/UpdateListenerRuleResponse.java | 228 -- .../model/UpdateLoadBalancerRequest.java | 545 --- .../model/UpdateLoadBalancerResponse.java | 228 -- .../model/UpdateNetAccessPointRequest.java | 333 -- .../model/UpdateNetAccessPointResponse.java | 233 -- .../client/model/UpdateNetRequest.java | 273 -- .../client/model/UpdateNetResponse.java | 227 -- .../client/model/UpdateNicRequest.java | 352 -- .../client/model/UpdateNicResponse.java | 227 -- .../model/UpdateRoutePropagationRequest.java | 309 -- .../model/UpdateRoutePropagationResponse.java | 233 -- .../client/model/UpdateRouteRequest.java | 463 --- .../client/model/UpdateRouteResponse.java | 227 -- .../model/UpdateRouteTableLinkRequest.java | 274 -- .../model/UpdateRouteTableLinkResponse.java | 238 -- .../model/UpdateServerCertificateRequest.java | 314 -- .../UpdateServerCertificateResponse.java | 237 -- .../client/model/UpdateSnapshotRequest.java | 275 -- .../client/model/UpdateSnapshotResponse.java | 227 -- .../client/model/UpdateSubnetRequest.java | 268 -- .../client/model/UpdateSubnetResponse.java | 227 -- .../client/model/UpdateUserGroupRequest.java | 345 -- .../client/model/UpdateUserGroupResponse.java | 286 -- .../client/model/UpdateUserRequest.java | 308 -- .../client/model/UpdateUserResponse.java | 227 -- .../client/model/UpdateVmGroupRequest.java | 402 --- .../client/model/UpdateVmGroupResponse.java | 227 -- .../client/model/UpdateVmRequest.java | 722 ---- .../client/model/UpdateVmResponse.java | 227 -- .../client/model/UpdateVmTemplateRequest.java | 367 -- .../model/UpdateVmTemplateResponse.java | 228 -- .../client/model/UpdateVolumeRequest.java | 339 -- .../client/model/UpdateVolumeResponse.java | 227 -- .../model/UpdateVpnConnectionRequest.java | 343 -- .../model/UpdateVpnConnectionResponse.java | 228 -- .../osc_sdk_java/client/model/User.java | 328 -- .../osc_sdk_java/client/model/UserGroup.java | 365 -- .../client/model/VgwTelemetry.java | 333 -- .../client/model/VirtualGateway.java | 395 --- .../osc_sdk_java/client/model/Vm.java | 1477 -------- .../osc_sdk_java/client/model/VmGroup.java | 750 ---- .../osc_sdk_java/client/model/VmState.java | 271 -- .../osc_sdk_java/client/model/VmStates.java | 333 -- .../osc_sdk_java/client/model/VmTemplate.java | 628 ---- .../osc_sdk_java/client/model/VmType.java | 468 --- .../osc_sdk_java/client/model/Volume.java | 553 --- .../client/model/VpnConnection.java | 627 ---- .../osc_sdk_java/client/model/VpnOptions.java | 265 -- .../osc_sdk_java/client/model/With.java | 627 ---- .../client/ConfigurationInitializerTest.java | 154 - .../client/api/AccessKeyApiTest.java | 74 - .../client/api/AccountApiTest.java | 75 - .../client/api/ApiAccessPolicyApiTest.java | 45 - .../client/api/ApiAccessRuleApiTest.java | 64 - .../client/api/ApiLogApiTest.java | 34 - .../osc_sdk_java/client/api/CaApiTest.java | 64 - .../client/api/CatalogApiTest.java | 44 - .../client/api/ClientGatewayApiTest.java | 54 - .../client/api/DedicatedGroupApiTest.java | 67 - .../client/api/DhcpOptionApiTest.java | 54 - .../client/api/DirectLinkApiTest.java | 54 - .../api/DirectLinkInterfaceApiTest.java | 68 - .../client/api/FlexibleGpuApiTest.java | 95 - .../osc_sdk_java/client/api/ImageApiTest.java | 86 - .../client/api/InternetServiceApiTest.java | 78 - .../client/api/KeypairApiTest.java | 54 - .../client/api/ListenerApiTest.java | 86 - .../client/api/LoadBalancerApiTest.java | 151 - .../client/api/LoadBalancerPolicyApiTest.java | 46 - .../client/api/LocationApiTest.java | 34 - .../client/api/NatServiceApiTest.java | 54 - .../client/api/NetAccessPointApiTest.java | 78 - .../osc_sdk_java/client/api/NetApiTest.java | 64 - .../client/api/NetPeeringApiTest.java | 74 - .../osc_sdk_java/client/api/NicApiTest.java | 104 - .../client/api/PolicyApiTest.java | 222 -- .../client/api/ProductTypeApiTest.java | 44 - .../client/api/PublicCatalogApiTest.java | 34 - .../client/api/PublicIpApiTest.java | 84 - .../osc_sdk_java/client/api/QuotaApiTest.java | 34 - .../client/api/RegionApiTest.java | 34 - .../osc_sdk_java/client/api/RouteApiTest.java | 54 - .../client/api/RouteTableApiTest.java | 85 - .../client/api/SecurityGroupApiTest.java | 54 - .../client/api/SecurityGroupRuleApiTest.java | 46 - .../client/api/ServerCertificateApiTest.java | 68 - .../client/api/SnapshotApiTest.java | 86 - .../client/api/SubnetApiTest.java | 64 - .../client/api/SubregionApiTest.java | 34 - .../osc_sdk_java/client/api/TagApiTest.java | 54 - .../osc_sdk_java/client/api/TaskApiTest.java | 34 - .../osc_sdk_java/client/api/UserApiTest.java | 64 - .../client/api/UserGroupApiTest.java | 106 - .../client/api/VirtualGatewayApiTest.java | 88 - .../osc_sdk_java/client/api/VmApiTest.java | 134 - .../client/api/VmGroupApiTest.java | 84 - .../client/api/VmTemplateApiTest.java | 64 - .../client/api/VolumeApiTest.java | 84 - .../client/api/VpnConnectionApiTest.java | 86 - .../model/AcceptNetPeeringRequestTest.java | 38 - .../model/AcceptNetPeeringResponseTest.java | 38 - .../client/model/AccepterNetTest.java | 44 - .../client/model/AccessKeySecretKeyTest.java | 62 - .../client/model/AccessKeyTest.java | 56 - .../client/model/AccessLogTest.java | 50 - .../client/model/AccountTest.java | 116 - .../model/AddUserToUserGroupRequestTest.java | 56 - .../model/AddUserToUserGroupResponseTest.java | 32 - .../client/model/ApiAccessPolicyTest.java | 38 - .../client/model/ApiAccessRuleTest.java | 56 - .../ApplicationStickyCookiePolicyTest.java | 38 - .../client/model/BackendVmHealthTest.java | 50 - .../model/BlockDeviceMappingCreatedTest.java | 38 - .../model/BlockDeviceMappingImageTest.java | 44 - .../BlockDeviceMappingVmCreationTest.java | 50 - .../model/BlockDeviceMappingVmUpdateTest.java | 50 - .../client/model/BsuCreatedTest.java | 50 - .../client/model/BsuToCreateTest.java | 56 - .../client/model/BsuToUpdateVmTest.java | 38 - .../osc_sdk_java/client/model/CaTest.java | 44 - .../client/model/CatalogEntryTest.java | 74 - .../client/model/CatalogTest.java | 32 - .../client/model/CatalogsTest.java | 50 - .../model/CheckAuthenticationRequestTest.java | 44 - .../CheckAuthenticationResponseTest.java | 32 - .../client/model/ClientGatewayTest.java | 62 - .../client/model/ConsumptionEntryTest.java | 104 - .../model/CreateAccessKeyRequestTest.java | 44 - .../model/CreateAccessKeyResponseTest.java | 38 - .../model/CreateAccountRequestTest.java | 116 - .../model/CreateAccountResponseTest.java | 38 - .../model/CreateApiAccessRuleRequestTest.java | 56 - .../CreateApiAccessRuleResponseTest.java | 38 - .../client/model/CreateCaRequestTest.java | 44 - .../client/model/CreateCaResponseTest.java | 38 - .../model/CreateClientGatewayRequestTest.java | 50 - .../CreateClientGatewayResponseTest.java | 38 - .../CreateDedicatedGroupRequestTest.java | 50 - .../CreateDedicatedGroupResponseTest.java | 38 - .../model/CreateDhcpOptionsRequestTest.java | 56 - .../model/CreateDhcpOptionsResponseTest.java | 38 - .../CreateDirectLinkInterfaceRequestTest.java | 44 - ...CreateDirectLinkInterfaceResponseTest.java | 38 - .../model/CreateDirectLinkRequestTest.java | 50 - .../model/CreateDirectLinkResponseTest.java | 38 - .../model/CreateFlexibleGpuRequestTest.java | 56 - .../model/CreateFlexibleGpuResponseTest.java | 38 - .../CreateImageExportTaskRequestTest.java | 44 - .../CreateImageExportTaskResponseTest.java | 38 - .../client/model/CreateImageRequestTest.java | 98 - .../client/model/CreateImageResponseTest.java | 38 - .../CreateInternetServiceRequestTest.java | 32 - .../CreateInternetServiceResponseTest.java | 38 - .../model/CreateKeypairRequestTest.java | 44 - .../model/CreateKeypairResponseTest.java | 38 - .../model/CreateListenerRuleRequestTest.java | 50 - .../model/CreateListenerRuleResponseTest.java | 38 - ...reateLoadBalancerListenersRequestTest.java | 45 - ...eateLoadBalancerListenersResponseTest.java | 39 - .../CreateLoadBalancerPolicyRequestTest.java | 62 - .../CreateLoadBalancerPolicyResponseTest.java | 38 - .../model/CreateLoadBalancerRequestTest.java | 80 - .../model/CreateLoadBalancerResponseTest.java | 38 - .../CreateLoadBalancerTagsRequestTest.java | 44 - .../CreateLoadBalancerTagsResponseTest.java | 32 - .../model/CreateNatServiceRequestTest.java | 50 - .../model/CreateNatServiceResponseTest.java | 38 - .../CreateNetAccessPointRequestTest.java | 50 - .../CreateNetAccessPointResponseTest.java | 38 - .../model/CreateNetPeeringRequestTest.java | 44 - .../model/CreateNetPeeringResponseTest.java | 38 - .../client/model/CreateNetRequestTest.java | 44 - .../client/model/CreateNetResponseTest.java | 38 - .../client/model/CreateNicRequestTest.java | 56 - .../client/model/CreateNicResponseTest.java | 38 - .../client/model/CreatePolicyRequestTest.java | 56 - .../model/CreatePolicyResponseTest.java | 38 - .../model/CreatePolicyVersionRequestTest.java | 44 - .../CreatePolicyVersionResponseTest.java | 38 - .../model/CreateProductTypeRequestTest.java | 44 - .../model/CreateProductTypeResponseTest.java | 38 - .../model/CreatePublicIpRequestTest.java | 32 - .../model/CreatePublicIpResponseTest.java | 38 - .../client/model/CreateRouteRequestTest.java | 74 - .../client/model/CreateRouteResponseTest.java | 38 - .../model/CreateRouteTableRequestTest.java | 38 - .../model/CreateRouteTableResponseTest.java | 38 - .../model/CreateSecurityGroupRequestTest.java | 50 - .../CreateSecurityGroupResponseTest.java | 38 - .../CreateSecurityGroupRuleRequestTest.java | 86 - .../CreateSecurityGroupRuleResponseTest.java | 38 - .../CreateServerCertificateRequestTest.java | 62 - .../CreateServerCertificateResponseTest.java | 38 - .../CreateSnapshotExportTaskRequestTest.java | 44 - .../CreateSnapshotExportTaskResponseTest.java | 38 - .../model/CreateSnapshotRequestTest.java | 68 - .../model/CreateSnapshotResponseTest.java | 38 - .../client/model/CreateSubnetRequestTest.java | 50 - .../model/CreateSubnetResponseTest.java | 38 - .../client/model/CreateTagsRequestTest.java | 44 - .../client/model/CreateTagsResponseTest.java | 32 - .../model/CreateUserGroupRequestTest.java | 44 - .../model/CreateUserGroupResponseTest.java | 38 - .../client/model/CreateUserRequestTest.java | 44 - .../client/model/CreateUserResponseTest.java | 38 - .../CreateVirtualGatewayRequestTest.java | 38 - .../CreateVirtualGatewayResponseTest.java | 38 - .../model/CreateVmGroupRequestTest.java | 80 - .../model/CreateVmGroupResponseTest.java | 38 - .../model/CreateVmTemplateRequestTest.java | 86 - .../model/CreateVmTemplateResponseTest.java | 38 - .../client/model/CreateVmsRequestTest.java | 152 - .../client/model/CreateVmsResponseTest.java | 38 - .../client/model/CreateVolumeRequestTest.java | 62 - .../model/CreateVolumeResponseTest.java | 38 - .../model/CreateVpnConnectionRequestTest.java | 56 - .../CreateVpnConnectionResponseTest.java | 38 - .../CreateVpnConnectionRouteRequestTest.java | 44 - .../CreateVpnConnectionRouteResponseTest.java | 32 - .../client/model/DedicatedGroupTest.java | 68 - .../model/DeleteAccessKeyRequestTest.java | 44 - .../model/DeleteAccessKeyResponseTest.java | 32 - .../model/DeleteApiAccessRuleRequestTest.java | 38 - .../DeleteApiAccessRuleResponseTest.java | 32 - .../client/model/DeleteCaRequestTest.java | 38 - .../client/model/DeleteCaResponseTest.java | 32 - .../model/DeleteClientGatewayRequestTest.java | 38 - .../DeleteClientGatewayResponseTest.java | 32 - .../DeleteDedicatedGroupRequestTest.java | 44 - .../DeleteDedicatedGroupResponseTest.java | 32 - .../model/DeleteDhcpOptionsRequestTest.java | 38 - .../model/DeleteDhcpOptionsResponseTest.java | 32 - .../DeleteDirectLinkInterfaceRequestTest.java | 38 - ...DeleteDirectLinkInterfaceResponseTest.java | 32 - .../model/DeleteDirectLinkRequestTest.java | 38 - .../model/DeleteDirectLinkResponseTest.java | 32 - .../model/DeleteExportTaskRequestTest.java | 38 - .../model/DeleteExportTaskResponseTest.java | 32 - .../model/DeleteFlexibleGpuRequestTest.java | 38 - .../model/DeleteFlexibleGpuResponseTest.java | 32 - .../client/model/DeleteImageRequestTest.java | 38 - .../client/model/DeleteImageResponseTest.java | 32 - .../DeleteInternetServiceRequestTest.java | 38 - .../DeleteInternetServiceResponseTest.java | 32 - .../model/DeleteKeypairRequestTest.java | 38 - .../model/DeleteKeypairResponseTest.java | 32 - .../model/DeleteListenerRuleRequestTest.java | 38 - .../model/DeleteListenerRuleResponseTest.java | 32 - ...eleteLoadBalancerListenersRequestTest.java | 45 - ...leteLoadBalancerListenersResponseTest.java | 39 - .../DeleteLoadBalancerPolicyRequestTest.java | 44 - .../DeleteLoadBalancerPolicyResponseTest.java | 38 - .../model/DeleteLoadBalancerRequestTest.java | 38 - .../model/DeleteLoadBalancerResponseTest.java | 32 - .../DeleteLoadBalancerTagsRequestTest.java | 44 - .../DeleteLoadBalancerTagsResponseTest.java | 32 - .../model/DeleteNatServiceRequestTest.java | 38 - .../model/DeleteNatServiceResponseTest.java | 32 - .../DeleteNetAccessPointRequestTest.java | 38 - .../DeleteNetAccessPointResponseTest.java | 32 - .../model/DeleteNetPeeringRequestTest.java | 38 - .../model/DeleteNetPeeringResponseTest.java | 32 - .../client/model/DeleteNetRequestTest.java | 38 - .../client/model/DeleteNetResponseTest.java | 32 - .../client/model/DeleteNicRequestTest.java | 38 - .../client/model/DeleteNicResponseTest.java | 32 - .../client/model/DeletePolicyRequestTest.java | 38 - .../model/DeletePolicyResponseTest.java | 32 - .../model/DeletePolicyVersionRequestTest.java | 38 - .../DeletePolicyVersionResponseTest.java | 32 - .../model/DeletePublicIpRequestTest.java | 44 - .../model/DeletePublicIpResponseTest.java | 32 - .../client/model/DeleteRouteRequestTest.java | 44 - .../client/model/DeleteRouteResponseTest.java | 38 - .../model/DeleteRouteTableRequestTest.java | 38 - .../model/DeleteRouteTableResponseTest.java | 32 - .../model/DeleteSecurityGroupRequestTest.java | 44 - .../DeleteSecurityGroupResponseTest.java | 32 - .../DeleteSecurityGroupRuleRequestTest.java | 86 - .../DeleteSecurityGroupRuleResponseTest.java | 38 - .../DeleteServerCertificateRequestTest.java | 38 - .../DeleteServerCertificateResponseTest.java | 32 - .../model/DeleteSnapshotRequestTest.java | 38 - .../model/DeleteSnapshotResponseTest.java | 32 - .../client/model/DeleteSubnetRequestTest.java | 38 - .../model/DeleteSubnetResponseTest.java | 32 - .../client/model/DeleteTagsRequestTest.java | 44 - .../client/model/DeleteTagsResponseTest.java | 32 - .../DeleteUserGroupPolicyRequestTest.java | 50 - .../DeleteUserGroupPolicyResponseTest.java | 32 - .../model/DeleteUserGroupRequestTest.java | 50 - .../model/DeleteUserGroupResponseTest.java | 32 - .../client/model/DeleteUserRequestTest.java | 38 - .../client/model/DeleteUserResponseTest.java | 32 - .../DeleteVirtualGatewayRequestTest.java | 38 - .../DeleteVirtualGatewayResponseTest.java | 32 - .../model/DeleteVmGroupRequestTest.java | 38 - .../model/DeleteVmGroupResponseTest.java | 32 - .../model/DeleteVmTemplateRequestTest.java | 38 - .../model/DeleteVmTemplateResponseTest.java | 32 - .../client/model/DeleteVmsRequestTest.java | 38 - .../client/model/DeleteVmsResponseTest.java | 38 - .../client/model/DeleteVolumeRequestTest.java | 38 - .../model/DeleteVolumeResponseTest.java | 32 - .../model/DeleteVpnConnectionRequestTest.java | 38 - .../DeleteVpnConnectionResponseTest.java | 32 - .../DeleteVpnConnectionRouteRequestTest.java | 44 - .../DeleteVpnConnectionRouteResponseTest.java | 32 - ...eregisterVmsInLoadBalancerRequestTest.java | 45 - ...registerVmsInLoadBalancerResponseTest.java | 33 - .../client/model/DhcpOptionsSetTest.java | 68 - .../client/model/DirectLinkInterfaceTest.java | 68 - .../model/DirectLinkInterfacesTest.java | 110 - .../client/model/DirectLinkTest.java | 68 - .../client/model/ErrorResponseTest.java | 38 - .../osc_sdk_java/client/model/ErrorsTest.java | 44 - .../client/model/FiltersAccessKeysTest.java | 38 - .../model/FiltersApiAccessRuleTest.java | 56 - .../client/model/FiltersApiLogTest.java | 80 - .../client/model/FiltersCaTest.java | 44 - .../client/model/FiltersCatalogsTest.java | 44 - .../model/FiltersClientGatewayTest.java | 74 - .../model/FiltersDedicatedGroupTest.java | 50 - .../client/model/FiltersDhcpOptionsTest.java | 80 - .../model/FiltersDirectLinkInterfaceTest.java | 38 - .../client/model/FiltersDirectLinkTest.java | 32 - .../client/model/FiltersExportTaskTest.java | 32 - .../client/model/FiltersFlexibleGpuTest.java | 68 - .../client/model/FiltersImageTest.java | 170 - .../model/FiltersInternetServiceTest.java | 62 - .../client/model/FiltersKeypairTest.java | 44 - .../client/model/FiltersListenerRuleTest.java | 32 - .../client/model/FiltersLoadBalancerTest.java | 32 - .../client/model/FiltersNatServiceTest.java | 74 - .../model/FiltersNetAccessPointTest.java | 68 - .../client/model/FiltersNetPeeringTest.java | 104 - .../client/model/FiltersNetTest.java | 74 - .../client/model/FiltersNicTest.java | 200 -- .../client/model/FiltersProductTypeTest.java | 32 - .../client/model/FiltersPublicIpTest.java | 92 - .../client/model/FiltersQuotaTest.java | 50 - .../client/model/FiltersRouteTableTest.java | 128 - .../model/FiltersSecurityGroupTest.java | 152 - .../model/FiltersServerCertificateTest.java | 32 - .../client/model/FiltersServiceTest.java | 38 - .../client/model/FiltersSnapshotTest.java | 116 - .../client/model/FiltersSubnetTest.java | 80 - .../client/model/FiltersSubregionTest.java | 44 - .../client/model/FiltersTagTest.java | 50 - .../client/model/FiltersUserGroupTest.java | 38 - .../model/FiltersVirtualGatewayTest.java | 74 - .../client/model/FiltersVmGroupTest.java | 86 - .../client/model/FiltersVmTemplateTest.java | 98 - .../client/model/FiltersVmTest.java | 410 --- .../client/model/FiltersVmTypeTest.java | 80 - .../client/model/FiltersVmsStateTest.java | 68 - .../client/model/FiltersVolumeTest.java | 116 - .../model/FiltersVpnConnectionTest.java | 92 - .../client/model/FlexibleGpuCatalogTest.java | 56 - .../client/model/FlexibleGpuTest.java | 68 - .../client/model/HealthCheckTest.java | 68 - .../client/model/ImageExportTaskTest.java | 68 - .../osc_sdk_java/client/model/ImageTest.java | 128 - .../client/model/InlinePolicyTest.java | 38 - .../client/model/InternetServiceTest.java | 50 - .../client/model/KeypairCreatedTest.java | 50 - .../client/model/KeypairTest.java | 44 - .../model/LinkFlexibleGpuRequestTest.java | 44 - .../model/LinkFlexibleGpuResponseTest.java | 32 - .../model/LinkInternetServiceRequestTest.java | 44 - .../LinkInternetServiceResponseTest.java | 32 - ...oadBalancerBackendMachinesRequestTest.java | 51 - ...adBalancerBackendMachinesResponseTest.java | 33 - ...nkManagedPolicyToUserGroupRequestTest.java | 45 - ...kManagedPolicyToUserGroupResponseTest.java | 33 - .../client/model/LinkNicLightTest.java | 50 - .../client/model/LinkNicRequestTest.java | 50 - .../client/model/LinkNicResponseTest.java | 38 - .../client/model/LinkNicTest.java | 62 - .../client/model/LinkNicToUpdateTest.java | 38 - .../client/model/LinkPolicyRequestTest.java | 44 - .../client/model/LinkPolicyResponseTest.java | 32 - .../model/LinkPrivateIpsRequestTest.java | 56 - .../model/LinkPrivateIpsResponseTest.java | 32 - .../model/LinkPublicIpLightForVmTest.java | 44 - .../client/model/LinkPublicIpRequestTest.java | 68 - .../model/LinkPublicIpResponseTest.java | 38 - .../client/model/LinkPublicIpTest.java | 56 - .../model/LinkRouteTableRequestTest.java | 44 - .../model/LinkRouteTableResponseTest.java | 38 - .../client/model/LinkRouteTableTest.java | 56 - .../model/LinkVirtualGatewayRequestTest.java | 44 - .../model/LinkVirtualGatewayResponseTest.java | 38 - .../client/model/LinkVolumeRequestTest.java | 50 - .../client/model/LinkVolumeResponseTest.java | 32 - .../client/model/LinkedPolicyTest.java | 56 - .../client/model/LinkedVolumeTest.java | 56 - .../client/model/ListenerForCreationTest.java | 56 - .../model/ListenerRuleForCreationTest.java | 56 - .../client/model/ListenerRuleTest.java | 74 - .../client/model/ListenerTest.java | 62 - .../client/model/LoadBalancerLightTest.java | 38 - .../LoadBalancerStickyCookiePolicyTest.java | 38 - .../client/model/LoadBalancerTagTest.java | 44 - .../client/model/LoadBalancerTest.java | 134 - .../client/model/LocationTest.java | 38 - .../osc_sdk_java/client/model/LogTest.java | 122 - .../client/model/MaintenanceEventTest.java | 50 - .../client/model/NatServiceTest.java | 68 - .../client/model/NetAccessPointTest.java | 62 - .../client/model/NetPeeringStateTest.java | 38 - .../client/model/NetPeeringTest.java | 62 - .../osc_sdk_java/client/model/NetTest.java | 62 - .../model/NetToVirtualGatewayLinkTest.java | 38 - .../client/model/NicForVmCreationTest.java | 74 - .../client/model/NicLightTest.java | 104 - .../osc_sdk_java/client/model/NicTest.java | 116 - .../client/model/OsuApiKeyTest.java | 38 - .../model/OsuExportImageExportTaskTest.java | 50 - .../OsuExportSnapshotExportTaskTest.java | 44 - .../client/model/OsuExportToCreateTest.java | 56 - .../PermissionsOnResourceCreationTest.java | 38 - .../model/PermissionsOnResourceTest.java | 38 - .../client/model/Phase1OptionsTest.java | 80 - .../client/model/Phase2OptionsTest.java | 56 - .../client/model/PlacementTest.java | 38 - .../osc_sdk_java/client/model/PolicyTest.java | 86 - .../client/model/PolicyVersionTest.java | 50 - .../client/model/PrivateIpLightForVmTest.java | 50 - .../client/model/PrivateIpLightTest.java | 38 - .../client/model/PrivateIpTest.java | 50 - .../client/model/ProductTypeTest.java | 44 - .../client/model/PublicIpLightTest.java | 38 - .../client/model/PublicIpTest.java | 74 - .../model/PutUserGroupPolicyRequestTest.java | 56 - .../model/PutUserGroupPolicyResponseTest.java | 32 - .../osc_sdk_java/client/model/QuotaTest.java | 68 - .../client/model/QuotaTypesTest.java | 38 - .../model/ReadAccessKeysRequestTest.java | 44 - .../model/ReadAccessKeysResponseTest.java | 38 - .../client/model/ReadAccountsRequestTest.java | 32 - .../model/ReadAccountsResponseTest.java | 38 - .../model/ReadAdminPasswordRequestTest.java | 38 - .../model/ReadAdminPasswordResponseTest.java | 44 - .../model/ReadApiAccessPolicyRequestTest.java | 32 - .../ReadApiAccessPolicyResponseTest.java | 38 - .../model/ReadApiAccessRulesRequestTest.java | 38 - .../model/ReadApiAccessRulesResponseTest.java | 38 - .../client/model/ReadApiLogsRequestTest.java | 56 - .../client/model/ReadApiLogsResponseTest.java | 44 - .../client/model/ReadCasRequestTest.java | 38 - .../client/model/ReadCasResponseTest.java | 38 - .../client/model/ReadCatalogRequestTest.java | 32 - .../client/model/ReadCatalogResponseTest.java | 38 - .../client/model/ReadCatalogsRequestTest.java | 38 - .../model/ReadCatalogsResponseTest.java | 38 - .../model/ReadClientGatewaysRequestTest.java | 50 - .../model/ReadClientGatewaysResponseTest.java | 44 - .../model/ReadConsoleOutputRequestTest.java | 38 - .../model/ReadConsoleOutputResponseTest.java | 44 - .../ReadConsumptionAccountRequestTest.java | 56 - .../ReadConsumptionAccountResponseTest.java | 44 - .../model/ReadDedicatedGroupsRequestTest.java | 50 - .../ReadDedicatedGroupsResponseTest.java | 44 - .../model/ReadDhcpOptionsRequestTest.java | 50 - .../model/ReadDhcpOptionsResponseTest.java | 44 - .../ReadDirectLinkInterfacesRequestTest.java | 50 - .../ReadDirectLinkInterfacesResponseTest.java | 44 - .../model/ReadDirectLinksRequestTest.java | 50 - .../model/ReadDirectLinksResponseTest.java | 44 - .../ReadFlexibleGpuCatalogRequestTest.java | 32 - .../ReadFlexibleGpuCatalogResponseTest.java | 38 - .../model/ReadFlexibleGpusRequestTest.java | 38 - .../model/ReadFlexibleGpusResponseTest.java | 38 - .../ReadImageExportTasksRequestTest.java | 50 - .../ReadImageExportTasksResponseTest.java | 44 - .../client/model/ReadImagesRequestTest.java | 50 - .../client/model/ReadImagesResponseTest.java | 44 - .../ReadInternetServicesRequestTest.java | 50 - .../ReadInternetServicesResponseTest.java | 44 - .../client/model/ReadKeypairsRequestTest.java | 50 - .../model/ReadKeypairsResponseTest.java | 44 - .../model/ReadLinkedPoliciesFiltersTest.java | 32 - .../model/ReadLinkedPoliciesRequestTest.java | 56 - .../model/ReadLinkedPoliciesResponseTest.java | 56 - .../model/ReadListenerRulesRequestTest.java | 38 - .../model/ReadListenerRulesResponseTest.java | 38 - .../ReadLoadBalancerTagsRequestTest.java | 38 - .../ReadLoadBalancerTagsResponseTest.java | 38 - .../model/ReadLoadBalancersRequestTest.java | 38 - .../model/ReadLoadBalancersResponseTest.java | 38 - .../model/ReadLocationsRequestTest.java | 44 - .../model/ReadLocationsResponseTest.java | 44 - ...dPoliciesLinkedToUserGroupRequestTest.java | 57 - ...PoliciesLinkedToUserGroupResponseTest.java | 57 - .../model/ReadNatServicesRequestTest.java | 50 - .../model/ReadNatServicesResponseTest.java | 44 - ...ReadNetAccessPointServicesRequestTest.java | 50 - ...eadNetAccessPointServicesResponseTest.java | 45 - .../model/ReadNetAccessPointsRequestTest.java | 50 - .../ReadNetAccessPointsResponseTest.java | 44 - .../model/ReadNetPeeringsRequestTest.java | 50 - .../model/ReadNetPeeringsResponseTest.java | 44 - .../client/model/ReadNetsRequestTest.java | 50 - .../client/model/ReadNetsResponseTest.java | 44 - .../client/model/ReadNicsRequestTest.java | 38 - .../client/model/ReadNicsResponseTest.java | 38 - .../client/model/ReadPoliciesFiltersTest.java | 44 - .../client/model/ReadPoliciesRequestTest.java | 50 - .../model/ReadPoliciesResponseTest.java | 56 - .../client/model/ReadPolicyRequestTest.java | 32 - .../client/model/ReadPolicyResponseTest.java | 38 - .../model/ReadPolicyVersionRequestTest.java | 38 - .../model/ReadPolicyVersionResponseTest.java | 38 - .../model/ReadPolicyVersionsRequestTest.java | 44 - .../model/ReadPolicyVersionsResponseTest.java | 50 - .../model/ReadProductTypesRequestTest.java | 50 - .../model/ReadProductTypesResponseTest.java | 44 - .../model/ReadPublicCatalogRequestTest.java | 32 - .../model/ReadPublicCatalogResponseTest.java | 38 - .../model/ReadPublicIpRangesRequestTest.java | 44 - .../model/ReadPublicIpRangesResponseTest.java | 44 - .../model/ReadPublicIpsRequestTest.java | 50 - .../model/ReadPublicIpsResponseTest.java | 44 - .../client/model/ReadQuotasRequestTest.java | 50 - .../client/model/ReadQuotasResponseTest.java | 44 - .../client/model/ReadRegionsRequestTest.java | 32 - .../client/model/ReadRegionsResponseTest.java | 38 - .../model/ReadRouteTablesRequestTest.java | 50 - .../model/ReadRouteTablesResponseTest.java | 44 - .../model/ReadSecretAccessKeyRequestTest.java | 38 - .../ReadSecretAccessKeyResponseTest.java | 38 - .../model/ReadSecurityGroupsRequestTest.java | 50 - .../model/ReadSecurityGroupsResponseTest.java | 44 - .../ReadServerCertificatesRequestTest.java | 38 - .../ReadServerCertificatesResponseTest.java | 38 - .../ReadSnapshotExportTasksRequestTest.java | 50 - .../ReadSnapshotExportTasksResponseTest.java | 44 - .../model/ReadSnapshotsRequestTest.java | 50 - .../model/ReadSnapshotsResponseTest.java | 44 - .../client/model/ReadSubnetsRequestTest.java | 50 - .../client/model/ReadSubnetsResponseTest.java | 44 - .../model/ReadSubregionsRequestTest.java | 50 - .../model/ReadSubregionsResponseTest.java | 44 - .../client/model/ReadTagsRequestTest.java | 50 - .../client/model/ReadTagsResponseTest.java | 44 - .../ReadUserGroupPoliciesRequestTest.java | 56 - .../ReadUserGroupPoliciesResponseTest.java | 56 - .../model/ReadUserGroupPolicyRequestTest.java | 50 - .../ReadUserGroupPolicyResponseTest.java | 38 - .../model/ReadUserGroupRequestTest.java | 44 - .../model/ReadUserGroupResponseTest.java | 44 - .../ReadUserGroupsPerUserRequestTest.java | 44 - .../ReadUserGroupsPerUserResponseTest.java | 38 - .../model/ReadUserGroupsRequestTest.java | 50 - .../model/ReadUserGroupsResponseTest.java | 56 - .../client/model/ReadUsersRequestTest.java | 32 - .../client/model/ReadUsersResponseTest.java | 38 - .../model/ReadVirtualGatewaysRequestTest.java | 50 - .../ReadVirtualGatewaysResponseTest.java | 44 - .../client/model/ReadVmGroupsRequestTest.java | 38 - .../model/ReadVmGroupsResponseTest.java | 38 - .../model/ReadVmTemplatesRequestTest.java | 38 - .../model/ReadVmTemplatesResponseTest.java | 38 - .../client/model/ReadVmTypesRequestTest.java | 50 - .../client/model/ReadVmTypesResponseTest.java | 44 - .../model/ReadVmsHealthRequestTest.java | 44 - .../model/ReadVmsHealthResponseTest.java | 38 - .../client/model/ReadVmsRequestTest.java | 50 - .../client/model/ReadVmsResponseTest.java | 44 - .../client/model/ReadVmsStateRequestTest.java | 56 - .../model/ReadVmsStateResponseTest.java | 44 - .../client/model/ReadVolumesRequestTest.java | 50 - .../client/model/ReadVolumesResponseTest.java | 44 - .../model/ReadVpnConnectionsRequestTest.java | 50 - .../model/ReadVpnConnectionsResponseTest.java | 44 - .../client/model/RebootVmsRequestTest.java | 38 - .../client/model/RebootVmsResponseTest.java | 32 - .../osc_sdk_java/client/model/RegionTest.java | 38 - .../RegisterVmsInLoadBalancerRequestTest.java | 44 - ...RegisterVmsInLoadBalancerResponseTest.java | 32 - .../model/RejectNetPeeringRequestTest.java | 38 - .../model/RejectNetPeeringResponseTest.java | 32 - .../RemoveUserFromUserGroupRequestTest.java | 56 - .../RemoveUserFromUserGroupResponseTest.java | 32 - .../model/ResourceLoadBalancerTagTest.java | 32 - .../client/model/ResourceTagTest.java | 38 - .../client/model/ResponseContextTest.java | 32 - .../client/model/RouteLightTest.java | 44 - .../RoutePropagatingVirtualGatewayTest.java | 32 - .../client/model/RouteTableTest.java | 62 - .../osc_sdk_java/client/model/RouteTest.java | 92 - .../model/ScaleDownVmGroupRequestTest.java | 44 - .../model/ScaleDownVmGroupResponseTest.java | 32 - .../model/ScaleUpVmGroupRequestTest.java | 44 - .../model/ScaleUpVmGroupResponseTest.java | 32 - .../client/model/SecurityGroupLightTest.java | 38 - .../client/model/SecurityGroupRuleTest.java | 62 - .../client/model/SecurityGroupTest.java | 74 - .../model/SecurityGroupsMemberTest.java | 44 - .../client/model/ServerCertificateTest.java | 62 - .../client/model/ServiceTest.java | 44 - .../SetDefaultPolicyVersionRequestTest.java | 38 - .../SetDefaultPolicyVersionResponseTest.java | 32 - .../client/model/SnapshotExportTaskTest.java | 68 - .../client/model/SnapshotTest.java | 92 - .../client/model/SourceNetTest.java | 44 - .../client/model/SourceSecurityGroupTest.java | 38 - .../client/model/StartVmsRequestTest.java | 38 - .../client/model/StartVmsResponseTest.java | 38 - .../client/model/StateCommentTest.java | 38 - .../client/model/StopVmsRequestTest.java | 44 - .../client/model/StopVmsResponseTest.java | 38 - .../osc_sdk_java/client/model/SubnetTest.java | 74 - .../client/model/SubregionTest.java | 50 - .../osc_sdk_java/client/model/TagTest.java | 50 - .../model/UnlinkFlexibleGpuRequestTest.java | 38 - .../model/UnlinkFlexibleGpuResponseTest.java | 32 - .../UnlinkInternetServiceRequestTest.java | 44 - .../UnlinkInternetServiceResponseTest.java | 32 - ...oadBalancerBackendMachinesRequestTest.java | 51 - ...adBalancerBackendMachinesResponseTest.java | 33 - ...ManagedPolicyFromUserGroupRequestTest.java | 45 - ...anagedPolicyFromUserGroupResponseTest.java | 33 - .../client/model/UnlinkNicRequestTest.java | 38 - .../client/model/UnlinkNicResponseTest.java | 32 - .../client/model/UnlinkPolicyRequestTest.java | 44 - .../model/UnlinkPolicyResponseTest.java | 32 - .../model/UnlinkPrivateIpsRequestTest.java | 44 - .../model/UnlinkPrivateIpsResponseTest.java | 32 - .../model/UnlinkPublicIpRequestTest.java | 44 - .../model/UnlinkPublicIpResponseTest.java | 32 - .../model/UnlinkRouteTableRequestTest.java | 38 - .../model/UnlinkRouteTableResponseTest.java | 32 - .../UnlinkVirtualGatewayRequestTest.java | 44 - .../UnlinkVirtualGatewayResponseTest.java | 32 - .../client/model/UnlinkVolumeRequestTest.java | 44 - .../model/UnlinkVolumeResponseTest.java | 32 - .../model/UpdateAccessKeyRequestTest.java | 56 - .../model/UpdateAccessKeyResponseTest.java | 38 - .../model/UpdateAccountRequestTest.java | 110 - .../model/UpdateAccountResponseTest.java | 38 - .../UpdateApiAccessPolicyRequestTest.java | 44 - .../UpdateApiAccessPolicyResponseTest.java | 38 - .../model/UpdateApiAccessRuleRequestTest.java | 62 - .../UpdateApiAccessRuleResponseTest.java | 38 - .../client/model/UpdateCaRequestTest.java | 44 - .../client/model/UpdateCaResponseTest.java | 38 - .../UpdateDedicatedGroupRequestTest.java | 44 - .../UpdateDedicatedGroupResponseTest.java | 38 - .../UpdateDirectLinkInterfaceRequestTest.java | 44 - ...UpdateDirectLinkInterfaceResponseTest.java | 38 - .../model/UpdateFlexibleGpuRequestTest.java | 44 - .../model/UpdateFlexibleGpuResponseTest.java | 38 - .../client/model/UpdateImageRequestTest.java | 50 - .../client/model/UpdateImageResponseTest.java | 38 - .../model/UpdateListenerRuleRequestTest.java | 50 - .../model/UpdateListenerRuleResponseTest.java | 38 - .../model/UpdateLoadBalancerRequestTest.java | 86 - .../model/UpdateLoadBalancerResponseTest.java | 38 - .../UpdateNetAccessPointRequestTest.java | 50 - .../UpdateNetAccessPointResponseTest.java | 38 - .../client/model/UpdateNetRequestTest.java | 44 - .../client/model/UpdateNetResponseTest.java | 38 - .../client/model/UpdateNicRequestTest.java | 56 - .../client/model/UpdateNicResponseTest.java | 38 - .../UpdateRoutePropagationRequestTest.java | 50 - .../UpdateRoutePropagationResponseTest.java | 38 - .../client/model/UpdateRouteRequestTest.java | 74 - .../client/model/UpdateRouteResponseTest.java | 38 - .../UpdateRouteTableLinkRequestTest.java | 44 - .../UpdateRouteTableLinkResponseTest.java | 38 - .../UpdateServerCertificateRequestTest.java | 50 - .../UpdateServerCertificateResponseTest.java | 38 - .../model/UpdateSnapshotRequestTest.java | 44 - .../model/UpdateSnapshotResponseTest.java | 38 - .../client/model/UpdateSubnetRequestTest.java | 44 - .../model/UpdateSubnetResponseTest.java | 38 - .../model/UpdateUserGroupRequestTest.java | 56 - .../model/UpdateUserGroupResponseTest.java | 44 - .../client/model/UpdateUserRequestTest.java | 50 - .../client/model/UpdateUserResponseTest.java | 38 - .../model/UpdateVmGroupRequestTest.java | 62 - .../model/UpdateVmGroupResponseTest.java | 38 - .../client/model/UpdateVmRequestTest.java | 104 - .../client/model/UpdateVmResponseTest.java | 38 - .../model/UpdateVmTemplateRequestTest.java | 56 - .../model/UpdateVmTemplateResponseTest.java | 38 - .../client/model/UpdateVolumeRequestTest.java | 56 - .../model/UpdateVolumeResponseTest.java | 38 - .../model/UpdateVpnConnectionRequestTest.java | 56 - .../UpdateVpnConnectionResponseTest.java | 38 - .../client/model/UserGroupTest.java | 62 - .../osc_sdk_java/client/model/UserTest.java | 56 - .../client/model/VgwTelemetryTest.java | 56 - .../client/model/VirtualGatewayTest.java | 56 - .../client/model/VmGroupTest.java | 98 - .../client/model/VmStateTest.java | 44 - .../client/model/VmStatesTest.java | 50 - .../client/model/VmTemplateTest.java | 92 - .../osc_sdk_java/client/model/VmTest.java | 230 -- .../osc_sdk_java/client/model/VmTypeTest.java | 86 - .../osc_sdk_java/client/model/VolumeTest.java | 86 - .../client/model/VpnConnectionTest.java | 92 - .../client/model/VpnOptionsTest.java | 44 - .../osc_sdk_java/client/model/WithTest.java | 122 - .../osc_sdk_java/client/certs/README.md | 12 - .../client/certs/invalid/sdk.test.crt | 3 - .../client/certs/invalid/sdk.test.key | 3 - .../client/certs/valid/sdk.test.crt | 20 - .../client/certs/valid/sdk.test.key | 27 - templates/ApiClient.mustache | 893 +++++ templates/BeanValidationException.mustache | 29 + templates/Configuration.mustache | 53 + templates/CustomInstantDeserializer.mustache | 234 ++ templates/JSON.mustache | 541 +++ templates/JavaTimeFormatter.mustache | 58 + templates/Pair.mustache | 27 + templates/README.mustache | 248 ++ templates/RFC3339DateFormat.mustache | 48 + templates/RFC3339InstantDeserializer.mustache | 90 + templates/RFC3339JavaTimeModule.mustache | 29 + .../ServerConfiguration.mustache | 28 +- .../ServerVariable.mustache | 13 +- templates/StringUtil.mustache | 73 + .../additionalEnumTypeAnnotations.mustache | 2 + .../additionalModelTypeAnnotations.mustache | 2 + .../additionalOneOfTypeAnnotations.mustache | 2 + templates/api.mustache | 121 + templates/apiException.mustache | 92 + templates/apiOperation.mustache | 28 + templates/api_doc.mustache | 108 + templates/api_test.mustache | 51 + templates/auth/ApiKeyAuth.mustache | 67 + templates/auth/Authentication.mustache | 21 + templates/auth/HttpBasicAuth.mustache | 43 + templates/auth/HttpBearerAuth.mustache | 60 + templates/auth/OAuth.mustache | 29 + templates/auth/OAuthFlow.mustache | 15 + templates/beanValidation.mustache | 18 + templates/beanValidationCore.mustache | 20 + templates/beanValidationQueryParams.mustache | 1 + templates/build.gradle.mustache | 174 + templates/build.sbt.mustache | 1 + templates/enum_outer_doc.mustache | 7 + templates/generatedAnnotation.mustache | 1 + templates/git_push.sh.mustache | 57 + templates/gitignore.mustache | 21 + templates/gradle-wrapper.jar | Bin 0 -> 43453 bytes templates/gradle-wrapper.properties.mustache | 7 + templates/gradle.properties.mustache | 9 + templates/gradlew.bat.mustache | 92 + templates/gradlew.mustache | 249 ++ templates/jackson_annotations.mustache | 14 + templates/javaBuilder.mustache | 82 + .../apache-httpclient/ApiClient.mustache | 1137 ++++++ .../apache-httpclient/BaseApi.mustache | 111 + .../apache-httpclient/README.mustache | 209 ++ .../libraries/apache-httpclient/api.mustache | 244 ++ .../apache-httpclient/api_test.mustache | 57 + .../apache-httpclient/build.gradle.mustache | 145 + .../libraries/apache-httpclient/pom.mustache | 369 ++ templates/libraries/feign/ApiClient.mustache | 386 ++ .../feign/ApiResponseDecoder.mustache | 39 + .../libraries/feign/EncodingUtils.mustache | 88 + .../libraries/feign/ParamExpander.mustache | 24 + templates/libraries/feign/README.mustache | 77 + .../feign/additional_properties.mustache | 45 + templates/libraries/feign/api.mustache | 194 ++ templates/libraries/feign/api_test.mustache | 75 + .../feign/auth/ApiErrorDecoder.mustache | 29 + .../libraries/feign/auth/ApiKeyAuth.mustache | 45 + .../feign/auth/DefaultApi20Impl.mustache | 50 + .../feign/auth/HttpBasicAuth.mustache | 43 + .../feign/auth/HttpBearerAuth.mustache | 61 + templates/libraries/feign/auth/OAuth.mustache | 99 + .../auth/OauthClientCredentialsGrant.mustache | 42 + .../feign/auth/OauthPasswordGrant.mustache | 51 + .../libraries/feign/build.gradle.mustache | 163 + templates/libraries/feign/build.sbt.mustache | 46 + templates/libraries/feign/model.mustache | 78 + .../feign/model/ApiResponse.mustache | 45 + templates/libraries/feign/model_test.mustache | 41 + templates/libraries/feign/pojo.mustache | 580 +++ templates/libraries/feign/pom.mustache | 436 +++ .../google-api-client/ApiClient.mustache | 107 + .../libraries/google-api-client/api.mustache | 210 ++ .../google-api-client/api_test.mustache | 48 + .../google-api-client/build.gradle.mustache | 135 + .../google-api-client/build.sbt.mustache | 29 + .../libraries/google-api-client/pom.mustache | 330 ++ .../jersey2/AbstractOpenApiSchema.mustache | 140 + .../libraries/jersey2/ApiClient.mustache | 1517 ++++++++ .../libraries/jersey2/ApiResponse.mustache | 73 + templates/libraries/jersey2/JSON.mustache | 262 ++ .../jersey2/additional_properties.mustache | 39 + .../libraries/jersey2/anyof_model.mustache | 229 ++ templates/libraries/jersey2/api.mustache | 298 ++ .../libraries/jersey2/apiException.mustache | 102 + templates/libraries/jersey2/api_doc.mustache | 124 + templates/libraries/jersey2/api_test.mustache | 62 + .../jersey2/auth/ApiKeyAuth.mustache | 69 + .../jersey2/auth/Authentication.mustache | 24 + .../jersey2/auth/HttpBasicAuth.mustache | 45 + .../jersey2/auth/HttpBearerAuth.mustache | 52 + .../jersey2/auth/HttpSignatureAuth.mustache | 269 ++ .../libraries/jersey2/auth/OAuth.mustache | 196 ++ .../libraries/jersey2/auth/OAuthFlow.mustache | 13 + .../libraries/jersey2/build.gradle.mustache | 199 ++ .../libraries/jersey2/build.sbt.mustache | 41 + templates/libraries/jersey2/model.mustache | 63 + .../jersey2/model_anyof_doc.mustache | 38 + .../libraries/jersey2/model_doc.mustache | 23 + .../jersey2/model_oneof_doc.mustache | 38 + .../libraries/jersey2/model_test.mustache | 44 + .../libraries/jersey2/oneof_model.mustache | 291 ++ templates/libraries/jersey2/pojo.mustache | 417 +++ templates/libraries/jersey2/pom.mustache | 431 +++ .../jersey3/AbstractOpenApiSchema.mustache | 140 + .../libraries/jersey3/ApiClient.mustache | 1517 ++++++++ .../libraries/jersey3/ApiResponse.mustache | 73 + templates/libraries/jersey3/JSON.mustache | 262 ++ .../jersey3/additional_properties.mustache | 39 + .../libraries/jersey3/anyof_model.mustache | 229 ++ templates/libraries/jersey3/api.mustache | 298 ++ .../libraries/jersey3/apiException.mustache | 102 + templates/libraries/jersey3/api_doc.mustache | 124 + templates/libraries/jersey3/api_test.mustache | 62 + .../jersey3/auth/ApiKeyAuth.mustache | 69 + .../jersey3/auth/Authentication.mustache | 24 + .../jersey3/auth/HttpBasicAuth.mustache | 45 + .../jersey3/auth/HttpBearerAuth.mustache | 52 + .../jersey3/auth/HttpSignatureAuth.mustache | 269 ++ .../libraries/jersey3/auth/OAuth.mustache | 196 ++ .../libraries/jersey3/auth/OAuthFlow.mustache | 13 + .../libraries/jersey3/build.gradle.mustache | 189 + .../libraries/jersey3/build.sbt.mustache | 41 + .../jersey3/generatedAnnotation.mustache | 1 + templates/libraries/jersey3/model.mustache | 63 + .../jersey3/model_anyof_doc.mustache | 38 + .../libraries/jersey3/model_doc.mustache | 23 + .../jersey3/model_oneof_doc.mustache | 38 + .../libraries/jersey3/model_test.mustache | 44 + .../libraries/jersey3/oneof_model.mustache | 291 ++ templates/libraries/jersey3/pojo.mustache | 417 +++ templates/libraries/jersey3/pom.mustache | 431 +++ .../libraries/microprofile/README.mustache | 19 + .../additional_properties.mustache | 45 + templates/libraries/microprofile/api.mustache | 127 + .../microprofile/api_exception.mustache | 23 + .../api_exception_mapper.mustache | 26 + .../libraries/microprofile/api_test.mustache | 81 + .../microprofile/beanValidation.mustache | 6 + .../beanValidationCookieParams.mustache | 1 + .../microprofile/beanValidationCore.mustache | 20 + .../beanValidationHeaderParams.mustache | 1 + .../beanValidationPathParams.mustache | 1 + .../beanValidationQueryParams.mustache | 1 + .../microprofile/bodyParams.mustache | 1 + .../microprofile/bodyParamsImpl.mustache | 1 + .../microprofile/client_operation.mustache | 1 + .../microprofile/cookieParams.mustache | 1 + .../microprofile/cookieParamsImpl.mustache | 1 + .../libraries/microprofile/enumClass.mustache | 84 + .../microprofile/enumOuterClass.mustache | 70 + .../microprofile/formParams.mustache | 1 + .../microprofile/formParamsImpl.mustache | 1 + .../formParamsNameSuffix.mustache | 1 + .../microprofile/generatedAnnotation.mustache | 1 + .../microprofile/headerParams.mustache | 1 + .../microprofile/headerParamsImpl.mustache | 1 + .../microprofile/kumuluzee.beans.xml.mustache | 5 + .../kumuluzee.config.yaml.mustache | 10 + .../microprofile/kumuluzee.pom.mustache | 98 + .../microprofile/licenseInfo.mustache | 11 + .../libraries/microprofile/model.mustache | 65 + .../microprofile/pathParams.mustache | 1 + .../microprofile/pathParamsImpl.mustache | 1 + .../libraries/microprofile/pojo.mustache | 156 + .../microprofile/pojoOverrides.mustache | 70 + templates/libraries/microprofile/pom.mustache | 258 ++ .../libraries/microprofile/pom_3.0.mustache | 258 ++ .../microprofile/queryParams.mustache | 1 + .../microprofile/queryParamsImpl.mustache | 1 + .../microprofile/server_operation.mustache | 1 + .../native/AbstractOpenApiSchema.mustache | 138 + templates/libraries/native/ApiClient.mustache | 451 +++ .../libraries/native/ApiResponse.mustache | 60 + templates/libraries/native/JSON.mustache | 271 ++ templates/libraries/native/README.mustache | 191 + .../native/additional_properties.mustache | 45 + .../libraries/native/anyof_model.mustache | 364 ++ templates/libraries/native/api.mustache | 821 +++++ .../libraries/native/apiException.mustache | 82 + templates/libraries/native/api_doc.mustache | 280 ++ templates/libraries/native/api_test.mustache | 63 + .../libraries/native/build.gradle.mustache | 140 + .../native/generatedAnnotation.mustache | 1 + templates/libraries/native/model.mustache | 67 + templates/libraries/native/modelEnum.mustache | 120 + .../libraries/native/model_anyof_doc.mustache | 38 + templates/libraries/native/model_doc.mustache | 23 + .../libraries/native/model_oneof_doc.mustache | 38 + .../libraries/native/oneof_model.mustache | 397 +++ templates/libraries/native/pojo.mustache | 583 ++++ templates/libraries/native/pom.mustache | 321 ++ templates/libraries/native/travis.mustache | 16 + .../AbstractOpenApiSchema.mustache | 137 + .../okhttp-gson/ApiCallback.mustache | 51 + .../libraries/okhttp-gson/ApiClient.mustache | 1066 ++++-- .../okhttp-gson/ApiResponse.mustache | 75 + .../GzipRequestInterceptor.mustache | 74 + templates/libraries/okhttp-gson/JSON.mustache | 561 +++ .../okhttp-gson/ProgressRequestBody.mustache | 62 + .../okhttp-gson/ProgressResponseBody.mustache | 59 + .../libraries/okhttp-gson/README.mustache | 195 ++ .../additional_properties.mustache | 46 + .../okhttp-gson/anyof_model.mustache | 408 +++ templates/libraries/okhttp-gson/api.mustache | 610 ++++ .../okhttp-gson/apiException.mustache | 196 ++ .../libraries/okhttp-gson/api_doc.mustache | 110 + .../libraries/okhttp-gson/api_test.mustache | 65 + .../okhttp-gson/auth/AWS4Auth.mustache | 105 + .../okhttp-gson/auth/ApiKeyAuth.mustache | 70 + .../okhttp-gson/auth/Authentication.mustache | 27 + .../okhttp-gson/auth/HttpBasicAuth.mustache | 44 + .../okhttp-gson/auth/HttpBearerAuth.mustache | 65 + .../libraries/okhttp-gson/auth/OAuth.mustache | 32 + .../auth/OAuthOkHttpClient.mustache | 73 + .../okhttp-gson/auth/RetryingOAuth.mustache | 214 ++ .../okhttp-gson/build.gradle.mustache | 202 ++ .../libraries/okhttp-gson/build.sbt.mustache | 41 + .../libraries/okhttp-gson/model.mustache | 35 + .../libraries/okhttp-gson/modelEnum.mustache | 85 + .../okhttp-gson/modelInnerEnum.mustache | 66 + .../libraries/okhttp-gson/model_test.mustache | 42 + .../okhttp-gson/oneof_model.mustache | 522 +++ templates/libraries/okhttp-gson/pojo.mustache | 595 ++++ .../libraries/okhttp-gson/pom.mustache | 246 +- .../libraries/rest-assured/ApiClient.mustache | 59 + .../rest-assured/GsonObjectMapper.mustache | 30 + .../rest-assured/JacksonObjectMapper.mustache | 51 + .../libraries/rest-assured/Oper.mustache | 13 + .../libraries/rest-assured/README.mustache | 42 + .../ResponseSpecBuilders.mustache | 31 + templates/libraries/rest-assured/api.mustache | 291 ++ .../libraries/rest-assured/api_doc.mustache | 62 + .../libraries/rest-assured/api_test.mustache | 72 + .../rest-assured/build.gradle.mustache | 167 + .../libraries/rest-assured/build.sbt.mustache | 49 + templates/libraries/rest-assured/pom.mustache | 370 ++ .../libraries/restclient/ApiClient.mustache | 891 +++++ .../libraries/restclient/README.mustache | 216 ++ .../restclient/additional_properties.mustache | 45 + templates/libraries/restclient/api.mustache | 221 ++ .../libraries/restclient/api_test.mustache | 45 + .../restclient/auth/ApiKeyAuth.mustache | 65 + .../restclient/auth/Authentication.mustache | 19 + .../restclient/auth/HttpBasicAuth.mustache | 41 + .../restclient/auth/HttpBearerAuth.mustache | 59 + .../libraries/restclient/auth/OAuth.mustache | 51 + .../restclient/auth/OAuthFlow.mustache | 7 + .../restclient/build.gradle.mustache | 159 + templates/libraries/restclient/model.mustache | 78 + templates/libraries/restclient/pojo.mustache | 625 ++++ templates/libraries/restclient/pom.mustache | 365 ++ .../single_request_parameter.mustache | 110 + .../libraries/resteasy/ApiClient.mustache | 773 ++++ templates/libraries/resteasy/JSON.mustache | 49 + templates/libraries/resteasy/api.mustache | 113 + .../libraries/resteasy/build.gradle.mustache | 130 + .../libraries/resteasy/build.sbt.mustache | 26 + templates/libraries/resteasy/pom.mustache | 317 ++ .../libraries/resttemplate/ApiClient.mustache | 971 ++++++ .../libraries/resttemplate/BaseApi.mustache | 77 + .../additional_properties.mustache | 45 + templates/libraries/resttemplate/api.mustache | 189 + .../libraries/resttemplate/api_test.mustache | 51 + .../resttemplate/auth/ApiKeyAuth.mustache | 65 + .../resttemplate/auth/Authentication.mustache | 19 + .../resttemplate/auth/HttpBasicAuth.mustache | 41 + .../resttemplate/auth/HttpBearerAuth.mustache | 59 + .../resttemplate/auth/OAuth.mustache | 51 + .../resttemplate/auth/OAuthFlow.mustache | 7 + .../resttemplate/build.gradle.mustache | 188 + .../libraries/resttemplate/model.mustache | 78 + .../libraries/resttemplate/pojo.mustache | 625 ++++ templates/libraries/resttemplate/pom.mustache | 387 ++ .../libraries/retrofit2/ApiClient.mustache | 477 +++ .../retrofit2/CollectionFormats.mustache | 101 + templates/libraries/retrofit2/JSON.mustache | 443 +++ .../libraries/retrofit2/JSON_jackson.mustache | 264 ++ templates/libraries/retrofit2/README.mustache | 38 + templates/libraries/retrofit2/api.mustache | 84 + .../libraries/retrofit2/api_test.mustache | 52 + .../retrofit2/auth/ApiKeyAuth.mustache | 74 + .../retrofit2/auth/HttpBasicAuth.mustache | 52 + .../retrofit2/auth/HttpBearerAuth.mustache | 44 + .../libraries/retrofit2/auth/OAuth.mustache | 187 + .../retrofit2/auth/OAuthOkHttpClient.mustache | 74 + .../libraries/retrofit2/bodyParams.mustache | 1 + .../libraries/retrofit2/build.gradle.mustache | 166 + .../libraries/retrofit2/build.sbt.mustache | 43 + .../libraries/retrofit2/formParams.mustache | 1 + .../retrofit2/formParams.mustache.save | 1 + .../libraries/retrofit2/headerParams.mustache | 1 + .../libraries/retrofit2/pathParams.mustache | 1 + .../play-common/auth/ApiKeyAuth.mustache | 70 + .../retrofit2/play24/ApiClient.mustache | 148 + .../play24/Play24CallAdapterFactory.mustache | 102 + .../play24/Play24CallFactory.mustache | 256 ++ .../libraries/retrofit2/play24/api.mustache | 63 + .../retrofit2/play25/ApiClient.mustache | 147 + .../play25/Play25CallAdapterFactory.mustache | 118 + .../play25/Play25CallFactory.mustache | 266 ++ .../libraries/retrofit2/play25/api.mustache | 63 + .../retrofit2/play26/ApiClient.mustache | 216 ++ .../play26/Play26CallAdapterFactory.mustache | 118 + .../play26/Play26CallFactory.mustache | 296 ++ .../libraries/retrofit2/play26/api.mustache | 71 + templates/libraries/retrofit2/pom.mustache | 417 +++ .../libraries/retrofit2/queryParams.mustache | 1 + templates/libraries/vertx/ApiClient.mustache | 737 ++++ .../libraries/vertx/Configuration.mustache | 45 + templates/libraries/vertx/api.mustache | 54 + .../libraries/vertx/apiException.mustache | 113 + templates/libraries/vertx/apiImpl.mustache | 122 + templates/libraries/vertx/api_test.mustache | 64 + .../libraries/vertx/auth/ApiKeyAuth.mustache | 67 + .../vertx/auth/Authentication.mustache | 21 + .../vertx/auth/HttpBasicAuth.mustache | 41 + .../vertx/auth/HttpBearerAuth.mustache | 40 + templates/libraries/vertx/auth/OAuth.mustache | 29 + .../libraries/vertx/auth/OAuthFlow.mustache | 7 + .../libraries/vertx/build.gradle.mustache | 61 + templates/libraries/vertx/pom.mustache | 320 ++ templates/libraries/vertx/rxApiImpl.mustache | 88 + .../libraries/webclient/ApiClient.mustache | 805 +++++ .../webclient/additional_properties.mustache | 45 + templates/libraries/webclient/api.mustache | 223 ++ .../libraries/webclient/api_test.mustache | 47 + .../webclient/auth/ApiKeyAuth.mustache | 65 + .../webclient/auth/Authentication.mustache | 19 + .../webclient/auth/HttpBasicAuth.mustache | 41 + .../webclient/auth/HttpBearerAuth.mustache | 38 + .../libraries/webclient/auth/OAuth.mustache | 27 + .../webclient/auth/OAuthFlow.mustache | 7 + .../libraries/webclient/build.gradle.mustache | 182 + templates/libraries/webclient/model.mustache | 78 + templates/libraries/webclient/pojo.mustache | 625 ++++ templates/libraries/webclient/pom.mustache | 192 + .../single_request_parameter.mustache | 106 + templates/licenseInfo.mustache | 11 + templates/manifest.mustache | 3 + templates/maven.yml.mustache | 31 + templates/model.mustache | 68 + templates/modelEnum.mustache | 120 + templates/modelInnerEnum.mustache | 95 + templates/model_doc.mustache | 4 + templates/model_test.mustache | 43 + templates/nullable_var_annotations.mustache | 1 + templates/oneof_interface.mustache | 6 + templates/openapi.mustache | 1 + templates/permits.mustache | 1 + templates/pojo.mustache | 624 ++++ templates/pojo_doc.mustache | 37 + templates/pom.mustache | 404 +++ templates/sealed.mustache | 1 + templates/settings.gradle.mustache | 1 + templates/toto.mustache | 5 + templates/travis.mustache | 22 + templates/typeInfoAnnotation.mustache | 23 + templates/xmlAnnotation.mustache | 6 + 2296 files changed, 50909 insertions(+), 285379 deletions(-) delete mode 100644 .osc-api-patches/outscale-yaml.patch delete mode 100644 .osc-patches/after-format/0001-give-basePath-priority-if-set-by-user.patch delete mode 100644 .osc-patches/after-format/2022-12-15-add_exception_conf.patch delete mode 100644 .osc-patches/before-format/2022-12-06-1-configfile-support.patch delete mode 100644 .osc-patches/before-format/2022-12-06-2-configenv-support.patch delete mode 100644 .osc-patches/before-format/2022-12-07-basic-auth.patch delete mode 100644 README.md.template delete mode 100644 docs/AcceptNetPeeringRequest.md delete mode 100644 docs/AcceptNetPeeringResponse.md delete mode 100644 docs/AccepterNet.md delete mode 100644 docs/AccessKey.md delete mode 100644 docs/AccessKeyApi.md delete mode 100644 docs/AccessKeySecretKey.md delete mode 100644 docs/AccessLog.md delete mode 100644 docs/Account.md delete mode 100644 docs/AccountApi.md delete mode 100644 docs/ApiAccessPolicy.md delete mode 100644 docs/ApiAccessPolicyApi.md delete mode 100644 docs/ApiAccessRule.md delete mode 100644 docs/ApiAccessRuleApi.md delete mode 100644 docs/ApiLogApi.md delete mode 100644 docs/ApplicationStickyCookiePolicy.md delete mode 100644 docs/BackendVmHealth.md delete mode 100644 docs/BlockDeviceMappingCreated.md delete mode 100644 docs/BlockDeviceMappingImage.md delete mode 100644 docs/BlockDeviceMappingVmCreation.md delete mode 100644 docs/BlockDeviceMappingVmUpdate.md delete mode 100644 docs/BsuCreated.md delete mode 100644 docs/BsuToCreate.md delete mode 100644 docs/BsuToUpdateVm.md delete mode 100644 docs/Ca.md delete mode 100644 docs/CaApi.md delete mode 100644 docs/Catalog.md delete mode 100644 docs/CatalogApi.md delete mode 100644 docs/CatalogEntry.md delete mode 100644 docs/Catalogs.md delete mode 100644 docs/CheckAuthenticationRequest.md delete mode 100644 docs/CheckAuthenticationResponse.md delete mode 100644 docs/ClientGateway.md delete mode 100644 docs/ClientGatewayApi.md delete mode 100644 docs/ConsumptionEntry.md delete mode 100644 docs/CreateAccessKeyRequest.md delete mode 100644 docs/CreateAccessKeyResponse.md delete mode 100644 docs/CreateAccountRequest.md delete mode 100644 docs/CreateAccountResponse.md delete mode 100644 docs/CreateApiAccessRuleRequest.md delete mode 100644 docs/CreateApiAccessRuleResponse.md delete mode 100644 docs/CreateCaRequest.md delete mode 100644 docs/CreateCaResponse.md delete mode 100644 docs/CreateClientGatewayRequest.md delete mode 100644 docs/CreateClientGatewayResponse.md delete mode 100644 docs/CreateDhcpOptionsRequest.md delete mode 100644 docs/CreateDhcpOptionsResponse.md delete mode 100644 docs/CreateDirectLinkInterfaceRequest.md delete mode 100644 docs/CreateDirectLinkInterfaceResponse.md delete mode 100644 docs/CreateDirectLinkRequest.md delete mode 100644 docs/CreateDirectLinkResponse.md delete mode 100644 docs/CreateFlexibleGpuRequest.md delete mode 100644 docs/CreateFlexibleGpuResponse.md delete mode 100644 docs/CreateImageExportTaskRequest.md delete mode 100644 docs/CreateImageExportTaskResponse.md delete mode 100644 docs/CreateImageRequest.md delete mode 100644 docs/CreateImageResponse.md delete mode 100644 docs/CreateInternetServiceRequest.md delete mode 100644 docs/CreateInternetServiceResponse.md delete mode 100644 docs/CreateKeypairRequest.md delete mode 100644 docs/CreateKeypairResponse.md delete mode 100644 docs/CreateListenerRuleRequest.md delete mode 100644 docs/CreateListenerRuleResponse.md delete mode 100644 docs/CreateLoadBalancerListenersRequest.md delete mode 100644 docs/CreateLoadBalancerListenersResponse.md delete mode 100644 docs/CreateLoadBalancerPolicyRequest.md delete mode 100644 docs/CreateLoadBalancerPolicyResponse.md delete mode 100644 docs/CreateLoadBalancerRequest.md delete mode 100644 docs/CreateLoadBalancerResponse.md delete mode 100644 docs/CreateLoadBalancerTagsRequest.md delete mode 100644 docs/CreateLoadBalancerTagsResponse.md delete mode 100644 docs/CreateNatServiceRequest.md delete mode 100644 docs/CreateNatServiceResponse.md delete mode 100644 docs/CreateNetAccessPointRequest.md delete mode 100644 docs/CreateNetAccessPointResponse.md delete mode 100644 docs/CreateNetPeeringRequest.md delete mode 100644 docs/CreateNetPeeringResponse.md delete mode 100644 docs/CreateNetRequest.md delete mode 100644 docs/CreateNetResponse.md delete mode 100644 docs/CreateNicRequest.md delete mode 100644 docs/CreateNicResponse.md delete mode 100644 docs/CreatePublicIpRequest.md delete mode 100644 docs/CreatePublicIpResponse.md delete mode 100644 docs/CreateRouteRequest.md delete mode 100644 docs/CreateRouteResponse.md delete mode 100644 docs/CreateRouteTableRequest.md delete mode 100644 docs/CreateRouteTableResponse.md delete mode 100644 docs/CreateSecurityGroupRequest.md delete mode 100644 docs/CreateSecurityGroupResponse.md delete mode 100644 docs/CreateSecurityGroupRuleRequest.md delete mode 100644 docs/CreateSecurityGroupRuleResponse.md delete mode 100644 docs/CreateServerCertificateRequest.md delete mode 100644 docs/CreateServerCertificateResponse.md delete mode 100644 docs/CreateSnapshotExportTaskRequest.md delete mode 100644 docs/CreateSnapshotExportTaskResponse.md delete mode 100644 docs/CreateSnapshotRequest.md delete mode 100644 docs/CreateSnapshotResponse.md delete mode 100644 docs/CreateSubnetRequest.md delete mode 100644 docs/CreateSubnetResponse.md delete mode 100644 docs/CreateTagsRequest.md delete mode 100644 docs/CreateTagsResponse.md delete mode 100644 docs/CreateVirtualGatewayRequest.md delete mode 100644 docs/CreateVirtualGatewayResponse.md delete mode 100644 docs/CreateVmGroupRequest.md delete mode 100644 docs/CreateVmGroupResponse.md delete mode 100644 docs/CreateVmTemplateRequest.md delete mode 100644 docs/CreateVmTemplateResponse.md delete mode 100644 docs/CreateVmsRequest.md delete mode 100644 docs/CreateVmsResponse.md delete mode 100644 docs/CreateVolumeRequest.md delete mode 100644 docs/CreateVolumeResponse.md delete mode 100644 docs/CreateVpnConnectionRequest.md delete mode 100644 docs/CreateVpnConnectionResponse.md delete mode 100644 docs/CreateVpnConnectionRouteRequest.md delete mode 100644 docs/CreateVpnConnectionRouteResponse.md delete mode 100644 docs/DeleteAccessKeyRequest.md delete mode 100644 docs/DeleteAccessKeyResponse.md delete mode 100644 docs/DeleteApiAccessRuleRequest.md delete mode 100644 docs/DeleteApiAccessRuleResponse.md delete mode 100644 docs/DeleteCaRequest.md delete mode 100644 docs/DeleteCaResponse.md delete mode 100644 docs/DeleteClientGatewayRequest.md delete mode 100644 docs/DeleteClientGatewayResponse.md delete mode 100644 docs/DeleteDhcpOptionsRequest.md delete mode 100644 docs/DeleteDhcpOptionsResponse.md delete mode 100644 docs/DeleteDirectLinkInterfaceRequest.md delete mode 100644 docs/DeleteDirectLinkInterfaceResponse.md delete mode 100644 docs/DeleteDirectLinkRequest.md delete mode 100644 docs/DeleteDirectLinkResponse.md delete mode 100644 docs/DeleteExportTaskRequest.md delete mode 100644 docs/DeleteExportTaskResponse.md delete mode 100644 docs/DeleteFlexibleGpuRequest.md delete mode 100644 docs/DeleteFlexibleGpuResponse.md delete mode 100644 docs/DeleteImageRequest.md delete mode 100644 docs/DeleteImageResponse.md delete mode 100644 docs/DeleteInternetServiceRequest.md delete mode 100644 docs/DeleteInternetServiceResponse.md delete mode 100644 docs/DeleteKeypairRequest.md delete mode 100644 docs/DeleteKeypairResponse.md delete mode 100644 docs/DeleteListenerRuleRequest.md delete mode 100644 docs/DeleteListenerRuleResponse.md delete mode 100644 docs/DeleteLoadBalancerListenersRequest.md delete mode 100644 docs/DeleteLoadBalancerListenersResponse.md delete mode 100644 docs/DeleteLoadBalancerPolicyRequest.md delete mode 100644 docs/DeleteLoadBalancerPolicyResponse.md delete mode 100644 docs/DeleteLoadBalancerRequest.md delete mode 100644 docs/DeleteLoadBalancerResponse.md delete mode 100644 docs/DeleteLoadBalancerTagsRequest.md delete mode 100644 docs/DeleteLoadBalancerTagsResponse.md delete mode 100644 docs/DeleteNatServiceRequest.md delete mode 100644 docs/DeleteNatServiceResponse.md delete mode 100644 docs/DeleteNetAccessPointRequest.md delete mode 100644 docs/DeleteNetAccessPointResponse.md delete mode 100644 docs/DeleteNetPeeringRequest.md delete mode 100644 docs/DeleteNetPeeringResponse.md delete mode 100644 docs/DeleteNetRequest.md delete mode 100644 docs/DeleteNetResponse.md delete mode 100644 docs/DeleteNicRequest.md delete mode 100644 docs/DeleteNicResponse.md delete mode 100644 docs/DeletePublicIpRequest.md delete mode 100644 docs/DeletePublicIpResponse.md delete mode 100644 docs/DeleteRouteRequest.md delete mode 100644 docs/DeleteRouteResponse.md delete mode 100644 docs/DeleteRouteTableRequest.md delete mode 100644 docs/DeleteRouteTableResponse.md delete mode 100644 docs/DeleteSecurityGroupRequest.md delete mode 100644 docs/DeleteSecurityGroupResponse.md delete mode 100644 docs/DeleteSecurityGroupRuleRequest.md delete mode 100644 docs/DeleteSecurityGroupRuleResponse.md delete mode 100644 docs/DeleteServerCertificateRequest.md delete mode 100644 docs/DeleteServerCertificateResponse.md delete mode 100644 docs/DeleteSnapshotRequest.md delete mode 100644 docs/DeleteSnapshotResponse.md delete mode 100644 docs/DeleteSubnetRequest.md delete mode 100644 docs/DeleteSubnetResponse.md delete mode 100644 docs/DeleteTagsRequest.md delete mode 100644 docs/DeleteTagsResponse.md delete mode 100644 docs/DeleteVirtualGatewayRequest.md delete mode 100644 docs/DeleteVirtualGatewayResponse.md delete mode 100644 docs/DeleteVmGroupRequest.md delete mode 100644 docs/DeleteVmGroupResponse.md delete mode 100644 docs/DeleteVmTemplateRequest.md delete mode 100644 docs/DeleteVmTemplateResponse.md delete mode 100644 docs/DeleteVmsRequest.md delete mode 100644 docs/DeleteVmsResponse.md delete mode 100644 docs/DeleteVolumeRequest.md delete mode 100644 docs/DeleteVolumeResponse.md delete mode 100644 docs/DeleteVpnConnectionRequest.md delete mode 100644 docs/DeleteVpnConnectionResponse.md delete mode 100644 docs/DeleteVpnConnectionRouteRequest.md delete mode 100644 docs/DeleteVpnConnectionRouteResponse.md delete mode 100644 docs/DeregisterVmsInLoadBalancerRequest.md delete mode 100644 docs/DeregisterVmsInLoadBalancerResponse.md delete mode 100644 docs/DhcpOptionApi.md delete mode 100644 docs/DhcpOptionsSet.md delete mode 100644 docs/DirectLink.md delete mode 100644 docs/DirectLinkApi.md delete mode 100644 docs/DirectLinkInterface.md delete mode 100644 docs/DirectLinkInterfaceApi.md delete mode 100644 docs/DirectLinkInterfaces.md delete mode 100644 docs/ErrorResponse.md delete mode 100644 docs/Errors.md delete mode 100644 docs/FiltersAccessKeys.md delete mode 100644 docs/FiltersApiAccessRule.md delete mode 100644 docs/FiltersApiLog.md delete mode 100644 docs/FiltersCa.md delete mode 100644 docs/FiltersCatalogs.md delete mode 100644 docs/FiltersClientGateway.md delete mode 100644 docs/FiltersDhcpOptions.md delete mode 100644 docs/FiltersDirectLink.md delete mode 100644 docs/FiltersDirectLinkInterface.md delete mode 100644 docs/FiltersExportTask.md delete mode 100644 docs/FiltersFlexibleGpu.md delete mode 100644 docs/FiltersImage.md delete mode 100644 docs/FiltersInternetService.md delete mode 100644 docs/FiltersKeypair.md delete mode 100644 docs/FiltersListenerRule.md delete mode 100644 docs/FiltersLoadBalancer.md delete mode 100644 docs/FiltersNatService.md delete mode 100644 docs/FiltersNet.md delete mode 100644 docs/FiltersNetAccessPoint.md delete mode 100644 docs/FiltersNetPeering.md delete mode 100644 docs/FiltersNic.md delete mode 100644 docs/FiltersProductType.md delete mode 100644 docs/FiltersPublicIp.md delete mode 100644 docs/FiltersQuota.md delete mode 100644 docs/FiltersRouteTable.md delete mode 100644 docs/FiltersSecurityGroup.md delete mode 100644 docs/FiltersServerCertificate.md delete mode 100644 docs/FiltersService.md delete mode 100644 docs/FiltersSnapshot.md delete mode 100644 docs/FiltersSubnet.md delete mode 100644 docs/FiltersSubregion.md delete mode 100644 docs/FiltersTag.md delete mode 100644 docs/FiltersVirtualGateway.md delete mode 100644 docs/FiltersVm.md delete mode 100644 docs/FiltersVmGroup.md delete mode 100644 docs/FiltersVmTemplate.md delete mode 100644 docs/FiltersVmType.md delete mode 100644 docs/FiltersVmsState.md delete mode 100644 docs/FiltersVolume.md delete mode 100644 docs/FiltersVpnConnection.md delete mode 100644 docs/FlexibleGpu.md delete mode 100644 docs/FlexibleGpuApi.md delete mode 100644 docs/FlexibleGpuCatalog.md delete mode 100644 docs/HealthCheck.md delete mode 100644 docs/Image.md delete mode 100644 docs/ImageApi.md delete mode 100644 docs/ImageExportTask.md delete mode 100644 docs/InternetService.md delete mode 100644 docs/InternetServiceApi.md delete mode 100644 docs/Keypair.md delete mode 100644 docs/KeypairApi.md delete mode 100644 docs/KeypairCreated.md delete mode 100644 docs/LinkFlexibleGpuRequest.md delete mode 100644 docs/LinkFlexibleGpuResponse.md delete mode 100644 docs/LinkInternetServiceRequest.md delete mode 100644 docs/LinkInternetServiceResponse.md delete mode 100644 docs/LinkLoadBalancerBackendMachinesRequest.md delete mode 100644 docs/LinkLoadBalancerBackendMachinesResponse.md delete mode 100644 docs/LinkNic.md delete mode 100644 docs/LinkNicLight.md delete mode 100644 docs/LinkNicRequest.md delete mode 100644 docs/LinkNicResponse.md delete mode 100644 docs/LinkNicToUpdate.md delete mode 100644 docs/LinkPrivateIpsRequest.md delete mode 100644 docs/LinkPrivateIpsResponse.md delete mode 100644 docs/LinkPublicIp.md delete mode 100644 docs/LinkPublicIpLightForVm.md delete mode 100644 docs/LinkPublicIpRequest.md delete mode 100644 docs/LinkPublicIpResponse.md delete mode 100644 docs/LinkRouteTable.md delete mode 100644 docs/LinkRouteTableRequest.md delete mode 100644 docs/LinkRouteTableResponse.md delete mode 100644 docs/LinkVirtualGatewayRequest.md delete mode 100644 docs/LinkVirtualGatewayResponse.md delete mode 100644 docs/LinkVolumeRequest.md delete mode 100644 docs/LinkVolumeResponse.md delete mode 100644 docs/LinkedVolume.md delete mode 100644 docs/Listener.md delete mode 100644 docs/ListenerApi.md delete mode 100644 docs/ListenerForCreation.md delete mode 100644 docs/ListenerRule.md delete mode 100644 docs/ListenerRuleForCreation.md delete mode 100644 docs/LoadBalancer.md delete mode 100644 docs/LoadBalancerApi.md delete mode 100644 docs/LoadBalancerLight.md delete mode 100644 docs/LoadBalancerPolicyApi.md delete mode 100644 docs/LoadBalancerStickyCookiePolicy.md delete mode 100644 docs/LoadBalancerTag.md delete mode 100644 docs/Location.md delete mode 100644 docs/LocationApi.md delete mode 100644 docs/Log.md delete mode 100644 docs/MaintenanceEvent.md delete mode 100644 docs/NatService.md delete mode 100644 docs/NatServiceApi.md delete mode 100644 docs/Net.md delete mode 100644 docs/NetAccessPoint.md delete mode 100644 docs/NetAccessPointApi.md delete mode 100644 docs/NetApi.md delete mode 100644 docs/NetPeering.md delete mode 100644 docs/NetPeeringApi.md delete mode 100644 docs/NetPeeringState.md delete mode 100644 docs/NetToVirtualGatewayLink.md delete mode 100644 docs/Nic.md delete mode 100644 docs/NicApi.md delete mode 100644 docs/NicForVmCreation.md delete mode 100644 docs/NicLight.md delete mode 100644 docs/OsuApiKey.md delete mode 100644 docs/OsuExportImageExportTask.md delete mode 100644 docs/OsuExportSnapshotExportTask.md delete mode 100644 docs/OsuExportToCreate.md delete mode 100644 docs/PermissionsOnResource.md delete mode 100644 docs/PermissionsOnResourceCreation.md delete mode 100644 docs/Phase1Options.md delete mode 100644 docs/Phase2Options.md delete mode 100644 docs/Placement.md delete mode 100644 docs/PrivateIp.md delete mode 100644 docs/PrivateIpLight.md delete mode 100644 docs/PrivateIpLightForVm.md delete mode 100644 docs/ProductType.md delete mode 100644 docs/ProductTypeApi.md delete mode 100644 docs/PublicCatalogApi.md delete mode 100644 docs/PublicIp.md delete mode 100644 docs/PublicIpApi.md delete mode 100644 docs/PublicIpLight.md delete mode 100644 docs/Quota.md delete mode 100644 docs/QuotaApi.md delete mode 100644 docs/QuotaTypes.md delete mode 100644 docs/ReadAccessKeysRequest.md delete mode 100644 docs/ReadAccessKeysResponse.md delete mode 100644 docs/ReadAccountsRequest.md delete mode 100644 docs/ReadAccountsResponse.md delete mode 100644 docs/ReadAdminPasswordRequest.md delete mode 100644 docs/ReadAdminPasswordResponse.md delete mode 100644 docs/ReadApiAccessPolicyRequest.md delete mode 100644 docs/ReadApiAccessPolicyResponse.md delete mode 100644 docs/ReadApiAccessRulesRequest.md delete mode 100644 docs/ReadApiAccessRulesResponse.md delete mode 100644 docs/ReadApiLogsRequest.md delete mode 100644 docs/ReadApiLogsResponse.md delete mode 100644 docs/ReadCasRequest.md delete mode 100644 docs/ReadCasResponse.md delete mode 100644 docs/ReadCatalogRequest.md delete mode 100644 docs/ReadCatalogResponse.md delete mode 100644 docs/ReadCatalogsRequest.md delete mode 100644 docs/ReadCatalogsResponse.md delete mode 100644 docs/ReadClientGatewaysRequest.md delete mode 100644 docs/ReadClientGatewaysResponse.md delete mode 100644 docs/ReadConsoleOutputRequest.md delete mode 100644 docs/ReadConsoleOutputResponse.md delete mode 100644 docs/ReadConsumptionAccountRequest.md delete mode 100644 docs/ReadConsumptionAccountResponse.md delete mode 100644 docs/ReadDhcpOptionsRequest.md delete mode 100644 docs/ReadDhcpOptionsResponse.md delete mode 100644 docs/ReadDirectLinkInterfacesRequest.md delete mode 100644 docs/ReadDirectLinkInterfacesResponse.md delete mode 100644 docs/ReadDirectLinksRequest.md delete mode 100644 docs/ReadDirectLinksResponse.md delete mode 100644 docs/ReadFlexibleGpuCatalogRequest.md delete mode 100644 docs/ReadFlexibleGpuCatalogResponse.md delete mode 100644 docs/ReadFlexibleGpusRequest.md delete mode 100644 docs/ReadFlexibleGpusResponse.md delete mode 100644 docs/ReadImageExportTasksRequest.md delete mode 100644 docs/ReadImageExportTasksResponse.md delete mode 100644 docs/ReadImagesRequest.md delete mode 100644 docs/ReadImagesResponse.md delete mode 100644 docs/ReadInternetServicesRequest.md delete mode 100644 docs/ReadInternetServicesResponse.md delete mode 100644 docs/ReadKeypairsRequest.md delete mode 100644 docs/ReadKeypairsResponse.md delete mode 100644 docs/ReadListenerRulesRequest.md delete mode 100644 docs/ReadListenerRulesResponse.md delete mode 100644 docs/ReadLoadBalancerTagsRequest.md delete mode 100644 docs/ReadLoadBalancerTagsResponse.md delete mode 100644 docs/ReadLoadBalancersRequest.md delete mode 100644 docs/ReadLoadBalancersResponse.md delete mode 100644 docs/ReadLocationsRequest.md delete mode 100644 docs/ReadLocationsResponse.md delete mode 100644 docs/ReadNatServicesRequest.md delete mode 100644 docs/ReadNatServicesResponse.md delete mode 100644 docs/ReadNetAccessPointServicesRequest.md delete mode 100644 docs/ReadNetAccessPointServicesResponse.md delete mode 100644 docs/ReadNetAccessPointsRequest.md delete mode 100644 docs/ReadNetAccessPointsResponse.md delete mode 100644 docs/ReadNetPeeringsRequest.md delete mode 100644 docs/ReadNetPeeringsResponse.md delete mode 100644 docs/ReadNetsRequest.md delete mode 100644 docs/ReadNetsResponse.md delete mode 100644 docs/ReadNicsRequest.md delete mode 100644 docs/ReadNicsResponse.md delete mode 100644 docs/ReadProductTypesRequest.md delete mode 100644 docs/ReadProductTypesResponse.md delete mode 100644 docs/ReadPublicCatalogRequest.md delete mode 100644 docs/ReadPublicCatalogResponse.md delete mode 100644 docs/ReadPublicIpRangesRequest.md delete mode 100644 docs/ReadPublicIpRangesResponse.md delete mode 100644 docs/ReadPublicIpsRequest.md delete mode 100644 docs/ReadPublicIpsResponse.md delete mode 100644 docs/ReadQuotasRequest.md delete mode 100644 docs/ReadQuotasResponse.md delete mode 100644 docs/ReadRegionsRequest.md delete mode 100644 docs/ReadRegionsResponse.md delete mode 100644 docs/ReadRouteTablesRequest.md delete mode 100644 docs/ReadRouteTablesResponse.md delete mode 100644 docs/ReadSecretAccessKeyRequest.md delete mode 100644 docs/ReadSecretAccessKeyResponse.md delete mode 100644 docs/ReadSecurityGroupsRequest.md delete mode 100644 docs/ReadSecurityGroupsResponse.md delete mode 100644 docs/ReadServerCertificatesRequest.md delete mode 100644 docs/ReadServerCertificatesResponse.md delete mode 100644 docs/ReadSnapshotExportTasksRequest.md delete mode 100644 docs/ReadSnapshotExportTasksResponse.md delete mode 100644 docs/ReadSnapshotsRequest.md delete mode 100644 docs/ReadSnapshotsResponse.md delete mode 100644 docs/ReadSubnetsRequest.md delete mode 100644 docs/ReadSubnetsResponse.md delete mode 100644 docs/ReadSubregionsRequest.md delete mode 100644 docs/ReadSubregionsResponse.md delete mode 100644 docs/ReadTagsRequest.md delete mode 100644 docs/ReadTagsResponse.md delete mode 100644 docs/ReadVirtualGatewaysRequest.md delete mode 100644 docs/ReadVirtualGatewaysResponse.md delete mode 100644 docs/ReadVmGroupsRequest.md delete mode 100644 docs/ReadVmGroupsResponse.md delete mode 100644 docs/ReadVmTemplatesRequest.md delete mode 100644 docs/ReadVmTemplatesResponse.md delete mode 100644 docs/ReadVmTypesRequest.md delete mode 100644 docs/ReadVmTypesResponse.md delete mode 100644 docs/ReadVmsHealthRequest.md delete mode 100644 docs/ReadVmsHealthResponse.md delete mode 100644 docs/ReadVmsRequest.md delete mode 100644 docs/ReadVmsResponse.md delete mode 100644 docs/ReadVmsStateRequest.md delete mode 100644 docs/ReadVmsStateResponse.md delete mode 100644 docs/ReadVolumesRequest.md delete mode 100644 docs/ReadVolumesResponse.md delete mode 100644 docs/ReadVpnConnectionsRequest.md delete mode 100644 docs/ReadVpnConnectionsResponse.md delete mode 100644 docs/RebootVmsRequest.md delete mode 100644 docs/RebootVmsResponse.md delete mode 100644 docs/Region.md delete mode 100644 docs/RegionApi.md delete mode 100644 docs/RegisterVmsInLoadBalancerRequest.md delete mode 100644 docs/RegisterVmsInLoadBalancerResponse.md delete mode 100644 docs/RejectNetPeeringRequest.md delete mode 100644 docs/RejectNetPeeringResponse.md delete mode 100644 docs/ResourceLoadBalancerTag.md delete mode 100644 docs/ResourceTag.md delete mode 100644 docs/ResponseContext.md delete mode 100644 docs/Route.md delete mode 100644 docs/RouteApi.md delete mode 100644 docs/RouteLight.md delete mode 100644 docs/RoutePropagatingVirtualGateway.md delete mode 100644 docs/RouteTable.md delete mode 100644 docs/RouteTableApi.md delete mode 100644 docs/ScaleDownVmGroupRequest.md delete mode 100644 docs/ScaleDownVmGroupResponse.md delete mode 100644 docs/ScaleUpVmGroupRequest.md delete mode 100644 docs/ScaleUpVmGroupResponse.md delete mode 100644 docs/SecurityGroup.md delete mode 100644 docs/SecurityGroupApi.md delete mode 100644 docs/SecurityGroupLight.md delete mode 100644 docs/SecurityGroupRule.md delete mode 100644 docs/SecurityGroupRuleApi.md delete mode 100644 docs/SecurityGroupsMember.md delete mode 100644 docs/ServerCertificate.md delete mode 100644 docs/ServerCertificateApi.md delete mode 100644 docs/Service.md delete mode 100644 docs/Snapshot.md delete mode 100644 docs/SnapshotApi.md delete mode 100644 docs/SnapshotExportTask.md delete mode 100644 docs/SourceNet.md delete mode 100644 docs/SourceSecurityGroup.md delete mode 100644 docs/StartVmsRequest.md delete mode 100644 docs/StartVmsResponse.md delete mode 100644 docs/StateComment.md delete mode 100644 docs/StopVmsRequest.md delete mode 100644 docs/StopVmsResponse.md delete mode 100644 docs/Subnet.md delete mode 100644 docs/SubnetApi.md delete mode 100644 docs/Subregion.md delete mode 100644 docs/SubregionApi.md delete mode 100644 docs/Tag.md delete mode 100644 docs/TagApi.md delete mode 100644 docs/TaskApi.md delete mode 100644 docs/UnlinkFlexibleGpuRequest.md delete mode 100644 docs/UnlinkFlexibleGpuResponse.md delete mode 100644 docs/UnlinkInternetServiceRequest.md delete mode 100644 docs/UnlinkInternetServiceResponse.md delete mode 100644 docs/UnlinkLoadBalancerBackendMachinesRequest.md delete mode 100644 docs/UnlinkLoadBalancerBackendMachinesResponse.md delete mode 100644 docs/UnlinkNicRequest.md delete mode 100644 docs/UnlinkNicResponse.md delete mode 100644 docs/UnlinkPrivateIpsRequest.md delete mode 100644 docs/UnlinkPrivateIpsResponse.md delete mode 100644 docs/UnlinkPublicIpRequest.md delete mode 100644 docs/UnlinkPublicIpResponse.md delete mode 100644 docs/UnlinkRouteTableRequest.md delete mode 100644 docs/UnlinkRouteTableResponse.md delete mode 100644 docs/UnlinkVirtualGatewayRequest.md delete mode 100644 docs/UnlinkVirtualGatewayResponse.md delete mode 100644 docs/UnlinkVolumeRequest.md delete mode 100644 docs/UnlinkVolumeResponse.md delete mode 100644 docs/UpdateAccessKeyRequest.md delete mode 100644 docs/UpdateAccessKeyResponse.md delete mode 100644 docs/UpdateAccountRequest.md delete mode 100644 docs/UpdateAccountResponse.md delete mode 100644 docs/UpdateApiAccessPolicyRequest.md delete mode 100644 docs/UpdateApiAccessPolicyResponse.md delete mode 100644 docs/UpdateApiAccessRuleRequest.md delete mode 100644 docs/UpdateApiAccessRuleResponse.md delete mode 100644 docs/UpdateCaRequest.md delete mode 100644 docs/UpdateCaResponse.md delete mode 100644 docs/UpdateDirectLinkInterfaceRequest.md delete mode 100644 docs/UpdateDirectLinkInterfaceResponse.md delete mode 100644 docs/UpdateFlexibleGpuRequest.md delete mode 100644 docs/UpdateFlexibleGpuResponse.md delete mode 100644 docs/UpdateImageRequest.md delete mode 100644 docs/UpdateImageResponse.md delete mode 100644 docs/UpdateListenerRuleRequest.md delete mode 100644 docs/UpdateListenerRuleResponse.md delete mode 100644 docs/UpdateLoadBalancerRequest.md delete mode 100644 docs/UpdateLoadBalancerResponse.md delete mode 100644 docs/UpdateNetAccessPointRequest.md delete mode 100644 docs/UpdateNetAccessPointResponse.md delete mode 100644 docs/UpdateNetRequest.md delete mode 100644 docs/UpdateNetResponse.md delete mode 100644 docs/UpdateNicRequest.md delete mode 100644 docs/UpdateNicResponse.md delete mode 100644 docs/UpdateRoutePropagationRequest.md delete mode 100644 docs/UpdateRoutePropagationResponse.md delete mode 100644 docs/UpdateRouteRequest.md delete mode 100644 docs/UpdateRouteResponse.md delete mode 100644 docs/UpdateServerCertificateRequest.md delete mode 100644 docs/UpdateServerCertificateResponse.md delete mode 100644 docs/UpdateSnapshotRequest.md delete mode 100644 docs/UpdateSnapshotResponse.md delete mode 100644 docs/UpdateSubnetRequest.md delete mode 100644 docs/UpdateSubnetResponse.md delete mode 100644 docs/UpdateVmGroupRequest.md delete mode 100644 docs/UpdateVmGroupResponse.md delete mode 100644 docs/UpdateVmRequest.md delete mode 100644 docs/UpdateVmResponse.md delete mode 100644 docs/UpdateVmTemplateRequest.md delete mode 100644 docs/UpdateVmTemplateResponse.md delete mode 100644 docs/UpdateVolumeRequest.md delete mode 100644 docs/UpdateVolumeResponse.md delete mode 100644 docs/UpdateVpnConnectionRequest.md delete mode 100644 docs/UpdateVpnConnectionResponse.md delete mode 100644 docs/VgwTelemetry.md delete mode 100644 docs/VirtualGateway.md delete mode 100644 docs/VirtualGatewayApi.md delete mode 100644 docs/Vm.md delete mode 100644 docs/VmApi.md delete mode 100644 docs/VmGroup.md delete mode 100644 docs/VmGroupApi.md delete mode 100644 docs/VmState.md delete mode 100644 docs/VmStates.md delete mode 100644 docs/VmTemplate.md delete mode 100644 docs/VmTemplateApi.md delete mode 100644 docs/VmType.md delete mode 100644 docs/Volume.md delete mode 100644 docs/VolumeApi.md delete mode 100644 docs/VpnConnection.md delete mode 100644 docs/VpnConnectionApi.md delete mode 100644 docs/VpnOptions.md delete mode 100644 docs/With.md delete mode 100644 gen.yml delete mode 100644 src/main/AndroidManifest.xml delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/ApiCallback.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/ApiException.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/ApiResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/Configuration.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/GzipRequestInterceptor.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/JSON.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/Pair.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/ProgressRequestBody.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/ProgressResponseBody.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/StringUtil.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/AccountApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/CaApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/CatalogApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ImageApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/KeypairApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ListenerApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/LocationApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/NetApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/NicApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/PolicyApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/QuotaApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/RegionApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/SubnetApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/SubregionApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/TagApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/TaskApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/UserApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VmApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VolumeApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApi.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/auth/AWS4Auth.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/auth/ApiKeyAuth.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/auth/Authentication.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBearerAuth.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AbstractOpenApiSchema.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AccepterNet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKey.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKey.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessLog.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Account.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRule.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealth.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreated.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImage.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreation.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuCreated.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVm.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Ca.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalog.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntry.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalogs.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ClientGateway.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntry.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLink.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterface.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaces.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Errors.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeys.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRule.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLog.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCa.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogs.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGateway.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptions.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLink.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterface.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTask.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpu.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersImage.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetService.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypair.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRule.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancer.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatService.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPoint.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeering.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNic.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductType.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIp.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuota.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTable.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersService.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshot.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregion.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersTag.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGateway.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVm.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmType.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsState.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolume.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnection.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpu.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalog.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/HealthCheck.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Image.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTask.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/InternetService.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Keypair.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreated.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNic.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIp.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVm.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTable.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolume.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Listener.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreation.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRule.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreation.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancer.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTag.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Location.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Log.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEvent.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NatService.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Net.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPoint.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeering.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringState.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLink.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Nic.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreation.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/NicLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKey.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTask.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTask.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResource.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreation.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase1Options.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase2Options.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Placement.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Policy.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersion.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIp.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVm.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ProductType.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIp.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Quota.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypes.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFilters.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFilters.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Region.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTag.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceTag.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ResponseContext.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Route.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGateway.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteTable.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLight.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRule.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMember.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Service.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Snapshot.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTask.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceNet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/StateComment.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Subnet.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Subregion.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Tag.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequest.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponse.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/User.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/UserGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetry.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VirtualGateway.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Vm.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VmGroup.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VmState.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VmStates.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VmTemplate.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VmType.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/Volume.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnConnection.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnOptions.java delete mode 100644 src/main/java/io/github/outscale/osc_sdk_java/client/model/With.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/AccountApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/CaApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/CatalogApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ImageApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/KeypairApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ListenerApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/LocationApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/NetApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/NicApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/PolicyApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/QuotaApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/RegionApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/SubnetApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/SubregionApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/TagApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/TaskApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/UserApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VmApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VolumeApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApiTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AccepterNetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKeyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessLogTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AccountTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRuleTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealthTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreatedTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImageTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuCreatedTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVmTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CaTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntryTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ClientGatewayTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntryTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfacesTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeysTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRuleTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLogTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCaTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGatewayTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptionsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterfaceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTaskTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpuTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersImageTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypairTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRuleTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancerTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPointTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeeringTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNicTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductTypeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIpTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuotaTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTableTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshotTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersTagTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGatewayTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTypeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsStateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolumeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnectionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalogTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/HealthCheckTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTaskTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/InternetServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreatedTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVmTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolumeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTagTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LocationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/LogTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEventTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NatServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPointTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringStateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLinkTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NicLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/NicTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKeyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTaskTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTaskTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreationTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase1OptionsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase2OptionsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PlacementTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVmTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ProductTypeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypesTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFiltersTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFiltersTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RegionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTagTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceTagTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ResponseContextTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGatewayTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTableTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLightTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRuleTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMemberTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/ServiceTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTaskTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceNetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/StateCommentTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SubnetTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/SubregionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/TagTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequestTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponseTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UserGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/UserTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetryTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VirtualGatewayTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmGroupTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStatesTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTemplateTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTypeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VolumeTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnConnectionTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnOptionsTest.java delete mode 100644 src/test/java/io/github/outscale/osc_sdk_java/client/model/WithTest.java delete mode 100644 src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md delete mode 100644 src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt delete mode 100644 src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key delete mode 100644 src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt delete mode 100644 src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key create mode 100644 templates/ApiClient.mustache create mode 100644 templates/BeanValidationException.mustache create mode 100644 templates/Configuration.mustache create mode 100644 templates/CustomInstantDeserializer.mustache create mode 100644 templates/JSON.mustache create mode 100644 templates/JavaTimeFormatter.mustache create mode 100644 templates/Pair.mustache create mode 100644 templates/README.mustache create mode 100644 templates/RFC3339DateFormat.mustache create mode 100644 templates/RFC3339InstantDeserializer.mustache create mode 100644 templates/RFC3339JavaTimeModule.mustache rename src/main/java/io/github/outscale/osc_sdk_java/client/ServerConfiguration.java => templates/ServerConfiguration.mustache (62%) rename src/main/java/io/github/outscale/osc_sdk_java/client/ServerVariable.java => templates/ServerVariable.mustache (74%) create mode 100644 templates/StringUtil.mustache create mode 100644 templates/additionalEnumTypeAnnotations.mustache create mode 100644 templates/additionalModelTypeAnnotations.mustache create mode 100644 templates/additionalOneOfTypeAnnotations.mustache create mode 100644 templates/api.mustache create mode 100644 templates/apiException.mustache create mode 100644 templates/apiOperation.mustache create mode 100644 templates/api_doc.mustache create mode 100644 templates/api_test.mustache create mode 100644 templates/auth/ApiKeyAuth.mustache create mode 100644 templates/auth/Authentication.mustache create mode 100644 templates/auth/HttpBasicAuth.mustache create mode 100644 templates/auth/HttpBearerAuth.mustache create mode 100644 templates/auth/OAuth.mustache create mode 100644 templates/auth/OAuthFlow.mustache create mode 100644 templates/beanValidation.mustache create mode 100644 templates/beanValidationCore.mustache create mode 100644 templates/beanValidationQueryParams.mustache create mode 100644 templates/build.gradle.mustache create mode 100644 templates/build.sbt.mustache create mode 100644 templates/enum_outer_doc.mustache create mode 100644 templates/generatedAnnotation.mustache create mode 100644 templates/git_push.sh.mustache create mode 100644 templates/gitignore.mustache create mode 100644 templates/gradle-wrapper.jar create mode 100644 templates/gradle-wrapper.properties.mustache create mode 100644 templates/gradle.properties.mustache create mode 100644 templates/gradlew.bat.mustache create mode 100644 templates/gradlew.mustache create mode 100644 templates/jackson_annotations.mustache create mode 100644 templates/javaBuilder.mustache create mode 100644 templates/libraries/apache-httpclient/ApiClient.mustache create mode 100644 templates/libraries/apache-httpclient/BaseApi.mustache create mode 100644 templates/libraries/apache-httpclient/README.mustache create mode 100644 templates/libraries/apache-httpclient/api.mustache create mode 100644 templates/libraries/apache-httpclient/api_test.mustache create mode 100644 templates/libraries/apache-httpclient/build.gradle.mustache create mode 100644 templates/libraries/apache-httpclient/pom.mustache create mode 100644 templates/libraries/feign/ApiClient.mustache create mode 100644 templates/libraries/feign/ApiResponseDecoder.mustache create mode 100644 templates/libraries/feign/EncodingUtils.mustache create mode 100644 templates/libraries/feign/ParamExpander.mustache create mode 100644 templates/libraries/feign/README.mustache create mode 100644 templates/libraries/feign/additional_properties.mustache create mode 100644 templates/libraries/feign/api.mustache create mode 100644 templates/libraries/feign/api_test.mustache create mode 100644 templates/libraries/feign/auth/ApiErrorDecoder.mustache create mode 100644 templates/libraries/feign/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/feign/auth/DefaultApi20Impl.mustache create mode 100644 templates/libraries/feign/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/feign/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/feign/auth/OAuth.mustache create mode 100644 templates/libraries/feign/auth/OauthClientCredentialsGrant.mustache create mode 100644 templates/libraries/feign/auth/OauthPasswordGrant.mustache create mode 100644 templates/libraries/feign/build.gradle.mustache create mode 100644 templates/libraries/feign/build.sbt.mustache create mode 100644 templates/libraries/feign/model.mustache create mode 100644 templates/libraries/feign/model/ApiResponse.mustache create mode 100644 templates/libraries/feign/model_test.mustache create mode 100644 templates/libraries/feign/pojo.mustache create mode 100644 templates/libraries/feign/pom.mustache create mode 100644 templates/libraries/google-api-client/ApiClient.mustache create mode 100644 templates/libraries/google-api-client/api.mustache create mode 100644 templates/libraries/google-api-client/api_test.mustache create mode 100644 templates/libraries/google-api-client/build.gradle.mustache create mode 100644 templates/libraries/google-api-client/build.sbt.mustache create mode 100644 templates/libraries/google-api-client/pom.mustache create mode 100644 templates/libraries/jersey2/AbstractOpenApiSchema.mustache create mode 100644 templates/libraries/jersey2/ApiClient.mustache create mode 100644 templates/libraries/jersey2/ApiResponse.mustache create mode 100644 templates/libraries/jersey2/JSON.mustache create mode 100644 templates/libraries/jersey2/additional_properties.mustache create mode 100644 templates/libraries/jersey2/anyof_model.mustache create mode 100644 templates/libraries/jersey2/api.mustache create mode 100644 templates/libraries/jersey2/apiException.mustache create mode 100644 templates/libraries/jersey2/api_doc.mustache create mode 100644 templates/libraries/jersey2/api_test.mustache create mode 100644 templates/libraries/jersey2/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/jersey2/auth/Authentication.mustache create mode 100644 templates/libraries/jersey2/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/jersey2/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/jersey2/auth/HttpSignatureAuth.mustache create mode 100644 templates/libraries/jersey2/auth/OAuth.mustache create mode 100644 templates/libraries/jersey2/auth/OAuthFlow.mustache create mode 100644 templates/libraries/jersey2/build.gradle.mustache create mode 100644 templates/libraries/jersey2/build.sbt.mustache create mode 100644 templates/libraries/jersey2/model.mustache create mode 100644 templates/libraries/jersey2/model_anyof_doc.mustache create mode 100644 templates/libraries/jersey2/model_doc.mustache create mode 100644 templates/libraries/jersey2/model_oneof_doc.mustache create mode 100644 templates/libraries/jersey2/model_test.mustache create mode 100644 templates/libraries/jersey2/oneof_model.mustache create mode 100644 templates/libraries/jersey2/pojo.mustache create mode 100644 templates/libraries/jersey2/pom.mustache create mode 100644 templates/libraries/jersey3/AbstractOpenApiSchema.mustache create mode 100644 templates/libraries/jersey3/ApiClient.mustache create mode 100644 templates/libraries/jersey3/ApiResponse.mustache create mode 100644 templates/libraries/jersey3/JSON.mustache create mode 100644 templates/libraries/jersey3/additional_properties.mustache create mode 100644 templates/libraries/jersey3/anyof_model.mustache create mode 100644 templates/libraries/jersey3/api.mustache create mode 100644 templates/libraries/jersey3/apiException.mustache create mode 100644 templates/libraries/jersey3/api_doc.mustache create mode 100644 templates/libraries/jersey3/api_test.mustache create mode 100644 templates/libraries/jersey3/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/jersey3/auth/Authentication.mustache create mode 100644 templates/libraries/jersey3/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/jersey3/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/jersey3/auth/HttpSignatureAuth.mustache create mode 100644 templates/libraries/jersey3/auth/OAuth.mustache create mode 100644 templates/libraries/jersey3/auth/OAuthFlow.mustache create mode 100644 templates/libraries/jersey3/build.gradle.mustache create mode 100644 templates/libraries/jersey3/build.sbt.mustache create mode 100644 templates/libraries/jersey3/generatedAnnotation.mustache create mode 100644 templates/libraries/jersey3/model.mustache create mode 100644 templates/libraries/jersey3/model_anyof_doc.mustache create mode 100644 templates/libraries/jersey3/model_doc.mustache create mode 100644 templates/libraries/jersey3/model_oneof_doc.mustache create mode 100644 templates/libraries/jersey3/model_test.mustache create mode 100644 templates/libraries/jersey3/oneof_model.mustache create mode 100644 templates/libraries/jersey3/pojo.mustache create mode 100644 templates/libraries/jersey3/pom.mustache create mode 100644 templates/libraries/microprofile/README.mustache create mode 100644 templates/libraries/microprofile/additional_properties.mustache create mode 100644 templates/libraries/microprofile/api.mustache create mode 100644 templates/libraries/microprofile/api_exception.mustache create mode 100644 templates/libraries/microprofile/api_exception_mapper.mustache create mode 100644 templates/libraries/microprofile/api_test.mustache create mode 100644 templates/libraries/microprofile/beanValidation.mustache create mode 100644 templates/libraries/microprofile/beanValidationCookieParams.mustache create mode 100644 templates/libraries/microprofile/beanValidationCore.mustache create mode 100644 templates/libraries/microprofile/beanValidationHeaderParams.mustache create mode 100644 templates/libraries/microprofile/beanValidationPathParams.mustache create mode 100644 templates/libraries/microprofile/beanValidationQueryParams.mustache create mode 100644 templates/libraries/microprofile/bodyParams.mustache create mode 100644 templates/libraries/microprofile/bodyParamsImpl.mustache create mode 100644 templates/libraries/microprofile/client_operation.mustache create mode 100644 templates/libraries/microprofile/cookieParams.mustache create mode 100644 templates/libraries/microprofile/cookieParamsImpl.mustache create mode 100644 templates/libraries/microprofile/enumClass.mustache create mode 100644 templates/libraries/microprofile/enumOuterClass.mustache create mode 100644 templates/libraries/microprofile/formParams.mustache create mode 100644 templates/libraries/microprofile/formParamsImpl.mustache create mode 100644 templates/libraries/microprofile/formParamsNameSuffix.mustache create mode 100644 templates/libraries/microprofile/generatedAnnotation.mustache create mode 100644 templates/libraries/microprofile/headerParams.mustache create mode 100644 templates/libraries/microprofile/headerParamsImpl.mustache create mode 100644 templates/libraries/microprofile/kumuluzee.beans.xml.mustache create mode 100644 templates/libraries/microprofile/kumuluzee.config.yaml.mustache create mode 100644 templates/libraries/microprofile/kumuluzee.pom.mustache create mode 100644 templates/libraries/microprofile/licenseInfo.mustache create mode 100644 templates/libraries/microprofile/model.mustache create mode 100644 templates/libraries/microprofile/pathParams.mustache create mode 100644 templates/libraries/microprofile/pathParamsImpl.mustache create mode 100644 templates/libraries/microprofile/pojo.mustache create mode 100644 templates/libraries/microprofile/pojoOverrides.mustache create mode 100644 templates/libraries/microprofile/pom.mustache create mode 100644 templates/libraries/microprofile/pom_3.0.mustache create mode 100644 templates/libraries/microprofile/queryParams.mustache create mode 100644 templates/libraries/microprofile/queryParamsImpl.mustache create mode 100644 templates/libraries/microprofile/server_operation.mustache create mode 100644 templates/libraries/native/AbstractOpenApiSchema.mustache create mode 100644 templates/libraries/native/ApiClient.mustache create mode 100644 templates/libraries/native/ApiResponse.mustache create mode 100644 templates/libraries/native/JSON.mustache create mode 100644 templates/libraries/native/README.mustache create mode 100644 templates/libraries/native/additional_properties.mustache create mode 100644 templates/libraries/native/anyof_model.mustache create mode 100644 templates/libraries/native/api.mustache create mode 100644 templates/libraries/native/apiException.mustache create mode 100644 templates/libraries/native/api_doc.mustache create mode 100644 templates/libraries/native/api_test.mustache create mode 100644 templates/libraries/native/build.gradle.mustache create mode 100644 templates/libraries/native/generatedAnnotation.mustache create mode 100644 templates/libraries/native/model.mustache create mode 100644 templates/libraries/native/modelEnum.mustache create mode 100644 templates/libraries/native/model_anyof_doc.mustache create mode 100644 templates/libraries/native/model_doc.mustache create mode 100644 templates/libraries/native/model_oneof_doc.mustache create mode 100644 templates/libraries/native/oneof_model.mustache create mode 100644 templates/libraries/native/pojo.mustache create mode 100644 templates/libraries/native/pom.mustache create mode 100644 templates/libraries/native/travis.mustache create mode 100644 templates/libraries/okhttp-gson/AbstractOpenApiSchema.mustache create mode 100644 templates/libraries/okhttp-gson/ApiCallback.mustache rename src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java => templates/libraries/okhttp-gson/ApiClient.mustache (58%) create mode 100644 templates/libraries/okhttp-gson/ApiResponse.mustache create mode 100644 templates/libraries/okhttp-gson/GzipRequestInterceptor.mustache create mode 100644 templates/libraries/okhttp-gson/JSON.mustache create mode 100644 templates/libraries/okhttp-gson/ProgressRequestBody.mustache create mode 100644 templates/libraries/okhttp-gson/ProgressResponseBody.mustache create mode 100644 templates/libraries/okhttp-gson/README.mustache create mode 100644 templates/libraries/okhttp-gson/additional_properties.mustache create mode 100644 templates/libraries/okhttp-gson/anyof_model.mustache create mode 100644 templates/libraries/okhttp-gson/api.mustache create mode 100644 templates/libraries/okhttp-gson/apiException.mustache create mode 100644 templates/libraries/okhttp-gson/api_doc.mustache create mode 100644 templates/libraries/okhttp-gson/api_test.mustache create mode 100644 templates/libraries/okhttp-gson/auth/AWS4Auth.mustache create mode 100644 templates/libraries/okhttp-gson/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/okhttp-gson/auth/Authentication.mustache create mode 100644 templates/libraries/okhttp-gson/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/okhttp-gson/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/okhttp-gson/auth/OAuth.mustache create mode 100644 templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache create mode 100644 templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache create mode 100644 templates/libraries/okhttp-gson/build.gradle.mustache create mode 100644 templates/libraries/okhttp-gson/build.sbt.mustache create mode 100644 templates/libraries/okhttp-gson/model.mustache create mode 100644 templates/libraries/okhttp-gson/modelEnum.mustache create mode 100644 templates/libraries/okhttp-gson/modelInnerEnum.mustache create mode 100644 templates/libraries/okhttp-gson/model_test.mustache create mode 100644 templates/libraries/okhttp-gson/oneof_model.mustache create mode 100644 templates/libraries/okhttp-gson/pojo.mustache rename pom.xml.template => templates/libraries/okhttp-gson/pom.mustache (68%) create mode 100644 templates/libraries/rest-assured/ApiClient.mustache create mode 100644 templates/libraries/rest-assured/GsonObjectMapper.mustache create mode 100644 templates/libraries/rest-assured/JacksonObjectMapper.mustache create mode 100644 templates/libraries/rest-assured/Oper.mustache create mode 100644 templates/libraries/rest-assured/README.mustache create mode 100644 templates/libraries/rest-assured/ResponseSpecBuilders.mustache create mode 100644 templates/libraries/rest-assured/api.mustache create mode 100644 templates/libraries/rest-assured/api_doc.mustache create mode 100644 templates/libraries/rest-assured/api_test.mustache create mode 100644 templates/libraries/rest-assured/build.gradle.mustache create mode 100644 templates/libraries/rest-assured/build.sbt.mustache create mode 100644 templates/libraries/rest-assured/pom.mustache create mode 100644 templates/libraries/restclient/ApiClient.mustache create mode 100644 templates/libraries/restclient/README.mustache create mode 100644 templates/libraries/restclient/additional_properties.mustache create mode 100644 templates/libraries/restclient/api.mustache create mode 100644 templates/libraries/restclient/api_test.mustache create mode 100644 templates/libraries/restclient/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/restclient/auth/Authentication.mustache create mode 100644 templates/libraries/restclient/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/restclient/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/restclient/auth/OAuth.mustache create mode 100644 templates/libraries/restclient/auth/OAuthFlow.mustache create mode 100644 templates/libraries/restclient/build.gradle.mustache create mode 100644 templates/libraries/restclient/model.mustache create mode 100644 templates/libraries/restclient/pojo.mustache create mode 100644 templates/libraries/restclient/pom.mustache create mode 100644 templates/libraries/restclient/single_request_parameter.mustache create mode 100644 templates/libraries/resteasy/ApiClient.mustache create mode 100644 templates/libraries/resteasy/JSON.mustache create mode 100644 templates/libraries/resteasy/api.mustache create mode 100644 templates/libraries/resteasy/build.gradle.mustache create mode 100644 templates/libraries/resteasy/build.sbt.mustache create mode 100644 templates/libraries/resteasy/pom.mustache create mode 100644 templates/libraries/resttemplate/ApiClient.mustache create mode 100644 templates/libraries/resttemplate/BaseApi.mustache create mode 100644 templates/libraries/resttemplate/additional_properties.mustache create mode 100644 templates/libraries/resttemplate/api.mustache create mode 100644 templates/libraries/resttemplate/api_test.mustache create mode 100644 templates/libraries/resttemplate/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/resttemplate/auth/Authentication.mustache create mode 100644 templates/libraries/resttemplate/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/resttemplate/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/resttemplate/auth/OAuth.mustache create mode 100644 templates/libraries/resttemplate/auth/OAuthFlow.mustache create mode 100644 templates/libraries/resttemplate/build.gradle.mustache create mode 100644 templates/libraries/resttemplate/model.mustache create mode 100644 templates/libraries/resttemplate/pojo.mustache create mode 100644 templates/libraries/resttemplate/pom.mustache create mode 100644 templates/libraries/retrofit2/ApiClient.mustache create mode 100644 templates/libraries/retrofit2/CollectionFormats.mustache create mode 100644 templates/libraries/retrofit2/JSON.mustache create mode 100644 templates/libraries/retrofit2/JSON_jackson.mustache create mode 100644 templates/libraries/retrofit2/README.mustache create mode 100644 templates/libraries/retrofit2/api.mustache create mode 100644 templates/libraries/retrofit2/api_test.mustache create mode 100644 templates/libraries/retrofit2/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/retrofit2/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/retrofit2/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/retrofit2/auth/OAuth.mustache create mode 100644 templates/libraries/retrofit2/auth/OAuthOkHttpClient.mustache create mode 100644 templates/libraries/retrofit2/bodyParams.mustache create mode 100644 templates/libraries/retrofit2/build.gradle.mustache create mode 100644 templates/libraries/retrofit2/build.sbt.mustache create mode 100644 templates/libraries/retrofit2/formParams.mustache create mode 100644 templates/libraries/retrofit2/formParams.mustache.save create mode 100644 templates/libraries/retrofit2/headerParams.mustache create mode 100644 templates/libraries/retrofit2/pathParams.mustache create mode 100644 templates/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/retrofit2/play24/ApiClient.mustache create mode 100644 templates/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache create mode 100644 templates/libraries/retrofit2/play24/Play24CallFactory.mustache create mode 100644 templates/libraries/retrofit2/play24/api.mustache create mode 100644 templates/libraries/retrofit2/play25/ApiClient.mustache create mode 100644 templates/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache create mode 100644 templates/libraries/retrofit2/play25/Play25CallFactory.mustache create mode 100644 templates/libraries/retrofit2/play25/api.mustache create mode 100644 templates/libraries/retrofit2/play26/ApiClient.mustache create mode 100644 templates/libraries/retrofit2/play26/Play26CallAdapterFactory.mustache create mode 100644 templates/libraries/retrofit2/play26/Play26CallFactory.mustache create mode 100644 templates/libraries/retrofit2/play26/api.mustache create mode 100644 templates/libraries/retrofit2/pom.mustache create mode 100644 templates/libraries/retrofit2/queryParams.mustache create mode 100644 templates/libraries/vertx/ApiClient.mustache create mode 100644 templates/libraries/vertx/Configuration.mustache create mode 100644 templates/libraries/vertx/api.mustache create mode 100644 templates/libraries/vertx/apiException.mustache create mode 100644 templates/libraries/vertx/apiImpl.mustache create mode 100644 templates/libraries/vertx/api_test.mustache create mode 100644 templates/libraries/vertx/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/vertx/auth/Authentication.mustache create mode 100644 templates/libraries/vertx/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/vertx/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/vertx/auth/OAuth.mustache create mode 100644 templates/libraries/vertx/auth/OAuthFlow.mustache create mode 100644 templates/libraries/vertx/build.gradle.mustache create mode 100644 templates/libraries/vertx/pom.mustache create mode 100644 templates/libraries/vertx/rxApiImpl.mustache create mode 100644 templates/libraries/webclient/ApiClient.mustache create mode 100644 templates/libraries/webclient/additional_properties.mustache create mode 100644 templates/libraries/webclient/api.mustache create mode 100644 templates/libraries/webclient/api_test.mustache create mode 100644 templates/libraries/webclient/auth/ApiKeyAuth.mustache create mode 100644 templates/libraries/webclient/auth/Authentication.mustache create mode 100644 templates/libraries/webclient/auth/HttpBasicAuth.mustache create mode 100644 templates/libraries/webclient/auth/HttpBearerAuth.mustache create mode 100644 templates/libraries/webclient/auth/OAuth.mustache create mode 100644 templates/libraries/webclient/auth/OAuthFlow.mustache create mode 100644 templates/libraries/webclient/build.gradle.mustache create mode 100644 templates/libraries/webclient/model.mustache create mode 100644 templates/libraries/webclient/pojo.mustache create mode 100644 templates/libraries/webclient/pom.mustache create mode 100644 templates/libraries/webclient/single_request_parameter.mustache create mode 100644 templates/licenseInfo.mustache create mode 100644 templates/manifest.mustache create mode 100644 templates/maven.yml.mustache create mode 100644 templates/model.mustache create mode 100644 templates/modelEnum.mustache create mode 100644 templates/modelInnerEnum.mustache create mode 100644 templates/model_doc.mustache create mode 100644 templates/model_test.mustache create mode 100644 templates/nullable_var_annotations.mustache create mode 100644 templates/oneof_interface.mustache create mode 100644 templates/openapi.mustache create mode 100644 templates/permits.mustache create mode 100644 templates/pojo.mustache create mode 100644 templates/pojo_doc.mustache create mode 100644 templates/pom.mustache create mode 100644 templates/sealed.mustache create mode 100644 templates/settings.gradle.mustache create mode 100644 templates/toto.mustache create mode 100644 templates/travis.mustache create mode 100644 templates/typeInfoAnnotation.mustache create mode 100644 templates/xmlAnnotation.mustache diff --git a/.github/scripts/release-build.sh b/.github/scripts/release-build.sh index 13eb99ad..375d043c 100755 --- a/.github/scripts/release-build.sh +++ b/.github/scripts/release-build.sh @@ -29,12 +29,12 @@ echo "$release_notes$(cat $root/changelog.md)" > $root/changelog.md # generate SDK cd "$root" -make gen +sed -i "s|.*|${new_api_version}|" pom.xml # setup git && commit git config user.name "Outscale Bot" git config user.email "opensource+bot@outscale.com" -for f in src dist; do +for f in src dist pom.xml; do git add $f || true done git commit -asm "osc-sdk-java v$new_sdk_version" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb28b19e..f89808a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,12 +6,15 @@ on: description: 'Outscale API version' required: true +permissions: + contents: write + jobs: auto-build: environment: auto-build - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 with: ref: main - uses: actions/setup-java@v3 @@ -19,12 +22,14 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'maven' + - name: Write Outscale API version to use run: echo "${{ github.event.inputs.api_version }}" > api_version - name: check for release duplicate env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: make release-check-duplicate + - name: auto-generate release run: make release-build - name: push release branch @@ -34,4 +39,4 @@ jobs: - name: create pull request run: make release-pr env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/cred-scan.yml b/.github/workflows/cred-scan.yml index 35f3d781..8b8a6f96 100644 --- a/.github/workflows/cred-scan.yml +++ b/.github/workflows/cred-scan.yml @@ -2,18 +2,17 @@ name: Credential Scanner on: pull_request: - branches: - - main - push: - branches: - - main + branches: [ main ] + +permissions: + contents: read jobs: cred-scan: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Scan credentials - uses: outscale-dev/cred-scan@main + uses: outscale/cred-scan@main with: scan_path: "./" diff --git a/.github/workflows/github-sanity-scan.yml b/.github/workflows/github-sanity-scan.yml index 7e5fb554..5df1fb9b 100644 --- a/.github/workflows/github-sanity-scan.yml +++ b/.github/workflows/github-sanity-scan.yml @@ -4,11 +4,14 @@ on: pull_request: branches: [ main ] +permissions: + contents: read + jobs: github-sanity-scan: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Github sanity scanner uses: outscale/github-sanity-scan@main with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1d32ae3..8090213e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,14 +1,18 @@ name: osc-sdk-java maven publishing + on: release: types: [released] +permissions: + contents: read + jobs: publish: environment: publish - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - uses: actions/setup-java@v3 with: distribution: 'temurin' @@ -18,9 +22,10 @@ jobs: server-username: SONATYPE_USERNAME server-password: SONATYPE_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + - name: Publish run: mvn deploy env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} \ No newline at end of file + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5c6ec89c..4518bfcf 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -10,16 +10,16 @@ permissions: jobs: reuse-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Reuse specification test run: make reuse-test examples-test: environment: eu-west-2 - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - uses: actions/setup-java@v3 with: distribution: 'temurin' @@ -35,19 +35,8 @@ jobs: OSC_USERNAME: ${{ secrets.OSC_USERNAME }} OSC_PASSWORD: ${{ secrets.OSC_PASSWORD }} run: make examples-test - regeneration-test: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '11' - cache: 'maven' - - name: SDK re-generation test - run: make regen-test dependabot-auto-merge: - needs: [reuse-test, examples-test, regeneration-test] + needs: [reuse-test, examples-test] runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} steps: diff --git a/.osc-api-patches/outscale-yaml.patch b/.osc-api-patches/outscale-yaml.patch deleted file mode 100644 index dc6f6dbd..00000000 --- a/.osc-api-patches/outscale-yaml.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/outscale.yaml b/outscale.yaml -index 1016bea..47eb28c 100644 ---- a/outscale.yaml -+++ b/outscale.yaml -@@ -506,11 +506,8 @@ components: - type: boolean - ExpirationDate: - description: The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z`, or `2020-06-14`). To remove an existing expiration date, use the method without specifying this parameter. -- oneOf: -- - format: date-time -- type: string -- - format: date -- type: string -+ format: date-time -+ type: string - type: object - CreateAccessKeyResponse: - additionalProperties: false -@@ -2846,18 +2843,12 @@ components: - type: array - QueryDateAfter: - description: The date and time, or the date, after which you want to retrieve logged calls, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). By default, this date is set to 48 hours before the `QueryDateBefore` parameter value. -- oneOf: -- - format: date-time -- type: string -- - format: date -- type: string -+ format: date-time -+ type: string - QueryDateBefore: - description: The date and time, or the date, before which you want to retrieve logged calls, in ISO 8601 format (for example, `2020-06-30T00:00:00.000Z` or `2020-06-14`). By default, this date is set to now, or 48 hours after the `QueryDateAfter` parameter value. -- oneOf: -- - format: date-time -- type: string -- - format: date -- type: string -+ format: date-time -+ type: string - QueryIpAddresses: - description: The IPs used for the logged calls. - items: -@@ -4583,7 +4574,7 @@ components: - type: array - CreationDate: - description: The date and time of creation of the OMI, in ISO 8601 date-time format. -- format: date-time -+ format: date - type: string - Description: - description: The description of the OMI. -@@ -6171,22 +6162,16 @@ components: - type: boolean - FromDate: - description: The beginning of the time period, in ISO 8601 date format (for example, `2020-06-14`). The date-time format is also accepted, but only with a time set to midnight (for example, `2020-06-14T00:00:00.000Z`). -- oneOf: -- - format: date -- type: string -- - format: date-time -- type: string -+ format: date-time -+ type: string - Overall: - default: false - description: By default or if false, returns only the consumption of the specific account that sends this request. If true, returns either the overall consumption of your paying account and all linked accounts (if the account that sends this request is a paying account) or returns nothing (if the account that sends this request is a linked account). - type: boolean - ToDate: - description: The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). The date-time format is also accepted, but only with a time set to midnight (for example, `2020-06-30T00:00:00.000Z`). -- oneOf: -- - format: date -- type: string -- - format: date-time -- type: string -+ format: date-time -+ type: string - required: - - FromDate - - ToDate -@@ -7901,11 +7886,8 @@ components: - type: boolean - ExpirationDate: - description: The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). If not specified, the access key is set to not expire. -- oneOf: -- - format: date-time -- type: string -- - format: date -- type: string -+ format: date-time -+ type: string - State: - description: The new state for the access key (`ACTIVE` \| `INACTIVE`). When set to `ACTIVE`, the access key is enabled and can be used to send requests. When set to `INACTIVE`, the access key is disabled. - type: string diff --git a/.osc-patches/after-format/0001-give-basePath-priority-if-set-by-user.patch b/.osc-patches/after-format/0001-give-basePath-priority-if-set-by-user.patch deleted file mode 100644 index 69f01883..00000000 --- a/.osc-patches/after-format/0001-give-basePath-priority-if-set-by-user.patch +++ /dev/null @@ -1,47 +0,0 @@ -From c60275de6529e5bcf4c14d98b4be7f0b2aa12f13 Mon Sep 17 00:00:00 2001 -From: Matthias Gatto -Date: Mon, 11 Sep 2023 15:35:32 +0200 -Subject: [PATCH] give basePath priority if set by user - -Signed-off-by: Matthias Gatto ---- - .../github/outscale/osc_sdk_java/client/ApiClient.java | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java -index 9ebe7f6..533a4b7 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java -@@ -54,7 +54,8 @@ import okio.Okio; - /** ApiClient class. */ - public class ApiClient { - -- private String basePath = "https://api.eu-west-2.outscale.com/api/v1"; -+ private String backupPath = "https://api.eu-west-2.outscale.com/api/v1"; -+ private String basePath = null; - protected List servers = - new ArrayList( - Arrays.asList( -@@ -1320,7 +1321,9 @@ public class ApiClient { - url.append(baseUrl).append(path); - } else { - String baseURL; -- if (serverIndex != null) { -+ if (basePath != null) { -+ baseURL = basePath; -+ } else if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException( - String.format( -@@ -1330,7 +1333,7 @@ public class ApiClient { - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { -- baseURL = basePath; -+ baseURL = backupPath; - } - url.append(baseURL).append(path); - } --- -2.42.0 - diff --git a/.osc-patches/after-format/2022-12-15-add_exception_conf.patch b/.osc-patches/after-format/2022-12-15-add_exception_conf.patch deleted file mode 100644 index a081fdcd..00000000 --- a/.osc-patches/after-format/2022-12-15-add_exception_conf.patch +++ /dev/null @@ -1,471 +0,0 @@ -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java -index 6f53b6b..4aa1eaa 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java -@@ -26,7 +26,7 @@ public class ConfigurationEnv extends ConfigurationInitializer { - return configurationEnv; - } - -- public ApiClient getApiClient() { -+ public ApiClient getApiClient() throws ConfigurationException { - return getApiClient(profile); - } - -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationException.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationException.java -new file mode 100644 -index 0000000..66485ae ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationException.java -@@ -0,0 +1,25 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+public class ConfigurationException extends Exception { -+ -+ /** Constructor for ConfigurationException. */ -+ public ConfigurationException() {} -+ -+ /** -+ * Constructor for ConfigurationException. -+ * -+ * @param message the error message -+ */ -+ public ConfigurationException(String message) { -+ super(message); -+ } -+ -+ /** -+ * Get the exception message including HTTP response data. -+ * -+ * @return The exception message -+ */ -+ public String getMessage() { -+ return String.format("Message: %s", super.getMessage()); -+ } -+} -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -index 3ad64f2..cdeceef 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -@@ -24,11 +24,11 @@ public class ConfigurationFile extends ConfigurationInitializer { - return defaultConfigPath.toString(); - } - -- public static ConfigurationFile loadDefaultConfigFile() { -+ public static ConfigurationFile loadDefaultConfigFile() throws ConfigurationException { - return loadConfigFile(getDefaultConfigPath()); - } - -- public static ConfigurationFile loadConfigFile(String path) { -+ public static ConfigurationFile loadConfigFile(String path) throws ConfigurationException { - if (path == null) { - return null; - } -@@ -44,22 +44,22 @@ public class ConfigurationFile extends ConfigurationInitializer { - Type listType = new TypeToken>() {}.getType(); - configurationFile.profiles = gson.fromJson(br, listType); - } catch (FileNotFoundException e) { -- System.err.println("The file is not found "); -- return null; -+ throw new ConfigurationException(String.format("The file '%s' is not found ", path)); - } catch (IOException e) { -- System.err.println("Error during the read of the file"); -- return null; -+ throw new ConfigurationException( -+ String.format("Error during the read of the file '%s'", path)); - } - - return configurationFile; - } - -- public ApiClient getApiClient(String profile) { -+ public ApiClient getApiClient(String profile) throws ConfigurationException { - if (!profiles.containsKey(profile)) { -- System.err.println( -- "Profile was not found for creating Configuration, did you load the config" -- + " file ?"); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "Profile '%s' was not found for creating Configuration, did you load" -+ + " the configfile ?", -+ profile)); - } - return getApiClient(profiles.get(profile)); - } -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java -index ef2306b..2f13306 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java -@@ -24,7 +24,7 @@ import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; - - public class ConfigurationInitializer { - -- protected ApiClient getApiClient(Profile profile) { -+ protected ApiClient getApiClient(Profile profile) throws ConfigurationException { - Profile selectedProfile = profile; - - ApiClient apiClient = new ApiClient(); -@@ -68,7 +68,7 @@ public class ConfigurationInitializer { - apiClient.setServers( - new ArrayList() { - { -- add(serverConfiguration); -+ this.add(serverConfiguration); - } - }); - apiClient.setServerIndex(0); -@@ -87,14 +87,20 @@ public class ConfigurationInitializer { - CertificateFactory factory = CertificateFactory.getInstance("X.509"); - cert = (X509Certificate) factory.generateCertificate(br); - } catch (FileNotFoundException e) { -- System.err.println("The certificate is not found "); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "The certificate '%s' is not found ", -+ selectedProfile.getX509ClientCert())); - } catch (IOException e) { -- System.err.println("Error during the read of the certificate"); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "Error during the read of the certificate '%s'", -+ selectedProfile.getX509ClientCert())); - } catch (CertificateException e) { -- System.err.println("Error during the parse of the certificate"); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "Error during the parse of the certificate '%s'", -+ selectedProfile.getX509ClientCert())); - } - - PEMKeyPair pemKey; -@@ -102,15 +108,25 @@ public class ConfigurationInitializer { - try (BufferedReader br = - new BufferedReader(new FileReader(selectedProfile.getX509ClientKey()))) { - pemKey = (PEMKeyPair) new PEMParser(br).readObject(); -+ if (pemKey == null) { -+ throw new ConfigurationException( -+ String.format( -+ "Error during the read of the private key '%s'", -+ selectedProfile.getX509ClientKey())); -+ } - ecKey = - (PrivateKey) - new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); - } catch (FileNotFoundException e) { -- System.err.println("The private key is not found "); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "The private key '%s' is not found ", -+ selectedProfile.getX509ClientKey())); - } catch (IOException e) { -- System.err.println("Error during the read of the private key"); -- return null; -+ throw new ConfigurationException( -+ String.format( -+ "Error during the read of the private key '%s'", -+ selectedProfile.getX509ClientKey())); - } - - HeldCertificate clientCertificate = -@@ -136,8 +152,8 @@ public class ConfigurationInitializer { - && selectedProfile.getX509ClientKeyB64() != null - && selectedProfile.getX509ClientKeyB64().length() > 0) { - if (tlsConfigured) { -- System.err.println("Cannot configure client certificate with both file and base64"); -- return null; -+ throw new ConfigurationException( -+ "Cannot configure client certificate with both file and base64"); - } - - byte[] decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientKeyB64()); -@@ -150,12 +166,14 @@ public class ConfigurationInitializer { - PrivateKey ecKey = null; - try { - pemKey = (PEMKeyPair) new PEMParser(new StringReader(privateKey)).readObject(); -+ if (pemKey == null) { -+ throw new ConfigurationException("Cannot parse the private Key B64 encoded"); -+ } - ecKey = - (PrivateKey) - new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); - } catch (IOException e) { -- System.err.println("Cannot parse the private Key"); -- return null; -+ throw new ConfigurationException("Cannot parse the private Key B64 encoded"); - } - - X509Certificate cert = null; -@@ -166,8 +184,8 @@ public class ConfigurationInitializer { - factory.generateCertificate( - new ByteArrayInputStream(certificate.getBytes())); - } catch (CertificateException e) { -- System.err.println("Error during parse of the certificate"); -- return null; -+ throw new ConfigurationException( -+ "Error during parse of the certificate B64 encoded"); - } - - HeldCertificate clientCertificate = -diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java -new file mode 100644 -index 0000000..b592441 ---- /dev/null -+++ b/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java -@@ -0,0 +1,154 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+import static org.junit.Assert.assertThrows; -+import static org.junit.jupiter.api.Assertions.assertEquals; -+import static org.junit.jupiter.api.Assertions.assertNotEquals; -+ -+import org.junit.jupiter.api.Test; -+ -+public class ConfigurationInitializerTest { -+ -+ private final ConfigurationInitializer configuration = new ConfigurationInitializer(); -+ -+ private String getValidCertificateFile() { -+ return ConfigurationInitializerTest.class.getResource("certs/valid/sdk.test.crt").getFile(); -+ } -+ -+ private String getValidKeyFile() { -+ return ConfigurationInitializerTest.class.getResource("certs/valid/sdk.test.key").getFile(); -+ } -+ -+ private String getInvalidKeyFile() { -+ return ConfigurationInitializerTest.class -+ .getResource("certs/invalid/sdk.test.key") -+ .getFile(); -+ } -+ -+ private String getInvalidCertificateFile() { -+ return ConfigurationInitializerTest.class -+ .getResource("certs/invalid/sdk.test.crt") -+ .getFile(); -+ } -+ -+ private String getValidCertificateB64() { -+ return "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURPVENDQWlFQ0ZCQlFQUmloN1pwNEhtcTZLeGtaOFdUbCtUcklNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1HMHgKQ3pBSkJnTlZCQVlUQWxSVE1RMHdDd1lEVlFRSURBUlVaWE4wTVEwd0N3WURWUVFIREFSVVpYTjBNUTB3Q3dZRApWUVFLREFSVVpYTjBNUTB3Q3dZRFZRUUxEQVJVWlhOME1RMHdDd1lEVlFRRERBUlVSVk5VTVJNd0VRWUpLb1pJCmh2Y05BUWtCRmdSVVJWTlVNQjRYRFRJeU1USXhOVEV5TXpZeE1Wb1hEVEkxTURrd09URXlNell4TVZvd1JURUwKTUFrR0ExVUVCaE1DVkZNeEV6QVJCZ05WQkFnTUNsTnZiV1V0VTNSaGRHVXhJVEFmQmdOVkJBb01HRWx1ZEdWeQpibVYwSUZkcFpHZHBkSE1nVUhSNUlFeDBaRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DCmdnRUJBS0VXYVJSNUltMkdnMHZjcVI1a0RmNHFyQ3N4amJkbmsvbk5DVDMzV25vVmRVUnVGQVlVV1ljVTVTdCsKTFg3RkdFK0VaOUo1bzlYLzBUcGFRbTMxZndIRUdieWJBQWQzRzI1Y2IwNnd4cGhHL3V6YWR0WVRHdURTdjQ3cgpPLzZuVTBnaG9hMldKRXVLSDJsNXJxQTZHakd4OWFqc1RUeThTbk9zV2MrOFdQRGhBaHhiRjFBS0hhMHprTE9kCm0zWlpnRTk2SWpEdjR1c0lQeUlhR2N1b21lNjBMUnB6OGp6NlBpYWtkbmFWZ21NWVpKMHRncndQWTkvRmd6cGEKVFo3QWhEcTcrSUJQZ1B5cXFZYnZuUHY1bTBvVlp5NG1CRkZuNTdrNnVjcUZpSUJvdDZsN3NDaTRSNXBGV1c2MwpRMFFmaEs4UUZkRXNzeUp6ejdJdGpqYTJuLzhDQXdFQUFUQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFVdmMwClVIS3B5V3Y5Uld0UGZlb3luYTdTOHNJMi9wM2UxNXh4V1ZKSW8zOVZBSmMyRTUvTzZSYVRHS2N6RzkxcjNCMEsKaWhwVkpEWllHM0V2VGtOWWN3Unhqb25URjBkYU5mTzYrSndIOGdMcFRrQU9GN3Ywd0gzeGRRVWJzOW0yY2RWdgphZ3dTT0M1WXdlTFdiaGw2Vm9tRlp0b3h0eE0xclRWUkFDcVNWNzBwNnNQK3FJUFNOUkxOZmVoVkt0Vm5PYmJUCmpFRndRZS9Vb2pCZ2FTMXM0Ni9lK0dMTkdmQWs0MmNZbnVyUU9QTFVKT1pvYmVncXpodElkNytQUndBbGVyT28KODhjb0RXY3JPRnl2RkdUUTJoMXB3dko3NkFNNXh5NHFFbitRNzVCZ0VuaWJSeHBzWUpDeUU1RGErem5LWnlGUQoyeHdWRS9aU2lOcm9BTno1NXc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="; -+ } -+ -+ private String getValidKeyB64() { -+ return "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBb1JacEZIa2liWWFEUzl5cEhtUU4vaXFzS3pHTnQyZVQrYzBKUGZkYWVoVjFSRzRVCkJoUlpoeFRsSzM0dGZzVVlUNFJuMG5tajFmL1JPbHBDYmZWL0FjUVp2SnNBQjNjYmJseHZUckRHbUViKzdOcDIKMWhNYTROSy9qdXM3L3FkVFNDR2hyWllrUzRvZmFYbXVvRG9hTWJIMXFPeE5QTHhLYzZ4Wno3eFk4T0VDSEZzWApVQW9kclRPUXM1MmJkbG1BVDNvaU1PL2k2d2cvSWhvWnk2aVo3clF0R25QeVBQbytKcVIyZHBXQ1l4aGtuUzJDCnZBOWozOFdET2xwTm5zQ0VPcnY0Z0UrQS9LcXBodStjKy9tYlNoVm5MaVlFVVdmbnVUcTV5b1dJZ0dpM3FYdXcKS0xoSG1rVlpicmREUkIrRXJ4QVYwU3l6SW5QUHNpMk9OcmFmL3dJREFRQUJBb0lCQUhGTUg5QUVldEJwd1VMRQpDamFUekx1dEs3YWRmYjAzSG42ZFZSaStObWFUWFEwcUZ1OUh0TWdyVEJ2US9SS2ljVHpNTlhGMW1HUFZMMFZKCllsdVFSU25xME9jMFpVcmEzUEk4RlJWVmcvaHFScll6MlUwcjFzVzF0SUZDdGNtZnloVjdnZ2xqQmxnUzU1RDUKd25aekp5VTRzejJDSmJqSC9kMXBwU2xVb1lHWXdvUXUvTzdYamJmbVFyTVY2L2o3dHRibUNMZmpaVjZ3UE53bwpETWZCUnlLKzY3WFhjcTV4c2dreE9qanhTbFUyZmY2ekh1TjhXU3hPUmlWNGw0OEIydU5wV041VWQySDkvcFNGCjgvZlZkNkFtaFh6SzlCL29kQUlKSFhPdU9iQ0JUbGRSV3h5VEVLbW10TTVrZE5GdE51MkRBN1RSNFY0VWJzTWMKZW83NkFMRUNnWUVBeldzdE42VGdzRTJJdXVlbm83ajRmaXhXdDN4MFU1SkNyZjg0cURZUzQ1cVVmbzBzU3gxdQp3V0F3M09FTjBmNHhkTUJEb2x0eFFOejBmQ1pkR1hVOGxiQUpzbENxWm1EVlRCcXUyTmdaTnhBbHNMYzdNNHY0CkdJb2svaE5YOHF1L0dVbEpqRnNBSzJxNTZMWE5uc3Z2TlZLcWQwdGRPOFB3WmNKU25mZ1lnV01DZ1lFQXlNREUKSHpIWEppMFlDd2RVQmF6SkpQVGtXV1pMYnlyTWk0di95OElNZTNmMC9nWUR1ZUtCZWdiVE1rVWxZN3lqTk5YYQpuZUlWSndvYk05MnJDNU9rVldvalo2ZlA1MVUydy9kendsSFZGanJiaFZtVVN0RjViZGdZRHNDbm5rMUdwTjdOCnM0bS8vVjV2RjBFbk5MY1hkY1IzTlFXMzRpNXdybmFOUm1ZejE3VUNnWUFneEZYa0tHTEcvTGN3eVQ4T2VMVDYKdTJ2aHZQSjVXajFVci8rRHBZeUJ6ZWlkL3pydmlIUmdXRTJ6RGhzOFFnWDFqNjI2T2tmb2h0Wmc3Mld1WitzUQpIWktPWlJ1cFZRenhKTmg3TW8xaklTcEI5QmgzY241U3U4YUcyT01RaktEaEViV3ZzOXhsRUpNek1iem85YkxrCm1Ka2tpbHNHNjR4dlR2NEt3TVozN1FLQmdRQ2RZTWtmTDJKY01rUEQrWlc3OFMycXhEVHpoTWNrT2lncVNiRloKV2lHUTlZUmhVL085Mkx6cUhjbVpnaTJDbDlKV1RFUmJPMjZic1VlTURIM1gwSUdtMkZNeklwSlE1elBNd3dQRAoxWVU0TFNJRTB5bjIwV3JoV3VQWlJOemlzKy9xdGlRS1dMWGkraElhNTkvRmFyZUFnbWwxYnFzdUxIdjN1VWFkClp1ZkRkUUtCZ0Zsb1ZJWlpNcGFIZGI2TUw3UmhPbGZQcXNldHl3TmFOMG0yVFAyY0tpMXVsTnZCNC9zd1I5WkQKYUN4TXd0c1BFK21Qa0ZpVXlQcUd1U1AvZSs3dzBIejFjdlJkT251TUNDVUE0alg5RFRjN2JOTFZKVVYwUHFsZgpoYlFPaDJzdFE5b0FJMStBOXpTZEhSWUUvMXpPWW9XaDlUN0N0T3YxRHhMMEFqa1Iwc2w1Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg=="; -+ } -+ -+ /** -+ * Model tests for AccepterNet -+ * -+ * @throws ConfigurationException -+ */ -+ @Test -+ public void testRegion() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ -+ ApiClient client = this.configuration.getApiClient(profile); -+ -+ assertEquals(1, client.getServers().size()); -+ assertEquals("https://api.{region}.outscale.com/api/v1", client.getServers().get(0).URL); -+ } -+ -+ @Test -+ public void testCertificateFileOk() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ profile.setX509ClientCert(this.getValidCertificateFile()); -+ profile.setX509ClientKey(this.getValidKeyFile()); -+ -+ ApiClient client = this.configuration.getApiClient(profile); -+ assertNotEquals(null, client); -+ } -+ -+ @Test -+ public void testCertificateFileKo() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ -+ // Invalid Certificate -+ profile.setX509ClientCert(this.getInvalidCertificateFile()); -+ profile.setX509ClientKey(this.getValidKeyFile()); -+ -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ -+ // Invalid Private Key -+ profile.setX509ClientCert(this.getValidCertificateFile()); -+ profile.setX509ClientKey(this.getInvalidKeyFile()); -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ -+ // Invalid Path -+ profile.setX509ClientCert("notAPath"); -+ profile.setX509ClientKey(this.getValidKeyFile()); -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ } -+ -+ @Test -+ public void testCertificateEnvOk() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ -+ profile.setX509ClientCertB64(this.getValidCertificateB64()); -+ profile.setX509ClientKeyB64(this.getValidKeyB64()); -+ -+ assertNotEquals(null, this.configuration.getApiClient(profile)); -+ } -+ -+ @Test -+ public void testCertificateBoth() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ -+ // Set Both -+ profile.setX509ClientCert(this.getValidCertificateFile()); -+ profile.setX509ClientKey(this.getValidKeyFile()); -+ profile.setX509ClientCertB64(this.getValidCertificateB64()); -+ profile.setX509ClientKeyB64(this.getValidCertificateB64()); -+ -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ } -+ -+ @Test -+ public void testCertificateEnvKo() throws ConfigurationException { -+ Profile profile = new Profile(); -+ profile.setRegion("us-east-2"); -+ -+ // Invalid Certificate -+ profile.setX509ClientCertB64("NotValid"); -+ profile.setX509ClientKeyB64(this.getValidKeyB64()); -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ -+ // Invalid PrivateKey -+ profile.setX509ClientCertB64(this.getValidCertificateB64()); -+ profile.setX509ClientKeyB64("NotValid"); -+ assertThrows( -+ ConfigurationException.class, -+ () -> { -+ this.configuration.getApiClient(profile); -+ }); -+ } -+} -diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md -new file mode 100644 -index 0000000..be767f4 ---- /dev/null -+++ b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md -@@ -0,0 +1,12 @@ -+# Certificates -+ -+## How to regenerate test certificate -+``` -+mkdir -p valid -+cd valid -+openssl genrsa -des3 -out myCA.key 2048 -+openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem -+openssl genrsa -out sdk.test.key 2048 -+openssl req -new -key sdk.test.key -out sdk.test.csr -+openssl x509 -req -in sdk.test.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out sdk.test.crt -days 999 -sha256 -+``` -\ No newline at end of file -diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt -new file mode 100644 -index 0000000..4b301a4 ---- /dev/null -+++ b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt -@@ -0,0 +1,3 @@ -+-----BEGIN CERTIFICATE----- -+SU5WQUxJRENFUlQ= -+-----END CERTIFICATE----- -diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key -new file mode 100644 -index 0000000..8e2cd39 ---- /dev/null -+++ b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key -@@ -0,0 +1,3 @@ -+-----BEGIN RSA PRIVATE KEY----- -+SU5WQUxJREtFWQ== -+-----END RSA PRIVATE KEY----- -diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt -new file mode 100644 -index 0000000..db722ca ---- /dev/null -+++ b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt -@@ -0,0 +1,20 @@ -+-----BEGIN CERTIFICATE----- -+MIIDOTCCAiECFBBQPRih7Zp4Hmq6KxkZ8WTl+TrIMA0GCSqGSIb3DQEBCwUAMG0x -+CzAJBgNVBAYTAlRTMQ0wCwYDVQQIDARUZXN0MQ0wCwYDVQQHDARUZXN0MQ0wCwYD -+VQQKDARUZXN0MQ0wCwYDVQQLDARUZXN0MQ0wCwYDVQQDDARURVNUMRMwEQYJKoZI -+hvcNAQkBFgRURVNUMB4XDTIyMTIxNTEyMzYxMVoXDTI1MDkwOTEyMzYxMVowRTEL -+MAkGA1UEBhMCVFMxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVy -+bmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -+ggEBAKEWaRR5Im2Gg0vcqR5kDf4qrCsxjbdnk/nNCT33WnoVdURuFAYUWYcU5St+ -+LX7FGE+EZ9J5o9X/0TpaQm31fwHEGbybAAd3G25cb06wxphG/uzadtYTGuDSv47r -+O/6nU0ghoa2WJEuKH2l5rqA6GjGx9ajsTTy8SnOsWc+8WPDhAhxbF1AKHa0zkLOd -+m3ZZgE96IjDv4usIPyIaGcuome60LRpz8jz6PiakdnaVgmMYZJ0tgrwPY9/Fgzpa -+TZ7AhDq7+IBPgPyqqYbvnPv5m0oVZy4mBFFn57k6ucqFiIBot6l7sCi4R5pFWW63 -+Q0QfhK8QFdEssyJzz7Itjja2n/8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAUvc0 -+UHKpyWv9RWtPfeoyna7S8sI2/p3e15xxWVJIo39VAJc2E5/O6RaTGKczG91r3B0K -+ihpVJDZYG3EvTkNYcwRxjonTF0daNfO6+JwH8gLpTkAOF7v0wH3xdQUbs9m2cdVv -+agwSOC5YweLWbhl6VomFZtoxtxM1rTVRACqSV70p6sP+qIPSNRLNfehVKtVnObbT -+jEFwQe/UojBgaS1s46/e+GLNGfAk42cYnurQOPLUJOZobegqzhtId7+PRwAlerOo -+88coDWcrOFyvFGTQ2h1pwvJ76AM5xy4qEn+Q75BgEnibRxpsYJCyE5Da+znKZyFQ -+2xwVE/ZSiNroANz55w== -+-----END CERTIFICATE----- -diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key -new file mode 100644 -index 0000000..957889f ---- /dev/null -+++ b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key -@@ -0,0 +1,27 @@ -+-----BEGIN RSA PRIVATE KEY----- -+MIIEowIBAAKCAQEAoRZpFHkibYaDS9ypHmQN/iqsKzGNt2eT+c0JPfdaehV1RG4U -+BhRZhxTlK34tfsUYT4Rn0nmj1f/ROlpCbfV/AcQZvJsAB3cbblxvTrDGmEb+7Np2 -+1hMa4NK/jus7/qdTSCGhrZYkS4ofaXmuoDoaMbH1qOxNPLxKc6xZz7xY8OECHFsX -+UAodrTOQs52bdlmAT3oiMO/i6wg/IhoZy6iZ7rQtGnPyPPo+JqR2dpWCYxhknS2C -+vA9j38WDOlpNnsCEOrv4gE+A/Kqphu+c+/mbShVnLiYEUWfnuTq5yoWIgGi3qXuw -+KLhHmkVZbrdDRB+ErxAV0SyzInPPsi2ONraf/wIDAQABAoIBAHFMH9AEetBpwULE -+CjaTzLutK7adfb03Hn6dVRi+NmaTXQ0qFu9HtMgrTBvQ/RKicTzMNXF1mGPVL0VJ -+YluQRSnq0Oc0ZUra3PI8FRVVg/hqRrYz2U0r1sW1tIFCtcmfyhV7ggljBlgS55D5 -+wnZzJyU4sz2CJbjH/d1ppSlUoYGYwoQu/O7XjbfmQrMV6/j7ttbmCLfjZV6wPNwo -+DMfBRyK+67XXcq5xsgkxOjjxSlU2ff6zHuN8WSxORiV4l48B2uNpWN5Ud2H9/pSF -+8/fVd6AmhXzK9B/odAIJHXOuObCBTldRWxyTEKmmtM5kdNFtNu2DA7TR4V4UbsMc -+eo76ALECgYEAzWstN6TgsE2Iuueno7j4fixWt3x0U5JCrf84qDYS45qUfo0sSx1u -+wWAw3OEN0f4xdMBDoltxQNz0fCZdGXU8lbAJslCqZmDVTBqu2NgZNxAlsLc7M4v4 -+GIok/hNX8qu/GUlJjFsAK2q56LXNnsvvNVKqd0tdO8PwZcJSnfgYgWMCgYEAyMDE -+HzHXJi0YCwdUBazJJPTkWWZLbyrMi4v/y8IMe3f0/gYDueKBegbTMkUlY7yjNNXa -+neIVJwobM92rC5OkVWojZ6fP51U2w/dzwlHVFjrbhVmUStF5bdgYDsCnnk1GpN7N -+s4m//V5vF0EnNLcXdcR3NQW34i5wrnaNRmYz17UCgYAgxFXkKGLG/LcwyT8OeLT6 -+u2vhvPJ5Wj1Ur/+DpYyBzeid/zrviHRgWE2zDhs8QgX1j626OkfohtZg72WuZ+sQ -+HZKOZRupVQzxJNh7Mo1jISpB9Bh3cn5Su8aG2OMQjKDhEbWvs9xlEJMzMbzo9bLk -+mJkkilsG64xvTv4KwMZ37QKBgQCdYMkfL2JcMkPD+ZW78S2qxDTzhMckOigqSbFZ -+WiGQ9YRhU/O92LzqHcmZgi2Cl9JWTERbO26bsUeMDH3X0IGm2FMzIpJQ5zPMwwPD -+1YU4LSIE0yn20WrhWuPZRNzis+/qtiQKWLXi+hIa59/FareAgml1bqsuLHv3uUad -+ZufDdQKBgFloVIZZMpaHdb6ML7RhOlfPqsetywNaN0m2TP2cKi1ulNvB4/swR9ZD -+aCxMwtsPE+mPkFiUyPqGuSP/e+7w0Hz1cvRdOnuMCCUA4jX9DTc7bNLVJUV0Pqlf -+hbQOh2stQ9oAI1+A9zSdHRYE/1zOYoWh9T7CtOv1DxL0AjkR0sl5 -+-----END RSA PRIVATE KEY----- --- -2.30.2 - diff --git a/.osc-patches/before-format/2022-12-06-1-configfile-support.patch b/.osc-patches/before-format/2022-12-06-1-configfile-support.patch deleted file mode 100644 index 390044a6..00000000 --- a/.osc-patches/before-format/2022-12-06-1-configfile-support.patch +++ /dev/null @@ -1,865 +0,0 @@ -unchanged: ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -@@ -0,0 +1,238 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+import java.io.BufferedReader; -+import java.io.ByteArrayInputStream; -+import java.io.FileInputStream; -+import java.io.FileNotFoundException; -+import java.io.FileReader; -+import java.io.IOException; -+import java.io.StringReader; -+import java.lang.reflect.Type; -+import java.nio.file.Path; -+import java.nio.file.Paths; -+import java.security.KeyPair; -+import java.security.PrivateKey; -+import java.security.cert.CertificateException; -+import java.security.cert.CertificateFactory; -+import java.security.cert.X509Certificate; -+import java.util.ArrayList; -+import java.util.Base64; -+import java.util.HashMap; -+import java.util.Map; -+ -+import org.bouncycastle.openssl.PEMKeyPair; -+import org.bouncycastle.openssl.PEMParser; -+import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -+ -+import com.google.gson.Gson; -+import com.google.gson.GsonBuilder; -+import com.google.gson.reflect.TypeToken; -+ -+import okhttp3.OkHttpClient; -+import okhttp3.tls.HandshakeCertificates; -+import okhttp3.tls.HeldCertificate; -+ -+public class ConfigurationFile { -+ private Map profiles; -+ -+ private static Path defaultConfigPath = Paths.get(System.getProperty("user.home"), ".osc", "config.json"); -+ -+ public ConfigurationFile() { -+ } -+ -+ public static String getDefaultConfigPath() { -+ return defaultConfigPath.toString(); -+ } -+ -+ public static ConfigurationFile loadDefaultConfigFile() { -+ return loadConfigFile(getDefaultConfigPath()); -+ } -+ -+ public static ConfigurationFile loadConfigFile(String path) { -+ if (path == null) { -+ return null; -+ } -+ -+ GsonBuilder gsonBuilder = JSON.createGson(); -+ gsonBuilder.registerTypeAdapterFactory( -+ new io.github.outscale.osc_sdk_java.client.Profile.CustomTypeAdapterFactory()); -+ gsonBuilder -+ .registerTypeAdapterFactory( -+ new io.github.outscale.osc_sdk_java.client.Endpoint.CustomTypeAdapterFactory()); -+ Gson gson = gsonBuilder.create(); -+ ConfigurationFile configurationFile = new ConfigurationFile(); -+ try (BufferedReader br = new BufferedReader(new FileReader(path))) { -+ Type listType = new TypeToken>() { -+ }.getType(); -+ configurationFile.profiles = gson.fromJson(br, listType); -+ } catch (FileNotFoundException e) { -+ System.err.println("The file is not found "); -+ return null; -+ } catch (IOException e) { -+ System.err.println("Error during the read of the file"); -+ return null; -+ } -+ -+ return configurationFile; -+ } -+ -+ public ApiClient getApiClient(String profile) { -+ if (!profiles.containsKey(profile)) { -+ System.err.println("Profile was not found for creating Configuration, did you load the config file ?"); -+ return null; -+ } -+ Profile selectedProfile = profiles.get(profile); -+ -+ ApiClient apiClient = new ApiClient(); -+ -+ String accessKey = ""; -+ if (selectedProfile.getAccessKey() != null && selectedProfile.getAccessKey().length() > 0) { -+ accessKey = selectedProfile.getAccessKey(); -+ } -+ -+ String secretKey = ""; -+ if (selectedProfile.getSecretKey() != null && selectedProfile.getSecretKey().length() > 0) { -+ secretKey = selectedProfile.getSecretKey(); -+ } -+ -+ String region = "eu-west-2"; -+ if (selectedProfile.getRegion() != null && selectedProfile.getRegion().length() > 0) { -+ region = selectedProfile.getRegion(); -+ } -+ -+ apiClient.setAWS4Configuration(accessKey, secretKey, region, "api"); -+ -+ StringBuilder urlBuilder = new StringBuilder(); -+ if (selectedProfile.getProtocol() != null && selectedProfile.getProtocol().length() > 0) { -+ urlBuilder.append(selectedProfile.getProtocol() + "://"); -+ } else { -+ urlBuilder.append("https://"); -+ } -+ -+ Endpoint endpoints = selectedProfile.getEndpoints(); -+ if (endpoints != null && endpoints.getApi().length() > 0) { -+ urlBuilder.append(endpoints.getApi()); -+ } else { -+ urlBuilder.append("api.{region}.outscale.com/api/v1"); -+ } -+ -+ HashMap serverVariables = new HashMap<>(); -+ serverVariables.put("region", new ServerVariable("Loaded from profile", region, null)); -+ ServerConfiguration serverConfiguration = new ServerConfiguration( -+ urlBuilder.toString(), -+ "Loaded from profile", -+ serverVariables); -+ apiClient.setServers(new ArrayList() { -+ { -+ add(serverConfiguration); -+ } -+ }); -+ apiClient.setServerIndex(0); -+ apiClient.setServerVariables(null); -+ -+ // TLS -+ boolean tlsConfigured = false; -+ if (selectedProfile.getX509ClientCert() != null -+ && selectedProfile.getX509ClientCert().length() > 0 -+ && selectedProfile.getX509ClientKey() != null -+ && selectedProfile.getX509ClientKey().length() > 0) { -+ tlsConfigured = true; -+ -+ X509Certificate cert = null; -+ try (FileInputStream br = new FileInputStream(selectedProfile.getX509ClientCert())) { -+ CertificateFactory factory = CertificateFactory.getInstance("X.509"); -+ cert = (X509Certificate) factory.generateCertificate(br); -+ } catch (FileNotFoundException e) { -+ System.err.println("The certificate is not found "); -+ return null; -+ } catch (IOException e) { -+ System.err.println("Error during the read of the certificate"); -+ return null; -+ } catch (CertificateException e) { -+ System.err.println("Error during the parse of the certificate"); -+ return null; -+ } -+ -+ PEMKeyPair pemKey; -+ PrivateKey ecKey = null; -+ try (BufferedReader br = new BufferedReader(new FileReader(selectedProfile.getX509ClientKey()))) { -+ pemKey = (PEMKeyPair) new PEMParser(br).readObject(); -+ ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -+ } catch (FileNotFoundException e) { -+ System.err.println("The private key is not found "); -+ return null; -+ } catch (IOException e) { -+ System.err.println("Error during the read of the private key"); -+ return null; -+ } -+ -+ HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -+ HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -+ .addPlatformTrustedCertificates() -+ .heldCertificate(clientCertificate) -+ .build(); -+ -+ OkHttpClient client = new OkHttpClient.Builder() -+ .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -+ .build(); -+ -+ apiClient.setHttpClient(client); -+ } -+ -+ if (selectedProfile.getX509ClientCertB64() != null -+ && selectedProfile.getX509ClientCertB64().length() > 0 -+ && selectedProfile.getX509ClientKeyB64() != null -+ && selectedProfile.getX509ClientKeyB64().length() > 0) { -+ if (tlsConfigured) { -+ System.err.println("Cannot configure client certificate with both file and base64"); -+ return null; -+ } -+ -+ byte[] decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientKeyB64()); -+ String privateKey = new String(decodedBytes); -+ -+ decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientCertB64()); -+ String certificate = new String(decodedBytes); -+ -+ PEMKeyPair pemKey; -+ PrivateKey ecKey = null; -+ try { -+ pemKey = (PEMKeyPair) new PEMParser(new StringReader(privateKey)).readObject(); -+ ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -+ } catch (IOException e) { -+ System.err.println("Cannot parse the private Key"); -+ return null; -+ } -+ -+ X509Certificate cert = null; -+ try { -+ CertificateFactory factory = CertificateFactory.getInstance("X.509"); -+ cert = (X509Certificate) factory -+ .generateCertificate(new ByteArrayInputStream(certificate.getBytes())); -+ } catch (CertificateException e) { -+ System.err.println("Error during parse of the certificate"); -+ return null; -+ } -+ -+ HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -+ HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -+ .addPlatformTrustedCertificates() -+ .heldCertificate(clientCertificate) -+ .build(); -+ -+ OkHttpClient client = new OkHttpClient.Builder() -+ .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -+ .build(); -+ -+ apiClient.setHttpClient(client); -+ } -+ -+ return apiClient; -+ } -+ -+ @Override -+ public String toString() { -+ return profiles.toString(); -+ } -+ -+} -unchanged: ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/Endpoint.java -@@ -0,0 +1,72 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+import java.io.IOException; -+ -+import com.google.gson.Gson; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonObject; -+import com.google.gson.TypeAdapter; -+import com.google.gson.TypeAdapterFactory; -+import com.google.gson.annotations.SerializedName; -+import com.google.gson.reflect.TypeToken; -+import com.google.gson.stream.JsonReader; -+import com.google.gson.stream.JsonWriter; -+ -+public class Endpoint { -+ -+ public static final String SERIALIZED_NAME_API = "api"; -+ @SerializedName(SERIALIZED_NAME_API) -+ private String api; -+ -+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { -+ @SuppressWarnings("unchecked") -+ @Override -+ public TypeAdapter create(Gson gson, TypeToken type) { -+ if (!Endpoint.class.isAssignableFrom(type.getRawType())) { -+ return null; // this class only serializes 'VpnOptions' and its subtypes -+ } -+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); -+ final TypeAdapter thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(Endpoint.class)); -+ -+ return (TypeAdapter) new TypeAdapter() { -+ @Override -+ public void write(JsonWriter out, Endpoint value) throws IOException { -+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); -+ elementAdapter.write(out, obj); -+ } -+ -+ @Override -+ public Endpoint read(JsonReader in) throws IOException { -+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); -+ return thisAdapter.fromJsonTree(jsonObj); -+ } -+ -+ }.nullSafe(); -+ } -+ } -+ -+ /** -+ * Create an instance of Endpoint given an JSON string -+ * -+ * @param jsonString JSON string -+ * @return An instance of Profile -+ * @throws IOException if the JSON string is invalid with respect to -+ * AcceptNetPeeringRequest -+ */ -+ public static Endpoint fromJson(String jsonString) throws IOException { -+ return JSON.getGson().fromJson(jsonString, Endpoint.class); -+ } -+ -+ @Override -+ public String toString() { -+ StringBuilder sb = new StringBuilder(); -+ sb.append("class Endpoint {\n"); -+ sb.append(" api: ").append(api).append("\n"); -+ sb.append("}"); -+ return sb.toString(); -+ } -+ -+ public String getApi() { -+ return api; -+ } -+} -unchanged: ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java -@@ -0,0 +1,158 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+import java.io.IOException; -+import java.util.HashSet; -+import java.util.Set; -+import java.util.Map.Entry; -+ -+import com.google.gson.Gson; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonObject; -+import com.google.gson.TypeAdapter; -+import com.google.gson.TypeAdapterFactory; -+import com.google.gson.annotations.SerializedName; -+import com.google.gson.reflect.TypeToken; -+import com.google.gson.stream.JsonReader; -+import com.google.gson.stream.JsonWriter; -+ -+public class Profile { -+ public static final String SERIALIZED_NAME_ACCESS_KEY = "access_key"; -+ @SerializedName(SERIALIZED_NAME_ACCESS_KEY) -+ private String accessKey; -+ -+ public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; -+ @SerializedName(SERIALIZED_NAME_SECRET_KEY) -+ private String secretKey; -+ -+ public static final String SERIALIZED_NAME_X509_CLIENT_CERT = "x509_client_cert"; -+ @SerializedName(SERIALIZED_NAME_X509_CLIENT_CERT) -+ private String x509ClientCert; -+ -+ public static final String SERIALIZED_NAME_X509_CLIENT_CERT_B64 = "x509_client_cert_b64"; -+ @SerializedName(SERIALIZED_NAME_X509_CLIENT_CERT_B64) -+ private String x509ClientCertB64; -+ -+ public static final String SERIALIZED_NAME_X509_CLIENT_KEY = "x509_client_key"; -+ @SerializedName(SERIALIZED_NAME_X509_CLIENT_KEY) -+ private String x509ClientKey; -+ -+ public static final String SERIALIZED_NAME_X509_CLIENT_KEY_B64 = "x509_client_key_b64"; -+ @SerializedName(SERIALIZED_NAME_X509_CLIENT_KEY_B64) -+ private String x509ClientKeyB64; -+ -+ public static final String SERIALIZED_NAME_PROTOCOL = "protocol"; -+ @SerializedName(SERIALIZED_NAME_PROTOCOL) -+ private String protocol; -+ -+ public static final String SERIALIZED_NAME_METHOD = "method"; -+ @SerializedName(SERIALIZED_NAME_METHOD) -+ private String method; -+ -+ public static final String SERIALIZED_NAME_REGION = "region"; -+ @SerializedName(SERIALIZED_NAME_REGION) -+ private String region; -+ -+ public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; -+ @SerializedName(SERIALIZED_NAME_ENDPOINTS) -+ private Endpoint endpoints; -+ -+ public static HashSet openapiFields; -+ public static HashSet openapiRequiredFields; -+ -+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { -+ @SuppressWarnings("unchecked") -+ @Override -+ public TypeAdapter create(Gson gson, TypeToken type) { -+ if (!Profile.class.isAssignableFrom(type.getRawType())) { -+ return null; // this class only serializes 'Profile' and its subtypes -+ } -+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); -+ final TypeAdapter thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(Profile.class)); -+ -+ return (TypeAdapter) new TypeAdapter() { -+ @Override -+ public void write(JsonWriter out, Profile value) throws IOException { -+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); -+ elementAdapter.write(out, obj); -+ } -+ -+ @Override -+ public Profile read(JsonReader in) throws IOException { -+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); -+ return thisAdapter.fromJsonTree(jsonObj); -+ } -+ -+ }.nullSafe(); -+ } -+ } -+ -+ /** -+ * Create an instance of Profile given an JSON string -+ * -+ * @param jsonString JSON string -+ * @return An instance of Profile -+ * @throws IOException if the JSON string is invalid with respect to -+ * AcceptNetPeeringRequest -+ */ -+ public static Profile fromJson(String jsonString) throws IOException { -+ return JSON.getGson().fromJson(jsonString, Profile.class); -+ } -+ -+ @Override -+ public String toString() { -+ StringBuilder sb = new StringBuilder(); -+ sb.append("class Profile {\n"); -+ sb.append(" accessKey: ").append(accessKey).append("\n"); -+ sb.append(" secretKey: ").append(secretKey).append("\n"); -+ sb.append(" region: ").append(region).append("\n"); -+ sb.append(" x509ClientCert: ").append(x509ClientCert).append("\n"); -+ sb.append(" x509ClientCertB64: ").append(x509ClientCertB64).append("\n"); -+ sb.append(" x509ClientKey: ").append(x509ClientKey).append("\n"); -+ sb.append(" x509ClientKeyB64: ").append(x509ClientKeyB64).append("\n"); -+ sb.append(" method: ").append(method).append("\n"); -+ sb.append(" protocol: ").append(protocol).append("\n"); -+ sb.append(" endpoints: ").append(endpoints).append("\n"); -+ sb.append("}"); -+ return sb.toString(); -+ } -+ -+ public Endpoint getEndpoints() { -+ return endpoints; -+ } -+ -+ public String getProtocol() { -+ return protocol; -+ } -+ -+ public String getAccessKey() { -+ return accessKey; -+ } -+ -+ public String getMethod() { -+ return method; -+ } -+ -+ public String getRegion() { -+ return region; -+ } -+ -+ public String getSecretKey() { -+ return secretKey; -+ } -+ -+ public String getX509ClientCert() { -+ return x509ClientCert; -+ } -+ -+ public String getX509ClientCertB64() { -+ return x509ClientCertB64; -+ } -+ -+ public String getX509ClientKey() { -+ return x509ClientKey; -+ } -+ -+ public String getX509ClientKeyB64() { -+ return x509ClientKeyB64; -+ } -+} -only in patch2: -unchanged: ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationFile.java -@@ -1,38 +1,19 @@ - package io.github.outscale.osc_sdk_java.client; - - import java.io.BufferedReader; --import java.io.ByteArrayInputStream; --import java.io.FileInputStream; - import java.io.FileNotFoundException; - import java.io.FileReader; - import java.io.IOException; --import java.io.StringReader; - import java.lang.reflect.Type; - import java.nio.file.Path; - import java.nio.file.Paths; --import java.security.KeyPair; --import java.security.PrivateKey; --import java.security.cert.CertificateException; --import java.security.cert.CertificateFactory; --import java.security.cert.X509Certificate; --import java.util.ArrayList; --import java.util.Base64; --import java.util.HashMap; - import java.util.Map; - --import org.bouncycastle.openssl.PEMKeyPair; --import org.bouncycastle.openssl.PEMParser; --import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -- - import com.google.gson.Gson; - import com.google.gson.GsonBuilder; - import com.google.gson.reflect.TypeToken; - --import okhttp3.OkHttpClient; --import okhttp3.tls.HandshakeCertificates; --import okhttp3.tls.HeldCertificate; -- --public class ConfigurationFile { -+public class ConfigurationFile extends ConfigurationInitializer { - private Map profiles; - - private static Path defaultConfigPath = Paths.get(System.getProperty("user.home"), ".osc", "config.json"); -@@ -81,153 +62,7 @@ public class ConfigurationFile { - System.err.println("Profile was not found for creating Configuration, did you load the config file ?"); - return null; - } -- Profile selectedProfile = profiles.get(profile); -- -- ApiClient apiClient = new ApiClient(); -- -- String accessKey = ""; -- if (selectedProfile.getAccessKey() != null && selectedProfile.getAccessKey().length() > 0) { -- accessKey = selectedProfile.getAccessKey(); -- } -- -- String secretKey = ""; -- if (selectedProfile.getSecretKey() != null && selectedProfile.getSecretKey().length() > 0) { -- secretKey = selectedProfile.getSecretKey(); -- } -- -- String region = "eu-west-2"; -- if (selectedProfile.getRegion() != null && selectedProfile.getRegion().length() > 0) { -- region = selectedProfile.getRegion(); -- } -- -- apiClient.setAWS4Configuration(accessKey, secretKey, region, "api"); -- -- StringBuilder urlBuilder = new StringBuilder(); -- if (selectedProfile.getProtocol() != null && selectedProfile.getProtocol().length() > 0) { -- urlBuilder.append(selectedProfile.getProtocol() + "://"); -- } else { -- urlBuilder.append("https://"); -- } -- -- Endpoint endpoints = selectedProfile.getEndpoints(); -- if (endpoints != null && endpoints.getApi().length() > 0) { -- urlBuilder.append(endpoints.getApi()); -- } else { -- urlBuilder.append("api.{region}.outscale.com/api/v1"); -- } -- -- HashMap serverVariables = new HashMap<>(); -- serverVariables.put("region", new ServerVariable("Loaded from profile", region, null)); -- ServerConfiguration serverConfiguration = new ServerConfiguration( -- urlBuilder.toString(), -- "Loaded from profile", -- serverVariables); -- apiClient.setServers(new ArrayList() { -- { -- add(serverConfiguration); -- } -- }); -- apiClient.setServerIndex(0); -- apiClient.setServerVariables(null); -- -- // TLS -- boolean tlsConfigured = false; -- if (selectedProfile.getX509ClientCert() != null -- && selectedProfile.getX509ClientCert().length() > 0 -- && selectedProfile.getX509ClientKey() != null -- && selectedProfile.getX509ClientKey().length() > 0) { -- tlsConfigured = true; -- -- X509Certificate cert = null; -- try (FileInputStream br = new FileInputStream(selectedProfile.getX509ClientCert())) { -- CertificateFactory factory = CertificateFactory.getInstance("X.509"); -- cert = (X509Certificate) factory.generateCertificate(br); -- } catch (FileNotFoundException e) { -- System.err.println("The certificate is not found "); -- return null; -- } catch (IOException e) { -- System.err.println("Error during the read of the certificate"); -- return null; -- } catch (CertificateException e) { -- System.err.println("Error during the parse of the certificate"); -- return null; -- } -- -- PEMKeyPair pemKey; -- PrivateKey ecKey = null; -- try (BufferedReader br = new BufferedReader(new FileReader(selectedProfile.getX509ClientKey()))) { -- pemKey = (PEMKeyPair) new PEMParser(br).readObject(); -- ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -- } catch (FileNotFoundException e) { -- System.err.println("The private key is not found "); -- return null; -- } catch (IOException e) { -- System.err.println("Error during the read of the private key"); -- return null; -- } -- -- HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -- HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -- .addPlatformTrustedCertificates() -- .heldCertificate(clientCertificate) -- .build(); -- -- OkHttpClient client = new OkHttpClient.Builder() -- .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -- .build(); -- -- apiClient.setHttpClient(client); -- } -- -- if (selectedProfile.getX509ClientCertB64() != null -- && selectedProfile.getX509ClientCertB64().length() > 0 -- && selectedProfile.getX509ClientKeyB64() != null -- && selectedProfile.getX509ClientKeyB64().length() > 0) { -- if (tlsConfigured) { -- System.err.println("Cannot configure client certificate with both file and base64"); -- return null; -- } -- -- byte[] decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientKeyB64()); -- String privateKey = new String(decodedBytes); -- -- decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientCertB64()); -- String certificate = new String(decodedBytes); -- -- PEMKeyPair pemKey; -- PrivateKey ecKey = null; -- try { -- pemKey = (PEMKeyPair) new PEMParser(new StringReader(privateKey)).readObject(); -- ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -- } catch (IOException e) { -- System.err.println("Cannot parse the private Key"); -- return null; -- } -- -- X509Certificate cert = null; -- try { -- CertificateFactory factory = CertificateFactory.getInstance("X.509"); -- cert = (X509Certificate) factory -- .generateCertificate(new ByteArrayInputStream(certificate.getBytes())); -- } catch (CertificateException e) { -- System.err.println("Error during parse of the certificate"); -- return null; -- } -- -- HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -- HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -- .addPlatformTrustedCertificates() -- .heldCertificate(clientCertificate) -- .build(); -- -- OkHttpClient client = new OkHttpClient.Builder() -- .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -- .build(); -- -- apiClient.setHttpClient(client); -- } -- -- return apiClient; -+ return getApiClient(profiles.get(profile)); - } - - @Override -only in patch2: -unchanged: ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java -@@ -0,0 +1,181 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+import java.io.BufferedReader; -+import java.io.ByteArrayInputStream; -+import java.io.FileInputStream; -+import java.io.FileNotFoundException; -+import java.io.FileReader; -+import java.io.IOException; -+import java.io.StringReader; -+import java.security.KeyPair; -+import java.security.PrivateKey; -+import java.security.cert.CertificateException; -+import java.security.cert.CertificateFactory; -+import java.security.cert.X509Certificate; -+import java.util.ArrayList; -+import java.util.Base64; -+import java.util.HashMap; -+ -+import org.bouncycastle.openssl.PEMKeyPair; -+import org.bouncycastle.openssl.PEMParser; -+import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -+ -+import okhttp3.OkHttpClient; -+import okhttp3.tls.HandshakeCertificates; -+import okhttp3.tls.HeldCertificate; -+ -+public class ConfigurationInitializer { -+ -+ protected ApiClient getApiClient(Profile profile) { -+ Profile selectedProfile = profile; -+ -+ ApiClient apiClient = new ApiClient(); -+ -+ String accessKey = ""; -+ if (selectedProfile.getAccessKey() != null && selectedProfile.getAccessKey().length() > 0) { -+ accessKey = selectedProfile.getAccessKey(); -+ } -+ -+ String secretKey = ""; -+ if (selectedProfile.getSecretKey() != null && selectedProfile.getSecretKey().length() > 0) { -+ secretKey = selectedProfile.getSecretKey(); -+ } -+ -+ String region = "eu-west-2"; -+ if (selectedProfile.getRegion() != null && selectedProfile.getRegion().length() > 0) { -+ region = selectedProfile.getRegion(); -+ } -+ -+ apiClient.setAWS4Configuration(accessKey, secretKey, region, "api"); -+ -+ StringBuilder urlBuilder = new StringBuilder(); -+ if (selectedProfile.getProtocol() != null && selectedProfile.getProtocol().length() > 0) { -+ urlBuilder.append(selectedProfile.getProtocol() + "://"); -+ } else { -+ urlBuilder.append("https://"); -+ } -+ -+ Endpoint endpoints = selectedProfile.getEndpoints(); -+ if (endpoints != null -+ && endpoints.getApi() != null -+ && endpoints.getApi().length() > 0) { -+ urlBuilder.append(endpoints.getApi()); -+ } else { -+ urlBuilder.append("api.{region}.outscale.com/api/v1"); -+ } -+ -+ HashMap serverVariables = new HashMap<>(); -+ serverVariables.put("region", new ServerVariable("Loaded from profile", region, null)); -+ ServerConfiguration serverConfiguration = new ServerConfiguration( -+ urlBuilder.toString(), -+ "Loaded from profile", -+ serverVariables); -+ apiClient.setServers(new ArrayList() { -+ { -+ add(serverConfiguration); -+ } -+ }); -+ apiClient.setServerIndex(0); -+ apiClient.setServerVariables(null); -+ -+ // TLS -+ boolean tlsConfigured = false; -+ if (selectedProfile.getX509ClientCert() != null -+ && selectedProfile.getX509ClientCert().length() > 0 -+ && selectedProfile.getX509ClientKey() != null -+ && selectedProfile.getX509ClientKey().length() > 0) { -+ tlsConfigured = true; -+ -+ X509Certificate cert = null; -+ try (FileInputStream br = new FileInputStream(selectedProfile.getX509ClientCert())) { -+ CertificateFactory factory = CertificateFactory.getInstance("X.509"); -+ cert = (X509Certificate) factory.generateCertificate(br); -+ } catch (FileNotFoundException e) { -+ System.err.println("The certificate is not found "); -+ return null; -+ } catch (IOException e) { -+ System.err.println("Error during the read of the certificate"); -+ return null; -+ } catch (CertificateException e) { -+ System.err.println("Error during the parse of the certificate"); -+ return null; -+ } -+ -+ PEMKeyPair pemKey; -+ PrivateKey ecKey = null; -+ try (BufferedReader br = new BufferedReader(new FileReader(selectedProfile.getX509ClientKey()))) { -+ pemKey = (PEMKeyPair) new PEMParser(br).readObject(); -+ ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -+ } catch (FileNotFoundException e) { -+ System.err.println("The private key is not found "); -+ return null; -+ } catch (IOException e) { -+ System.err.println("Error during the read of the private key"); -+ return null; -+ } -+ -+ HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -+ HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -+ .addPlatformTrustedCertificates() -+ .heldCertificate(clientCertificate) -+ .build(); -+ -+ OkHttpClient client = new OkHttpClient.Builder() -+ .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -+ .build(); -+ -+ apiClient.setHttpClient(client); -+ } -+ -+ if (selectedProfile.getX509ClientCertB64() != null -+ && selectedProfile.getX509ClientCertB64().length() > 0 -+ && selectedProfile.getX509ClientKeyB64() != null -+ && selectedProfile.getX509ClientKeyB64().length() > 0) { -+ if (tlsConfigured) { -+ System.err.println("Cannot configure client certificate with both file and base64"); -+ return null; -+ } -+ -+ byte[] decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientKeyB64()); -+ String privateKey = new String(decodedBytes); -+ -+ decodedBytes = Base64.getDecoder().decode(selectedProfile.getX509ClientCertB64()); -+ String certificate = new String(decodedBytes); -+ -+ PEMKeyPair pemKey; -+ PrivateKey ecKey = null; -+ try { -+ pemKey = (PEMKeyPair) new PEMParser(new StringReader(privateKey)).readObject(); -+ ecKey = (PrivateKey) new JcaPEMKeyConverter().getPrivateKey(pemKey.getPrivateKeyInfo()); -+ } catch (IOException e) { -+ System.err.println("Cannot parse the private Key"); -+ return null; -+ } -+ -+ X509Certificate cert = null; -+ try { -+ CertificateFactory factory = CertificateFactory.getInstance("X.509"); -+ cert = (X509Certificate) factory -+ .generateCertificate(new ByteArrayInputStream(certificate.getBytes())); -+ } catch (CertificateException e) { -+ System.err.println("Error during parse of the certificate"); -+ return null; -+ } -+ -+ HeldCertificate clientCertificate = new HeldCertificate(new KeyPair(cert.getPublicKey(), ecKey), cert); -+ HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() -+ .addPlatformTrustedCertificates() -+ .heldCertificate(clientCertificate) -+ .build(); -+ -+ OkHttpClient client = new OkHttpClient.Builder() -+ .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) -+ .build(); -+ -+ apiClient.setHttpClient(client); -+ } -+ -+ return apiClient; -+ } -+ -+} diff --git a/.osc-patches/before-format/2022-12-06-2-configenv-support.patch b/.osc-patches/before-format/2022-12-06-2-configenv-support.patch deleted file mode 100644 index a8ebfcef..00000000 --- a/.osc-patches/before-format/2022-12-06-2-configenv-support.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java -new file mode 100644 -index 0000000..c1021d3 ---- /dev/null -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java -@@ -0,0 +1,39 @@ -+package io.github.outscale.osc_sdk_java.client; -+ -+public class ConfigurationEnv extends ConfigurationInitializer { -+ private Profile profile; -+ -+ public ConfigurationEnv() { -+ } -+ -+ public static ConfigurationEnv loadConfigEnv() { -+ ConfigurationEnv configurationEnv = new ConfigurationEnv(); -+ -+ configurationEnv.profile = new Profile(); -+ configurationEnv.profile.setAccessKey(System.getenv("OSC_ACCESS_KEY")); -+ configurationEnv.profile.setSecretKey(System.getenv("OSC_SECRET_KEY")); -+ configurationEnv.profile.setRegion(System.getenv("OSC_REGION")); -+ configurationEnv.profile.setX509ClientCert(System.getenv("OSC_X509_CLIENT_CERT")); -+ configurationEnv.profile.setX509ClientCertB64(System.getenv("OSC_X509_CLIENT_CERT_B64")); -+ configurationEnv.profile.setX509ClientKey(System.getenv("OSC_X509_CLIENT_KEY")); -+ configurationEnv.profile.setX509ClientKeyB64(System.getenv("OSC_X509_CLIENT_KEY_B64")); -+ configurationEnv.profile.setMethod(System.getenv("OSC_METHOD")); -+ configurationEnv.profile.setProtocol(System.getenv("OSC_PROTOCOL")); -+ -+ Endpoint endpoints = new Endpoint(); -+ endpoints.setApi(System.getenv("OSC_ENDPOINT_API")); -+ configurationEnv.profile.setEndpoints(endpoints); -+ -+ return configurationEnv; -+ } -+ -+ public ApiClient getApiClient() { -+ return getApiClient(profile); -+ } -+ -+ @Override -+ public String toString() { -+ return profile.toString(); -+ } -+ -+} -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/Endpoint.java b/src/main/java/io/github/outscale/osc_sdk_java/client/Endpoint.java -index b635fcf..c5d6aca 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/Endpoint.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/Endpoint.java -@@ -69,4 +69,8 @@ public class Endpoint { - public String getApi() { - return api; - } -+ -+ public void setApi(String api) { -+ this.api = api; -+ } - } -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java b/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java -index 9dc7fa7..bbc2f42 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java -@@ -155,4 +155,44 @@ public class Profile { - public String getX509ClientKeyB64() { - return x509ClientKeyB64; - } -+ -+ public void setAccessKey(String accessKey) { -+ this.accessKey = accessKey; -+ } -+ -+ public void setEndpoints(Endpoint endpoints) { -+ this.endpoints = endpoints; -+ } -+ -+ public void setMethod(String method) { -+ this.method = method; -+ } -+ -+ public void setProtocol(String protocol) { -+ this.protocol = protocol; -+ } -+ -+ public void setRegion(String region) { -+ this.region = region; -+ } -+ -+ public void setSecretKey(String secretKey) { -+ this.secretKey = secretKey; -+ } -+ -+ public void setX509ClientCert(String x509ClientCert) { -+ this.x509ClientCert = x509ClientCert; -+ } -+ -+ public void setX509ClientCertB64(String x509ClientCertB64) { -+ this.x509ClientCertB64 = x509ClientCertB64; -+ } -+ -+ public void setX509ClientKey(String x509ClientKey) { -+ this.x509ClientKey = x509ClientKey; -+ } -+ -+ public void setX509ClientKeyB64(String x509ClientKeyB64) { -+ this.x509ClientKeyB64 = x509ClientKeyB64; -+ } - } diff --git a/.osc-patches/before-format/2022-12-07-basic-auth.patch b/.osc-patches/before-format/2022-12-07-basic-auth.patch deleted file mode 100644 index 066ec60f..00000000 --- a/.osc-patches/before-format/2022-12-07-basic-auth.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java -index 8d0e8e5..a8f8ef8 100644 ---- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java -+++ b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java -@@ -10,7 +10,6 @@ - * Do not edit the class manually. - */ - -- - package io.github.outscale.osc_sdk_java.client.auth; - - import io.github.outscale.osc_sdk_java.client.Pair; -@@ -22,11 +21,14 @@ import java.net.URI; - import java.util.Map; - import java.util.List; - --import java.io.UnsupportedEncodingException; -+import org.joda.time.format.DateTimeFormat; -+import org.joda.time.format.DateTimeFormatter; - - public class HttpBasicAuth implements Authentication { - private String username; - private String password; -+ private DateTimeFormatter timeFormatter = DateTimeFormat -+ .forPattern("yyyyMMdd'T'HHmmss'Z'").withZoneUTC(); - - public String getUsername() { - return username; -@@ -45,13 +47,16 @@ public class HttpBasicAuth implements Authentication { - } - - @Override -- public void applyToParams(List queryParams, Map headerParams, Map cookieParams, -- String payload, String method, URI uri) throws ApiException { -+ public void applyToParams(List queryParams, Map headerParams, -+ Map cookieParams, -+ String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( -- username == null ? "" : username, -- password == null ? "" : password)); -+ username == null ? "" : username, -+ password == null ? "" : password)); -+ -+ headerParams.put("X-Osc-Date", timeFormatter.print(System.currentTimeMillis())); - } - } diff --git a/.reuse/dep5 b/.reuse/dep5 index 1ed92ed3..3b5c4221 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -7,6 +7,6 @@ Files: *.md *.md.template Copyright: 2019 Outscale SAS License: CC-BY-4.0 -Files: Makefile sdk_version api_version *.java .git* src/* dist/* *.yml *.yaml .osc-patches/*.patch .osc-api-patches/*.patch examples/* pom.xml pom.xml.template +Files: Makefile sdk_version api_version *.java .git* src/* dist/* *.yml *.yaml .osc-patches/*.patch .osc-api-patches/*.patch examples/* pom.xml pom.xml.template templates/* Copyright: 2019 Outscale SAS License: BSD-3-Clause diff --git a/Makefile b/Makefile index 52457714..bd52eccb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ API_VERSION=$(shell cat api_version) SDK_VERSION=$(shell cat sdk_version) USER_ID=$(shell id -u) GROUP_ID=$(shell id -g) -OPENAPI_IMG=openapitools/openapi-generator-cli:v6.3.0 +OPENAPI_IMG=openapitools/openapi-generator-cli:v7.17.0 #OPENAPI_IMG=outscale/openapi-generator:java-awsv4-signature SHELL := /bin/bash @@ -11,61 +11,28 @@ all: help .PHONY: help help: @echo "help:" - @echo "- make gen : regenerate SDK" @echo "- make test : run all tests" - -.PHONY: gen -gen: clean osc-generate - -.PNONY: openapi-generator-help -openapi-generator-help: - docker run -v $(PWD):/sdk --rm $(OPENAPI_IMG) config-help -g java - -.PHONY: osc-generate -osc-generate: osc-api/outscale.yaml - @echo start generating SDK... - rm -rf .sdk || true - mkdir .sdk - docker run -v $(PWD):/sdk --rm $(OPENAPI_IMG) generate -i /sdk/osc-api/outscale.yaml -g java -c /sdk/gen.yml -o /sdk/.sdk - docker run -v $(PWD):/sdk --rm $(OPENAPI_IMG) sed -i "s%setUserAgent(\".*\");%setUserAgent(\"osc-sdk-java/$(SDK_VERSION)\");%" /sdk/.sdk/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java - docker run -v $(PWD):/sdk --rm $(OPENAPI_IMG) chown -R $(USER_ID).$(GROUP_ID) /sdk/.sdk - @echo SDK generated - mv .sdk/src ./ - mv .sdk/docs ./ - @echo start update SDK version - sed "s%SDK_VERSION%$(SDK_VERSION)%" pom.xml.template > pom.xml - sed "s%SDK_VERSION%$(SDK_VERSION)%" README.md.template > README.md - sed -i "s%API_VERSION%$(API_VERSION)%" README.md - $(shell for i in ./examples/*; do sed "s%SDK_VERSION%$(SDK_VERSION)%" $$i/pom.xml.template > $$i/pom.xml; done) - git apply ./.osc-patches/before-format/* - mvn spotless:apply - git apply ./.osc-patches/after-format/* - -osc-api/outscale.yaml: - @echo getting osc-api description... - git clone https://github.com/outscale/osc-api-deploy.git - git clone https://github.com/outscale/osc-api-deploy.git osc-api && cd osc-api && git checkout -b $(API_VERSION) $(API_VERSION) - ./osc-api-deploy/hacks/patch-nooneof.rb osc-api/outscale.yaml > osc-api/outscale-tmp.yaml - mv osc-api/outscale-tmp.yaml osc-api/outscale.yaml + @echo "- make build : build" .PHONY: clean clean: @echo cleaning build artifacts... - rm -rf .sdk osc-api src docs || true + mvn clean .PHONY: test test: reuse-test examples-test regen-test @echo all tests OK... +.PHONY: build +build: + @echo all tests OK... + mvn clean compile + .PHONY: reuse-test reuse-test: @echo testing licensing with reuse... docker run --rm --volume $(PWD):/data fsfe/reuse:0.11.1 lint -.PHONY: local-deploy -local-deploy: - mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dgpg.skip - .PHONY: examples-test examples-test: example-volumes example-region example-vm example-config_file example-config_env example-password_auth @echo examples are OK @@ -99,13 +66,6 @@ example-config_env: local-deploy example-password_auth: local-deploy @echo testing examples/password_auth example... make -C examples/password_auth build run -# try to regen, should not have any difference -.PHONY: regen-test -regen-test: gen - @echo SDK regeneration test... - git add src - git diff --cached -s --exit-code - git diff -s --exit-code # Used by bot to auto-release # GH_TOKEN and SSH_PRIVATE_KEY are needed @@ -136,3 +96,7 @@ release-push: .PHONY: release-pr release-pr: bash .github/scripts/release-pr.sh + +.PHONY: local-deploy +local-deploy: + mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dgpg.skip diff --git a/README.md.template b/README.md.template deleted file mode 100644 index 42b59bc6..00000000 --- a/README.md.template +++ /dev/null @@ -1,841 +0,0 @@ -[![Project Incubating](https://docs.outscale.com/fr/userguide/_images/Project-Incubating-blue.svg)](https://docs.outscale.com/en/userguide/Open-Source-Projects.html) - -# osc-sdk-java - -3DS OUTSCALE API -- API version: API_VERSION - -Welcome to the OUTSCALE API documentation.
-The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

-You can learn more about errors returned by the API in the dedicated [errors page](api/errors).

-Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/OUTSCALE-APIs-Reference.html) between AWS and the OUTSCALE API.
-You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

-An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api). - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - io.github.outscale - osc-sdk-java - SDK_VERSION - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy - repositories { - mavenCentral() // Needed if the 'osc-sdk-java' jar has been published to maven central. - mavenLocal() // Needed if the 'osc-sdk-java' jar has been published to the local maven repo. - } - - dependencies { - implementation "io.github.outscale:osc-sdk-java:SDK_VERSION" - } -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/osc-sdk-java-SDK_VERSION.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - CreateAccessKeyRequest createAccessKeyRequest = new CreateAccessKeyRequest(); // CreateAccessKeyRequest | - try { - CreateAccessKeyResponse result = apiInstance.createAccessKey(createAccessKeyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#createAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccessKeyApi* | [**createAccessKey**](docs/AccessKeyApi.md#createAccessKey) | **POST** /CreateAccessKey | -*AccessKeyApi* | [**deleteAccessKey**](docs/AccessKeyApi.md#deleteAccessKey) | **POST** /DeleteAccessKey | -*AccessKeyApi* | [**readAccessKeys**](docs/AccessKeyApi.md#readAccessKeys) | **POST** /ReadAccessKeys | -*AccessKeyApi* | [**readSecretAccessKey**](docs/AccessKeyApi.md#readSecretAccessKey) | **POST** /ReadSecretAccessKey | -*AccessKeyApi* | [**updateAccessKey**](docs/AccessKeyApi.md#updateAccessKey) | **POST** /UpdateAccessKey | -*AccountApi* | [**checkAuthentication**](docs/AccountApi.md#checkAuthentication) | **POST** /CheckAuthentication | -*AccountApi* | [**createAccount**](docs/AccountApi.md#createAccount) | **POST** /CreateAccount | -*AccountApi* | [**readAccounts**](docs/AccountApi.md#readAccounts) | **POST** /ReadAccounts | -*AccountApi* | [**readConsumptionAccount**](docs/AccountApi.md#readConsumptionAccount) | **POST** /ReadConsumptionAccount | -*AccountApi* | [**resetAccountPassword**](docs/AccountApi.md#resetAccountPassword) | **POST** /ResetAccountPassword | -*AccountApi* | [**sendResetPasswordEmail**](docs/AccountApi.md#sendResetPasswordEmail) | **POST** /SendResetPasswordEmail | -*AccountApi* | [**updateAccount**](docs/AccountApi.md#updateAccount) | **POST** /UpdateAccount | -*ApiAccessPolicyApi* | [**readApiAccessPolicy**](docs/ApiAccessPolicyApi.md#readApiAccessPolicy) | **POST** /ReadApiAccessPolicy | -*ApiAccessPolicyApi* | [**updateApiAccessPolicy**](docs/ApiAccessPolicyApi.md#updateApiAccessPolicy) | **POST** /UpdateApiAccessPolicy | -*ApiAccessRuleApi* | [**createApiAccessRule**](docs/ApiAccessRuleApi.md#createApiAccessRule) | **POST** /CreateApiAccessRule | -*ApiAccessRuleApi* | [**deleteApiAccessRule**](docs/ApiAccessRuleApi.md#deleteApiAccessRule) | **POST** /DeleteApiAccessRule | -*ApiAccessRuleApi* | [**readApiAccessRules**](docs/ApiAccessRuleApi.md#readApiAccessRules) | **POST** /ReadApiAccessRules | -*ApiAccessRuleApi* | [**updateApiAccessRule**](docs/ApiAccessRuleApi.md#updateApiAccessRule) | **POST** /UpdateApiAccessRule | -*ApiLogApi* | [**readApiLogs**](docs/ApiLogApi.md#readApiLogs) | **POST** /ReadApiLogs | -*CaApi* | [**createCa**](docs/CaApi.md#createCa) | **POST** /CreateCa | -*CaApi* | [**deleteCa**](docs/CaApi.md#deleteCa) | **POST** /DeleteCa | -*CaApi* | [**readCas**](docs/CaApi.md#readCas) | **POST** /ReadCas | -*CaApi* | [**updateCa**](docs/CaApi.md#updateCa) | **POST** /UpdateCa | -*CatalogApi* | [**readCatalog**](docs/CatalogApi.md#readCatalog) | **POST** /ReadCatalog | -*ClientGatewayApi* | [**createClientGateway**](docs/ClientGatewayApi.md#createClientGateway) | **POST** /CreateClientGateway | -*ClientGatewayApi* | [**deleteClientGateway**](docs/ClientGatewayApi.md#deleteClientGateway) | **POST** /DeleteClientGateway | -*ClientGatewayApi* | [**readClientGateways**](docs/ClientGatewayApi.md#readClientGateways) | **POST** /ReadClientGateways | -*DhcpOptionApi* | [**createDhcpOptions**](docs/DhcpOptionApi.md#createDhcpOptions) | **POST** /CreateDhcpOptions | -*DhcpOptionApi* | [**deleteDhcpOptions**](docs/DhcpOptionApi.md#deleteDhcpOptions) | **POST** /DeleteDhcpOptions | -*DhcpOptionApi* | [**readDhcpOptions**](docs/DhcpOptionApi.md#readDhcpOptions) | **POST** /ReadDhcpOptions | -*DirectLinkApi* | [**createDirectLink**](docs/DirectLinkApi.md#createDirectLink) | **POST** /CreateDirectLink | -*DirectLinkApi* | [**deleteDirectLink**](docs/DirectLinkApi.md#deleteDirectLink) | **POST** /DeleteDirectLink | -*DirectLinkApi* | [**readDirectLinks**](docs/DirectLinkApi.md#readDirectLinks) | **POST** /ReadDirectLinks | -*DirectLinkInterfaceApi* | [**createDirectLinkInterface**](docs/DirectLinkInterfaceApi.md#createDirectLinkInterface) | **POST** /CreateDirectLinkInterface | -*DirectLinkInterfaceApi* | [**deleteDirectLinkInterface**](docs/DirectLinkInterfaceApi.md#deleteDirectLinkInterface) | **POST** /DeleteDirectLinkInterface | -*DirectLinkInterfaceApi* | [**readDirectLinkInterfaces**](docs/DirectLinkInterfaceApi.md#readDirectLinkInterfaces) | **POST** /ReadDirectLinkInterfaces | -*DirectLinkInterfaceApi* | [**updateDirectLinkInterface**](docs/DirectLinkInterfaceApi.md#updateDirectLinkInterface) | **POST** /UpdateDirectLinkInterface | -*FlexibleGpuApi* | [**createFlexibleGpu**](docs/FlexibleGpuApi.md#createFlexibleGpu) | **POST** /CreateFlexibleGpu | -*FlexibleGpuApi* | [**deleteFlexibleGpu**](docs/FlexibleGpuApi.md#deleteFlexibleGpu) | **POST** /DeleteFlexibleGpu | -*FlexibleGpuApi* | [**linkFlexibleGpu**](docs/FlexibleGpuApi.md#linkFlexibleGpu) | **POST** /LinkFlexibleGpu | -*FlexibleGpuApi* | [**readFlexibleGpuCatalog**](docs/FlexibleGpuApi.md#readFlexibleGpuCatalog) | **POST** /ReadFlexibleGpuCatalog | -*FlexibleGpuApi* | [**readFlexibleGpus**](docs/FlexibleGpuApi.md#readFlexibleGpus) | **POST** /ReadFlexibleGpus | -*FlexibleGpuApi* | [**unlinkFlexibleGpu**](docs/FlexibleGpuApi.md#unlinkFlexibleGpu) | **POST** /UnlinkFlexibleGpu | -*FlexibleGpuApi* | [**updateFlexibleGpu**](docs/FlexibleGpuApi.md#updateFlexibleGpu) | **POST** /UpdateFlexibleGpu | -*ImageApi* | [**createImage**](docs/ImageApi.md#createImage) | **POST** /CreateImage | -*ImageApi* | [**createImageExportTask**](docs/ImageApi.md#createImageExportTask) | **POST** /CreateImageExportTask | -*ImageApi* | [**deleteImage**](docs/ImageApi.md#deleteImage) | **POST** /DeleteImage | -*ImageApi* | [**readImageExportTasks**](docs/ImageApi.md#readImageExportTasks) | **POST** /ReadImageExportTasks | -*ImageApi* | [**readImages**](docs/ImageApi.md#readImages) | **POST** /ReadImages | -*ImageApi* | [**updateImage**](docs/ImageApi.md#updateImage) | **POST** /UpdateImage | -*InternetServiceApi* | [**createInternetService**](docs/InternetServiceApi.md#createInternetService) | **POST** /CreateInternetService | -*InternetServiceApi* | [**deleteInternetService**](docs/InternetServiceApi.md#deleteInternetService) | **POST** /DeleteInternetService | -*InternetServiceApi* | [**linkInternetService**](docs/InternetServiceApi.md#linkInternetService) | **POST** /LinkInternetService | -*InternetServiceApi* | [**readInternetServices**](docs/InternetServiceApi.md#readInternetServices) | **POST** /ReadInternetServices | -*InternetServiceApi* | [**unlinkInternetService**](docs/InternetServiceApi.md#unlinkInternetService) | **POST** /UnlinkInternetService | -*KeypairApi* | [**createKeypair**](docs/KeypairApi.md#createKeypair) | **POST** /CreateKeypair | -*KeypairApi* | [**deleteKeypair**](docs/KeypairApi.md#deleteKeypair) | **POST** /DeleteKeypair | -*KeypairApi* | [**readKeypairs**](docs/KeypairApi.md#readKeypairs) | **POST** /ReadKeypairs | -*ListenerApi* | [**createListenerRule**](docs/ListenerApi.md#createListenerRule) | **POST** /CreateListenerRule | -*ListenerApi* | [**createLoadBalancerListeners**](docs/ListenerApi.md#createLoadBalancerListeners) | **POST** /CreateLoadBalancerListeners | -*ListenerApi* | [**deleteListenerRule**](docs/ListenerApi.md#deleteListenerRule) | **POST** /DeleteListenerRule | -*ListenerApi* | [**deleteLoadBalancerListeners**](docs/ListenerApi.md#deleteLoadBalancerListeners) | **POST** /DeleteLoadBalancerListeners | -*ListenerApi* | [**readListenerRules**](docs/ListenerApi.md#readListenerRules) | **POST** /ReadListenerRules | -*ListenerApi* | [**updateListenerRule**](docs/ListenerApi.md#updateListenerRule) | **POST** /UpdateListenerRule | -*LoadBalancerApi* | [**createLoadBalancer**](docs/LoadBalancerApi.md#createLoadBalancer) | **POST** /CreateLoadBalancer | -*LoadBalancerApi* | [**createLoadBalancerTags**](docs/LoadBalancerApi.md#createLoadBalancerTags) | **POST** /CreateLoadBalancerTags | -*LoadBalancerApi* | [**deleteLoadBalancer**](docs/LoadBalancerApi.md#deleteLoadBalancer) | **POST** /DeleteLoadBalancer | -*LoadBalancerApi* | [**deleteLoadBalancerTags**](docs/LoadBalancerApi.md#deleteLoadBalancerTags) | **POST** /DeleteLoadBalancerTags | -*LoadBalancerApi* | [**deregisterVmsInLoadBalancer**](docs/LoadBalancerApi.md#deregisterVmsInLoadBalancer) | **POST** /DeregisterVmsInLoadBalancer | -*LoadBalancerApi* | [**linkLoadBalancerBackendMachines**](docs/LoadBalancerApi.md#linkLoadBalancerBackendMachines) | **POST** /LinkLoadBalancerBackendMachines | -*LoadBalancerApi* | [**readLoadBalancerTags**](docs/LoadBalancerApi.md#readLoadBalancerTags) | **POST** /ReadLoadBalancerTags | -*LoadBalancerApi* | [**readLoadBalancers**](docs/LoadBalancerApi.md#readLoadBalancers) | **POST** /ReadLoadBalancers | -*LoadBalancerApi* | [**readVmsHealth**](docs/LoadBalancerApi.md#readVmsHealth) | **POST** /ReadVmsHealth | -*LoadBalancerApi* | [**registerVmsInLoadBalancer**](docs/LoadBalancerApi.md#registerVmsInLoadBalancer) | **POST** /RegisterVmsInLoadBalancer | -*LoadBalancerApi* | [**unlinkLoadBalancerBackendMachines**](docs/LoadBalancerApi.md#unlinkLoadBalancerBackendMachines) | **POST** /UnlinkLoadBalancerBackendMachines | -*LoadBalancerApi* | [**updateLoadBalancer**](docs/LoadBalancerApi.md#updateLoadBalancer) | **POST** /UpdateLoadBalancer | -*LoadBalancerPolicyApi* | [**createLoadBalancerPolicy**](docs/LoadBalancerPolicyApi.md#createLoadBalancerPolicy) | **POST** /CreateLoadBalancerPolicy | -*LoadBalancerPolicyApi* | [**deleteLoadBalancerPolicy**](docs/LoadBalancerPolicyApi.md#deleteLoadBalancerPolicy) | **POST** /DeleteLoadBalancerPolicy | -*LocationApi* | [**readLocations**](docs/LocationApi.md#readLocations) | **POST** /ReadLocations | -*NatServiceApi* | [**createNatService**](docs/NatServiceApi.md#createNatService) | **POST** /CreateNatService | -*NatServiceApi* | [**deleteNatService**](docs/NatServiceApi.md#deleteNatService) | **POST** /DeleteNatService | -*NatServiceApi* | [**readNatServices**](docs/NatServiceApi.md#readNatServices) | **POST** /ReadNatServices | -*NetApi* | [**createNet**](docs/NetApi.md#createNet) | **POST** /CreateNet | -*NetApi* | [**deleteNet**](docs/NetApi.md#deleteNet) | **POST** /DeleteNet | -*NetApi* | [**readNets**](docs/NetApi.md#readNets) | **POST** /ReadNets | -*NetApi* | [**updateNet**](docs/NetApi.md#updateNet) | **POST** /UpdateNet | -*NetAccessPointApi* | [**createNetAccessPoint**](docs/NetAccessPointApi.md#createNetAccessPoint) | **POST** /CreateNetAccessPoint | -*NetAccessPointApi* | [**deleteNetAccessPoint**](docs/NetAccessPointApi.md#deleteNetAccessPoint) | **POST** /DeleteNetAccessPoint | -*NetAccessPointApi* | [**readNetAccessPointServices**](docs/NetAccessPointApi.md#readNetAccessPointServices) | **POST** /ReadNetAccessPointServices | -*NetAccessPointApi* | [**readNetAccessPoints**](docs/NetAccessPointApi.md#readNetAccessPoints) | **POST** /ReadNetAccessPoints | -*NetAccessPointApi* | [**updateNetAccessPoint**](docs/NetAccessPointApi.md#updateNetAccessPoint) | **POST** /UpdateNetAccessPoint | -*NetPeeringApi* | [**acceptNetPeering**](docs/NetPeeringApi.md#acceptNetPeering) | **POST** /AcceptNetPeering | -*NetPeeringApi* | [**createNetPeering**](docs/NetPeeringApi.md#createNetPeering) | **POST** /CreateNetPeering | -*NetPeeringApi* | [**deleteNetPeering**](docs/NetPeeringApi.md#deleteNetPeering) | **POST** /DeleteNetPeering | -*NetPeeringApi* | [**readNetPeerings**](docs/NetPeeringApi.md#readNetPeerings) | **POST** /ReadNetPeerings | -*NetPeeringApi* | [**rejectNetPeering**](docs/NetPeeringApi.md#rejectNetPeering) | **POST** /RejectNetPeering | -*NicApi* | [**createNic**](docs/NicApi.md#createNic) | **POST** /CreateNic | -*NicApi* | [**deleteNic**](docs/NicApi.md#deleteNic) | **POST** /DeleteNic | -*NicApi* | [**linkNic**](docs/NicApi.md#linkNic) | **POST** /LinkNic | -*NicApi* | [**linkPrivateIps**](docs/NicApi.md#linkPrivateIps) | **POST** /LinkPrivateIps | -*NicApi* | [**readNics**](docs/NicApi.md#readNics) | **POST** /ReadNics | -*NicApi* | [**unlinkNic**](docs/NicApi.md#unlinkNic) | **POST** /UnlinkNic | -*NicApi* | [**unlinkPrivateIps**](docs/NicApi.md#unlinkPrivateIps) | **POST** /UnlinkPrivateIps | -*NicApi* | [**updateNic**](docs/NicApi.md#updateNic) | **POST** /UpdateNic | -*ProductTypeApi* | [**readProductTypes**](docs/ProductTypeApi.md#readProductTypes) | **POST** /ReadProductTypes | -*PublicCatalogApi* | [**readPublicCatalog**](docs/PublicCatalogApi.md#readPublicCatalog) | **POST** /ReadPublicCatalog | -*PublicIpApi* | [**createPublicIp**](docs/PublicIpApi.md#createPublicIp) | **POST** /CreatePublicIp | -*PublicIpApi* | [**deletePublicIp**](docs/PublicIpApi.md#deletePublicIp) | **POST** /DeletePublicIp | -*PublicIpApi* | [**linkPublicIp**](docs/PublicIpApi.md#linkPublicIp) | **POST** /LinkPublicIp | -*PublicIpApi* | [**readPublicIpRanges**](docs/PublicIpApi.md#readPublicIpRanges) | **POST** /ReadPublicIpRanges | -*PublicIpApi* | [**readPublicIps**](docs/PublicIpApi.md#readPublicIps) | **POST** /ReadPublicIps | -*PublicIpApi* | [**unlinkPublicIp**](docs/PublicIpApi.md#unlinkPublicIp) | **POST** /UnlinkPublicIp | -*QuotaApi* | [**readQuotas**](docs/QuotaApi.md#readQuotas) | **POST** /ReadQuotas | -*RegionApi* | [**readRegions**](docs/RegionApi.md#readRegions) | **POST** /ReadRegions | -*RouteApi* | [**createRoute**](docs/RouteApi.md#createRoute) | **POST** /CreateRoute | -*RouteApi* | [**deleteRoute**](docs/RouteApi.md#deleteRoute) | **POST** /DeleteRoute | -*RouteApi* | [**updateRoute**](docs/RouteApi.md#updateRoute) | **POST** /UpdateRoute | -*RouteTableApi* | [**createRouteTable**](docs/RouteTableApi.md#createRouteTable) | **POST** /CreateRouteTable | -*RouteTableApi* | [**deleteRouteTable**](docs/RouteTableApi.md#deleteRouteTable) | **POST** /DeleteRouteTable | -*RouteTableApi* | [**linkRouteTable**](docs/RouteTableApi.md#linkRouteTable) | **POST** /LinkRouteTable | -*RouteTableApi* | [**readRouteTables**](docs/RouteTableApi.md#readRouteTables) | **POST** /ReadRouteTables | -*RouteTableApi* | [**unlinkRouteTable**](docs/RouteTableApi.md#unlinkRouteTable) | **POST** /UnlinkRouteTable | -*SecurityGroupApi* | [**createSecurityGroup**](docs/SecurityGroupApi.md#createSecurityGroup) | **POST** /CreateSecurityGroup | -*SecurityGroupApi* | [**deleteSecurityGroup**](docs/SecurityGroupApi.md#deleteSecurityGroup) | **POST** /DeleteSecurityGroup | -*SecurityGroupApi* | [**readSecurityGroups**](docs/SecurityGroupApi.md#readSecurityGroups) | **POST** /ReadSecurityGroups | -*SecurityGroupRuleApi* | [**createSecurityGroupRule**](docs/SecurityGroupRuleApi.md#createSecurityGroupRule) | **POST** /CreateSecurityGroupRule | -*SecurityGroupRuleApi* | [**deleteSecurityGroupRule**](docs/SecurityGroupRuleApi.md#deleteSecurityGroupRule) | **POST** /DeleteSecurityGroupRule | -*ServerCertificateApi* | [**createServerCertificate**](docs/ServerCertificateApi.md#createServerCertificate) | **POST** /CreateServerCertificate | -*ServerCertificateApi* | [**deleteServerCertificate**](docs/ServerCertificateApi.md#deleteServerCertificate) | **POST** /DeleteServerCertificate | -*ServerCertificateApi* | [**readServerCertificates**](docs/ServerCertificateApi.md#readServerCertificates) | **POST** /ReadServerCertificates | -*ServerCertificateApi* | [**updateServerCertificate**](docs/ServerCertificateApi.md#updateServerCertificate) | **POST** /UpdateServerCertificate | -*SnapshotApi* | [**createSnapshot**](docs/SnapshotApi.md#createSnapshot) | **POST** /CreateSnapshot | -*SnapshotApi* | [**createSnapshotExportTask**](docs/SnapshotApi.md#createSnapshotExportTask) | **POST** /CreateSnapshotExportTask | -*SnapshotApi* | [**deleteSnapshot**](docs/SnapshotApi.md#deleteSnapshot) | **POST** /DeleteSnapshot | -*SnapshotApi* | [**readSnapshotExportTasks**](docs/SnapshotApi.md#readSnapshotExportTasks) | **POST** /ReadSnapshotExportTasks | -*SnapshotApi* | [**readSnapshots**](docs/SnapshotApi.md#readSnapshots) | **POST** /ReadSnapshots | -*SnapshotApi* | [**updateSnapshot**](docs/SnapshotApi.md#updateSnapshot) | **POST** /UpdateSnapshot | -*SubnetApi* | [**createSubnet**](docs/SubnetApi.md#createSubnet) | **POST** /CreateSubnet | -*SubnetApi* | [**deleteSubnet**](docs/SubnetApi.md#deleteSubnet) | **POST** /DeleteSubnet | -*SubnetApi* | [**readSubnets**](docs/SubnetApi.md#readSubnets) | **POST** /ReadSubnets | -*SubnetApi* | [**updateSubnet**](docs/SubnetApi.md#updateSubnet) | **POST** /UpdateSubnet | -*SubregionApi* | [**readSubregions**](docs/SubregionApi.md#readSubregions) | **POST** /ReadSubregions | -*TagApi* | [**createTags**](docs/TagApi.md#createTags) | **POST** /CreateTags | -*TagApi* | [**deleteTags**](docs/TagApi.md#deleteTags) | **POST** /DeleteTags | -*TagApi* | [**readTags**](docs/TagApi.md#readTags) | **POST** /ReadTags | -*TaskApi* | [**deleteExportTask**](docs/TaskApi.md#deleteExportTask) | **POST** /DeleteExportTask | -*VirtualGatewayApi* | [**createVirtualGateway**](docs/VirtualGatewayApi.md#createVirtualGateway) | **POST** /CreateVirtualGateway | -*VirtualGatewayApi* | [**deleteVirtualGateway**](docs/VirtualGatewayApi.md#deleteVirtualGateway) | **POST** /DeleteVirtualGateway | -*VirtualGatewayApi* | [**linkVirtualGateway**](docs/VirtualGatewayApi.md#linkVirtualGateway) | **POST** /LinkVirtualGateway | -*VirtualGatewayApi* | [**readVirtualGateways**](docs/VirtualGatewayApi.md#readVirtualGateways) | **POST** /ReadVirtualGateways | -*VirtualGatewayApi* | [**unlinkVirtualGateway**](docs/VirtualGatewayApi.md#unlinkVirtualGateway) | **POST** /UnlinkVirtualGateway | -*VirtualGatewayApi* | [**updateRoutePropagation**](docs/VirtualGatewayApi.md#updateRoutePropagation) | **POST** /UpdateRoutePropagation | -*VmApi* | [**createVms**](docs/VmApi.md#createVms) | **POST** /CreateVms | -*VmApi* | [**deleteVms**](docs/VmApi.md#deleteVms) | **POST** /DeleteVms | -*VmApi* | [**readAdminPassword**](docs/VmApi.md#readAdminPassword) | **POST** /ReadAdminPassword | -*VmApi* | [**readConsoleOutput**](docs/VmApi.md#readConsoleOutput) | **POST** /ReadConsoleOutput | -*VmApi* | [**readVmTypes**](docs/VmApi.md#readVmTypes) | **POST** /ReadVmTypes | -*VmApi* | [**readVms**](docs/VmApi.md#readVms) | **POST** /ReadVms | -*VmApi* | [**readVmsState**](docs/VmApi.md#readVmsState) | **POST** /ReadVmsState | -*VmApi* | [**rebootVms**](docs/VmApi.md#rebootVms) | **POST** /RebootVms | -*VmApi* | [**startVms**](docs/VmApi.md#startVms) | **POST** /StartVms | -*VmApi* | [**stopVms**](docs/VmApi.md#stopVms) | **POST** /StopVms | -*VmApi* | [**updateVm**](docs/VmApi.md#updateVm) | **POST** /UpdateVm | -*VolumeApi* | [**createVolume**](docs/VolumeApi.md#createVolume) | **POST** /CreateVolume | -*VolumeApi* | [**deleteVolume**](docs/VolumeApi.md#deleteVolume) | **POST** /DeleteVolume | -*VolumeApi* | [**linkVolume**](docs/VolumeApi.md#linkVolume) | **POST** /LinkVolume | -*VolumeApi* | [**readVolumes**](docs/VolumeApi.md#readVolumes) | **POST** /ReadVolumes | -*VolumeApi* | [**unlinkVolume**](docs/VolumeApi.md#unlinkVolume) | **POST** /UnlinkVolume | -*VolumeApi* | [**updateVolume**](docs/VolumeApi.md#updateVolume) | **POST** /UpdateVolume | -*VpnConnectionApi* | [**createVpnConnection**](docs/VpnConnectionApi.md#createVpnConnection) | **POST** /CreateVpnConnection | -*VpnConnectionApi* | [**createVpnConnectionRoute**](docs/VpnConnectionApi.md#createVpnConnectionRoute) | **POST** /CreateVpnConnectionRoute | -*VpnConnectionApi* | [**deleteVpnConnection**](docs/VpnConnectionApi.md#deleteVpnConnection) | **POST** /DeleteVpnConnection | -*VpnConnectionApi* | [**deleteVpnConnectionRoute**](docs/VpnConnectionApi.md#deleteVpnConnectionRoute) | **POST** /DeleteVpnConnectionRoute | -*VpnConnectionApi* | [**readVpnConnections**](docs/VpnConnectionApi.md#readVpnConnections) | **POST** /ReadVpnConnections | -*VpnConnectionApi* | [**updateVpnConnection**](docs/VpnConnectionApi.md#updateVpnConnection) | **POST** /UpdateVpnConnection | - - -## Documentation for Models - - - [AcceptNetPeeringRequest](docs/AcceptNetPeeringRequest.md) - - [AcceptNetPeeringResponse](docs/AcceptNetPeeringResponse.md) - - [AccepterNet](docs/AccepterNet.md) - - [AccessKey](docs/AccessKey.md) - - [AccessKeySecretKey](docs/AccessKeySecretKey.md) - - [AccessLog](docs/AccessLog.md) - - [Account](docs/Account.md) - - [ApiAccessPolicy](docs/ApiAccessPolicy.md) - - [ApiAccessRule](docs/ApiAccessRule.md) - - [ApplicationStickyCookiePolicy](docs/ApplicationStickyCookiePolicy.md) - - [BackendVmHealth](docs/BackendVmHealth.md) - - [BlockDeviceMappingCreated](docs/BlockDeviceMappingCreated.md) - - [BlockDeviceMappingImage](docs/BlockDeviceMappingImage.md) - - [BlockDeviceMappingVmCreation](docs/BlockDeviceMappingVmCreation.md) - - [BlockDeviceMappingVmUpdate](docs/BlockDeviceMappingVmUpdate.md) - - [BsuCreated](docs/BsuCreated.md) - - [BsuToCreate](docs/BsuToCreate.md) - - [BsuToUpdateVm](docs/BsuToUpdateVm.md) - - [Ca](docs/Ca.md) - - [Catalog](docs/Catalog.md) - - [CatalogEntry](docs/CatalogEntry.md) - - [CheckAuthenticationRequest](docs/CheckAuthenticationRequest.md) - - [CheckAuthenticationResponse](docs/CheckAuthenticationResponse.md) - - [ClientGateway](docs/ClientGateway.md) - - [ConsumptionEntry](docs/ConsumptionEntry.md) - - [CreateAccessKeyRequest](docs/CreateAccessKeyRequest.md) - - [CreateAccessKeyResponse](docs/CreateAccessKeyResponse.md) - - [CreateAccountRequest](docs/CreateAccountRequest.md) - - [CreateAccountResponse](docs/CreateAccountResponse.md) - - [CreateApiAccessRuleRequest](docs/CreateApiAccessRuleRequest.md) - - [CreateApiAccessRuleResponse](docs/CreateApiAccessRuleResponse.md) - - [CreateCaRequest](docs/CreateCaRequest.md) - - [CreateCaResponse](docs/CreateCaResponse.md) - - [CreateClientGatewayRequest](docs/CreateClientGatewayRequest.md) - - [CreateClientGatewayResponse](docs/CreateClientGatewayResponse.md) - - [CreateDhcpOptionsRequest](docs/CreateDhcpOptionsRequest.md) - - [CreateDhcpOptionsResponse](docs/CreateDhcpOptionsResponse.md) - - [CreateDirectLinkInterfaceRequest](docs/CreateDirectLinkInterfaceRequest.md) - - [CreateDirectLinkInterfaceResponse](docs/CreateDirectLinkInterfaceResponse.md) - - [CreateDirectLinkRequest](docs/CreateDirectLinkRequest.md) - - [CreateDirectLinkResponse](docs/CreateDirectLinkResponse.md) - - [CreateFlexibleGpuRequest](docs/CreateFlexibleGpuRequest.md) - - [CreateFlexibleGpuResponse](docs/CreateFlexibleGpuResponse.md) - - [CreateImageExportTaskRequest](docs/CreateImageExportTaskRequest.md) - - [CreateImageExportTaskResponse](docs/CreateImageExportTaskResponse.md) - - [CreateImageRequest](docs/CreateImageRequest.md) - - [CreateImageResponse](docs/CreateImageResponse.md) - - [CreateInternetServiceRequest](docs/CreateInternetServiceRequest.md) - - [CreateInternetServiceResponse](docs/CreateInternetServiceResponse.md) - - [CreateKeypairRequest](docs/CreateKeypairRequest.md) - - [CreateKeypairResponse](docs/CreateKeypairResponse.md) - - [CreateListenerRuleRequest](docs/CreateListenerRuleRequest.md) - - [CreateListenerRuleResponse](docs/CreateListenerRuleResponse.md) - - [CreateLoadBalancerListenersRequest](docs/CreateLoadBalancerListenersRequest.md) - - [CreateLoadBalancerListenersResponse](docs/CreateLoadBalancerListenersResponse.md) - - [CreateLoadBalancerPolicyRequest](docs/CreateLoadBalancerPolicyRequest.md) - - [CreateLoadBalancerPolicyResponse](docs/CreateLoadBalancerPolicyResponse.md) - - [CreateLoadBalancerRequest](docs/CreateLoadBalancerRequest.md) - - [CreateLoadBalancerResponse](docs/CreateLoadBalancerResponse.md) - - [CreateLoadBalancerTagsRequest](docs/CreateLoadBalancerTagsRequest.md) - - [CreateLoadBalancerTagsResponse](docs/CreateLoadBalancerTagsResponse.md) - - [CreateNatServiceRequest](docs/CreateNatServiceRequest.md) - - [CreateNatServiceResponse](docs/CreateNatServiceResponse.md) - - [CreateNetAccessPointRequest](docs/CreateNetAccessPointRequest.md) - - [CreateNetAccessPointResponse](docs/CreateNetAccessPointResponse.md) - - [CreateNetPeeringRequest](docs/CreateNetPeeringRequest.md) - - [CreateNetPeeringResponse](docs/CreateNetPeeringResponse.md) - - [CreateNetRequest](docs/CreateNetRequest.md) - - [CreateNetResponse](docs/CreateNetResponse.md) - - [CreateNicRequest](docs/CreateNicRequest.md) - - [CreateNicResponse](docs/CreateNicResponse.md) - - [CreatePublicIpRequest](docs/CreatePublicIpRequest.md) - - [CreatePublicIpResponse](docs/CreatePublicIpResponse.md) - - [CreateRouteRequest](docs/CreateRouteRequest.md) - - [CreateRouteResponse](docs/CreateRouteResponse.md) - - [CreateRouteTableRequest](docs/CreateRouteTableRequest.md) - - [CreateRouteTableResponse](docs/CreateRouteTableResponse.md) - - [CreateSecurityGroupRequest](docs/CreateSecurityGroupRequest.md) - - [CreateSecurityGroupResponse](docs/CreateSecurityGroupResponse.md) - - [CreateSecurityGroupRuleRequest](docs/CreateSecurityGroupRuleRequest.md) - - [CreateSecurityGroupRuleResponse](docs/CreateSecurityGroupRuleResponse.md) - - [CreateServerCertificateRequest](docs/CreateServerCertificateRequest.md) - - [CreateServerCertificateResponse](docs/CreateServerCertificateResponse.md) - - [CreateSnapshotExportTaskRequest](docs/CreateSnapshotExportTaskRequest.md) - - [CreateSnapshotExportTaskResponse](docs/CreateSnapshotExportTaskResponse.md) - - [CreateSnapshotRequest](docs/CreateSnapshotRequest.md) - - [CreateSnapshotResponse](docs/CreateSnapshotResponse.md) - - [CreateSubnetRequest](docs/CreateSubnetRequest.md) - - [CreateSubnetResponse](docs/CreateSubnetResponse.md) - - [CreateTagsRequest](docs/CreateTagsRequest.md) - - [CreateTagsResponse](docs/CreateTagsResponse.md) - - [CreateVirtualGatewayRequest](docs/CreateVirtualGatewayRequest.md) - - [CreateVirtualGatewayResponse](docs/CreateVirtualGatewayResponse.md) - - [CreateVmsRequest](docs/CreateVmsRequest.md) - - [CreateVmsResponse](docs/CreateVmsResponse.md) - - [CreateVolumeRequest](docs/CreateVolumeRequest.md) - - [CreateVolumeResponse](docs/CreateVolumeResponse.md) - - [CreateVpnConnectionRequest](docs/CreateVpnConnectionRequest.md) - - [CreateVpnConnectionResponse](docs/CreateVpnConnectionResponse.md) - - [CreateVpnConnectionRouteRequest](docs/CreateVpnConnectionRouteRequest.md) - - [CreateVpnConnectionRouteResponse](docs/CreateVpnConnectionRouteResponse.md) - - [DeleteAccessKeyRequest](docs/DeleteAccessKeyRequest.md) - - [DeleteAccessKeyResponse](docs/DeleteAccessKeyResponse.md) - - [DeleteApiAccessRuleRequest](docs/DeleteApiAccessRuleRequest.md) - - [DeleteApiAccessRuleResponse](docs/DeleteApiAccessRuleResponse.md) - - [DeleteCaRequest](docs/DeleteCaRequest.md) - - [DeleteCaResponse](docs/DeleteCaResponse.md) - - [DeleteClientGatewayRequest](docs/DeleteClientGatewayRequest.md) - - [DeleteClientGatewayResponse](docs/DeleteClientGatewayResponse.md) - - [DeleteDhcpOptionsRequest](docs/DeleteDhcpOptionsRequest.md) - - [DeleteDhcpOptionsResponse](docs/DeleteDhcpOptionsResponse.md) - - [DeleteDirectLinkInterfaceRequest](docs/DeleteDirectLinkInterfaceRequest.md) - - [DeleteDirectLinkInterfaceResponse](docs/DeleteDirectLinkInterfaceResponse.md) - - [DeleteDirectLinkRequest](docs/DeleteDirectLinkRequest.md) - - [DeleteDirectLinkResponse](docs/DeleteDirectLinkResponse.md) - - [DeleteExportTaskRequest](docs/DeleteExportTaskRequest.md) - - [DeleteExportTaskResponse](docs/DeleteExportTaskResponse.md) - - [DeleteFlexibleGpuRequest](docs/DeleteFlexibleGpuRequest.md) - - [DeleteFlexibleGpuResponse](docs/DeleteFlexibleGpuResponse.md) - - [DeleteImageRequest](docs/DeleteImageRequest.md) - - [DeleteImageResponse](docs/DeleteImageResponse.md) - - [DeleteInternetServiceRequest](docs/DeleteInternetServiceRequest.md) - - [DeleteInternetServiceResponse](docs/DeleteInternetServiceResponse.md) - - [DeleteKeypairRequest](docs/DeleteKeypairRequest.md) - - [DeleteKeypairResponse](docs/DeleteKeypairResponse.md) - - [DeleteListenerRuleRequest](docs/DeleteListenerRuleRequest.md) - - [DeleteListenerRuleResponse](docs/DeleteListenerRuleResponse.md) - - [DeleteLoadBalancerListenersRequest](docs/DeleteLoadBalancerListenersRequest.md) - - [DeleteLoadBalancerListenersResponse](docs/DeleteLoadBalancerListenersResponse.md) - - [DeleteLoadBalancerPolicyRequest](docs/DeleteLoadBalancerPolicyRequest.md) - - [DeleteLoadBalancerPolicyResponse](docs/DeleteLoadBalancerPolicyResponse.md) - - [DeleteLoadBalancerRequest](docs/DeleteLoadBalancerRequest.md) - - [DeleteLoadBalancerResponse](docs/DeleteLoadBalancerResponse.md) - - [DeleteLoadBalancerTagsRequest](docs/DeleteLoadBalancerTagsRequest.md) - - [DeleteLoadBalancerTagsResponse](docs/DeleteLoadBalancerTagsResponse.md) - - [DeleteNatServiceRequest](docs/DeleteNatServiceRequest.md) - - [DeleteNatServiceResponse](docs/DeleteNatServiceResponse.md) - - [DeleteNetAccessPointRequest](docs/DeleteNetAccessPointRequest.md) - - [DeleteNetAccessPointResponse](docs/DeleteNetAccessPointResponse.md) - - [DeleteNetPeeringRequest](docs/DeleteNetPeeringRequest.md) - - [DeleteNetPeeringResponse](docs/DeleteNetPeeringResponse.md) - - [DeleteNetRequest](docs/DeleteNetRequest.md) - - [DeleteNetResponse](docs/DeleteNetResponse.md) - - [DeleteNicRequest](docs/DeleteNicRequest.md) - - [DeleteNicResponse](docs/DeleteNicResponse.md) - - [DeletePublicIpRequest](docs/DeletePublicIpRequest.md) - - [DeletePublicIpResponse](docs/DeletePublicIpResponse.md) - - [DeleteRouteRequest](docs/DeleteRouteRequest.md) - - [DeleteRouteResponse](docs/DeleteRouteResponse.md) - - [DeleteRouteTableRequest](docs/DeleteRouteTableRequest.md) - - [DeleteRouteTableResponse](docs/DeleteRouteTableResponse.md) - - [DeleteSecurityGroupRequest](docs/DeleteSecurityGroupRequest.md) - - [DeleteSecurityGroupResponse](docs/DeleteSecurityGroupResponse.md) - - [DeleteSecurityGroupRuleRequest](docs/DeleteSecurityGroupRuleRequest.md) - - [DeleteSecurityGroupRuleResponse](docs/DeleteSecurityGroupRuleResponse.md) - - [DeleteServerCertificateRequest](docs/DeleteServerCertificateRequest.md) - - [DeleteServerCertificateResponse](docs/DeleteServerCertificateResponse.md) - - [DeleteSnapshotRequest](docs/DeleteSnapshotRequest.md) - - [DeleteSnapshotResponse](docs/DeleteSnapshotResponse.md) - - [DeleteSubnetRequest](docs/DeleteSubnetRequest.md) - - [DeleteSubnetResponse](docs/DeleteSubnetResponse.md) - - [DeleteTagsRequest](docs/DeleteTagsRequest.md) - - [DeleteTagsResponse](docs/DeleteTagsResponse.md) - - [DeleteVirtualGatewayRequest](docs/DeleteVirtualGatewayRequest.md) - - [DeleteVirtualGatewayResponse](docs/DeleteVirtualGatewayResponse.md) - - [DeleteVmsRequest](docs/DeleteVmsRequest.md) - - [DeleteVmsResponse](docs/DeleteVmsResponse.md) - - [DeleteVolumeRequest](docs/DeleteVolumeRequest.md) - - [DeleteVolumeResponse](docs/DeleteVolumeResponse.md) - - [DeleteVpnConnectionRequest](docs/DeleteVpnConnectionRequest.md) - - [DeleteVpnConnectionResponse](docs/DeleteVpnConnectionResponse.md) - - [DeleteVpnConnectionRouteRequest](docs/DeleteVpnConnectionRouteRequest.md) - - [DeleteVpnConnectionRouteResponse](docs/DeleteVpnConnectionRouteResponse.md) - - [DeregisterVmsInLoadBalancerRequest](docs/DeregisterVmsInLoadBalancerRequest.md) - - [DeregisterVmsInLoadBalancerResponse](docs/DeregisterVmsInLoadBalancerResponse.md) - - [DhcpOptionsSet](docs/DhcpOptionsSet.md) - - [DirectLink](docs/DirectLink.md) - - [DirectLinkInterface](docs/DirectLinkInterface.md) - - [DirectLinkInterfaces](docs/DirectLinkInterfaces.md) - - [ErrorResponse](docs/ErrorResponse.md) - - [Errors](docs/Errors.md) - - [FiltersAccessKeys](docs/FiltersAccessKeys.md) - - [FiltersApiAccessRule](docs/FiltersApiAccessRule.md) - - [FiltersApiLog](docs/FiltersApiLog.md) - - [FiltersCa](docs/FiltersCa.md) - - [FiltersClientGateway](docs/FiltersClientGateway.md) - - [FiltersDhcpOptions](docs/FiltersDhcpOptions.md) - - [FiltersDirectLink](docs/FiltersDirectLink.md) - - [FiltersDirectLinkInterface](docs/FiltersDirectLinkInterface.md) - - [FiltersExportTask](docs/FiltersExportTask.md) - - [FiltersFlexibleGpu](docs/FiltersFlexibleGpu.md) - - [FiltersImage](docs/FiltersImage.md) - - [FiltersInternetService](docs/FiltersInternetService.md) - - [FiltersKeypair](docs/FiltersKeypair.md) - - [FiltersListenerRule](docs/FiltersListenerRule.md) - - [FiltersLoadBalancer](docs/FiltersLoadBalancer.md) - - [FiltersNatService](docs/FiltersNatService.md) - - [FiltersNet](docs/FiltersNet.md) - - [FiltersNetAccessPoint](docs/FiltersNetAccessPoint.md) - - [FiltersNetPeering](docs/FiltersNetPeering.md) - - [FiltersNic](docs/FiltersNic.md) - - [FiltersProductType](docs/FiltersProductType.md) - - [FiltersPublicIp](docs/FiltersPublicIp.md) - - [FiltersQuota](docs/FiltersQuota.md) - - [FiltersRouteTable](docs/FiltersRouteTable.md) - - [FiltersSecurityGroup](docs/FiltersSecurityGroup.md) - - [FiltersServerCertificate](docs/FiltersServerCertificate.md) - - [FiltersService](docs/FiltersService.md) - - [FiltersSnapshot](docs/FiltersSnapshot.md) - - [FiltersSubnet](docs/FiltersSubnet.md) - - [FiltersSubregion](docs/FiltersSubregion.md) - - [FiltersTag](docs/FiltersTag.md) - - [FiltersVirtualGateway](docs/FiltersVirtualGateway.md) - - [FiltersVm](docs/FiltersVm.md) - - [FiltersVmType](docs/FiltersVmType.md) - - [FiltersVmsState](docs/FiltersVmsState.md) - - [FiltersVolume](docs/FiltersVolume.md) - - [FiltersVpnConnection](docs/FiltersVpnConnection.md) - - [FlexibleGpu](docs/FlexibleGpu.md) - - [FlexibleGpuCatalog](docs/FlexibleGpuCatalog.md) - - [HealthCheck](docs/HealthCheck.md) - - [Image](docs/Image.md) - - [ImageExportTask](docs/ImageExportTask.md) - - [InternetService](docs/InternetService.md) - - [Keypair](docs/Keypair.md) - - [KeypairCreated](docs/KeypairCreated.md) - - [LinkFlexibleGpuRequest](docs/LinkFlexibleGpuRequest.md) - - [LinkFlexibleGpuResponse](docs/LinkFlexibleGpuResponse.md) - - [LinkInternetServiceRequest](docs/LinkInternetServiceRequest.md) - - [LinkInternetServiceResponse](docs/LinkInternetServiceResponse.md) - - [LinkLoadBalancerBackendMachinesRequest](docs/LinkLoadBalancerBackendMachinesRequest.md) - - [LinkLoadBalancerBackendMachinesResponse](docs/LinkLoadBalancerBackendMachinesResponse.md) - - [LinkNic](docs/LinkNic.md) - - [LinkNicLight](docs/LinkNicLight.md) - - [LinkNicRequest](docs/LinkNicRequest.md) - - [LinkNicResponse](docs/LinkNicResponse.md) - - [LinkNicToUpdate](docs/LinkNicToUpdate.md) - - [LinkPrivateIpsRequest](docs/LinkPrivateIpsRequest.md) - - [LinkPrivateIpsResponse](docs/LinkPrivateIpsResponse.md) - - [LinkPublicIp](docs/LinkPublicIp.md) - - [LinkPublicIpLightForVm](docs/LinkPublicIpLightForVm.md) - - [LinkPublicIpRequest](docs/LinkPublicIpRequest.md) - - [LinkPublicIpResponse](docs/LinkPublicIpResponse.md) - - [LinkRouteTable](docs/LinkRouteTable.md) - - [LinkRouteTableRequest](docs/LinkRouteTableRequest.md) - - [LinkRouteTableResponse](docs/LinkRouteTableResponse.md) - - [LinkVirtualGatewayRequest](docs/LinkVirtualGatewayRequest.md) - - [LinkVirtualGatewayResponse](docs/LinkVirtualGatewayResponse.md) - - [LinkVolumeRequest](docs/LinkVolumeRequest.md) - - [LinkVolumeResponse](docs/LinkVolumeResponse.md) - - [LinkedVolume](docs/LinkedVolume.md) - - [Listener](docs/Listener.md) - - [ListenerForCreation](docs/ListenerForCreation.md) - - [ListenerRule](docs/ListenerRule.md) - - [ListenerRuleForCreation](docs/ListenerRuleForCreation.md) - - [LoadBalancer](docs/LoadBalancer.md) - - [LoadBalancerLight](docs/LoadBalancerLight.md) - - [LoadBalancerStickyCookiePolicy](docs/LoadBalancerStickyCookiePolicy.md) - - [LoadBalancerTag](docs/LoadBalancerTag.md) - - [Location](docs/Location.md) - - [Log](docs/Log.md) - - [MaintenanceEvent](docs/MaintenanceEvent.md) - - [NatService](docs/NatService.md) - - [Net](docs/Net.md) - - [NetAccessPoint](docs/NetAccessPoint.md) - - [NetPeering](docs/NetPeering.md) - - [NetPeeringState](docs/NetPeeringState.md) - - [NetToVirtualGatewayLink](docs/NetToVirtualGatewayLink.md) - - [Nic](docs/Nic.md) - - [NicForVmCreation](docs/NicForVmCreation.md) - - [NicLight](docs/NicLight.md) - - [OsuApiKey](docs/OsuApiKey.md) - - [OsuExportImageExportTask](docs/OsuExportImageExportTask.md) - - [OsuExportSnapshotExportTask](docs/OsuExportSnapshotExportTask.md) - - [OsuExportToCreate](docs/OsuExportToCreate.md) - - [PermissionsOnResource](docs/PermissionsOnResource.md) - - [PermissionsOnResourceCreation](docs/PermissionsOnResourceCreation.md) - - [Phase1Options](docs/Phase1Options.md) - - [Phase2Options](docs/Phase2Options.md) - - [Placement](docs/Placement.md) - - [PrivateIp](docs/PrivateIp.md) - - [PrivateIpLight](docs/PrivateIpLight.md) - - [PrivateIpLightForVm](docs/PrivateIpLightForVm.md) - - [ProductType](docs/ProductType.md) - - [PublicIp](docs/PublicIp.md) - - [PublicIpLight](docs/PublicIpLight.md) - - [Quota](docs/Quota.md) - - [QuotaTypes](docs/QuotaTypes.md) - - [ReadAccessKeysRequest](docs/ReadAccessKeysRequest.md) - - [ReadAccessKeysResponse](docs/ReadAccessKeysResponse.md) - - [ReadAccountsRequest](docs/ReadAccountsRequest.md) - - [ReadAccountsResponse](docs/ReadAccountsResponse.md) - - [ReadAdminPasswordRequest](docs/ReadAdminPasswordRequest.md) - - [ReadAdminPasswordResponse](docs/ReadAdminPasswordResponse.md) - - [ReadApiAccessPolicyRequest](docs/ReadApiAccessPolicyRequest.md) - - [ReadApiAccessPolicyResponse](docs/ReadApiAccessPolicyResponse.md) - - [ReadApiAccessRulesRequest](docs/ReadApiAccessRulesRequest.md) - - [ReadApiAccessRulesResponse](docs/ReadApiAccessRulesResponse.md) - - [ReadApiLogsRequest](docs/ReadApiLogsRequest.md) - - [ReadApiLogsResponse](docs/ReadApiLogsResponse.md) - - [ReadCasRequest](docs/ReadCasRequest.md) - - [ReadCasResponse](docs/ReadCasResponse.md) - - [ReadCatalogRequest](docs/ReadCatalogRequest.md) - - [ReadCatalogResponse](docs/ReadCatalogResponse.md) - - [ReadClientGatewaysRequest](docs/ReadClientGatewaysRequest.md) - - [ReadClientGatewaysResponse](docs/ReadClientGatewaysResponse.md) - - [ReadConsoleOutputRequest](docs/ReadConsoleOutputRequest.md) - - [ReadConsoleOutputResponse](docs/ReadConsoleOutputResponse.md) - - [ReadConsumptionAccountRequest](docs/ReadConsumptionAccountRequest.md) - - [ReadConsumptionAccountResponse](docs/ReadConsumptionAccountResponse.md) - - [ReadDhcpOptionsRequest](docs/ReadDhcpOptionsRequest.md) - - [ReadDhcpOptionsResponse](docs/ReadDhcpOptionsResponse.md) - - [ReadDirectLinkInterfacesRequest](docs/ReadDirectLinkInterfacesRequest.md) - - [ReadDirectLinkInterfacesResponse](docs/ReadDirectLinkInterfacesResponse.md) - - [ReadDirectLinksRequest](docs/ReadDirectLinksRequest.md) - - [ReadDirectLinksResponse](docs/ReadDirectLinksResponse.md) - - [ReadFlexibleGpuCatalogRequest](docs/ReadFlexibleGpuCatalogRequest.md) - - [ReadFlexibleGpuCatalogResponse](docs/ReadFlexibleGpuCatalogResponse.md) - - [ReadFlexibleGpusRequest](docs/ReadFlexibleGpusRequest.md) - - [ReadFlexibleGpusResponse](docs/ReadFlexibleGpusResponse.md) - - [ReadImageExportTasksRequest](docs/ReadImageExportTasksRequest.md) - - [ReadImageExportTasksResponse](docs/ReadImageExportTasksResponse.md) - - [ReadImagesRequest](docs/ReadImagesRequest.md) - - [ReadImagesResponse](docs/ReadImagesResponse.md) - - [ReadInternetServicesRequest](docs/ReadInternetServicesRequest.md) - - [ReadInternetServicesResponse](docs/ReadInternetServicesResponse.md) - - [ReadKeypairsRequest](docs/ReadKeypairsRequest.md) - - [ReadKeypairsResponse](docs/ReadKeypairsResponse.md) - - [ReadListenerRulesRequest](docs/ReadListenerRulesRequest.md) - - [ReadListenerRulesResponse](docs/ReadListenerRulesResponse.md) - - [ReadLoadBalancerTagsRequest](docs/ReadLoadBalancerTagsRequest.md) - - [ReadLoadBalancerTagsResponse](docs/ReadLoadBalancerTagsResponse.md) - - [ReadLoadBalancersRequest](docs/ReadLoadBalancersRequest.md) - - [ReadLoadBalancersResponse](docs/ReadLoadBalancersResponse.md) - - [ReadLocationsRequest](docs/ReadLocationsRequest.md) - - [ReadLocationsResponse](docs/ReadLocationsResponse.md) - - [ReadNatServicesRequest](docs/ReadNatServicesRequest.md) - - [ReadNatServicesResponse](docs/ReadNatServicesResponse.md) - - [ReadNetAccessPointServicesRequest](docs/ReadNetAccessPointServicesRequest.md) - - [ReadNetAccessPointServicesResponse](docs/ReadNetAccessPointServicesResponse.md) - - [ReadNetAccessPointsRequest](docs/ReadNetAccessPointsRequest.md) - - [ReadNetAccessPointsResponse](docs/ReadNetAccessPointsResponse.md) - - [ReadNetPeeringsRequest](docs/ReadNetPeeringsRequest.md) - - [ReadNetPeeringsResponse](docs/ReadNetPeeringsResponse.md) - - [ReadNetsRequest](docs/ReadNetsRequest.md) - - [ReadNetsResponse](docs/ReadNetsResponse.md) - - [ReadNicsRequest](docs/ReadNicsRequest.md) - - [ReadNicsResponse](docs/ReadNicsResponse.md) - - [ReadProductTypesRequest](docs/ReadProductTypesRequest.md) - - [ReadProductTypesResponse](docs/ReadProductTypesResponse.md) - - [ReadPublicCatalogRequest](docs/ReadPublicCatalogRequest.md) - - [ReadPublicCatalogResponse](docs/ReadPublicCatalogResponse.md) - - [ReadPublicIpRangesRequest](docs/ReadPublicIpRangesRequest.md) - - [ReadPublicIpRangesResponse](docs/ReadPublicIpRangesResponse.md) - - [ReadPublicIpsRequest](docs/ReadPublicIpsRequest.md) - - [ReadPublicIpsResponse](docs/ReadPublicIpsResponse.md) - - [ReadQuotasRequest](docs/ReadQuotasRequest.md) - - [ReadQuotasResponse](docs/ReadQuotasResponse.md) - - [ReadRegionsRequest](docs/ReadRegionsRequest.md) - - [ReadRegionsResponse](docs/ReadRegionsResponse.md) - - [ReadRouteTablesRequest](docs/ReadRouteTablesRequest.md) - - [ReadRouteTablesResponse](docs/ReadRouteTablesResponse.md) - - [ReadSecretAccessKeyRequest](docs/ReadSecretAccessKeyRequest.md) - - [ReadSecretAccessKeyResponse](docs/ReadSecretAccessKeyResponse.md) - - [ReadSecurityGroupsRequest](docs/ReadSecurityGroupsRequest.md) - - [ReadSecurityGroupsResponse](docs/ReadSecurityGroupsResponse.md) - - [ReadServerCertificatesRequest](docs/ReadServerCertificatesRequest.md) - - [ReadServerCertificatesResponse](docs/ReadServerCertificatesResponse.md) - - [ReadSnapshotExportTasksRequest](docs/ReadSnapshotExportTasksRequest.md) - - [ReadSnapshotExportTasksResponse](docs/ReadSnapshotExportTasksResponse.md) - - [ReadSnapshotsRequest](docs/ReadSnapshotsRequest.md) - - [ReadSnapshotsResponse](docs/ReadSnapshotsResponse.md) - - [ReadSubnetsRequest](docs/ReadSubnetsRequest.md) - - [ReadSubnetsResponse](docs/ReadSubnetsResponse.md) - - [ReadSubregionsRequest](docs/ReadSubregionsRequest.md) - - [ReadSubregionsResponse](docs/ReadSubregionsResponse.md) - - [ReadTagsRequest](docs/ReadTagsRequest.md) - - [ReadTagsResponse](docs/ReadTagsResponse.md) - - [ReadVirtualGatewaysRequest](docs/ReadVirtualGatewaysRequest.md) - - [ReadVirtualGatewaysResponse](docs/ReadVirtualGatewaysResponse.md) - - [ReadVmTypesRequest](docs/ReadVmTypesRequest.md) - - [ReadVmTypesResponse](docs/ReadVmTypesResponse.md) - - [ReadVmsHealthRequest](docs/ReadVmsHealthRequest.md) - - [ReadVmsHealthResponse](docs/ReadVmsHealthResponse.md) - - [ReadVmsRequest](docs/ReadVmsRequest.md) - - [ReadVmsResponse](docs/ReadVmsResponse.md) - - [ReadVmsStateRequest](docs/ReadVmsStateRequest.md) - - [ReadVmsStateResponse](docs/ReadVmsStateResponse.md) - - [ReadVolumesRequest](docs/ReadVolumesRequest.md) - - [ReadVolumesResponse](docs/ReadVolumesResponse.md) - - [ReadVpnConnectionsRequest](docs/ReadVpnConnectionsRequest.md) - - [ReadVpnConnectionsResponse](docs/ReadVpnConnectionsResponse.md) - - [RebootVmsRequest](docs/RebootVmsRequest.md) - - [RebootVmsResponse](docs/RebootVmsResponse.md) - - [Region](docs/Region.md) - - [RegisterVmsInLoadBalancerRequest](docs/RegisterVmsInLoadBalancerRequest.md) - - [RegisterVmsInLoadBalancerResponse](docs/RegisterVmsInLoadBalancerResponse.md) - - [RejectNetPeeringRequest](docs/RejectNetPeeringRequest.md) - - [RejectNetPeeringResponse](docs/RejectNetPeeringResponse.md) - - [ResetAccountPasswordRequest](docs/ResetAccountPasswordRequest.md) - - [ResetAccountPasswordResponse](docs/ResetAccountPasswordResponse.md) - - [ResourceLoadBalancerTag](docs/ResourceLoadBalancerTag.md) - - [ResourceTag](docs/ResourceTag.md) - - [ResponseContext](docs/ResponseContext.md) - - [Route](docs/Route.md) - - [RouteLight](docs/RouteLight.md) - - [RoutePropagatingVirtualGateway](docs/RoutePropagatingVirtualGateway.md) - - [RouteTable](docs/RouteTable.md) - - [SecurityGroup](docs/SecurityGroup.md) - - [SecurityGroupLight](docs/SecurityGroupLight.md) - - [SecurityGroupRule](docs/SecurityGroupRule.md) - - [SecurityGroupsMember](docs/SecurityGroupsMember.md) - - [SendResetPasswordEmailRequest](docs/SendResetPasswordEmailRequest.md) - - [SendResetPasswordEmailResponse](docs/SendResetPasswordEmailResponse.md) - - [ServerCertificate](docs/ServerCertificate.md) - - [Service](docs/Service.md) - - [Snapshot](docs/Snapshot.md) - - [SnapshotExportTask](docs/SnapshotExportTask.md) - - [SourceNet](docs/SourceNet.md) - - [SourceSecurityGroup](docs/SourceSecurityGroup.md) - - [StartVmsRequest](docs/StartVmsRequest.md) - - [StartVmsResponse](docs/StartVmsResponse.md) - - [StateComment](docs/StateComment.md) - - [StopVmsRequest](docs/StopVmsRequest.md) - - [StopVmsResponse](docs/StopVmsResponse.md) - - [Subnet](docs/Subnet.md) - - [Subregion](docs/Subregion.md) - - [Tag](docs/Tag.md) - - [UnlinkFlexibleGpuRequest](docs/UnlinkFlexibleGpuRequest.md) - - [UnlinkFlexibleGpuResponse](docs/UnlinkFlexibleGpuResponse.md) - - [UnlinkInternetServiceRequest](docs/UnlinkInternetServiceRequest.md) - - [UnlinkInternetServiceResponse](docs/UnlinkInternetServiceResponse.md) - - [UnlinkLoadBalancerBackendMachinesRequest](docs/UnlinkLoadBalancerBackendMachinesRequest.md) - - [UnlinkLoadBalancerBackendMachinesResponse](docs/UnlinkLoadBalancerBackendMachinesResponse.md) - - [UnlinkNicRequest](docs/UnlinkNicRequest.md) - - [UnlinkNicResponse](docs/UnlinkNicResponse.md) - - [UnlinkPrivateIpsRequest](docs/UnlinkPrivateIpsRequest.md) - - [UnlinkPrivateIpsResponse](docs/UnlinkPrivateIpsResponse.md) - - [UnlinkPublicIpRequest](docs/UnlinkPublicIpRequest.md) - - [UnlinkPublicIpResponse](docs/UnlinkPublicIpResponse.md) - - [UnlinkRouteTableRequest](docs/UnlinkRouteTableRequest.md) - - [UnlinkRouteTableResponse](docs/UnlinkRouteTableResponse.md) - - [UnlinkVirtualGatewayRequest](docs/UnlinkVirtualGatewayRequest.md) - - [UnlinkVirtualGatewayResponse](docs/UnlinkVirtualGatewayResponse.md) - - [UnlinkVolumeRequest](docs/UnlinkVolumeRequest.md) - - [UnlinkVolumeResponse](docs/UnlinkVolumeResponse.md) - - [UpdateAccessKeyRequest](docs/UpdateAccessKeyRequest.md) - - [UpdateAccessKeyResponse](docs/UpdateAccessKeyResponse.md) - - [UpdateAccountRequest](docs/UpdateAccountRequest.md) - - [UpdateAccountResponse](docs/UpdateAccountResponse.md) - - [UpdateApiAccessPolicyRequest](docs/UpdateApiAccessPolicyRequest.md) - - [UpdateApiAccessPolicyResponse](docs/UpdateApiAccessPolicyResponse.md) - - [UpdateApiAccessRuleRequest](docs/UpdateApiAccessRuleRequest.md) - - [UpdateApiAccessRuleResponse](docs/UpdateApiAccessRuleResponse.md) - - [UpdateCaRequest](docs/UpdateCaRequest.md) - - [UpdateCaResponse](docs/UpdateCaResponse.md) - - [UpdateDirectLinkInterfaceRequest](docs/UpdateDirectLinkInterfaceRequest.md) - - [UpdateDirectLinkInterfaceResponse](docs/UpdateDirectLinkInterfaceResponse.md) - - [UpdateFlexibleGpuRequest](docs/UpdateFlexibleGpuRequest.md) - - [UpdateFlexibleGpuResponse](docs/UpdateFlexibleGpuResponse.md) - - [UpdateImageRequest](docs/UpdateImageRequest.md) - - [UpdateImageResponse](docs/UpdateImageResponse.md) - - [UpdateListenerRuleRequest](docs/UpdateListenerRuleRequest.md) - - [UpdateListenerRuleResponse](docs/UpdateListenerRuleResponse.md) - - [UpdateLoadBalancerRequest](docs/UpdateLoadBalancerRequest.md) - - [UpdateLoadBalancerResponse](docs/UpdateLoadBalancerResponse.md) - - [UpdateNetAccessPointRequest](docs/UpdateNetAccessPointRequest.md) - - [UpdateNetAccessPointResponse](docs/UpdateNetAccessPointResponse.md) - - [UpdateNetRequest](docs/UpdateNetRequest.md) - - [UpdateNetResponse](docs/UpdateNetResponse.md) - - [UpdateNicRequest](docs/UpdateNicRequest.md) - - [UpdateNicResponse](docs/UpdateNicResponse.md) - - [UpdateRoutePropagationRequest](docs/UpdateRoutePropagationRequest.md) - - [UpdateRoutePropagationResponse](docs/UpdateRoutePropagationResponse.md) - - [UpdateRouteRequest](docs/UpdateRouteRequest.md) - - [UpdateRouteResponse](docs/UpdateRouteResponse.md) - - [UpdateServerCertificateRequest](docs/UpdateServerCertificateRequest.md) - - [UpdateServerCertificateResponse](docs/UpdateServerCertificateResponse.md) - - [UpdateSnapshotRequest](docs/UpdateSnapshotRequest.md) - - [UpdateSnapshotResponse](docs/UpdateSnapshotResponse.md) - - [UpdateSubnetRequest](docs/UpdateSubnetRequest.md) - - [UpdateSubnetResponse](docs/UpdateSubnetResponse.md) - - [UpdateVmRequest](docs/UpdateVmRequest.md) - - [UpdateVmResponse](docs/UpdateVmResponse.md) - - [UpdateVolumeRequest](docs/UpdateVolumeRequest.md) - - [UpdateVolumeResponse](docs/UpdateVolumeResponse.md) - - [UpdateVpnConnectionRequest](docs/UpdateVpnConnectionRequest.md) - - [UpdateVpnConnectionResponse](docs/UpdateVpnConnectionResponse.md) - - [VgwTelemetry](docs/VgwTelemetry.md) - - [VirtualGateway](docs/VirtualGateway.md) - - [Vm](docs/Vm.md) - - [VmState](docs/VmState.md) - - [VmStates](docs/VmStates.md) - - [VmType](docs/VmType.md) - - [Volume](docs/Volume.md) - - [VpnConnection](docs/VpnConnection.md) - - [VpnOptions](docs/VpnOptions.md) - - [With](docs/With.md) - - -## Documentation for Authorization - -Authentication schemes defined for the API: -### ApiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - -### ApiKeyAuthSec - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - -### BasicAuth - -- **Type**: HTTP basic authentication - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - -support@outscale.com - diff --git a/docs/AcceptNetPeeringRequest.md b/docs/AcceptNetPeeringRequest.md deleted file mode 100644 index 16be1f79..00000000 --- a/docs/AcceptNetPeeringRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AcceptNetPeeringRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netPeeringId** | **String** | The ID of the Net peering you want to accept. | | - - - diff --git a/docs/AcceptNetPeeringResponse.md b/docs/AcceptNetPeeringResponse.md deleted file mode 100644 index 8269becf..00000000 --- a/docs/AcceptNetPeeringResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AcceptNetPeeringResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netPeering** | [**NetPeering**](NetPeering.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/AccepterNet.md b/docs/AccepterNet.md deleted file mode 100644 index 81a2400c..00000000 --- a/docs/AccepterNet.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AccepterNet - -Information about the accepter Net. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the accepter Net. | [optional] | -|**ipRange** | **String** | The IP range for the accepter Net, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**netId** | **String** | The ID of the accepter Net. | [optional] | - - - diff --git a/docs/AccessKey.md b/docs/AccessKey.md deleted file mode 100644 index 732ba629..00000000 --- a/docs/AccessKey.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# AccessKey - -Information about the access key. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | The ID of the access key. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key was created. | [optional] | -|**expirationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key expires. | [optional] | -|**lastModificationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key was last modified. | [optional] | -|**state** | **String** | The state of the access key (`ACTIVE` if the key is valid for API calls, or `INACTIVE` if not). | [optional] | - - - diff --git a/docs/AccessKeyApi.md b/docs/AccessKeyApi.md deleted file mode 100644 index 3d64600e..00000000 --- a/docs/AccessKeyApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# AccessKeyApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createAccessKey**](AccessKeyApi.md#createAccessKey) | **POST** /CreateAccessKey | | -| [**deleteAccessKey**](AccessKeyApi.md#deleteAccessKey) | **POST** /DeleteAccessKey | | -| [**readAccessKeys**](AccessKeyApi.md#readAccessKeys) | **POST** /ReadAccessKeys | | -| [**readSecretAccessKey**](AccessKeyApi.md#readSecretAccessKey) | **POST** /ReadSecretAccessKey | | -| [**updateAccessKey**](AccessKeyApi.md#updateAccessKey) | **POST** /UpdateAccessKey | | - - - -# **createAccessKey** -> CreateAccessKeyResponse createAccessKey(createAccessKeyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - CreateAccessKeyRequest createAccessKeyRequest = new CreateAccessKeyRequest(); // CreateAccessKeyRequest | - try { - CreateAccessKeyResponse result = apiInstance.createAccessKey(createAccessKeyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#createAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createAccessKeyRequest** | [**CreateAccessKeyRequest**](CreateAccessKeyRequest.md)| | [optional] | - -### Return type - -[**CreateAccessKeyResponse**](CreateAccessKeyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteAccessKey** -> DeleteAccessKeyResponse deleteAccessKey(deleteAccessKeyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - DeleteAccessKeyRequest deleteAccessKeyRequest = new DeleteAccessKeyRequest(); // DeleteAccessKeyRequest | - try { - DeleteAccessKeyResponse result = apiInstance.deleteAccessKey(deleteAccessKeyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#deleteAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteAccessKeyRequest** | [**DeleteAccessKeyRequest**](DeleteAccessKeyRequest.md)| | [optional] | - -### Return type - -[**DeleteAccessKeyResponse**](DeleteAccessKeyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readAccessKeys** -> ReadAccessKeysResponse readAccessKeys(readAccessKeysRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - ReadAccessKeysRequest readAccessKeysRequest = new ReadAccessKeysRequest(); // ReadAccessKeysRequest | - try { - ReadAccessKeysResponse result = apiInstance.readAccessKeys(readAccessKeysRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#readAccessKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readAccessKeysRequest** | [**ReadAccessKeysRequest**](ReadAccessKeysRequest.md)| | [optional] | - -### Return type - -[**ReadAccessKeysResponse**](ReadAccessKeysResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readSecretAccessKey** -> ReadSecretAccessKeyResponse readSecretAccessKey(readSecretAccessKeyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - ReadSecretAccessKeyRequest readSecretAccessKeyRequest = new ReadSecretAccessKeyRequest(); // ReadSecretAccessKeyRequest | - try { - ReadSecretAccessKeyResponse result = apiInstance.readSecretAccessKey(readSecretAccessKeyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#readSecretAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSecretAccessKeyRequest** | [**ReadSecretAccessKeyRequest**](ReadSecretAccessKeyRequest.md)| | [optional] | - -### Return type - -[**ReadSecretAccessKeyResponse**](ReadSecretAccessKeyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateAccessKey** -> UpdateAccessKeyResponse updateAccessKey(updateAccessKeyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - AccessKeyApi apiInstance = new AccessKeyApi(defaultClient); - UpdateAccessKeyRequest updateAccessKeyRequest = new UpdateAccessKeyRequest(); // UpdateAccessKeyRequest | - try { - UpdateAccessKeyResponse result = apiInstance.updateAccessKey(updateAccessKeyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyApi#updateAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateAccessKeyRequest** | [**UpdateAccessKeyRequest**](UpdateAccessKeyRequest.md)| | [optional] | - -### Return type - -[**UpdateAccessKeyResponse**](UpdateAccessKeyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/AccessKeySecretKey.md b/docs/AccessKeySecretKey.md deleted file mode 100644 index d5c0a3e9..00000000 --- a/docs/AccessKeySecretKey.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# AccessKeySecretKey - -Information about the access key. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | The ID of the access key. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key was created. | [optional] | -|**expirationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key expires. | [optional] | -|**lastModificationDate** | **OffsetDateTime** | The date and time (UTC) at which the access key was last modified. | [optional] | -|**secretKey** | **String** | The secret key that enables you to send requests. | [optional] | -|**state** | **String** | The state of the access key (`ACTIVE` if the key is valid for API calls, or `INACTIVE` if not). | [optional] | - - - diff --git a/docs/AccessLog.md b/docs/AccessLog.md deleted file mode 100644 index 9106f894..00000000 --- a/docs/AccessLog.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AccessLog - -Information about access logs. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isEnabled** | **Boolean** | If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the `OsuBucketName` parameter is required. | [optional] | -|**osuBucketName** | **String** | The name of the OOS bucket for the access logs. | [optional] | -|**osuBucketPrefix** | **String** | The path to the folder of the access logs in your OOS bucket (by default, the `root` level of your bucket). | [optional] | -|**publicationInterval** | **Integer** | The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either `5` or `60` (by default, `60`). | [optional] | - - - diff --git a/docs/Account.md b/docs/Account.md deleted file mode 100644 index e3a7d254..00000000 --- a/docs/Account.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# Account - -Information about the account. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The ID of the account. | [optional] | -|**additionalEmails** | **List<String>** | One or more additional email addresses for the account. These addresses are used for notifications only. | [optional] | -|**city** | **String** | The city of the account owner. | [optional] | -|**companyName** | **String** | The name of the company for the account. | [optional] | -|**country** | **String** | The country of the account owner. | [optional] | -|**customerId** | **String** | The ID of the customer. | [optional] | -|**email** | **String** | The main email address for the account. This address is used for your credentials and for notifications. | [optional] | -|**firstName** | **String** | The first name of the account owner. | [optional] | -|**jobTitle** | **String** | The job title of the account owner. | [optional] | -|**lastName** | **String** | The last name of the account owner. | [optional] | -|**mobileNumber** | **String** | The mobile phone number of the account owner. | [optional] | -|**phoneNumber** | **String** | The landline phone number of the account owner. | [optional] | -|**stateProvince** | **String** | The state/province of the account. | [optional] | -|**vatNumber** | **String** | The value added tax (VAT) number for the account. | [optional] | -|**zipCode** | **String** | The ZIP code of the city. | [optional] | - - - diff --git a/docs/AccountApi.md b/docs/AccountApi.md deleted file mode 100644 index e8d63578..00000000 --- a/docs/AccountApi.md +++ /dev/null @@ -1,358 +0,0 @@ -# AccountApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**checkAuthentication**](AccountApi.md#checkAuthentication) | **POST** /CheckAuthentication | | -| [**createAccount**](AccountApi.md#createAccount) | **POST** /CreateAccount | | -| [**readAccounts**](AccountApi.md#readAccounts) | **POST** /ReadAccounts | | -| [**readConsumptionAccount**](AccountApi.md#readConsumptionAccount) | **POST** /ReadConsumptionAccount | | -| [**updateAccount**](AccountApi.md#updateAccount) | **POST** /UpdateAccount | | - - - -# **checkAuthentication** -> CheckAuthenticationResponse checkAuthentication(checkAuthenticationRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AccountApi apiInstance = new AccountApi(defaultClient); - CheckAuthenticationRequest checkAuthenticationRequest = new CheckAuthenticationRequest(); // CheckAuthenticationRequest | - try { - CheckAuthenticationResponse result = apiInstance.checkAuthentication(checkAuthenticationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#checkAuthentication"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **checkAuthenticationRequest** | [**CheckAuthenticationRequest**](CheckAuthenticationRequest.md)| | [optional] | - -### Return type - -[**CheckAuthenticationResponse**](CheckAuthenticationResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **createAccount** -> CreateAccountResponse createAccount(createAccountRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AccountApi apiInstance = new AccountApi(defaultClient); - CreateAccountRequest createAccountRequest = new CreateAccountRequest(); // CreateAccountRequest | - try { - CreateAccountResponse result = apiInstance.createAccount(createAccountRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#createAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createAccountRequest** | [**CreateAccountRequest**](CreateAccountRequest.md)| | [optional] | - -### Return type - -[**CreateAccountResponse**](CreateAccountResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readAccounts** -> ReadAccountsResponse readAccounts(readAccountsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AccountApi apiInstance = new AccountApi(defaultClient); - ReadAccountsRequest readAccountsRequest = new ReadAccountsRequest(); // ReadAccountsRequest | - try { - ReadAccountsResponse result = apiInstance.readAccounts(readAccountsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#readAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readAccountsRequest** | [**ReadAccountsRequest**](ReadAccountsRequest.md)| | [optional] | - -### Return type - -[**ReadAccountsResponse**](ReadAccountsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readConsumptionAccount** -> ReadConsumptionAccountResponse readConsumptionAccount(readConsumptionAccountRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AccountApi apiInstance = new AccountApi(defaultClient); - ReadConsumptionAccountRequest readConsumptionAccountRequest = new ReadConsumptionAccountRequest(); // ReadConsumptionAccountRequest | - try { - ReadConsumptionAccountResponse result = apiInstance.readConsumptionAccount(readConsumptionAccountRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#readConsumptionAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readConsumptionAccountRequest** | [**ReadConsumptionAccountRequest**](ReadConsumptionAccountRequest.md)| | [optional] | - -### Return type - -[**ReadConsumptionAccountResponse**](ReadConsumptionAccountResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateAccount** -> UpdateAccountResponse updateAccount(updateAccountRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AccountApi apiInstance = new AccountApi(defaultClient); - UpdateAccountRequest updateAccountRequest = new UpdateAccountRequest(); // UpdateAccountRequest | - try { - UpdateAccountResponse result = apiInstance.updateAccount(updateAccountRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#updateAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateAccountRequest** | [**UpdateAccountRequest**](UpdateAccountRequest.md)| | [optional] | - -### Return type - -[**UpdateAccountResponse**](UpdateAccountResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/ApiAccessPolicy.md b/docs/ApiAccessPolicy.md deleted file mode 100644 index dd02fcbe..00000000 --- a/docs/ApiAccessPolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ApiAccessPolicy - -Information about the API access policy. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**maxAccessKeyExpirationSeconds** | **Long** | The maximum possible lifetime for your access keys, in seconds. If `0`, your access keys can have unlimited lifetimes. | [optional] | -|**requireTrustedEnv** | **Boolean** | If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see [About Your API Access Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-Policy.html).<br /> If this is enabled, it is required that you and all your users log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see [About Authentication > Multi-Factor Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_factor_authentication). | [optional] | - - - diff --git a/docs/ApiAccessPolicyApi.md b/docs/ApiAccessPolicyApi.md deleted file mode 100644 index d2987687..00000000 --- a/docs/ApiAccessPolicyApi.md +++ /dev/null @@ -1,164 +0,0 @@ -# ApiAccessPolicyApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readApiAccessPolicy**](ApiAccessPolicyApi.md#readApiAccessPolicy) | **POST** /ReadApiAccessPolicy | | -| [**updateApiAccessPolicy**](ApiAccessPolicyApi.md#updateApiAccessPolicy) | **POST** /UpdateApiAccessPolicy | | - - - -# **readApiAccessPolicy** -> ReadApiAccessPolicyResponse readApiAccessPolicy(readApiAccessPolicyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessPolicyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessPolicyApi apiInstance = new ApiAccessPolicyApi(defaultClient); - ReadApiAccessPolicyRequest readApiAccessPolicyRequest = new ReadApiAccessPolicyRequest(); // ReadApiAccessPolicyRequest | - try { - ReadApiAccessPolicyResponse result = apiInstance.readApiAccessPolicy(readApiAccessPolicyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessPolicyApi#readApiAccessPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readApiAccessPolicyRequest** | [**ReadApiAccessPolicyRequest**](ReadApiAccessPolicyRequest.md)| | [optional] | - -### Return type - -[**ReadApiAccessPolicyResponse**](ReadApiAccessPolicyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateApiAccessPolicy** -> UpdateApiAccessPolicyResponse updateApiAccessPolicy(updateApiAccessPolicyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessPolicyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessPolicyApi apiInstance = new ApiAccessPolicyApi(defaultClient); - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest = new UpdateApiAccessPolicyRequest(); // UpdateApiAccessPolicyRequest | - try { - UpdateApiAccessPolicyResponse result = apiInstance.updateApiAccessPolicy(updateApiAccessPolicyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessPolicyApi#updateApiAccessPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateApiAccessPolicyRequest** | [**UpdateApiAccessPolicyRequest**](UpdateApiAccessPolicyRequest.md)| | [optional] | - -### Return type - -[**UpdateApiAccessPolicyResponse**](UpdateApiAccessPolicyResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/ApiAccessRule.md b/docs/ApiAccessRule.md deleted file mode 100644 index 4ef578b3..00000000 --- a/docs/ApiAccessRule.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ApiAccessRule - -Information about the API access rule. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRuleId** | **String** | The ID of the API access rule. | [optional] | -|**caIds** | **List<String>** | One or more IDs of Client Certificate Authorities (CAs) used for the API access rule. | [optional] | -|**cns** | **List<String>** | One or more Client Certificate Common Names (CNs). | [optional] | -|**description** | **String** | The description of the API access rule. | [optional] | -|**ipRanges** | **List<String>** | One or more IP ranges used for the API access rule, in CIDR notation (for example, `192.0.2.0/16`). | [optional] | - - - diff --git a/docs/ApiAccessRuleApi.md b/docs/ApiAccessRuleApi.md deleted file mode 100644 index bad337fb..00000000 --- a/docs/ApiAccessRuleApi.md +++ /dev/null @@ -1,308 +0,0 @@ -# ApiAccessRuleApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createApiAccessRule**](ApiAccessRuleApi.md#createApiAccessRule) | **POST** /CreateApiAccessRule | | -| [**deleteApiAccessRule**](ApiAccessRuleApi.md#deleteApiAccessRule) | **POST** /DeleteApiAccessRule | | -| [**readApiAccessRules**](ApiAccessRuleApi.md#readApiAccessRules) | **POST** /ReadApiAccessRules | | -| [**updateApiAccessRule**](ApiAccessRuleApi.md#updateApiAccessRule) | **POST** /UpdateApiAccessRule | | - - - -# **createApiAccessRule** -> CreateApiAccessRuleResponse createApiAccessRule(createApiAccessRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessRuleApi apiInstance = new ApiAccessRuleApi(defaultClient); - CreateApiAccessRuleRequest createApiAccessRuleRequest = new CreateApiAccessRuleRequest(); // CreateApiAccessRuleRequest | - try { - CreateApiAccessRuleResponse result = apiInstance.createApiAccessRule(createApiAccessRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessRuleApi#createApiAccessRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createApiAccessRuleRequest** | [**CreateApiAccessRuleRequest**](CreateApiAccessRuleRequest.md)| | [optional] | - -### Return type - -[**CreateApiAccessRuleResponse**](CreateApiAccessRuleResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteApiAccessRule** -> DeleteApiAccessRuleResponse deleteApiAccessRule(deleteApiAccessRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessRuleApi apiInstance = new ApiAccessRuleApi(defaultClient); - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest = new DeleteApiAccessRuleRequest(); // DeleteApiAccessRuleRequest | - try { - DeleteApiAccessRuleResponse result = apiInstance.deleteApiAccessRule(deleteApiAccessRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessRuleApi#deleteApiAccessRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteApiAccessRuleRequest** | [**DeleteApiAccessRuleRequest**](DeleteApiAccessRuleRequest.md)| | [optional] | - -### Return type - -[**DeleteApiAccessRuleResponse**](DeleteApiAccessRuleResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readApiAccessRules** -> ReadApiAccessRulesResponse readApiAccessRules(readApiAccessRulesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessRuleApi apiInstance = new ApiAccessRuleApi(defaultClient); - ReadApiAccessRulesRequest readApiAccessRulesRequest = new ReadApiAccessRulesRequest(); // ReadApiAccessRulesRequest | - try { - ReadApiAccessRulesResponse result = apiInstance.readApiAccessRules(readApiAccessRulesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessRuleApi#readApiAccessRules"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readApiAccessRulesRequest** | [**ReadApiAccessRulesRequest**](ReadApiAccessRulesRequest.md)| | [optional] | - -### Return type - -[**ReadApiAccessRulesResponse**](ReadApiAccessRulesResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateApiAccessRule** -> UpdateApiAccessRuleResponse updateApiAccessRule(updateApiAccessRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ApiAccessRuleApi apiInstance = new ApiAccessRuleApi(defaultClient); - UpdateApiAccessRuleRequest updateApiAccessRuleRequest = new UpdateApiAccessRuleRequest(); // UpdateApiAccessRuleRequest | - try { - UpdateApiAccessRuleResponse result = apiInstance.updateApiAccessRule(updateApiAccessRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAccessRuleApi#updateApiAccessRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateApiAccessRuleRequest** | [**UpdateApiAccessRuleRequest**](UpdateApiAccessRuleRequest.md)| | [optional] | - -### Return type - -[**UpdateApiAccessRuleResponse**](UpdateApiAccessRuleResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/ApiLogApi.md b/docs/ApiLogApi.md deleted file mode 100644 index bbdbca76..00000000 --- a/docs/ApiLogApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# ApiLogApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readApiLogs**](ApiLogApi.md#readApiLogs) | **POST** /ReadApiLogs | | - - - -# **readApiLogs** -> ReadApiLogsResponse readApiLogs(readApiLogsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ApiLogApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ApiLogApi apiInstance = new ApiLogApi(defaultClient); - ReadApiLogsRequest readApiLogsRequest = new ReadApiLogsRequest(); // ReadApiLogsRequest | - try { - ReadApiLogsResponse result = apiInstance.readApiLogs(readApiLogsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ApiLogApi#readApiLogs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readApiLogsRequest** | [**ReadApiLogsRequest**](ReadApiLogsRequest.md)| | [optional] | - -### Return type - -[**ReadApiLogsResponse**](ReadApiLogsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/ApplicationStickyCookiePolicy.md b/docs/ApplicationStickyCookiePolicy.md deleted file mode 100644 index 1c6eaa76..00000000 --- a/docs/ApplicationStickyCookiePolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ApplicationStickyCookiePolicy - -Information about the stickiness policy. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cookieName** | **String** | The name of the application cookie used for stickiness. | [optional] | -|**policyName** | **String** | The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer. | [optional] | - - - diff --git a/docs/BackendVmHealth.md b/docs/BackendVmHealth.md deleted file mode 100644 index 2275f904..00000000 --- a/docs/BackendVmHealth.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BackendVmHealth - -Information about the health of a backend VM. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | The description of the state of the backend VM. | [optional] | -|**state** | **String** | The state of the backend VM (`InService` \\| `OutOfService` \\| `Unknown`). | [optional] | -|**stateReason** | **String** | Information about the cause of `OutOfService` VMs.<br /> Specifically, whether the cause is Elastic Load Balancing or the VM (`ELB` \\| `Instance` \\| `N/A`). | [optional] | -|**vmId** | **String** | The ID of the backend VM. | [optional] | - - - diff --git a/docs/BlockDeviceMappingCreated.md b/docs/BlockDeviceMappingCreated.md deleted file mode 100644 index d2c6531c..00000000 --- a/docs/BlockDeviceMappingCreated.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# BlockDeviceMappingCreated - -Information about the created block device mapping. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsu** | [**BsuCreated**](BsuCreated.md) | | [optional] | -|**deviceName** | **String** | The name of the device. | [optional] | - - - diff --git a/docs/BlockDeviceMappingImage.md b/docs/BlockDeviceMappingImage.md deleted file mode 100644 index e951da20..00000000 --- a/docs/BlockDeviceMappingImage.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# BlockDeviceMappingImage - -One or more parameters used to automatically set up volumes when the VM is created. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsu** | [**BsuToCreate**](BsuToCreate.md) | | [optional] | -|**deviceName** | **String** | The device name for the volume. For a root device, you must use `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, and the second `X` is a letter between `a` and `z`). | [optional] | -|**virtualDeviceName** | **String** | The name of the virtual device (`ephemeralN`). | [optional] | - - - diff --git a/docs/BlockDeviceMappingVmCreation.md b/docs/BlockDeviceMappingVmCreation.md deleted file mode 100644 index f4ec042c..00000000 --- a/docs/BlockDeviceMappingVmCreation.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BlockDeviceMappingVmCreation - -Information about the block device mapping. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsu** | [**BsuToCreate**](BsuToCreate.md) | | [optional] | -|**deviceName** | **String** | The device name for the volume. For a root device, you must use `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, and the second `X` is a letter between `a` and `z`). | [optional] | -|**noDevice** | **String** | Removes the device which is included in the block device mapping of the OMI. | [optional] | -|**virtualDeviceName** | **String** | The name of the virtual device (`ephemeralN`). | [optional] | - - - diff --git a/docs/BlockDeviceMappingVmUpdate.md b/docs/BlockDeviceMappingVmUpdate.md deleted file mode 100644 index 88bdab40..00000000 --- a/docs/BlockDeviceMappingVmUpdate.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BlockDeviceMappingVmUpdate - -Information about the block device mapping. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsu** | [**BsuToUpdateVm**](BsuToUpdateVm.md) | | [optional] | -|**deviceName** | **String** | The device name for the volume. For a root device, you must use `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, and the second `X` is a letter between `a` and `z`). | [optional] | -|**noDevice** | **String** | Removes the device which is included in the block device mapping of the OMI. | [optional] | -|**virtualDeviceName** | **String** | The name of the virtual device (`ephemeralN`). | [optional] | - - - diff --git a/docs/BsuCreated.md b/docs/BsuCreated.md deleted file mode 100644 index 3d594d8f..00000000 --- a/docs/BsuCreated.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BsuCreated - -Information about the created BSU volume. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. | [optional] | -|**linkDate** | **OffsetDateTime** | The date and time (UTC) at which the volume was attached to the VM, in ISO 8601 date-time format. | [optional] | -|**state** | **String** | The state of the volume. | [optional] | -|**volumeId** | **String** | The ID of the volume. | [optional] | - - - diff --git a/docs/BsuToCreate.md b/docs/BsuToCreate.md deleted file mode 100644 index 799f4b2b..00000000 --- a/docs/BsuToCreate.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# BsuToCreate - -Information about the BSU volume to create. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. | [optional] | -|**iops** | **Integer** | The number of I/O operations per second (IOPS). This parameter must be specified only if you create an `io1` volume. The maximum number of IOPS allowed for `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. | [optional] | -|**snapshotId** | **String** | The ID of the snapshot used to create the volume. | [optional] | -|**volumeSize** | **Integer** | The size of the volume, in gibibytes (GiB).<br /> If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.<br /> If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one. | [optional] | -|**volumeType** | **String** | The type of the volume (`standard` \\| `io1` \\| `gp2`). If not specified in the request, a `standard` volume is created.<br /> For more information about volume types, see [About Volumes > Volume Types and IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops). | [optional] | - - - diff --git a/docs/BsuToUpdateVm.md b/docs/BsuToUpdateVm.md deleted file mode 100644 index f84ce014..00000000 --- a/docs/BsuToUpdateVm.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# BsuToUpdateVm - -Information about the BSU volume. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If set to true, the volume is deleted when terminating the VM. If set to false, the volume is not deleted when terminating the VM. | [optional] | -|**volumeId** | **String** | The ID of the volume. | [optional] | - - - diff --git a/docs/Ca.md b/docs/Ca.md deleted file mode 100644 index 1493fe55..00000000 --- a/docs/Ca.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Ca - -Information about the Client Certificate Authority (CA). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caFingerprint** | **String** | The fingerprint of the CA. | [optional] | -|**caId** | **String** | The ID of the CA. | [optional] | -|**description** | **String** | The description of the CA. | [optional] | - - - diff --git a/docs/CaApi.md b/docs/CaApi.md deleted file mode 100644 index 0a1a1eaa..00000000 --- a/docs/CaApi.md +++ /dev/null @@ -1,308 +0,0 @@ -# CaApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createCa**](CaApi.md#createCa) | **POST** /CreateCa | | -| [**deleteCa**](CaApi.md#deleteCa) | **POST** /DeleteCa | | -| [**readCas**](CaApi.md#readCas) | **POST** /ReadCas | | -| [**updateCa**](CaApi.md#updateCa) | **POST** /UpdateCa | | - - - -# **createCa** -> CreateCaResponse createCa(createCaRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - CaApi apiInstance = new CaApi(defaultClient); - CreateCaRequest createCaRequest = new CreateCaRequest(); // CreateCaRequest | - try { - CreateCaResponse result = apiInstance.createCa(createCaRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CaApi#createCa"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createCaRequest** | [**CreateCaRequest**](CreateCaRequest.md)| | [optional] | - -### Return type - -[**CreateCaResponse**](CreateCaResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteCa** -> DeleteCaResponse deleteCa(deleteCaRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - CaApi apiInstance = new CaApi(defaultClient); - DeleteCaRequest deleteCaRequest = new DeleteCaRequest(); // DeleteCaRequest | - try { - DeleteCaResponse result = apiInstance.deleteCa(deleteCaRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CaApi#deleteCa"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteCaRequest** | [**DeleteCaRequest**](DeleteCaRequest.md)| | [optional] | - -### Return type - -[**DeleteCaResponse**](DeleteCaResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readCas** -> ReadCasResponse readCas(readCasRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - CaApi apiInstance = new CaApi(defaultClient); - ReadCasRequest readCasRequest = new ReadCasRequest(); // ReadCasRequest | - try { - ReadCasResponse result = apiInstance.readCas(readCasRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CaApi#readCas"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readCasRequest** | [**ReadCasRequest**](ReadCasRequest.md)| | [optional] | - -### Return type - -[**ReadCasResponse**](ReadCasResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateCa** -> UpdateCaResponse updateCa(updateCaRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuthSec - ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec"); - ApiKeyAuthSec.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuthSec.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - CaApi apiInstance = new CaApi(defaultClient); - UpdateCaRequest updateCaRequest = new UpdateCaRequest(); // UpdateCaRequest | - try { - UpdateCaResponse result = apiInstance.updateCa(updateCaRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CaApi#updateCa"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateCaRequest** | [**UpdateCaRequest**](UpdateCaRequest.md)| | [optional] | - -### Return type - -[**UpdateCaResponse**](UpdateCaResponse.md) - -### Authorization - -[ApiKeyAuthSec](../README.md#ApiKeyAuthSec), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/Catalog.md b/docs/Catalog.md deleted file mode 100644 index 239e50ae..00000000 --- a/docs/Catalog.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Catalog - -Information about our catalog of prices. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**entries** | [**List<CatalogEntry>**](CatalogEntry.md) | One or more catalog entries. | [optional] | - - - diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md deleted file mode 100644 index 05298aef..00000000 --- a/docs/CatalogApi.md +++ /dev/null @@ -1,148 +0,0 @@ -# CatalogApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readCatalog**](CatalogApi.md#readCatalog) | **POST** /ReadCatalog | | -| [**readCatalogs**](CatalogApi.md#readCatalogs) | **POST** /ReadCatalogs | | - - - -# **readCatalog** -> ReadCatalogResponse readCatalog(readCatalogRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CatalogApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - CatalogApi apiInstance = new CatalogApi(defaultClient); - ReadCatalogRequest readCatalogRequest = new ReadCatalogRequest(); // ReadCatalogRequest | - try { - ReadCatalogResponse result = apiInstance.readCatalog(readCatalogRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CatalogApi#readCatalog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readCatalogRequest** | [**ReadCatalogRequest**](ReadCatalogRequest.md)| | [optional] | - -### Return type - -[**ReadCatalogResponse**](ReadCatalogResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readCatalogs** -> ReadCatalogsResponse readCatalogs(readCatalogsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.CatalogApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - CatalogApi apiInstance = new CatalogApi(defaultClient); - ReadCatalogsRequest readCatalogsRequest = new ReadCatalogsRequest(); // ReadCatalogsRequest | - try { - ReadCatalogsResponse result = apiInstance.readCatalogs(readCatalogsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CatalogApi#readCatalogs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readCatalogsRequest** | [**ReadCatalogsRequest**](ReadCatalogsRequest.md)| | [optional] | - -### Return type - -[**ReadCatalogsResponse**](ReadCatalogsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/CatalogEntry.md b/docs/CatalogEntry.md deleted file mode 100644 index 04459410..00000000 --- a/docs/CatalogEntry.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# CatalogEntry - -Information about the catalog entry. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**category** | **String** | The category of the catalog entry (for example, `network`). | [optional] | -|**flags** | **String** | When returned and equal to `PER_MONTH`, the price of the catalog entry is calculated on a monthly basis. | [optional] | -|**operation** | **String** | The API call associated with the catalog entry (for example, `CreateVms` or `RunInstances`). | [optional] | -|**service** | **String** | The service associated with the catalog entry (`TinaOS-FCU`, `TinaOS-LBU`, `TinaOS-DirectLink`, or `TinaOS-OOS`). | [optional] | -|**subregionName** | **String** | The Subregion associated with the catalog entry. | [optional] | -|**title** | **String** | The description of the catalog entry. | [optional] | -|**type** | **String** | The type of resource associated with the catalog entry. | [optional] | -|**unitPrice** | **Float** | The unit price of the catalog entry, in the currency of the Region's catalog. | [optional] | - - - diff --git a/docs/Catalogs.md b/docs/Catalogs.md deleted file mode 100644 index b378f4a9..00000000 --- a/docs/Catalogs.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# Catalogs - -Information about the catalogs. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**entries** | [**List<CatalogEntry>**](CatalogEntry.md) | One or more catalog entries. | [optional] | -|**fromDate** | **OffsetDateTime** | The beginning of the time period (UTC). | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The state of the catalog (`CURRENT` \\| `OBSOLETE`). | [optional] | -|**toDate** | **OffsetDateTime** | The end of the time period (UTC). | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| CURRENT | "CURRENT" | -| OBSOLETE | "OBSOLETE" | - - - diff --git a/docs/CheckAuthenticationRequest.md b/docs/CheckAuthenticationRequest.md deleted file mode 100644 index 87582ea3..00000000 --- a/docs/CheckAuthenticationRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CheckAuthenticationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**login** | **String** | The email address of the account. | | -|**password** | **String** | The password of the account. | | - - - diff --git a/docs/CheckAuthenticationResponse.md b/docs/CheckAuthenticationResponse.md deleted file mode 100644 index 43e4fc91..00000000 --- a/docs/CheckAuthenticationResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CheckAuthenticationResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ClientGateway.md b/docs/ClientGateway.md deleted file mode 100644 index 3dc53ba3..00000000 --- a/docs/ClientGateway.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# ClientGateway - -Information about the client gateway. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpAsn** | **Integer** | The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet. | [optional] | -|**clientGatewayId** | **String** | The ID of the client gateway. | [optional] | -|**connectionType** | **String** | The type of communication tunnel used by the client gateway (always `ipsec.1`). | [optional] | -|**publicIp** | **String** | The public IPv4 address of the client gateway (must be a fixed address into a NATed network). | [optional] | -|**state** | **String** | The state of the client gateway (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the client gateway. | [optional] | - - - diff --git a/docs/ClientGatewayApi.md b/docs/ClientGatewayApi.md deleted file mode 100644 index 03190f34..00000000 --- a/docs/ClientGatewayApi.md +++ /dev/null @@ -1,218 +0,0 @@ -# ClientGatewayApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createClientGateway**](ClientGatewayApi.md#createClientGateway) | **POST** /CreateClientGateway | | -| [**deleteClientGateway**](ClientGatewayApi.md#deleteClientGateway) | **POST** /DeleteClientGateway | | -| [**readClientGateways**](ClientGatewayApi.md#readClientGateways) | **POST** /ReadClientGateways | | - - - -# **createClientGateway** -> CreateClientGatewayResponse createClientGateway(createClientGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ClientGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClientGatewayApi apiInstance = new ClientGatewayApi(defaultClient); - CreateClientGatewayRequest createClientGatewayRequest = new CreateClientGatewayRequest(); // CreateClientGatewayRequest | - try { - CreateClientGatewayResponse result = apiInstance.createClientGateway(createClientGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClientGatewayApi#createClientGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createClientGatewayRequest** | [**CreateClientGatewayRequest**](CreateClientGatewayRequest.md)| | [optional] | - -### Return type - -[**CreateClientGatewayResponse**](CreateClientGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteClientGateway** -> DeleteClientGatewayResponse deleteClientGateway(deleteClientGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ClientGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClientGatewayApi apiInstance = new ClientGatewayApi(defaultClient); - DeleteClientGatewayRequest deleteClientGatewayRequest = new DeleteClientGatewayRequest(); // DeleteClientGatewayRequest | - try { - DeleteClientGatewayResponse result = apiInstance.deleteClientGateway(deleteClientGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClientGatewayApi#deleteClientGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteClientGatewayRequest** | [**DeleteClientGatewayRequest**](DeleteClientGatewayRequest.md)| | [optional] | - -### Return type - -[**DeleteClientGatewayResponse**](DeleteClientGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readClientGateways** -> ReadClientGatewaysResponse readClientGateways(readClientGatewaysRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ClientGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClientGatewayApi apiInstance = new ClientGatewayApi(defaultClient); - ReadClientGatewaysRequest readClientGatewaysRequest = new ReadClientGatewaysRequest(); // ReadClientGatewaysRequest | - try { - ReadClientGatewaysResponse result = apiInstance.readClientGateways(readClientGatewaysRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClientGatewayApi#readClientGateways"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readClientGatewaysRequest** | [**ReadClientGatewaysRequest**](ReadClientGatewaysRequest.md)| | [optional] | - -### Return type - -[**ReadClientGatewaysResponse**](ReadClientGatewaysResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/ConsumptionEntry.md b/docs/ConsumptionEntry.md deleted file mode 100644 index 699ab454..00000000 --- a/docs/ConsumptionEntry.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# ConsumptionEntry - -Information about the resources consumed during the specified time period. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The ID of your TINA account. | [optional] | -|**category** | **String** | The category of the resource (for example, `network`). | [optional] | -|**fromDate** | **OffsetDateTime** | The beginning of the time period (UTC). | [optional] | -|**operation** | **String** | The API call that triggered the resource consumption (for example, `RunInstances` or `CreateVolume`). | [optional] | -|**payingAccountId** | **String** | The ID of the TINA account which is billed for your consumption. It can be different from your account in the `AccountId` parameter. | [optional] | -|**price** | **Double** | The total price of the consumed resource during the specified time period, in the currency of the Region's catalog. | [optional] | -|**service** | **String** | The service of the API call (`TinaOS-FCU`, `TinaOS-LBU`, `TinaOS-DirectLink`, `TinaOS-OOS`, or `TinaOS-OSU`). | [optional] | -|**subregionName** | **String** | The name of the Subregion. | [optional] | -|**title** | **String** | A description of the consumed resource. | [optional] | -|**toDate** | **OffsetDateTime** | The end of the time period (UTC). | [optional] | -|**type** | **String** | The type of resource, depending on the API call. | [optional] | -|**unitPrice** | **Double** | The unit price of the consumed resource, in the currency of the Region's catalog. | [optional] | -|**value** | **Double** | The consumed amount for the resource. The unit depends on the resource type. For more information, see the `Title` element. | [optional] | - - - diff --git a/docs/CreateAccessKeyRequest.md b/docs/CreateAccessKeyRequest.md deleted file mode 100644 index 5a7ddc9c..00000000 --- a/docs/CreateAccessKeyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateAccessKeyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**expirationDate** | **OffsetDateTime** | The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z`, or `2020-06-14`). To remove an existing expiration date, use the method without specifying this parameter. | [optional] | -|**userName** | **String** | The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account). | [optional] | - - - diff --git a/docs/CreateAccessKeyResponse.md b/docs/CreateAccessKeyResponse.md deleted file mode 100644 index d9a30fc5..00000000 --- a/docs/CreateAccessKeyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateAccessKeyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKey** | [**AccessKeySecretKey**](AccessKeySecretKey.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateAccountRequest.md b/docs/CreateAccountRequest.md deleted file mode 100644 index 09b23232..00000000 --- a/docs/CreateAccountRequest.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# CreateAccountRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**additionalEmails** | **List<String>** | One or more additional email addresses for the account. These addresses are used for notifications only. If you already have a list of additional emails registered, you cannot add to it, only replace it. To remove all registered additional emails, specify an empty list. | [optional] | -|**city** | **String** | The city of the account owner. | | -|**companyName** | **String** | The name of the company for the account. | | -|**country** | **String** | The country of the account owner. | | -|**customerId** | **String** | The ID of the customer. It must be 8 digits. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**email** | **String** | The main email address for the account. This address is used for your credentials and notifications. | | -|**firstName** | **String** | The first name of the account owner. | | -|**jobTitle** | **String** | The job title of the account owner. | [optional] | -|**lastName** | **String** | The last name of the account owner. | | -|**mobileNumber** | **String** | The mobile phone number of the account owner. | [optional] | -|**phoneNumber** | **String** | The landline phone number of the account owner. | [optional] | -|**stateProvince** | **String** | The state/province of the account. | [optional] | -|**vatNumber** | **String** | The value added tax (VAT) number for the account. | [optional] | -|**zipCode** | **String** | The ZIP code of the city. | | - - - diff --git a/docs/CreateAccountResponse.md b/docs/CreateAccountResponse.md deleted file mode 100644 index f035830a..00000000 --- a/docs/CreateAccountResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateAccountResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**account** | [**Account**](Account.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateApiAccessRuleRequest.md b/docs/CreateApiAccessRuleRequest.md deleted file mode 100644 index b2c47c82..00000000 --- a/docs/CreateApiAccessRuleRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CreateApiAccessRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caIds** | **List<String>** | One or more IDs of Client Certificate Authorities (CAs). | [optional] | -|**cns** | **List<String>** | One or more Client Certificate Common Names (CNs). If this parameter is specified, you must also specify the `CaIds` parameter. | [optional] | -|**description** | **String** | A description for the API access rule. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**ipRanges** | **List<String>** | One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). | [optional] | - - - diff --git a/docs/CreateApiAccessRuleResponse.md b/docs/CreateApiAccessRuleResponse.md deleted file mode 100644 index 40685bb3..00000000 --- a/docs/CreateApiAccessRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateApiAccessRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRule** | [**ApiAccessRule**](ApiAccessRule.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateCaRequest.md b/docs/CreateCaRequest.md deleted file mode 100644 index ba1b54b8..00000000 --- a/docs/CreateCaRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateCaRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caPem** | **String** | The CA in PEM format.<br />With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: `--CaPem=&quot;$(cat FILENAME)&quot;`. | | -|**description** | **String** | The description of the CA. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/CreateCaResponse.md b/docs/CreateCaResponse.md deleted file mode 100644 index b4f58ea0..00000000 --- a/docs/CreateCaResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateCaResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ca** | [**Ca**](Ca.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateClientGatewayRequest.md b/docs/CreateClientGatewayRequest.md deleted file mode 100644 index 2b3005fa..00000000 --- a/docs/CreateClientGatewayRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateClientGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpAsn** | **Integer** | The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet. <br/> This number must be between `1` and `4294967295`. If you do not have an ASN, you can choose one between 64512 and 65534, or between 4200000000 and 4294967294. | | -|**connectionType** | **String** | The communication protocol used to establish tunnel with your client gateway (always `ipsec.1`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**publicIp** | **String** | The public fixed IPv4 address of your client gateway. | | - - - diff --git a/docs/CreateClientGatewayResponse.md b/docs/CreateClientGatewayResponse.md deleted file mode 100644 index 58c2f3e1..00000000 --- a/docs/CreateClientGatewayResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateClientGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGateway** | [**ClientGateway**](ClientGateway.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateDhcpOptionsRequest.md b/docs/CreateDhcpOptionsRequest.md deleted file mode 100644 index 587bed13..00000000 --- a/docs/CreateDhcpOptionsRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CreateDhcpOptionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**domainName** | **String** | Specify a domain name (for example, `MyCompany.com`). You can specify only one domain name. You must specify at least one of the following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`. | [optional] | -|**domainNameServers** | **List<String>** | The IPs of domain name servers. If no IPs are specified, the `OutscaleProvidedDNS` value is set by default. You must specify at least one of the following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**logServers** | **List<String>** | The IPs of the log servers. You must specify at least one of the following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`. | [optional] | -|**ntpServers** | **List<String>** | The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`. | [optional] | - - - diff --git a/docs/CreateDhcpOptionsResponse.md b/docs/CreateDhcpOptionsResponse.md deleted file mode 100644 index 09f08747..00000000 --- a/docs/CreateDhcpOptionsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateDhcpOptionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSet** | [**DhcpOptionsSet**](DhcpOptionsSet.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateDirectLinkInterfaceRequest.md b/docs/CreateDirectLinkInterfaceRequest.md deleted file mode 100644 index 5270fdd8..00000000 --- a/docs/CreateDirectLinkInterfaceRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateDirectLinkInterfaceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkId** | **String** | The ID of the existing DirectLink for which you want to create the DirectLink interface. | | -|**directLinkInterface** | [**DirectLinkInterface**](DirectLinkInterface.md) | | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/CreateDirectLinkInterfaceResponse.md b/docs/CreateDirectLinkInterfaceResponse.md deleted file mode 100644 index 38d2b651..00000000 --- a/docs/CreateDirectLinkInterfaceResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateDirectLinkInterfaceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkInterface** | [**DirectLinkInterfaces**](DirectLinkInterfaces.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateDirectLinkRequest.md b/docs/CreateDirectLinkRequest.md deleted file mode 100644 index e1603368..00000000 --- a/docs/CreateDirectLinkRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateDirectLinkRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bandwidth** | **String** | The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`). | | -|**directLinkName** | **String** | The name of the DirectLink. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**location** | **String** | The code of the requested location for the DirectLink, returned by the [ReadLocations](#readlocations) method. | | - - - diff --git a/docs/CreateDirectLinkResponse.md b/docs/CreateDirectLinkResponse.md deleted file mode 100644 index f55f9124..00000000 --- a/docs/CreateDirectLinkResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateDirectLinkResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLink** | [**DirectLink**](DirectLink.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateFlexibleGpuRequest.md b/docs/CreateFlexibleGpuRequest.md deleted file mode 100644 index 304b2adf..00000000 --- a/docs/CreateFlexibleGpuRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CreateFlexibleGpuRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the fGPU is deleted when the VM is terminated. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**generation** | **String** | The processor generation that the fGPU must be compatible with. If not specified, the oldest possible processor generation is selected (as provided by [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for the specified model of fGPU). | [optional] | -|**modelName** | **String** | The model of fGPU you want to allocate. For more information, see [About Flexible GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). | | -|**subregionName** | **String** | The Subregion in which you want to create the fGPU. | | - - - diff --git a/docs/CreateFlexibleGpuResponse.md b/docs/CreateFlexibleGpuResponse.md deleted file mode 100644 index fe5942d8..00000000 --- a/docs/CreateFlexibleGpuResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateFlexibleGpuResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**flexibleGpu** | [**FlexibleGpu**](FlexibleGpu.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateImageExportTaskRequest.md b/docs/CreateImageExportTaskRequest.md deleted file mode 100644 index bb89e2d9..00000000 --- a/docs/CreateImageExportTaskRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateImageExportTaskRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**imageId** | **String** | The ID of the OMI to export. | | -|**osuExport** | [**OsuExportToCreate**](OsuExportToCreate.md) | | | - - - diff --git a/docs/CreateImageExportTaskResponse.md b/docs/CreateImageExportTaskResponse.md deleted file mode 100644 index ea8c1cd3..00000000 --- a/docs/CreateImageExportTaskResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateImageExportTaskResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**imageExportTask** | [**ImageExportTask**](ImageExportTask.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateImageRequest.md b/docs/CreateImageRequest.md deleted file mode 100644 index a0f37824..00000000 --- a/docs/CreateImageRequest.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# CreateImageRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**architecture** | **String** | **(when registering from a snapshot, or from a bucket without using a manifest file)** The architecture of the OMI (`i386` or `x86_64`). | [optional] | -|**blockDeviceMappings** | [**List<BlockDeviceMappingImage>**](BlockDeviceMappingImage.md) | **(when registering from a snapshot, or from a bucket without using a manifest file)** One or more block device mappings. | [optional] | -|**description** | **String** | A description for the new OMI. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**fileLocation** | **String** | **(when registering from a bucket by using a manifest file)** The pre-signed URL of the manifest file for the OMI you want to register. For more information, see [Configuring a Pre-signed URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) or [Managing Access to Your Buckets and Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.html).<br /> You can also specify the normal URL of the OMI if you have permission on the OOS bucket, without using the manifest file, but in that case, you need to manually specify through the other parameters all the information that would otherwise be read from the manifest file. | [optional] | -|**imageName** | **String** | A unique name for the new OMI.<br /> Constraints: 3-128 alphanumeric characters, underscores (`_`), spaces (` `), parentheses (`()`), slashes (`/`), periods (`.`), or dashes (`-`). | [optional] | -|**noReboot** | **Boolean** | **(when creating from a VM)** If false, the VM shuts down before creating the OMI and then reboots. If true, the VM does not. | [optional] | -|**productCodes** | **List<String>** | The product codes associated with the OMI. | [optional] | -|**rootDeviceName** | **String** | **(when registering from a snapshot, or from a bucket without using a manifest file)** The name of the root device for the new OMI. | [optional] | -|**sourceImageId** | **String** | **(when copying an OMI)** The ID of the OMI you want to copy. | [optional] | -|**sourceRegionName** | **String** | **(when copying an OMI)** The name of the source Region (always the same as the Region of your account). | [optional] | -|**vmId** | **String** | **(when creating from a VM)** The ID of the VM from which you want to create the OMI. | [optional] | - - - diff --git a/docs/CreateImageResponse.md b/docs/CreateImageResponse.md deleted file mode 100644 index 60fff295..00000000 --- a/docs/CreateImageResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateImageResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**image** | [**Image**](Image.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateInternetServiceRequest.md b/docs/CreateInternetServiceRequest.md deleted file mode 100644 index d4b8d2f9..00000000 --- a/docs/CreateInternetServiceRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreateInternetServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/CreateInternetServiceResponse.md b/docs/CreateInternetServiceResponse.md deleted file mode 100644 index ca516452..00000000 --- a/docs/CreateInternetServiceResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateInternetServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**internetService** | [**InternetService**](InternetService.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateKeypairRequest.md b/docs/CreateKeypairRequest.md deleted file mode 100644 index 0b8239eb..00000000 --- a/docs/CreateKeypairRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateKeypairRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**keypairName** | **String** | A unique name for the keypair, with a maximum length of 255 [ASCII printable characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters). | | -|**publicKey** | **String** | The public key to import in your account, if you are importing an existing keypair. This value must be Base64-encoded. | [optional] | - - - diff --git a/docs/CreateKeypairResponse.md b/docs/CreateKeypairResponse.md deleted file mode 100644 index 754e510a..00000000 --- a/docs/CreateKeypairResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateKeypairResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keypair** | [**KeypairCreated**](KeypairCreated.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateListenerRuleRequest.md b/docs/CreateListenerRuleRequest.md deleted file mode 100644 index ad45a3e7..00000000 --- a/docs/CreateListenerRuleRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateListenerRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**listener** | [**LoadBalancerLight**](LoadBalancerLight.md) | | | -|**listenerRule** | [**ListenerRuleForCreation**](ListenerRuleForCreation.md) | | | -|**vmIds** | **List<String>** | The IDs of the backend VMs. | | - - - diff --git a/docs/CreateListenerRuleResponse.md b/docs/CreateListenerRuleResponse.md deleted file mode 100644 index 97d11d52..00000000 --- a/docs/CreateListenerRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateListenerRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**listenerRule** | [**ListenerRule**](ListenerRule.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateLoadBalancerListenersRequest.md b/docs/CreateLoadBalancerListenersRequest.md deleted file mode 100644 index aa59acb8..00000000 --- a/docs/CreateLoadBalancerListenersRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateLoadBalancerListenersRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**listeners** | [**List<ListenerForCreation>**](ListenerForCreation.md) | One or more listeners for the load balancer. | | -|**loadBalancerName** | **String** | The name of the load balancer for which you want to create listeners. | | - - - diff --git a/docs/CreateLoadBalancerListenersResponse.md b/docs/CreateLoadBalancerListenersResponse.md deleted file mode 100644 index 2afee0a3..00000000 --- a/docs/CreateLoadBalancerListenersResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateLoadBalancerListenersResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateLoadBalancerPolicyRequest.md b/docs/CreateLoadBalancerPolicyRequest.md deleted file mode 100644 index 6d474038..00000000 --- a/docs/CreateLoadBalancerPolicyRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# CreateLoadBalancerPolicyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cookieExpirationPeriod** | **Integer** | The lifetime of the cookie, in seconds. If not specified, the default value of this parameter is `1`, which means that the sticky session lasts for the duration of the browser session. | [optional] | -|**cookieName** | **String** | The name of the application cookie used for stickiness. This parameter is required if you create a stickiness policy based on an application-generated cookie. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer for which you want to create a policy. | | -|**policyName** | **String** | The unique name of the policy, with a maximum length of 32 alphanumeric characters and dashes (-). | | -|**policyType** | **String** | The type of stickiness policy you want to create: `app` or `load_balancer`. | | - - - diff --git a/docs/CreateLoadBalancerPolicyResponse.md b/docs/CreateLoadBalancerPolicyResponse.md deleted file mode 100644 index 6313b173..00000000 --- a/docs/CreateLoadBalancerPolicyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateLoadBalancerPolicyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateLoadBalancerRequest.md b/docs/CreateLoadBalancerRequest.md deleted file mode 100644 index 09411227..00000000 --- a/docs/CreateLoadBalancerRequest.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# CreateLoadBalancerRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**listeners** | [**List<ListenerForCreation>**](ListenerForCreation.md) | One or more listeners to create. | | -|**loadBalancerName** | **String** | The unique name of the load balancer, with a maximum length of 32 alphanumeric characters and dashes (-). This name must not start or end with a dash. | | -|**loadBalancerType** | **String** | The type of load balancer: `internet-facing` or `internal`. Use this parameter only for load balancers in a Net. | [optional] | -|**publicIp** | **String** | (internet-facing only) The public IP you want to associate with the load balancer. If not specified, a public IP owned by 3DS OUTSCALE is associated. | [optional] | -|**securityGroups** | **List<String>** | (Net only) One or more IDs of security groups you want to assign to the load balancer. If not specified, the default security group of the Net is assigned to the load balancer. | [optional] | -|**subnets** | **List<String>** | (Net only) The ID of the Subnet in which you want to create the load balancer. Regardless of this Subnet, the load balancer can distribute traffic to all Subnets. This parameter is required in a Net. | [optional] | -|**subregionNames** | **List<String>** | (public Cloud only) The Subregion in which you want to create the load balancer. Regardless of this Subregion, the load balancer can distribute traffic to all Subregions. This parameter is required in the public Cloud. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags assigned to the load balancer. | [optional] | - - - diff --git a/docs/CreateLoadBalancerResponse.md b/docs/CreateLoadBalancerResponse.md deleted file mode 100644 index 109d9d7f..00000000 --- a/docs/CreateLoadBalancerResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateLoadBalancerResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateLoadBalancerTagsRequest.md b/docs/CreateLoadBalancerTagsRequest.md deleted file mode 100644 index dd384310..00000000 --- a/docs/CreateLoadBalancerTagsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateLoadBalancerTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerNames** | **List<String>** | One or more load balancer names. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags to add to the specified load balancers. | | - - - diff --git a/docs/CreateLoadBalancerTagsResponse.md b/docs/CreateLoadBalancerTagsResponse.md deleted file mode 100644 index 6019f21c..00000000 --- a/docs/CreateLoadBalancerTagsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreateLoadBalancerTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateNatServiceRequest.md b/docs/CreateNatServiceRequest.md deleted file mode 100644 index 00de8797..00000000 --- a/docs/CreateNatServiceRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateNatServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientToken** | **String** | A unique identifier which enables you to manage the idempotency. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**publicIpId** | **String** | The allocation ID of the public IP to associate with the NAT service.<br /> If the public IP is already associated with another resource, you must first disassociate it. | | -|**subnetId** | **String** | The ID of the Subnet in which you want to create the NAT service. | | - - - diff --git a/docs/CreateNatServiceResponse.md b/docs/CreateNatServiceResponse.md deleted file mode 100644 index 48e32890..00000000 --- a/docs/CreateNatServiceResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateNatServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**natService** | [**NatService**](NatService.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateNetAccessPointRequest.md b/docs/CreateNetAccessPointRequest.md deleted file mode 100644 index 37e721b9..00000000 --- a/docs/CreateNetAccessPointRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateNetAccessPointRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net. | | -|**routeTableIds** | **List<String>** | One or more IDs of route tables to use for the connection. | [optional] | -|**serviceName** | **String** | The name of the service (in the format `com.outscale.region.service`). | | - - - diff --git a/docs/CreateNetAccessPointResponse.md b/docs/CreateNetAccessPointResponse.md deleted file mode 100644 index bd4ad17e..00000000 --- a/docs/CreateNetAccessPointResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateNetAccessPointResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netAccessPoint** | [**NetAccessPoint**](NetAccessPoint.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateNetPeeringRequest.md b/docs/CreateNetPeeringRequest.md deleted file mode 100644 index 55647c6b..00000000 --- a/docs/CreateNetPeeringRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateNetPeeringRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accepterNetId** | **String** | The ID of the Net you want to connect with. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**sourceNetId** | **String** | The ID of the Net you send the peering request from. | | - - - diff --git a/docs/CreateNetPeeringResponse.md b/docs/CreateNetPeeringResponse.md deleted file mode 100644 index 16e38145..00000000 --- a/docs/CreateNetPeeringResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateNetPeeringResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netPeering** | [**NetPeering**](NetPeering.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateNetRequest.md b/docs/CreateNetRequest.md deleted file mode 100644 index fa3fd288..00000000 --- a/docs/CreateNetRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateNetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**ipRange** | **String** | The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`). | | -|**tenancy** | **String** | The tenancy options for the VMs:<br /> - `default` if a VM created in a Net can be launched with any tenancy.<br /> - `dedicated` if it can be launched with dedicated tenancy VMs running on single-tenant hardware.<br /> - `dedicated group ID`: if it can be launched in a dedicated group on single-tenant hardware. | [optional] | - - - diff --git a/docs/CreateNetResponse.md b/docs/CreateNetResponse.md deleted file mode 100644 index 97edd640..00000000 --- a/docs/CreateNetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateNetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**net** | [**Net**](Net.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateNicRequest.md b/docs/CreateNicRequest.md deleted file mode 100644 index 99d50cc1..00000000 --- a/docs/CreateNicRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CreateNicRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A description for the NIC. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**privateIps** | [**List<PrivateIpLight>**](PrivateIpLight.md) | The primary private IP for the NIC.<br /> This IP must be within the IP range of the Subnet that you specify with the `SubnetId` attribute.<br /> If you do not specify this attribute, a random private IP is selected within the IP range of the Subnet. | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the NIC. | [optional] | -|**subnetId** | **String** | The ID of the Subnet in which you want to create the NIC. | | - - - diff --git a/docs/CreateNicResponse.md b/docs/CreateNicResponse.md deleted file mode 100644 index 8f914084..00000000 --- a/docs/CreateNicResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateNicResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nic** | [**Nic**](Nic.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreatePublicIpRequest.md b/docs/CreatePublicIpRequest.md deleted file mode 100644 index b06d2bdf..00000000 --- a/docs/CreatePublicIpRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreatePublicIpRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/CreatePublicIpResponse.md b/docs/CreatePublicIpResponse.md deleted file mode 100644 index 3071a691..00000000 --- a/docs/CreatePublicIpResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreatePublicIpResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**publicIp** | [**PublicIp**](PublicIp.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateRouteRequest.md b/docs/CreateRouteRequest.md deleted file mode 100644 index d2657274..00000000 --- a/docs/CreateRouteRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# CreateRouteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**gatewayId** | **String** | The ID of an Internet service or virtual gateway attached to your Net. | [optional] | -|**natServiceId** | **String** | The ID of a NAT service. | [optional] | -|**netPeeringId** | **String** | The ID of a Net peering. | [optional] | -|**nicId** | **String** | The ID of a NIC. | [optional] | -|**routeTableId** | **String** | The ID of the route table for which you want to create a route. | | -|**vmId** | **String** | The ID of a NAT VM in your Net (attached to exactly one NIC). | [optional] | - - - diff --git a/docs/CreateRouteResponse.md b/docs/CreateRouteResponse.md deleted file mode 100644 index 9b41c7a2..00000000 --- a/docs/CreateRouteResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateRouteResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTable** | [**RouteTable**](RouteTable.md) | | [optional] | - - - diff --git a/docs/CreateRouteTableRequest.md b/docs/CreateRouteTableRequest.md deleted file mode 100644 index 8e9966f8..00000000 --- a/docs/CreateRouteTableRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateRouteTableRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net for which you want to create a route table. | | - - - diff --git a/docs/CreateRouteTableResponse.md b/docs/CreateRouteTableResponse.md deleted file mode 100644 index e3b10e52..00000000 --- a/docs/CreateRouteTableResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateRouteTableResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTable** | [**RouteTable**](RouteTable.md) | | [optional] | - - - diff --git a/docs/CreateSecurityGroupRequest.md b/docs/CreateSecurityGroupRequest.md deleted file mode 100644 index d9d5b512..00000000 --- a/docs/CreateSecurityGroupRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateSecurityGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A description for the security group.<br /> This description can contain between 1 and 255 characters. Allowed characters are `a-z`, `A-Z`, `0-9`, accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net for the security group. | [optional] | -|**securityGroupName** | **String** | The name of the security group.<br /> This name must not start with `sg-`.<br /> This name must be unique and contain between 1 and 255 characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, and `_.-:/()#,@[]+=&;{}!$*`. | | - - - diff --git a/docs/CreateSecurityGroupResponse.md b/docs/CreateSecurityGroupResponse.md deleted file mode 100644 index e3379daf..00000000 --- a/docs/CreateSecurityGroupResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateSecurityGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**securityGroup** | [**SecurityGroup**](SecurityGroup.md) | | [optional] | - - - diff --git a/docs/CreateSecurityGroupRuleRequest.md b/docs/CreateSecurityGroupRuleRequest.md deleted file mode 100644 index 3b69546e..00000000 --- a/docs/CreateSecurityGroupRuleRequest.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# CreateSecurityGroupRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flow** | **String** | The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets only. | | -|**fromPortRange** | **Integer** | The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If you specify this parameter, you cannot specify the `Rules` parameter and its subparameters. | [optional] | -|**ipProtocol** | **String** | The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. In a Net, this can also be an IP protocol number. For more information, see the [IANA.org website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). If you specify this parameter, you cannot specify the `Rules` parameter and its subparameters. | [optional] | -|**ipRange** | **String** | The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If you specify this parameter, you cannot specify the `Rules` parameter and its subparameters. | [optional] | -|**rules** | [**List<SecurityGroupRule>**](SecurityGroupRule.md) | Information about the security group rule to create. If you specify this parent parameter and its subparameters, you cannot specify the following parent parameters: `FromPortRange`, `IpProtocol`, `IpRange`, and `ToPortRange`. | [optional] | -|**securityGroupAccountIdToLink** | **String** | The account ID that owns the source or destination security group specified in the `SecurityGroupNameToLink` parameter. | [optional] | -|**securityGroupId** | **String** | The ID of the security group for which you want to create a rule. | | -|**securityGroupNameToLink** | **String** | The ID of a source or destination security group that you want to link to the security group of the rule. | [optional] | -|**toPortRange** | **Integer** | The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you specify this parameter, you cannot specify the `Rules` parameter and its subparameters. | [optional] | - - - diff --git a/docs/CreateSecurityGroupRuleResponse.md b/docs/CreateSecurityGroupRuleResponse.md deleted file mode 100644 index e0364579..00000000 --- a/docs/CreateSecurityGroupRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateSecurityGroupRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**securityGroup** | [**SecurityGroup**](SecurityGroup.md) | | [optional] | - - - diff --git a/docs/CreateServerCertificateRequest.md b/docs/CreateServerCertificateRequest.md deleted file mode 100644 index c555001a..00000000 --- a/docs/CreateServerCertificateRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# CreateServerCertificateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**body** | **String** | The PEM-encoded X509 certificate.<br />With OSC CLI, use the following syntax to make sure your certificate file is correctly parsed: `--Body=&quot;$(cat FILENAME)&quot;`. | | -|**chain** | **String** | The PEM-encoded intermediate certification authorities.<br />With OSC CLI, use the following syntax to make sure your certificate chain file is correctly parsed: `--Chain=&quot;$(cat FILENAME)&quot;`. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**name** | **String** | A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_). | | -|**path** | **String** | The path to the server certificate, set to a slash (/) if not specified. | [optional] | -|**privateKey** | **String** | The PEM-encoded private key matching the certificate.<br />With OSC CLI, use the following syntax to make sure your key file is correctly parsed: `--PrivateKey=&quot;$(cat FILENAME)&quot;`. | | - - - diff --git a/docs/CreateServerCertificateResponse.md b/docs/CreateServerCertificateResponse.md deleted file mode 100644 index 24f2f80e..00000000 --- a/docs/CreateServerCertificateResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateServerCertificateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**serverCertificate** | [**ServerCertificate**](ServerCertificate.md) | | [optional] | - - - diff --git a/docs/CreateSnapshotExportTaskRequest.md b/docs/CreateSnapshotExportTaskRequest.md deleted file mode 100644 index c7575818..00000000 --- a/docs/CreateSnapshotExportTaskRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateSnapshotExportTaskRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**osuExport** | [**OsuExportToCreate**](OsuExportToCreate.md) | | | -|**snapshotId** | **String** | The ID of the snapshot to export. | | - - - diff --git a/docs/CreateSnapshotExportTaskResponse.md b/docs/CreateSnapshotExportTaskResponse.md deleted file mode 100644 index 04d84dc9..00000000 --- a/docs/CreateSnapshotExportTaskResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateSnapshotExportTaskResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**snapshotExportTask** | [**SnapshotExportTask**](SnapshotExportTask.md) | | [optional] | - - - diff --git a/docs/CreateSnapshotRequest.md b/docs/CreateSnapshotRequest.md deleted file mode 100644 index 9e10ab64..00000000 --- a/docs/CreateSnapshotRequest.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# CreateSnapshotRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A description for the snapshot. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**fileLocation** | **String** | **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import, or the normal URL of the snapshot if you have permission on the OOS bucket. For more information, see [Configuring a Pre-signed URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) or [Managing Access to Your Buckets and Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.html). | [optional] | -|**snapshotSize** | **Long** | **(when importing from a bucket)** The size of the snapshot you want to create in your account, in bytes. This size must be greater than or equal to the size of the original, uncompressed snapshot. | [optional] | -|**sourceRegionName** | **String** | **(when copying a snapshot)** The name of the source Region, which must be the same as the Region of your account. | [optional] | -|**sourceSnapshotId** | **String** | **(when copying a snapshot)** The ID of the snapshot you want to copy. | [optional] | -|**volumeId** | **String** | **(when creating from a volume)** The ID of the volume you want to create a snapshot of. | [optional] | - - - diff --git a/docs/CreateSnapshotResponse.md b/docs/CreateSnapshotResponse.md deleted file mode 100644 index 2b242a7d..00000000 --- a/docs/CreateSnapshotResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateSnapshotResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**snapshot** | [**Snapshot**](Snapshot.md) | | [optional] | - - - diff --git a/docs/CreateSubnetRequest.md b/docs/CreateSubnetRequest.md deleted file mode 100644 index 15d9960f..00000000 --- a/docs/CreateSubnetRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateSubnetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**ipRange** | **String** | The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`).<br /> The IP range of the Subnet can be either the same as the Net one if you create only a single Subnet in this Net, or a subset of the Net one. In case of several Subnets in a Net, their IP ranges must not overlap. The smallest Subnet you can create uses a /29 netmask (eight IPs). For more information, see [About Nets](https://docs.outscale.com/en/userguide/About-Nets.html). | | -|**netId** | **String** | The ID of the Net for which you want to create a Subnet. | | -|**subregionName** | **String** | The name of the Subregion in which you want to create the Subnet. | [optional] | - - - diff --git a/docs/CreateSubnetResponse.md b/docs/CreateSubnetResponse.md deleted file mode 100644 index ba5f24d2..00000000 --- a/docs/CreateSubnetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateSubnetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**subnet** | [**Subnet**](Subnet.md) | | [optional] | - - - diff --git a/docs/CreateTagsRequest.md b/docs/CreateTagsRequest.md deleted file mode 100644 index 1d521d81..00000000 --- a/docs/CreateTagsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**resourceIds** | **List<String>** | One or more resource IDs. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags to add to the specified resources. | | - - - diff --git a/docs/CreateTagsResponse.md b/docs/CreateTagsResponse.md deleted file mode 100644 index 37adcfc7..00000000 --- a/docs/CreateTagsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreateTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/CreateVirtualGatewayRequest.md b/docs/CreateVirtualGatewayRequest.md deleted file mode 100644 index 15853739..00000000 --- a/docs/CreateVirtualGatewayRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVirtualGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**connectionType** | **String** | The type of VPN connection supported by the virtual gateway (always `ipsec.1`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/CreateVirtualGatewayResponse.md b/docs/CreateVirtualGatewayResponse.md deleted file mode 100644 index b92fee98..00000000 --- a/docs/CreateVirtualGatewayResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVirtualGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**virtualGateway** | [**VirtualGateway**](VirtualGateway.md) | | [optional] | - - - diff --git a/docs/CreateVmGroupRequest.md b/docs/CreateVmGroupRequest.md deleted file mode 100644 index 18a2087b..00000000 --- a/docs/CreateVmGroupRequest.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# CreateVmGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A description for the VM group. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**positioningStrategy** | [**PositioningStrategyEnum**](#PositioningStrategyEnum) | The positioning strategy of VMs on hypervisors. By default, or if set to `no-strategy` our orchestrator determines the most adequate position for your VMs. If set to `attract`, your VMs are deployed on the same hypervisor, which improves network performance. If set to `repulse`, your VMs are deployed on a different hypervisor, which improves fault tolerance. | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the VM group. | | -|**subnetId** | **String** | The ID of the Subnet in which you want to create the VM group. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags to add to the VM group. | [optional] | -|**vmCount** | **Integer** | The number of VMs deployed in the VM group. | | -|**vmGroupName** | **String** | The name of the VM group. | | -|**vmTemplateId** | **String** | The ID of the VM template used to launch VMs in the VM group. | | - - - -## Enum: PositioningStrategyEnum - -| Name | Value | -|---- | -----| -| ATTRACT | "attract" | -| NO_STRATEGY | "no-strategy" | -| REPULSE | "repulse" | - - - diff --git a/docs/CreateVmGroupResponse.md b/docs/CreateVmGroupResponse.md deleted file mode 100644 index 94f7755b..00000000 --- a/docs/CreateVmGroupResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVmGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmGroup** | [**VmGroup**](VmGroup.md) | | [optional] | - - - diff --git a/docs/CreateVmTemplateRequest.md b/docs/CreateVmTemplateRequest.md deleted file mode 100644 index f8470592..00000000 --- a/docs/CreateVmTemplateRequest.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# CreateVmTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cpuCores** | **Integer** | The number of vCores to use for each VM. | | -|**cpuGeneration** | **String** | The processor generation to use for each VM (for example, `v4`). | | -|**cpuPerformance** | [**CpuPerformanceEnum**](#CpuPerformanceEnum) | The performance of the VMs (`medium` \\| `high` \\| `highest`). | [optional] | -|**description** | **String** | A description for the VM template. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**imageId** | **String** | The ID of the OMI to use for each VM. You can find a list of OMIs by calling the [ReadImages](#readimages) method. | | -|**keypairName** | **String** | The name of the keypair to use for each VM. | [optional] | -|**ram** | **Integer** | The amount of RAM to use for each VM. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags to add to the VM template. | [optional] | -|**vmTemplateName** | **String** | The name of the VM template. | | - - - -## Enum: CpuPerformanceEnum - -| Name | Value | -|---- | -----| -| MEDIUM | "medium" | -| HIGH | "high" | -| HIGHEST | "highest" | - - - diff --git a/docs/CreateVmTemplateResponse.md b/docs/CreateVmTemplateResponse.md deleted file mode 100644 index 9b8469ab..00000000 --- a/docs/CreateVmTemplateResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVmTemplateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmTemplate** | [**VmTemplate**](VmTemplate.md) | | [optional] | - - - diff --git a/docs/CreateVmsRequest.md b/docs/CreateVmsRequest.md deleted file mode 100644 index 7b35ca51..00000000 --- a/docs/CreateVmsRequest.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# CreateVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**blockDeviceMappings** | [**List<BlockDeviceMappingVmCreation>**](BlockDeviceMappingVmCreation.md) | One or more block device mappings. | [optional] | -|**bootOnCreation** | **Boolean** | By default or if true, the VM is started on creation. If false, the VM is stopped on creation. | [optional] | -|**bsuOptimized** | **Boolean** | This parameter is not available. It is present in our API for the sake of historical compatibility with AWS. | [optional] | -|**clientToken** | **String** | A unique identifier which enables you to manage the idempotency. | [optional] | -|**deletionProtection** | **Boolean** | If true, you cannot delete the VM unless you change this parameter back to false. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**imageId** | **String** | The ID of the OMI used to create the VM. You can find the list of OMIs by calling the [ReadImages](#readimages) method. | | -|**keypairName** | **String** | The name of the keypair. | [optional] | -|**maxVmsCount** | **Integer** | The maximum number of VMs you want to create. If all the VMs cannot be created, the largest possible number of VMs above MinVmsCount is created. | [optional] | -|**minVmsCount** | **Integer** | The minimum number of VMs you want to create. If this number of VMs cannot be created, no VMs are created. | [optional] | -|**nestedVirtualization** | **Boolean** | (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled. | [optional] | -|**nics** | [**List<NicForVmCreation>**](NicForVmCreation.md) | One or more NICs. If you specify this parameter, you must not specify the `SubnetId` and `SubregionName` parameters. You also must define one NIC as the primary network interface of the VM with `0` as its device number. | [optional] | -|**performance** | [**PerformanceEnum**](#PerformanceEnum) | The performance of the VM (`medium` \\| `high` \\| `highest`). By default, `high`. This parameter is ignored if you specify a performance flag directly in the `VmType` parameter. | [optional] | -|**placement** | [**Placement**](Placement.md) | | [optional] | -|**privateIps** | **List<String>** | One or more private IPs of the VM. | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security group for the VMs. | [optional] | -|**securityGroups** | **List<String>** | One or more names of security groups for the VMs. | [optional] | -|**subnetId** | **String** | The ID of the Subnet in which you want to create the VM. If you specify this parameter, you must not specify the `Nics` parameter. | [optional] | -|**userData** | **String** | Data or script used to add a specific configuration to the VM. It must be Base64-encoded and is limited to 500 kibibytes (KiB). | [optional] | -|**vmInitiatedShutdownBehavior** | **String** | The VM behavior when you stop it. By default or if set to `stop`, the VM stops. If set to `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops and is terminated. | [optional] | -|**vmType** | **String** | The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` or `tinavW.cXrY` format), or an AWS type (for example, `t2.small`, which is the default value).<br /> If you specify an AWS type, it is converted in the background to its corresponding TINA type, but the AWS type is still returned. If the specified or converted TINA type includes a performance flag, this performance flag is applied regardless of the value you may have provided in the `Performance` parameter. For more information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). | [optional] | - - - -## Enum: PerformanceEnum - -| Name | Value | -|---- | -----| -| MEDIUM | "medium" | -| HIGH | "high" | -| HIGHEST | "highest" | - - - diff --git a/docs/CreateVmsResponse.md b/docs/CreateVmsResponse.md deleted file mode 100644 index 176e65a9..00000000 --- a/docs/CreateVmsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vms** | [**List<Vm>**](Vm.md) | Information about one or more created VMs. | [optional] | - - - diff --git a/docs/CreateVolumeRequest.md b/docs/CreateVolumeRequest.md deleted file mode 100644 index 6ef9346d..00000000 --- a/docs/CreateVolumeRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# CreateVolumeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**iops** | **Integer** | The number of I/O operations per second (IOPS). This parameter must be specified only if you create an `io1` volume. The maximum number of IOPS allowed for `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. | [optional] | -|**size** | **Integer** | The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 GiB. This parameter is required if the volume is not created from a snapshot (`SnapshotId` unspecified). | [optional] | -|**snapshotId** | **String** | The ID of the snapshot from which you want to create the volume. | [optional] | -|**subregionName** | **String** | The Subregion in which you want to create the volume. | | -|**volumeType** | **String** | The type of volume you want to create (`io1` \\| `gp2` \\| `standard`). If not specified, a `standard` volume is created.<br /> For more information about volume types, see [About Volumes > Volume Types and IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops). | [optional] | - - - diff --git a/docs/CreateVolumeResponse.md b/docs/CreateVolumeResponse.md deleted file mode 100644 index be999df7..00000000 --- a/docs/CreateVolumeResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVolumeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**volume** | [**Volume**](Volume.md) | | [optional] | - - - diff --git a/docs/CreateVpnConnectionRequest.md b/docs/CreateVpnConnectionRequest.md deleted file mode 100644 index e97bd1c3..00000000 --- a/docs/CreateVpnConnectionRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CreateVpnConnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGatewayId** | **String** | The ID of the client gateway. | | -|**connectionType** | **String** | The type of VPN connection (always `ipsec.1`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**staticRoutesOnly** | **Boolean** | By default or if false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) and [DeleteVpnConnectionRoute](#deletevpnconnectionroute). | [optional] | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | | - - - diff --git a/docs/CreateVpnConnectionResponse.md b/docs/CreateVpnConnectionResponse.md deleted file mode 100644 index 6f6737c4..00000000 --- a/docs/CreateVpnConnectionResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CreateVpnConnectionResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vpnConnection** | [**VpnConnection**](VpnConnection.md) | | [optional] | - - - diff --git a/docs/CreateVpnConnectionRouteRequest.md b/docs/CreateVpnConnectionRouteRequest.md deleted file mode 100644 index fc63216e..00000000 --- a/docs/CreateVpnConnectionRouteRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateVpnConnectionRouteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The network prefix of the route, in CIDR notation (for example, `10.12.0.0/16`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vpnConnectionId** | **String** | The ID of the target VPN connection of the static route. | | - - - diff --git a/docs/CreateVpnConnectionRouteResponse.md b/docs/CreateVpnConnectionRouteResponse.md deleted file mode 100644 index 549a2f33..00000000 --- a/docs/CreateVpnConnectionRouteResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreateVpnConnectionRouteResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteAccessKeyRequest.md b/docs/DeleteAccessKeyRequest.md deleted file mode 100644 index 5cc7ca2d..00000000 --- a/docs/DeleteAccessKeyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteAccessKeyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | The ID of the access key you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**userName** | **String** | The name of the EIM user the access key you want to delete is associated with. By default, the user who sends the request (which can be the root account). | [optional] | - - - diff --git a/docs/DeleteAccessKeyResponse.md b/docs/DeleteAccessKeyResponse.md deleted file mode 100644 index 8ea57a8d..00000000 --- a/docs/DeleteAccessKeyResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteAccessKeyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteApiAccessRuleRequest.md b/docs/DeleteApiAccessRuleRequest.md deleted file mode 100644 index 4e999b10..00000000 --- a/docs/DeleteApiAccessRuleRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteApiAccessRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRuleId** | **String** | The ID of the API access rule you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteApiAccessRuleResponse.md b/docs/DeleteApiAccessRuleResponse.md deleted file mode 100644 index 43387f4c..00000000 --- a/docs/DeleteApiAccessRuleResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteApiAccessRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteCaRequest.md b/docs/DeleteCaRequest.md deleted file mode 100644 index 9aa2f46b..00000000 --- a/docs/DeleteCaRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteCaRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caId** | **String** | The ID of the CA you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteCaResponse.md b/docs/DeleteCaResponse.md deleted file mode 100644 index b4c3c5db..00000000 --- a/docs/DeleteCaResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteCaResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteClientGatewayRequest.md b/docs/DeleteClientGatewayRequest.md deleted file mode 100644 index d4cd3c93..00000000 --- a/docs/DeleteClientGatewayRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteClientGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGatewayId** | **String** | The ID of the client gateway you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteClientGatewayResponse.md b/docs/DeleteClientGatewayResponse.md deleted file mode 100644 index b7d3e6cd..00000000 --- a/docs/DeleteClientGatewayResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteClientGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteDhcpOptionsRequest.md b/docs/DeleteDhcpOptionsRequest.md deleted file mode 100644 index afee025e..00000000 --- a/docs/DeleteDhcpOptionsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteDhcpOptionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSetId** | **String** | The ID of the DHCP options set you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteDhcpOptionsResponse.md b/docs/DeleteDhcpOptionsResponse.md deleted file mode 100644 index ce26cff3..00000000 --- a/docs/DeleteDhcpOptionsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteDhcpOptionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteDirectLinkInterfaceRequest.md b/docs/DeleteDirectLinkInterfaceRequest.md deleted file mode 100644 index 704b967d..00000000 --- a/docs/DeleteDirectLinkInterfaceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteDirectLinkInterfaceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkInterfaceId** | **String** | The ID of the DirectLink interface you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteDirectLinkInterfaceResponse.md b/docs/DeleteDirectLinkInterfaceResponse.md deleted file mode 100644 index 8f4ebd07..00000000 --- a/docs/DeleteDirectLinkInterfaceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteDirectLinkInterfaceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteDirectLinkRequest.md b/docs/DeleteDirectLinkRequest.md deleted file mode 100644 index 58859e02..00000000 --- a/docs/DeleteDirectLinkRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteDirectLinkRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkId** | **String** | The ID of the DirectLink you want to delete. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/DeleteDirectLinkResponse.md b/docs/DeleteDirectLinkResponse.md deleted file mode 100644 index 0a6b18f7..00000000 --- a/docs/DeleteDirectLinkResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteDirectLinkResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteExportTaskRequest.md b/docs/DeleteExportTaskRequest.md deleted file mode 100644 index ea70c841..00000000 --- a/docs/DeleteExportTaskRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteExportTaskRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**exportTaskId** | **String** | The ID of the export task to delete. | | - - - diff --git a/docs/DeleteExportTaskResponse.md b/docs/DeleteExportTaskResponse.md deleted file mode 100644 index 27fab192..00000000 --- a/docs/DeleteExportTaskResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteExportTaskResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteFlexibleGpuRequest.md b/docs/DeleteFlexibleGpuRequest.md deleted file mode 100644 index 14e918cc..00000000 --- a/docs/DeleteFlexibleGpuRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteFlexibleGpuRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flexibleGpuId** | **String** | The ID of the fGPU you want to delete. | | - - - diff --git a/docs/DeleteFlexibleGpuResponse.md b/docs/DeleteFlexibleGpuResponse.md deleted file mode 100644 index 1bc794e1..00000000 --- a/docs/DeleteFlexibleGpuResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteFlexibleGpuResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteImageRequest.md b/docs/DeleteImageRequest.md deleted file mode 100644 index 36576698..00000000 --- a/docs/DeleteImageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteImageRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**imageId** | **String** | The ID of the OMI you want to delete. | | - - - diff --git a/docs/DeleteImageResponse.md b/docs/DeleteImageResponse.md deleted file mode 100644 index 8926e0d2..00000000 --- a/docs/DeleteImageResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteImageResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteInternetServiceRequest.md b/docs/DeleteInternetServiceRequest.md deleted file mode 100644 index 2062aa44..00000000 --- a/docs/DeleteInternetServiceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteInternetServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**internetServiceId** | **String** | The ID of the Internet service you want to delete. | | - - - diff --git a/docs/DeleteInternetServiceResponse.md b/docs/DeleteInternetServiceResponse.md deleted file mode 100644 index e26e896d..00000000 --- a/docs/DeleteInternetServiceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteInternetServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteKeypairRequest.md b/docs/DeleteKeypairRequest.md deleted file mode 100644 index 594caea2..00000000 --- a/docs/DeleteKeypairRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteKeypairRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**keypairName** | **String** | The name of the keypair you want to delete. | | - - - diff --git a/docs/DeleteKeypairResponse.md b/docs/DeleteKeypairResponse.md deleted file mode 100644 index 0797660c..00000000 --- a/docs/DeleteKeypairResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteKeypairResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteListenerRuleRequest.md b/docs/DeleteListenerRuleRequest.md deleted file mode 100644 index e036b83f..00000000 --- a/docs/DeleteListenerRuleRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteListenerRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**listenerRuleName** | **String** | The name of the rule you want to delete. | | - - - diff --git a/docs/DeleteListenerRuleResponse.md b/docs/DeleteListenerRuleResponse.md deleted file mode 100644 index 671adcce..00000000 --- a/docs/DeleteListenerRuleResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteListenerRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteLoadBalancerListenersRequest.md b/docs/DeleteLoadBalancerListenersRequest.md deleted file mode 100644 index 82ef60d1..00000000 --- a/docs/DeleteLoadBalancerListenersRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteLoadBalancerListenersRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer for which you want to delete listeners. | | -|**loadBalancerPorts** | **List<Integer>** | One or more port numbers of the listeners you want to delete. | | - - - diff --git a/docs/DeleteLoadBalancerListenersResponse.md b/docs/DeleteLoadBalancerListenersResponse.md deleted file mode 100644 index 9f5acbea..00000000 --- a/docs/DeleteLoadBalancerListenersResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteLoadBalancerListenersResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteLoadBalancerPolicyRequest.md b/docs/DeleteLoadBalancerPolicyRequest.md deleted file mode 100644 index 3c75b85c..00000000 --- a/docs/DeleteLoadBalancerPolicyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteLoadBalancerPolicyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer for which you want to delete a policy. | | -|**policyName** | **String** | The name of the policy you want to delete. | | - - - diff --git a/docs/DeleteLoadBalancerPolicyResponse.md b/docs/DeleteLoadBalancerPolicyResponse.md deleted file mode 100644 index 31ea9fd9..00000000 --- a/docs/DeleteLoadBalancerPolicyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteLoadBalancerPolicyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteLoadBalancerRequest.md b/docs/DeleteLoadBalancerRequest.md deleted file mode 100644 index 549f94c1..00000000 --- a/docs/DeleteLoadBalancerRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteLoadBalancerRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer you want to delete. | | - - - diff --git a/docs/DeleteLoadBalancerResponse.md b/docs/DeleteLoadBalancerResponse.md deleted file mode 100644 index b223877b..00000000 --- a/docs/DeleteLoadBalancerResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteLoadBalancerResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteLoadBalancerTagsRequest.md b/docs/DeleteLoadBalancerTagsRequest.md deleted file mode 100644 index 2403b493..00000000 --- a/docs/DeleteLoadBalancerTagsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteLoadBalancerTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerNames** | **List<String>** | One or more load balancer names. | | -|**tags** | [**List<ResourceLoadBalancerTag>**](ResourceLoadBalancerTag.md) | One or more tags to delete from the load balancers. | | - - - diff --git a/docs/DeleteLoadBalancerTagsResponse.md b/docs/DeleteLoadBalancerTagsResponse.md deleted file mode 100644 index feecbaec..00000000 --- a/docs/DeleteLoadBalancerTagsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteLoadBalancerTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteNatServiceRequest.md b/docs/DeleteNatServiceRequest.md deleted file mode 100644 index bc24b5d3..00000000 --- a/docs/DeleteNatServiceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteNatServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**natServiceId** | **String** | The ID of the NAT service you want to delete. | | - - - diff --git a/docs/DeleteNatServiceResponse.md b/docs/DeleteNatServiceResponse.md deleted file mode 100644 index 448c77cd..00000000 --- a/docs/DeleteNatServiceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteNatServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteNetAccessPointRequest.md b/docs/DeleteNetAccessPointRequest.md deleted file mode 100644 index b63fcbd2..00000000 --- a/docs/DeleteNetAccessPointRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteNetAccessPointRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netAccessPointId** | **String** | The ID of the Net access point. | | - - - diff --git a/docs/DeleteNetAccessPointResponse.md b/docs/DeleteNetAccessPointResponse.md deleted file mode 100644 index 84592d61..00000000 --- a/docs/DeleteNetAccessPointResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteNetAccessPointResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteNetPeeringRequest.md b/docs/DeleteNetPeeringRequest.md deleted file mode 100644 index e8ee0b80..00000000 --- a/docs/DeleteNetPeeringRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteNetPeeringRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netPeeringId** | **String** | The ID of the Net peering you want to delete. | | - - - diff --git a/docs/DeleteNetPeeringResponse.md b/docs/DeleteNetPeeringResponse.md deleted file mode 100644 index 70fb2585..00000000 --- a/docs/DeleteNetPeeringResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteNetPeeringResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteNetRequest.md b/docs/DeleteNetRequest.md deleted file mode 100644 index 9b9fd479..00000000 --- a/docs/DeleteNetRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteNetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net you want to delete. | | - - - diff --git a/docs/DeleteNetResponse.md b/docs/DeleteNetResponse.md deleted file mode 100644 index 83ee463e..00000000 --- a/docs/DeleteNetResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteNetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteNicRequest.md b/docs/DeleteNicRequest.md deleted file mode 100644 index 87f6de17..00000000 --- a/docs/DeleteNicRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteNicRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nicId** | **String** | The ID of the NIC you want to delete. | | - - - diff --git a/docs/DeleteNicResponse.md b/docs/DeleteNicResponse.md deleted file mode 100644 index 7d9907b8..00000000 --- a/docs/DeleteNicResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteNicResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeletePublicIpRequest.md b/docs/DeletePublicIpRequest.md deleted file mode 100644 index b738fc2c..00000000 --- a/docs/DeletePublicIpRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeletePublicIpRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**publicIp** | **String** | The public IP. In the public Cloud, this parameter is required. | [optional] | -|**publicIpId** | **String** | The ID representing the association of the public IP with the VM or the NIC. In a Net, this parameter is required. | [optional] | - - - diff --git a/docs/DeletePublicIpResponse.md b/docs/DeletePublicIpResponse.md deleted file mode 100644 index 37da8ad7..00000000 --- a/docs/DeletePublicIpResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeletePublicIpResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteRouteRequest.md b/docs/DeleteRouteRequest.md deleted file mode 100644 index 4849357b..00000000 --- a/docs/DeleteRouteRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteRouteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The exact IP range for the route. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**routeTableId** | **String** | The ID of the route table from which you want to delete a route. | | - - - diff --git a/docs/DeleteRouteResponse.md b/docs/DeleteRouteResponse.md deleted file mode 100644 index 1f5b9258..00000000 --- a/docs/DeleteRouteResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteRouteResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTable** | [**RouteTable**](RouteTable.md) | | [optional] | - - - diff --git a/docs/DeleteRouteTableRequest.md b/docs/DeleteRouteTableRequest.md deleted file mode 100644 index 0ea3e231..00000000 --- a/docs/DeleteRouteTableRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteRouteTableRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**routeTableId** | **String** | The ID of the route table you want to delete. | | - - - diff --git a/docs/DeleteRouteTableResponse.md b/docs/DeleteRouteTableResponse.md deleted file mode 100644 index e7150258..00000000 --- a/docs/DeleteRouteTableResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteRouteTableResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteSecurityGroupRequest.md b/docs/DeleteSecurityGroupRequest.md deleted file mode 100644 index f8b024b4..00000000 --- a/docs/DeleteSecurityGroupRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteSecurityGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**securityGroupId** | **String** | The ID of the security group you want to delete. | [optional] | -|**securityGroupName** | **String** | The name of the security group. | [optional] | - - - diff --git a/docs/DeleteSecurityGroupResponse.md b/docs/DeleteSecurityGroupResponse.md deleted file mode 100644 index fbe74bd0..00000000 --- a/docs/DeleteSecurityGroupResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteSecurityGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteSecurityGroupRuleRequest.md b/docs/DeleteSecurityGroupRuleRequest.md deleted file mode 100644 index 6699edf9..00000000 --- a/docs/DeleteSecurityGroupRuleRequest.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# DeleteSecurityGroupRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flow** | **String** | The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets only. | | -|**fromPortRange** | **Integer** | The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. | [optional] | -|**ipProtocol** | **String** | The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. In a Net, this can also be an IP protocol number. For more information, see the [IANA.org website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). | [optional] | -|**ipRange** | **String** | The IP range for the security group rule, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**rules** | [**List<SecurityGroupRule>**](SecurityGroupRule.md) | One or more rules you want to delete from the security group. | [optional] | -|**securityGroupAccountIdToUnlink** | **String** | The account ID of the owner of the security group you want to delete a rule from. | [optional] | -|**securityGroupId** | **String** | The ID of the security group you want to delete a rule from. | | -|**securityGroupNameToUnlink** | **String** | The ID of the source security group. If you are in the Public Cloud, you can also specify the name of the source security group. | [optional] | -|**toPortRange** | **Integer** | The end of the port range for the TCP and UDP protocols, or an ICMP code number. | [optional] | - - - diff --git a/docs/DeleteSecurityGroupRuleResponse.md b/docs/DeleteSecurityGroupRuleResponse.md deleted file mode 100644 index d9df1f68..00000000 --- a/docs/DeleteSecurityGroupRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteSecurityGroupRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**securityGroup** | [**SecurityGroup**](SecurityGroup.md) | | [optional] | - - - diff --git a/docs/DeleteServerCertificateRequest.md b/docs/DeleteServerCertificateRequest.md deleted file mode 100644 index 6dfbf8dc..00000000 --- a/docs/DeleteServerCertificateRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteServerCertificateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**name** | **String** | The name of the server certificate you want to delete. | | - - - diff --git a/docs/DeleteServerCertificateResponse.md b/docs/DeleteServerCertificateResponse.md deleted file mode 100644 index 6ae1a605..00000000 --- a/docs/DeleteServerCertificateResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteServerCertificateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteSnapshotRequest.md b/docs/DeleteSnapshotRequest.md deleted file mode 100644 index 43fa4e05..00000000 --- a/docs/DeleteSnapshotRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteSnapshotRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**snapshotId** | **String** | The ID of the snapshot you want to delete. | | - - - diff --git a/docs/DeleteSnapshotResponse.md b/docs/DeleteSnapshotResponse.md deleted file mode 100644 index 1b0e6a49..00000000 --- a/docs/DeleteSnapshotResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteSnapshotResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteSubnetRequest.md b/docs/DeleteSubnetRequest.md deleted file mode 100644 index eb657a57..00000000 --- a/docs/DeleteSubnetRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteSubnetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**subnetId** | **String** | The ID of the Subnet you want to delete. | | - - - diff --git a/docs/DeleteSubnetResponse.md b/docs/DeleteSubnetResponse.md deleted file mode 100644 index 7be383f3..00000000 --- a/docs/DeleteSubnetResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteSubnetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteTagsRequest.md b/docs/DeleteTagsRequest.md deleted file mode 100644 index 828a3fbe..00000000 --- a/docs/DeleteTagsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**resourceIds** | **List<String>** | One or more resource IDs. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags to delete (if you set a tag value, only the tags matching exactly this value are deleted). | | - - - diff --git a/docs/DeleteTagsResponse.md b/docs/DeleteTagsResponse.md deleted file mode 100644 index 497c0423..00000000 --- a/docs/DeleteTagsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVirtualGatewayRequest.md b/docs/DeleteVirtualGatewayRequest.md deleted file mode 100644 index 1a1c5767..00000000 --- a/docs/DeleteVirtualGatewayRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVirtualGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**virtualGatewayId** | **String** | The ID of the virtual gateway you want to delete. | | - - - diff --git a/docs/DeleteVirtualGatewayResponse.md b/docs/DeleteVirtualGatewayResponse.md deleted file mode 100644 index 2362c509..00000000 --- a/docs/DeleteVirtualGatewayResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVirtualGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVmGroupRequest.md b/docs/DeleteVmGroupRequest.md deleted file mode 100644 index 627c1384..00000000 --- a/docs/DeleteVmGroupRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVmGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmGroupId** | **String** | The ID of the VM group you want to delete. | | - - - diff --git a/docs/DeleteVmGroupResponse.md b/docs/DeleteVmGroupResponse.md deleted file mode 100644 index 1cd45988..00000000 --- a/docs/DeleteVmGroupResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVmGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVmTemplateRequest.md b/docs/DeleteVmTemplateRequest.md deleted file mode 100644 index 52e388e9..00000000 --- a/docs/DeleteVmTemplateRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVmTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmTemplateId** | **String** | The ID of the VM template you want to delete. | | - - - diff --git a/docs/DeleteVmTemplateResponse.md b/docs/DeleteVmTemplateResponse.md deleted file mode 100644 index 4664d274..00000000 --- a/docs/DeleteVmTemplateResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVmTemplateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVmsRequest.md b/docs/DeleteVmsRequest.md deleted file mode 100644 index 68f80718..00000000 --- a/docs/DeleteVmsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | | - - - diff --git a/docs/DeleteVmsResponse.md b/docs/DeleteVmsResponse.md deleted file mode 100644 index 64bfe5cd..00000000 --- a/docs/DeleteVmsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vms** | [**List<VmState>**](VmState.md) | Information about one or more terminated VMs. | [optional] | - - - diff --git a/docs/DeleteVolumeRequest.md b/docs/DeleteVolumeRequest.md deleted file mode 100644 index 354995b0..00000000 --- a/docs/DeleteVolumeRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVolumeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**volumeId** | **String** | The ID of the volume you want to delete. | | - - - diff --git a/docs/DeleteVolumeResponse.md b/docs/DeleteVolumeResponse.md deleted file mode 100644 index 6c302d2c..00000000 --- a/docs/DeleteVolumeResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVolumeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVpnConnectionRequest.md b/docs/DeleteVpnConnectionRequest.md deleted file mode 100644 index bea0da43..00000000 --- a/docs/DeleteVpnConnectionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeleteVpnConnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vpnConnectionId** | **String** | The ID of the VPN connection you want to delete. | | - - - diff --git a/docs/DeleteVpnConnectionResponse.md b/docs/DeleteVpnConnectionResponse.md deleted file mode 100644 index 2c16cdd3..00000000 --- a/docs/DeleteVpnConnectionResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVpnConnectionResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeleteVpnConnectionRouteRequest.md b/docs/DeleteVpnConnectionRouteRequest.md deleted file mode 100644 index 8e0f5ed0..00000000 --- a/docs/DeleteVpnConnectionRouteRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeleteVpnConnectionRouteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The network prefix of the route to delete, in CIDR notation (for example, `10.12.0.0/16`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vpnConnectionId** | **String** | The ID of the target VPN connection of the static route to delete. | | - - - diff --git a/docs/DeleteVpnConnectionRouteResponse.md b/docs/DeleteVpnConnectionRouteResponse.md deleted file mode 100644 index 6d23d59a..00000000 --- a/docs/DeleteVpnConnectionRouteResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteVpnConnectionRouteResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DeregisterVmsInLoadBalancerRequest.md b/docs/DeregisterVmsInLoadBalancerRequest.md deleted file mode 100644 index 387986f8..00000000 --- a/docs/DeregisterVmsInLoadBalancerRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeregisterVmsInLoadBalancerRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | - - - diff --git a/docs/DeregisterVmsInLoadBalancerResponse.md b/docs/DeregisterVmsInLoadBalancerResponse.md deleted file mode 100644 index ef11c27e..00000000 --- a/docs/DeregisterVmsInLoadBalancerResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeregisterVmsInLoadBalancerResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/DhcpOptionApi.md b/docs/DhcpOptionApi.md deleted file mode 100644 index 89188a85..00000000 --- a/docs/DhcpOptionApi.md +++ /dev/null @@ -1,218 +0,0 @@ -# DhcpOptionApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createDhcpOptions**](DhcpOptionApi.md#createDhcpOptions) | **POST** /CreateDhcpOptions | | -| [**deleteDhcpOptions**](DhcpOptionApi.md#deleteDhcpOptions) | **POST** /DeleteDhcpOptions | | -| [**readDhcpOptions**](DhcpOptionApi.md#readDhcpOptions) | **POST** /ReadDhcpOptions | | - - - -# **createDhcpOptions** -> CreateDhcpOptionsResponse createDhcpOptions(createDhcpOptionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DhcpOptionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DhcpOptionApi apiInstance = new DhcpOptionApi(defaultClient); - CreateDhcpOptionsRequest createDhcpOptionsRequest = new CreateDhcpOptionsRequest(); // CreateDhcpOptionsRequest | - try { - CreateDhcpOptionsResponse result = apiInstance.createDhcpOptions(createDhcpOptionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DhcpOptionApi#createDhcpOptions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createDhcpOptionsRequest** | [**CreateDhcpOptionsRequest**](CreateDhcpOptionsRequest.md)| | [optional] | - -### Return type - -[**CreateDhcpOptionsResponse**](CreateDhcpOptionsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteDhcpOptions** -> DeleteDhcpOptionsResponse deleteDhcpOptions(deleteDhcpOptionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DhcpOptionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DhcpOptionApi apiInstance = new DhcpOptionApi(defaultClient); - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest = new DeleteDhcpOptionsRequest(); // DeleteDhcpOptionsRequest | - try { - DeleteDhcpOptionsResponse result = apiInstance.deleteDhcpOptions(deleteDhcpOptionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DhcpOptionApi#deleteDhcpOptions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteDhcpOptionsRequest** | [**DeleteDhcpOptionsRequest**](DeleteDhcpOptionsRequest.md)| | [optional] | - -### Return type - -[**DeleteDhcpOptionsResponse**](DeleteDhcpOptionsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readDhcpOptions** -> ReadDhcpOptionsResponse readDhcpOptions(readDhcpOptionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DhcpOptionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DhcpOptionApi apiInstance = new DhcpOptionApi(defaultClient); - ReadDhcpOptionsRequest readDhcpOptionsRequest = new ReadDhcpOptionsRequest(); // ReadDhcpOptionsRequest | - try { - ReadDhcpOptionsResponse result = apiInstance.readDhcpOptions(readDhcpOptionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DhcpOptionApi#readDhcpOptions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readDhcpOptionsRequest** | [**ReadDhcpOptionsRequest**](ReadDhcpOptionsRequest.md)| | [optional] | - -### Return type - -[**ReadDhcpOptionsResponse**](ReadDhcpOptionsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/DhcpOptionsSet.md b/docs/DhcpOptionsSet.md deleted file mode 100644 index 931f3902..00000000 --- a/docs/DhcpOptionsSet.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# DhcpOptionsSet - -Information about the DHCP options set. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_default** | **Boolean** | If true, the DHCP options set is a default one. If false, it is not. | [optional] | -|**dhcpOptionsSetId** | **String** | The ID of the DHCP options set. | [optional] | -|**domainName** | **String** | The domain name. | [optional] | -|**domainNameServers** | **List<String>** | One or more IPs for the domain name servers. | [optional] | -|**logServers** | **List<String>** | One or more IPs for the log servers. | [optional] | -|**ntpServers** | **List<String>** | One or more IPs for the NTP servers. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the DHCP options set. | [optional] | - - - diff --git a/docs/DirectLink.md b/docs/DirectLink.md deleted file mode 100644 index f4c571fd..00000000 --- a/docs/DirectLink.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# DirectLink - -Information about the DirectLink. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the DirectLink. | [optional] | -|**bandwidth** | **String** | The physical link bandwidth (either 1 Gbps or 10 Gbps). | [optional] | -|**directLinkId** | **String** | The ID of the DirectLink (for example, `dxcon-xxxxxxxx`). | [optional] | -|**directLinkName** | **String** | The name of the DirectLink. | [optional] | -|**location** | **String** | The datacenter where the DirectLink is located. | [optional] | -|**regionName** | **String** | The Region in which the DirectLink has been created. | [optional] | -|**state** | **String** | The state of the DirectLink.<br /> * `requested`: The DirectLink is requested but the request has not been validated yet.<br /> * `pending`: The DirectLink request has been validated. It remains in the `pending` state until you establish the physical link.<br /> * `available`: The physical link is established and the connection is ready to use.<br /> * `deleting`: The deletion process is in progress.<br /> * `deleted`: The DirectLink is deleted. | [optional] | - - - diff --git a/docs/DirectLinkApi.md b/docs/DirectLinkApi.md deleted file mode 100644 index bf11e5da..00000000 --- a/docs/DirectLinkApi.md +++ /dev/null @@ -1,218 +0,0 @@ -# DirectLinkApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createDirectLink**](DirectLinkApi.md#createDirectLink) | **POST** /CreateDirectLink | | -| [**deleteDirectLink**](DirectLinkApi.md#deleteDirectLink) | **POST** /DeleteDirectLink | | -| [**readDirectLinks**](DirectLinkApi.md#readDirectLinks) | **POST** /ReadDirectLinks | | - - - -# **createDirectLink** -> CreateDirectLinkResponse createDirectLink(createDirectLinkRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkApi apiInstance = new DirectLinkApi(defaultClient); - CreateDirectLinkRequest createDirectLinkRequest = new CreateDirectLinkRequest(); // CreateDirectLinkRequest | - try { - CreateDirectLinkResponse result = apiInstance.createDirectLink(createDirectLinkRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkApi#createDirectLink"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createDirectLinkRequest** | [**CreateDirectLinkRequest**](CreateDirectLinkRequest.md)| | [optional] | - -### Return type - -[**CreateDirectLinkResponse**](CreateDirectLinkResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteDirectLink** -> DeleteDirectLinkResponse deleteDirectLink(deleteDirectLinkRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkApi apiInstance = new DirectLinkApi(defaultClient); - DeleteDirectLinkRequest deleteDirectLinkRequest = new DeleteDirectLinkRequest(); // DeleteDirectLinkRequest | - try { - DeleteDirectLinkResponse result = apiInstance.deleteDirectLink(deleteDirectLinkRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkApi#deleteDirectLink"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteDirectLinkRequest** | [**DeleteDirectLinkRequest**](DeleteDirectLinkRequest.md)| | [optional] | - -### Return type - -[**DeleteDirectLinkResponse**](DeleteDirectLinkResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readDirectLinks** -> ReadDirectLinksResponse readDirectLinks(readDirectLinksRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkApi apiInstance = new DirectLinkApi(defaultClient); - ReadDirectLinksRequest readDirectLinksRequest = new ReadDirectLinksRequest(); // ReadDirectLinksRequest | - try { - ReadDirectLinksResponse result = apiInstance.readDirectLinks(readDirectLinksRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkApi#readDirectLinks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readDirectLinksRequest** | [**ReadDirectLinksRequest**](ReadDirectLinksRequest.md)| | [optional] | - -### Return type - -[**ReadDirectLinksResponse**](ReadDirectLinksResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/DirectLinkInterface.md b/docs/DirectLinkInterface.md deleted file mode 100644 index caab5c5a..00000000 --- a/docs/DirectLinkInterface.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# DirectLinkInterface - -Information about the DirectLink interface. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpAsn** | **Integer** | The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface. This number must be between `64512` and `65534`. | | -|**bgpKey** | **String** | The BGP authentication key. | [optional] | -|**clientPrivateIp** | **String** | The IP on the customer's side of the DirectLink interface. | [optional] | -|**directLinkInterfaceName** | **String** | The name of the DirectLink interface. | | -|**outscalePrivateIp** | **String** | The IP on the OUTSCALE side of the DirectLink interface. | [optional] | -|**virtualGatewayId** | **String** | The ID of the target virtual gateway. | | -|**vlan** | **Integer** | The VLAN number associated with the DirectLink interface. This number must be unique and be between `2` and `4094`. | | - - - diff --git a/docs/DirectLinkInterfaceApi.md b/docs/DirectLinkInterfaceApi.md deleted file mode 100644 index 4d678b03..00000000 --- a/docs/DirectLinkInterfaceApi.md +++ /dev/null @@ -1,288 +0,0 @@ -# DirectLinkInterfaceApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createDirectLinkInterface**](DirectLinkInterfaceApi.md#createDirectLinkInterface) | **POST** /CreateDirectLinkInterface | | -| [**deleteDirectLinkInterface**](DirectLinkInterfaceApi.md#deleteDirectLinkInterface) | **POST** /DeleteDirectLinkInterface | | -| [**readDirectLinkInterfaces**](DirectLinkInterfaceApi.md#readDirectLinkInterfaces) | **POST** /ReadDirectLinkInterfaces | | -| [**updateDirectLinkInterface**](DirectLinkInterfaceApi.md#updateDirectLinkInterface) | **POST** /UpdateDirectLinkInterface | | - - - -# **createDirectLinkInterface** -> CreateDirectLinkInterfaceResponse createDirectLinkInterface(createDirectLinkInterfaceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkInterfaceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkInterfaceApi apiInstance = new DirectLinkInterfaceApi(defaultClient); - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest = new CreateDirectLinkInterfaceRequest(); // CreateDirectLinkInterfaceRequest | - try { - CreateDirectLinkInterfaceResponse result = apiInstance.createDirectLinkInterface(createDirectLinkInterfaceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkInterfaceApi#createDirectLinkInterface"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createDirectLinkInterfaceRequest** | [**CreateDirectLinkInterfaceRequest**](CreateDirectLinkInterfaceRequest.md)| | [optional] | - -### Return type - -[**CreateDirectLinkInterfaceResponse**](CreateDirectLinkInterfaceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteDirectLinkInterface** -> DeleteDirectLinkInterfaceResponse deleteDirectLinkInterface(deleteDirectLinkInterfaceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkInterfaceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkInterfaceApi apiInstance = new DirectLinkInterfaceApi(defaultClient); - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest = new DeleteDirectLinkInterfaceRequest(); // DeleteDirectLinkInterfaceRequest | - try { - DeleteDirectLinkInterfaceResponse result = apiInstance.deleteDirectLinkInterface(deleteDirectLinkInterfaceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkInterfaceApi#deleteDirectLinkInterface"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteDirectLinkInterfaceRequest** | [**DeleteDirectLinkInterfaceRequest**](DeleteDirectLinkInterfaceRequest.md)| | [optional] | - -### Return type - -[**DeleteDirectLinkInterfaceResponse**](DeleteDirectLinkInterfaceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readDirectLinkInterfaces** -> ReadDirectLinkInterfacesResponse readDirectLinkInterfaces(readDirectLinkInterfacesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkInterfaceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkInterfaceApi apiInstance = new DirectLinkInterfaceApi(defaultClient); - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest = new ReadDirectLinkInterfacesRequest(); // ReadDirectLinkInterfacesRequest | - try { - ReadDirectLinkInterfacesResponse result = apiInstance.readDirectLinkInterfaces(readDirectLinkInterfacesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkInterfaceApi#readDirectLinkInterfaces"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readDirectLinkInterfacesRequest** | [**ReadDirectLinkInterfacesRequest**](ReadDirectLinkInterfacesRequest.md)| | [optional] | - -### Return type - -[**ReadDirectLinkInterfacesResponse**](ReadDirectLinkInterfacesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateDirectLinkInterface** -> UpdateDirectLinkInterfaceResponse updateDirectLinkInterface(updateDirectLinkInterfaceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.DirectLinkInterfaceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - DirectLinkInterfaceApi apiInstance = new DirectLinkInterfaceApi(defaultClient); - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest = new UpdateDirectLinkInterfaceRequest(); // UpdateDirectLinkInterfaceRequest | - try { - UpdateDirectLinkInterfaceResponse result = apiInstance.updateDirectLinkInterface(updateDirectLinkInterfaceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DirectLinkInterfaceApi#updateDirectLinkInterface"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateDirectLinkInterfaceRequest** | [**UpdateDirectLinkInterfaceRequest**](UpdateDirectLinkInterfaceRequest.md)| | [optional] | - -### Return type - -[**UpdateDirectLinkInterfaceResponse**](UpdateDirectLinkInterfaceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/DirectLinkInterfaces.md b/docs/DirectLinkInterfaces.md deleted file mode 100644 index ff6a9edd..00000000 --- a/docs/DirectLinkInterfaces.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# DirectLinkInterfaces - -Information about the DirectLink interfaces. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the DirectLink interface. | [optional] | -|**bgpAsn** | **Integer** | The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface. | [optional] | -|**bgpKey** | **String** | The BGP authentication key. | [optional] | -|**clientPrivateIp** | **String** | The IP on the customer's side of the DirectLink interface. | [optional] | -|**directLinkId** | **String** | The ID of the DirectLink. | [optional] | -|**directLinkInterfaceId** | **String** | The ID of the DirectLink interface. | [optional] | -|**directLinkInterfaceName** | **String** | The name of the DirectLink interface. | [optional] | -|**interfaceType** | **String** | The type of the DirectLink interface (always `private`). | [optional] | -|**location** | **String** | The datacenter where the DirectLink interface is located. | [optional] | -|**mtu** | **Integer** | The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always `1500`). | [optional] | -|**outscalePrivateIp** | **String** | The IP on the OUTSCALE side of the DirectLink interface. | [optional] | -|**state** | **String** | The state of the DirectLink interface (`pending` \\| `available` \\| `deleting` \\| `deleted` \\| `confirming` \\| `rejected` \\| `expired`). | [optional] | -|**virtualGatewayId** | **String** | The ID of the target virtual gateway. | [optional] | -|**vlan** | **Integer** | The VLAN number associated with the DirectLink interface. | [optional] | - - - diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md deleted file mode 100644 index 4c3e1239..00000000 --- a/docs/ErrorResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ErrorResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**errors** | [**List<Errors>**](Errors.md) | One or more errors. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/Errors.md b/docs/Errors.md deleted file mode 100644 index e5fb3f0f..00000000 --- a/docs/Errors.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Errors - -Information about the errors. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | The code of the error (for example, `4078`). You can search for this returned code in the [errors page](api-errors.html) to find more details about the error. | [optional] | -|**details** | **String** | A description providing more details about the error. | [optional] | -|**type** | **String** | The type of the error (for example, `InvalidParameterValue`). | [optional] | - - - diff --git a/docs/FiltersAccessKeys.md b/docs/FiltersAccessKeys.md deleted file mode 100644 index 00cca568..00000000 --- a/docs/FiltersAccessKeys.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FiltersAccessKeys - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyIds** | **List<String>** | The IDs of the access keys. | [optional] | -|**states** | **List<String>** | The states of the access keys (`ACTIVE` \\| `INACTIVE`). | [optional] | - - - diff --git a/docs/FiltersApiAccessRule.md b/docs/FiltersApiAccessRule.md deleted file mode 100644 index 705ec11b..00000000 --- a/docs/FiltersApiAccessRule.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# FiltersApiAccessRule - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRuleIds** | **List<String>** | One or more IDs of API access rules. | [optional] | -|**caIds** | **List<String>** | One or more IDs of Client Certificate Authorities (CAs). | [optional] | -|**cns** | **List<String>** | One or more Client Certificate Common Names (CNs). | [optional] | -|**descriptions** | **List<String>** | One or more descriptions of API access rules. | [optional] | -|**ipRanges** | **List<String>** | One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). | [optional] | - - - diff --git a/docs/FiltersApiLog.md b/docs/FiltersApiLog.md deleted file mode 100644 index 27b66ff5..00000000 --- a/docs/FiltersApiLog.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# FiltersApiLog - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**queryAccessKeys** | **List<String>** | The access keys used for the logged calls. | [optional] | -|**queryApiNames** | **List<String>** | The names of the APIs of the logged calls (always `oapi` for the OUTSCALE API). | [optional] | -|**queryCallNames** | **List<String>** | The names of the logged calls. | [optional] | -|**queryDateAfter** | **OffsetDateTime** | The date and time, or the date, after which you want to retrieve logged calls, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). By default, this date is set to 48 hours before the `QueryDateBefore` parameter value. | [optional] | -|**queryDateBefore** | **OffsetDateTime** | The date and time, or the date, before which you want to retrieve logged calls, in ISO 8601 format (for example, `2020-06-30T00:00:00.000Z` or `2020-06-14`). By default, this date is set to now, or 48 hours after the `QueryDateAfter` parameter value. | [optional] | -|**queryIpAddresses** | **List<String>** | The IPs used for the logged calls. | [optional] | -|**queryUserAgents** | **List<String>** | The user agents of the HTTP requests of the logged calls. | [optional] | -|**requestIds** | **List<String>** | The request IDs provided in the responses of the logged calls. | [optional] | -|**responseStatusCodes** | **List<Integer>** | The HTTP status codes of the logged calls. | [optional] | - - - diff --git a/docs/FiltersCa.md b/docs/FiltersCa.md deleted file mode 100644 index 447eb588..00000000 --- a/docs/FiltersCa.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FiltersCa - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caFingerprints** | **List<String>** | The fingerprints of the CAs. | [optional] | -|**caIds** | **List<String>** | The IDs of the CAs. | [optional] | -|**descriptions** | **List<String>** | The descriptions of the CAs. | [optional] | - - - diff --git a/docs/FiltersCatalogs.md b/docs/FiltersCatalogs.md deleted file mode 100644 index 12b4b21d..00000000 --- a/docs/FiltersCatalogs.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FiltersCatalogs - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**currentCatalogOnly** | **Boolean** | By default or if set to true, only returns the current catalog. If false, returns the current catalog and past catalogs. | [optional] | -|**fromDate** | **LocalDate** | The beginning of the time period, in ISO 8601 date format (for example, `2020-06-14`). This date cannot be older than 3 years. You must specify the parameters `FromDate` and `ToDate` together. | [optional] | -|**toDate** | **LocalDate** | The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). You must specify the parameters `FromDate` and `ToDate` together. | [optional] | - - - diff --git a/docs/FiltersClientGateway.md b/docs/FiltersClientGateway.md deleted file mode 100644 index 44ec6ce0..00000000 --- a/docs/FiltersClientGateway.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# FiltersClientGateway - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpAsns** | **List<Integer>** | The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections. | [optional] | -|**clientGatewayIds** | **List<String>** | The IDs of the client gateways. | [optional] | -|**connectionTypes** | **List<String>** | The types of communication tunnels used by the client gateways (always `ipsec.1`). | [optional] | -|**publicIps** | **List<String>** | The public IPv4 addresses of the client gateways. | [optional] | -|**states** | **List<String>** | The states of the client gateways (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the client gateways. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the client gateways. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the client gateways, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersDhcpOptions.md b/docs/FiltersDhcpOptions.md deleted file mode 100644 index 97497092..00000000 --- a/docs/FiltersDhcpOptions.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# FiltersDhcpOptions - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_default** | **Boolean** | If true, lists all default DHCP options set. If false, lists all non-default DHCP options set. | [optional] | -|**dhcpOptionsSetIds** | **List<String>** | The IDs of the DHCP options sets. | [optional] | -|**domainNameServers** | **List<String>** | The IPs of the domain name servers used for the DHCP options sets. | [optional] | -|**domainNames** | **List<String>** | The domain names used for the DHCP options sets. | [optional] | -|**logServers** | **List<String>** | The IPs of the log servers used for the DHCP options sets. | [optional] | -|**ntpServers** | **List<String>** | The IPs of the Network Time Protocol (NTP) servers used for the DHCP options sets. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the DHCP options sets. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the DHCP options sets. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the DHCP options sets, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersDirectLink.md b/docs/FiltersDirectLink.md deleted file mode 100644 index 555e7fb3..00000000 --- a/docs/FiltersDirectLink.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersDirectLink - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkIds** | **List<String>** | The IDs of the DirectLinks. | [optional] | - - - diff --git a/docs/FiltersDirectLinkInterface.md b/docs/FiltersDirectLinkInterface.md deleted file mode 100644 index 5c680a53..00000000 --- a/docs/FiltersDirectLinkInterface.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FiltersDirectLinkInterface - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkIds** | **List<String>** | The IDs of the DirectLinks. | [optional] | -|**directLinkInterfaceIds** | **List<String>** | The IDs of the DirectLink interfaces. | [optional] | - - - diff --git a/docs/FiltersExportTask.md b/docs/FiltersExportTask.md deleted file mode 100644 index a3b50f81..00000000 --- a/docs/FiltersExportTask.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersExportTask - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**taskIds** | **List<String>** | The IDs of the export tasks. | [optional] | - - - diff --git a/docs/FiltersFlexibleGpu.md b/docs/FiltersFlexibleGpu.md deleted file mode 100644 index 677bb2cf..00000000 --- a/docs/FiltersFlexibleGpu.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# FiltersFlexibleGpu - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | Indicates whether the fGPU is deleted when terminating the VM. | [optional] | -|**flexibleGpuIds** | **List<String>** | One or more IDs of fGPUs. | [optional] | -|**generations** | **List<String>** | The processor generations that the fGPUs are compatible with. | [optional] | -|**modelNames** | **List<String>** | One or more models of fGPUs. For more information, see [About Flexible GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). | [optional] | -|**states** | **List<String>** | The states of the fGPUs (`allocated` \\| `attaching` \\| `attached` \\| `detaching`). | [optional] | -|**subregionNames** | **List<String>** | The Subregions where the fGPUs are located. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | [optional] | - - - diff --git a/docs/FiltersImage.md b/docs/FiltersImage.md deleted file mode 100644 index 2e7ddac8..00000000 --- a/docs/FiltersImage.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# FiltersImage - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountAliases** | **List<String>** | The account aliases of the owners of the OMIs. | [optional] | -|**accountIds** | **List<String>** | The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch permissions are described. | [optional] | -|**architectures** | **List<String>** | The architectures of the OMIs (`i386` \\| `x86_64`). | [optional] | -|**blockDeviceMappingDeleteOnVmDeletion** | **Boolean** | Whether the volumes are deleted or not when terminating the VM. | [optional] | -|**blockDeviceMappingDeviceNames** | **List<String>** | The device names for the volumes. | [optional] | -|**blockDeviceMappingSnapshotIds** | **List<String>** | The IDs of the snapshots used to create the volumes. | [optional] | -|**blockDeviceMappingVolumeSizes** | **List<Integer>** | The sizes of the volumes, in gibibytes (GiB). | [optional] | -|**blockDeviceMappingVolumeTypes** | **List<String>** | The types of volumes (`standard` \\| `gp2` \\| `io1`). | [optional] | -|**descriptions** | **List<String>** | The descriptions of the OMIs, provided when they were created. | [optional] | -|**fileLocations** | **List<String>** | The locations of the buckets where the OMI files are stored. | [optional] | -|**hypervisors** | **List<String>** | The hypervisor type of the OMI (always `xen`). | [optional] | -|**imageIds** | **List<String>** | The IDs of the OMIs. | [optional] | -|**imageNames** | **List<String>** | The names of the OMIs, provided when they were created. | [optional] | -|**permissionsToLaunchAccountIds** | **List<String>** | The account IDs which have launch permissions for the OMIs. | [optional] | -|**permissionsToLaunchGlobalPermission** | **Boolean** | If true, lists all public OMIs. If false, lists all private OMIs. | [optional] | -|**productCodeNames** | **List<String>** | The names of the product codes associated with the OMI. | [optional] | -|**productCodes** | **List<String>** | The product codes associated with the OMI. | [optional] | -|**rootDeviceNames** | **List<String>** | The name of the root device. This value must be /dev/sda1. | [optional] | -|**rootDeviceTypes** | **List<String>** | The types of root device used by the OMIs (`bsu` or `ebs`). | [optional] | -|**states** | **List<String>** | The states of the OMIs (`pending` \\| `available` \\| `failed`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the OMIs. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the OMIs. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the OMIs, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**virtualizationTypes** | **List<String>** | The virtualization types (always `hvm`). | [optional] | - - - diff --git a/docs/FiltersInternetService.md b/docs/FiltersInternetService.md deleted file mode 100644 index 18e0f301..00000000 --- a/docs/FiltersInternetService.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# FiltersInternetService - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**internetServiceIds** | **List<String>** | The IDs of the Internet services. | [optional] | -|**linkNetIds** | **List<String>** | The IDs of the Nets the Internet services are attached to. | [optional] | -|**linkStates** | **List<String>** | The current states of the attachments between the Internet services and the Nets (only `available`, if the Internet gateway is attached to a Net). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the Internet services. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the Internet services. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the Internet services, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersKeypair.md b/docs/FiltersKeypair.md deleted file mode 100644 index 961dc28d..00000000 --- a/docs/FiltersKeypair.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FiltersKeypair - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keypairFingerprints** | **List<String>** | The fingerprints of the keypairs. | [optional] | -|**keypairNames** | **List<String>** | The names of the keypairs. | [optional] | -|**keypairTypes** | **List<String>** | The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`). | [optional] | - - - diff --git a/docs/FiltersListenerRule.md b/docs/FiltersListenerRule.md deleted file mode 100644 index 9f7232d8..00000000 --- a/docs/FiltersListenerRule.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersListenerRule - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**listenerRuleNames** | **List<String>** | The names of the listener rules. | [optional] | - - - diff --git a/docs/FiltersLoadBalancer.md b/docs/FiltersLoadBalancer.md deleted file mode 100644 index 125d0fb8..00000000 --- a/docs/FiltersLoadBalancer.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersLoadBalancer - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancerNames** | **List<String>** | The names of the load balancers. | [optional] | - - - diff --git a/docs/FiltersNatService.md b/docs/FiltersNatService.md deleted file mode 100644 index 12ac0d77..00000000 --- a/docs/FiltersNatService.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# FiltersNatService - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientTokens** | **List<String>** | The idempotency tokens provided when creating the NAT services. | [optional] | -|**natServiceIds** | **List<String>** | The IDs of the NAT services. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets in which the NAT services are. | [optional] | -|**states** | **List<String>** | The states of the NAT services (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**subnetIds** | **List<String>** | The IDs of the Subnets in which the NAT services are. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the NAT services. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the NAT services. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the NAT services, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersNet.md b/docs/FiltersNet.md deleted file mode 100644 index 2e216b60..00000000 --- a/docs/FiltersNet.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# FiltersNet - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSetIds** | **List<String>** | The IDs of the DHCP options sets. | [optional] | -|**ipRanges** | **List<String>** | The IP ranges for the Nets, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**isDefault** | **Boolean** | If true, the Net used is the default one. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets. | [optional] | -|**states** | **List<String>** | The states of the Nets (`pending` \\| `available` \\| `deleting`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the Nets. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the Nets. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the Nets, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersNetAccessPoint.md b/docs/FiltersNetAccessPoint.md deleted file mode 100644 index 0075d805..00000000 --- a/docs/FiltersNetAccessPoint.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# FiltersNetAccessPoint - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netAccessPointIds** | **List<String>** | The IDs of the Net access points. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets. | [optional] | -|**serviceNames** | **List<String>** | The names of the services. For more information, see [ReadNetAccessPointServices](#readnetaccesspointservices). | [optional] | -|**states** | **List<String>** | The states of the Net access points (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the Net access points. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the Net access points. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the Net access points, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersNetPeering.md b/docs/FiltersNetPeering.md deleted file mode 100644 index 21235462..00000000 --- a/docs/FiltersNetPeering.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# FiltersNetPeering - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accepterNetAccountIds** | **List<String>** | The account IDs of the owners of the peer Nets. | [optional] | -|**accepterNetIpRanges** | **List<String>** | The IP ranges of the peer Nets, in CIDR notation (for example, `10.0.0.0/24`). | [optional] | -|**accepterNetNetIds** | **List<String>** | The IDs of the peer Nets. | [optional] | -|**expirationDates** | **List<OffsetDateTime>** | The dates and times at which the Net peerings expire, in ISO 8601 date-time format (for example, `2020-06-14T00:00:00.000Z`). | [optional] | -|**netPeeringIds** | **List<String>** | The IDs of the Net peerings. | [optional] | -|**sourceNetAccountIds** | **List<String>** | The account IDs of the owners of the peer Nets. | [optional] | -|**sourceNetIpRanges** | **List<String>** | The IP ranges of the peer Nets. | [optional] | -|**sourceNetNetIds** | **List<String>** | The IDs of the peer Nets. | [optional] | -|**stateMessages** | **List<String>** | Additional information about the states of the Net peerings. | [optional] | -|**stateNames** | **List<String>** | The states of the Net peerings (`pending-acceptance` \\| `active` \\| `rejected` \\| `failed` \\| `expired` \\| `deleted`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the Net peerings. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the Net peerings. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the Net peerings, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersNic.md b/docs/FiltersNic.md deleted file mode 100644 index 39067d86..00000000 --- a/docs/FiltersNic.md +++ /dev/null @@ -1,42 +0,0 @@ - - -# FiltersNic - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**descriptions** | **List<String>** | The descriptions of the NICs. | [optional] | -|**isSourceDestCheck** | **Boolean** | Whether the source/destination checking is enabled (true) or disabled (false). | [optional] | -|**linkNicDeleteOnVmDeletion** | **Boolean** | Whether the NICs are deleted when the VMs they are attached to are terminated. | [optional] | -|**linkNicDeviceNumbers** | **List<Integer>** | The device numbers the NICs are attached to. | [optional] | -|**linkNicLinkNicIds** | **List<String>** | The attachment IDs of the NICs. | [optional] | -|**linkNicStates** | **List<String>** | The states of the attachments. | [optional] | -|**linkNicVmAccountIds** | **List<String>** | The account IDs of the owners of the VMs the NICs are attached to. | [optional] | -|**linkNicVmIds** | **List<String>** | The IDs of the VMs the NICs are attached to. | [optional] | -|**linkPublicIpAccountIds** | **List<String>** | The account IDs of the owners of the public IPs associated with the NICs. | [optional] | -|**linkPublicIpLinkPublicIpIds** | **List<String>** | The association IDs returned when the public IPs were associated with the NICs. | [optional] | -|**linkPublicIpPublicDnsNames** | **List<String>** | The public DNS names associated with the public IPs. | [optional] | -|**linkPublicIpPublicIpIds** | **List<String>** | The allocation IDs returned when the public IPs were allocated to their accounts. | [optional] | -|**linkPublicIpPublicIps** | **List<String>** | The public IPs associated with the NICs. | [optional] | -|**macAddresses** | **List<String>** | The Media Access Control (MAC) addresses of the NICs. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets where the NICs are located. | [optional] | -|**nicIds** | **List<String>** | The IDs of the NICs. | [optional] | -|**privateDnsNames** | **List<String>** | The private DNS names associated with the primary private IPs. | [optional] | -|**privateIpsLinkPublicIpAccountIds** | **List<String>** | The account IDs of the owner of the public IPs associated with the private IPs. | [optional] | -|**privateIpsLinkPublicIpPublicIps** | **List<String>** | The public IPs associated with the private IPs. | [optional] | -|**privateIpsPrimaryIp** | **Boolean** | Whether the private IP is the primary IP associated with the NIC. | [optional] | -|**privateIpsPrivateIps** | **List<String>** | The private IPs of the NICs. | [optional] | -|**securityGroupIds** | **List<String>** | The IDs of the security groups associated with the NICs. | [optional] | -|**securityGroupNames** | **List<String>** | The names of the security groups associated with the NICs. | [optional] | -|**states** | **List<String>** | The states of the NICs. | [optional] | -|**subnetIds** | **List<String>** | The IDs of the Subnets for the NICs. | [optional] | -|**subregionNames** | **List<String>** | The Subregions where the NICs are located. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the NICs. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the NICs. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the NICs, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersProductType.md b/docs/FiltersProductType.md deleted file mode 100644 index f174e056..00000000 --- a/docs/FiltersProductType.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersProductType - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**productTypeIds** | **List<String>** | The IDs of the product types. | [optional] | - - - diff --git a/docs/FiltersPublicIp.md b/docs/FiltersPublicIp.md deleted file mode 100644 index 4af29836..00000000 --- a/docs/FiltersPublicIp.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# FiltersPublicIp - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkPublicIpIds** | **List<String>** | The IDs representing the associations of public IPs with VMs or NICs. | [optional] | -|**nicAccountIds** | **List<String>** | The account IDs of the owners of the NICs. | [optional] | -|**nicIds** | **List<String>** | The IDs of the NICs. | [optional] | -|**placements** | **List<String>** | Whether the public IPs are for use in the public Cloud or in a Net. | [optional] | -|**privateIps** | **List<String>** | The private IPs associated with the public IPs. | [optional] | -|**publicIpIds** | **List<String>** | The IDs of the public IPs. | [optional] | -|**publicIps** | **List<String>** | The public IPs. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the public IPs. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the public IPs. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the public IPs, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**vmIds** | **List<String>** | The IDs of the VMs. | [optional] | - - - diff --git a/docs/FiltersQuota.md b/docs/FiltersQuota.md deleted file mode 100644 index f25c8bb1..00000000 --- a/docs/FiltersQuota.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# FiltersQuota - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**collections** | **List<String>** | The group names of the quotas. | [optional] | -|**quotaNames** | **List<String>** | The names of the quotas. | [optional] | -|**quotaTypes** | **List<String>** | The resource IDs if these are resource-specific quotas, `global` if they are not. | [optional] | -|**shortDescriptions** | **List<String>** | The description of the quotas. | [optional] | - - - diff --git a/docs/FiltersRouteTable.md b/docs/FiltersRouteTable.md deleted file mode 100644 index 300e9684..00000000 --- a/docs/FiltersRouteTable.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# FiltersRouteTable - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkRouteTableIds** | **List<String>** | The IDs of the route tables involved in the associations. | [optional] | -|**linkRouteTableLinkRouteTableIds** | **List<String>** | The IDs of the associations between the route tables and the Subnets. | [optional] | -|**linkRouteTableMain** | **Boolean** | If true, the route tables are the main ones for their Nets. | [optional] | -|**linkSubnetIds** | **List<String>** | The IDs of the Subnets involved in the associations. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets for the route tables. | [optional] | -|**routeCreationMethods** | **List<String>** | The methods used to create a route. | [optional] | -|**routeDestinationIpRanges** | **List<String>** | The IP ranges specified in routes in the tables. | [optional] | -|**routeDestinationServiceIds** | **List<String>** | The service IDs specified in routes in the tables. | [optional] | -|**routeGatewayIds** | **List<String>** | The IDs of the gateways specified in routes in the tables. | [optional] | -|**routeNatServiceIds** | **List<String>** | The IDs of the NAT services specified in routes in the tables. | [optional] | -|**routeNetPeeringIds** | **List<String>** | The IDs of the Net peerings specified in routes in the tables. | [optional] | -|**routeStates** | **List<String>** | The states of routes in the route tables (always `active`). | [optional] | -|**routeTableIds** | **List<String>** | The IDs of the route tables. | [optional] | -|**routeVmIds** | **List<String>** | The IDs of the VMs specified in routes in the tables. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the route tables. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the route tables. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the route tables, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersSecurityGroup.md b/docs/FiltersSecurityGroup.md deleted file mode 100644 index 34d1dd7f..00000000 --- a/docs/FiltersSecurityGroup.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# FiltersSecurityGroup - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**descriptions** | **List<String>** | The descriptions of the security groups. | [optional] | -|**inboundRuleAccountIds** | **List<String>** | The account IDs that have been granted permissions. | [optional] | -|**inboundRuleFromPortRanges** | **List<Integer>** | The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers. | [optional] | -|**inboundRuleIpRanges** | **List<String>** | The IP ranges that have been granted permissions, in CIDR notation (for example, `10.0.0.0/24`). | [optional] | -|**inboundRuleProtocols** | **List<String>** | The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a protocol number, or `-1` for all protocols). | [optional] | -|**inboundRuleSecurityGroupIds** | **List<String>** | The IDs of the security groups that have been granted permissions. | [optional] | -|**inboundRuleSecurityGroupNames** | **List<String>** | The names of the security groups that have been granted permissions. | [optional] | -|**inboundRuleToPortRanges** | **List<Integer>** | The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers. | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets specified when the security groups were created. | [optional] | -|**outboundRuleAccountIds** | **List<String>** | The account IDs that have been granted permissions. | [optional] | -|**outboundRuleFromPortRanges** | **List<Integer>** | The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers. | [optional] | -|**outboundRuleIpRanges** | **List<String>** | The IP ranges that have been granted permissions, in CIDR notation (for example, `10.0.0.0/24`). | [optional] | -|**outboundRuleProtocols** | **List<String>** | The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a protocol number, or `-1` for all protocols). | [optional] | -|**outboundRuleSecurityGroupIds** | **List<String>** | The IDs of the security groups that have been granted permissions. | [optional] | -|**outboundRuleSecurityGroupNames** | **List<String>** | The names of the security groups that have been granted permissions. | [optional] | -|**outboundRuleToPortRanges** | **List<Integer>** | The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers. | [optional] | -|**securityGroupIds** | **List<String>** | The IDs of the security groups. | [optional] | -|**securityGroupNames** | **List<String>** | The names of the security groups. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the security groups. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the security groups. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the security groups, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersServerCertificate.md b/docs/FiltersServerCertificate.md deleted file mode 100644 index 00f03aef..00000000 --- a/docs/FiltersServerCertificate.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FiltersServerCertificate - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**paths** | **List<String>** | The paths to the server certificates. | [optional] | - - - diff --git a/docs/FiltersService.md b/docs/FiltersService.md deleted file mode 100644 index 8e5201a6..00000000 --- a/docs/FiltersService.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FiltersService - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**serviceIds** | **List<String>** | The IDs of the services. | [optional] | -|**serviceNames** | **List<String>** | The names of the services. | [optional] | - - - diff --git a/docs/FiltersSnapshot.md b/docs/FiltersSnapshot.md deleted file mode 100644 index 43e4d92e..00000000 --- a/docs/FiltersSnapshot.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# FiltersSnapshot - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountAliases** | **List<String>** | The account aliases of the owners of the snapshots. | [optional] | -|**accountIds** | **List<String>** | The account IDs of the owners of the snapshots. | [optional] | -|**descriptions** | **List<String>** | The descriptions of the snapshots. | [optional] | -|**fromCreationDate** | **OffsetDateTime** | The beginning of the time period, in ISO 8601 date-time format (for example, `2020-06-14T00:00:00.000Z`). | [optional] | -|**permissionsToCreateVolumeAccountIds** | **List<String>** | The account IDs which have permissions to create volumes. | [optional] | -|**permissionsToCreateVolumeGlobalPermission** | **Boolean** | If true, lists all public volumes. If false, lists all private volumes. | [optional] | -|**progresses** | **List<Integer>** | The progresses of the snapshots, as a percentage. | [optional] | -|**snapshotIds** | **List<String>** | The IDs of the snapshots. | [optional] | -|**states** | **List<String>** | The states of the snapshots (`in-queue` \\| `pending` \\| `completed` \\| `error` \\| `deleting`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the snapshots. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the snapshots. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the snapshots, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**toCreationDate** | **OffsetDateTime** | The end of the time period, in ISO 8601 date-time format (for example, `2020-06-30T00:00:00.000Z`). | [optional] | -|**volumeIds** | **List<String>** | The IDs of the volumes used to create the snapshots. | [optional] | -|**volumeSizes** | **List<Integer>** | The sizes of the volumes used to create the snapshots, in gibibytes (GiB). | [optional] | - - - diff --git a/docs/FiltersSubnet.md b/docs/FiltersSubnet.md deleted file mode 100644 index c0767991..00000000 --- a/docs/FiltersSubnet.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# FiltersSubnet - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**availableIpsCounts** | **List<Integer>** | The number of available IPs. | [optional] | -|**ipRanges** | **List<String>** | The IP ranges in the Subnets, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets in which the Subnets are. | [optional] | -|**states** | **List<String>** | The states of the Subnets (`pending` \\| `available` \\| `deleted`). | [optional] | -|**subnetIds** | **List<String>** | The IDs of the Subnets. | [optional] | -|**subregionNames** | **List<String>** | The names of the Subregions in which the Subnets are located. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the Subnets. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the Subnets. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the Subnets, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | - - - diff --git a/docs/FiltersSubregion.md b/docs/FiltersSubregion.md deleted file mode 100644 index 95608d9a..00000000 --- a/docs/FiltersSubregion.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FiltersSubregion - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**regionNames** | **List<String>** | The names of the Regions containing the Subregions. | [optional] | -|**states** | **List<String>** | The states of the Subregions. | [optional] | -|**subregionNames** | **List<String>** | The names of the Subregions. | [optional] | - - - diff --git a/docs/FiltersTag.md b/docs/FiltersTag.md deleted file mode 100644 index 02c599fd..00000000 --- a/docs/FiltersTag.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# FiltersTag - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keys** | **List<String>** | The keys of the tags that are assigned to the resources. You can use this filter alongside the `Values` filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter. | [optional] | -|**resourceIds** | **List<String>** | The IDs of the resources with which the tags are associated. | [optional] | -|**resourceTypes** | **List<String>** | The resource type (`vm` \\| `image` \\| `volume` \\| `snapshot` \\| `public-ip` \\| `security-group` \\| `route-table` \\| `nic` \\| `net` \\| `subnet` \\| `net-peering` \\| `net-access-point` \\| `nat-service` \\| `internet-service` \\| `client-gateway` \\| `virtual-gateway` \\| `vpn-connection` \\| `dhcp-options` \\| `task`). | [optional] | -|**values** | **List<String>** | The values of the tags that are assigned to the resources. You can use this filter alongside the `TagKeys` filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter. | [optional] | - - - diff --git a/docs/FiltersVirtualGateway.md b/docs/FiltersVirtualGateway.md deleted file mode 100644 index 94ded49c..00000000 --- a/docs/FiltersVirtualGateway.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# FiltersVirtualGateway - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**connectionTypes** | **List<String>** | The types of the virtual gateways (always `ipsec.1`). | [optional] | -|**linkNetIds** | **List<String>** | The IDs of the Nets the virtual gateways are attached to. | [optional] | -|**linkStates** | **List<String>** | The current states of the attachments between the virtual gateways and the Nets (`attaching` \\| `attached` \\| `detaching` \\| `detached`). | [optional] | -|**states** | **List<String>** | The states of the virtual gateways (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the virtual gateways. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the virtual gateways. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the virtual gateways, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**virtualGatewayIds** | **List<String>** | The IDs of the virtual gateways. | [optional] | - - - diff --git a/docs/FiltersVm.md b/docs/FiltersVm.md deleted file mode 100644 index a2b26dcf..00000000 --- a/docs/FiltersVm.md +++ /dev/null @@ -1,77 +0,0 @@ - - -# FiltersVm - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**architectures** | **List<String>** | The architectures of the VMs (`i386` \\| `x86_64`). | [optional] | -|**blockDeviceMappingDeleteOnVmDeletion** | **Boolean** | Whether the BSU volumes are deleted when terminating the VMs. | [optional] | -|**blockDeviceMappingDeviceNames** | **List<String>** | The device names for the BSU volumes (in the format `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). | [optional] | -|**blockDeviceMappingLinkDates** | **List<LocalDate>** | The link dates for the BSU volumes mapped to the VMs (for example, `2016-01-23T18:45:30.000Z`). | [optional] | -|**blockDeviceMappingStates** | **List<String>** | The states for the BSU volumes (`attaching` \\| `attached` \\| `detaching` \\| `detached`). | [optional] | -|**blockDeviceMappingVolumeIds** | **List<String>** | The volume IDs of the BSU volumes. | [optional] | -|**clientTokens** | **List<String>** | The idempotency tokens provided when launching the VMs. | [optional] | -|**creationDates** | **List<LocalDate>** | The dates when the VMs were launched. | [optional] | -|**imageIds** | **List<String>** | The IDs of the OMIs used to launch the VMs. | [optional] | -|**isSourceDestChecked** | **Boolean** | Whether the source/destination checking is enabled (true) or disabled (false). | [optional] | -|**keypairNames** | **List<String>** | The names of the keypairs used when launching the VMs. | [optional] | -|**launchNumbers** | **List<Integer>** | The numbers for the VMs when launching a group of several VMs (for example, `0`, `1`, `2`, and so on). | [optional] | -|**lifecycles** | **List<String>** | Whether the VMs are Spot Instances (spot). | [optional] | -|**netIds** | **List<String>** | The IDs of the Nets in which the VMs are running. | [optional] | -|**nicAccountIds** | **List<String>** | The IDs of the NICs. | [optional] | -|**nicDescriptions** | **List<String>** | The descriptions of the NICs. | [optional] | -|**nicIsSourceDestChecked** | **Boolean** | Whether the source/destination checking is enabled (true) or disabled (false). | [optional] | -|**nicLinkNicDeleteOnVmDeletion** | **Boolean** | Whether the NICs are deleted when the VMs they are attached to are deleted. | [optional] | -|**nicLinkNicDeviceNumbers** | **List<Integer>** | The device numbers the NICs are attached to. | [optional] | -|**nicLinkNicLinkNicDates** | **List<LocalDate>** | The dates and times (UTC) when the NICs were attached to the VMs. | [optional] | -|**nicLinkNicLinkNicIds** | **List<String>** | The IDs of the NIC attachments. | [optional] | -|**nicLinkNicStates** | **List<String>** | The states of the attachments. | [optional] | -|**nicLinkNicVmAccountIds** | **List<String>** | The account IDs of the owners of the VMs the NICs are attached to. | [optional] | -|**nicLinkNicVmIds** | **List<String>** | The IDs of the VMs the NICs are attached to. | [optional] | -|**nicLinkPublicIpAccountIds** | **List<String>** | The account IDs of the owners of the public IPs associated with the NICs. | [optional] | -|**nicLinkPublicIpLinkPublicIpIds** | **List<String>** | The association IDs returned when the public IPs were associated with the NICs. | [optional] | -|**nicLinkPublicIpPublicIpIds** | **List<String>** | The allocation IDs returned when the public IPs were allocated to their accounts. | [optional] | -|**nicLinkPublicIpPublicIps** | **List<String>** | The public IPs associated with the NICs. | [optional] | -|**nicMacAddresses** | **List<String>** | The Media Access Control (MAC) addresses of the NICs. | [optional] | -|**nicNetIds** | **List<String>** | The IDs of the Nets where the NICs are located. | [optional] | -|**nicNicIds** | **List<String>** | The IDs of the NICs. | [optional] | -|**nicPrivateIpsLinkPublicIpAccountIds** | **List<String>** | The account IDs of the owner of the public IPs associated with the private IPs. | [optional] | -|**nicPrivateIpsLinkPublicIpIds** | **List<String>** | The public IPs associated with the private IPs. | [optional] | -|**nicPrivateIpsPrimaryIp** | **Boolean** | Whether the private IPs are the primary IPs associated with the NICs. | [optional] | -|**nicPrivateIpsPrivateIps** | **List<String>** | The private IPs of the NICs. | [optional] | -|**nicSecurityGroupIds** | **List<String>** | The IDs of the security groups associated with the NICs. | [optional] | -|**nicSecurityGroupNames** | **List<String>** | The names of the security groups associated with the NICs. | [optional] | -|**nicStates** | **List<String>** | The states of the NICs (`available` \\| `in-use`). | [optional] | -|**nicSubnetIds** | **List<String>** | The IDs of the Subnets for the NICs. | [optional] | -|**nicSubregionNames** | **List<String>** | The Subregions where the NICs are located. | [optional] | -|**platforms** | **List<String>** | The platforms. Use windows if you have Windows VMs. Otherwise, leave this filter blank. | [optional] | -|**privateIps** | **List<String>** | The private IPs of the VMs. | [optional] | -|**productCodes** | **List<String>** | The product codes associated with the OMI used to create the VMs. | [optional] | -|**publicIps** | **List<String>** | The public IPs of the VMs. | [optional] | -|**reservationIds** | **List<String>** | The IDs of the reservation of the VMs, created every time you launch VMs. These reservation IDs can be associated with several VMs when you lauch a group of VMs using the same launch request. | [optional] | -|**rootDeviceNames** | **List<String>** | The names of the root devices for the VMs (for example, `/dev/sda1`) | [optional] | -|**rootDeviceTypes** | **List<String>** | The root devices types used by the VMs (always `ebs`) | [optional] | -|**securityGroupIds** | **List<String>** | The IDs of the security groups for the VMs (only in the public Cloud). | [optional] | -|**securityGroupNames** | **List<String>** | The names of the security groups for the VMs (only in the public Cloud). | [optional] | -|**stateReasonCodes** | **List<Integer>** | The reason codes for the state changes. | [optional] | -|**stateReasonMessages** | **List<String>** | The messages describing the state changes. | [optional] | -|**stateReasons** | **List<String>** | The reasons explaining the current states of the VMs. This filter is like the `StateReasonCodes` one. | [optional] | -|**subnetIds** | **List<String>** | The IDs of the Subnets for the VMs. | [optional] | -|**subregionNames** | **List<String>** | The names of the Subregions of the VMs. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the VMs. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the VMs. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the VMs, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**tenancies** | **List<String>** | The tenancies of the VMs (`dedicated` \\| `default` \\| `host`). | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | [optional] | -|**vmSecurityGroupIds** | **List<String>** | The IDs of the security groups for the VMs. | [optional] | -|**vmSecurityGroupNames** | **List<String>** | The names of the security group for the VMs. | [optional] | -|**vmStateCodes** | **List<Integer>** | The state codes of the VMs: `-1` (quarantine), `0` (pending), `16` (running), `32` (shutting-down), `48` (terminated), `64` (stopping), and `80` (stopped). | [optional] | -|**vmStateNames** | **List<String>** | The state names of the VMs (`pending` \\| `running` \\| `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). | [optional] | -|**vmTypes** | **List<String>** | The VM types (for example, t2.micro). For more information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). | [optional] | - - - diff --git a/docs/FiltersVmGroup.md b/docs/FiltersVmGroup.md deleted file mode 100644 index 966b6c23..00000000 --- a/docs/FiltersVmGroup.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# FiltersVmGroup - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**descriptions** | **List<String>** | The descriptions of the VM groups. | [optional] | -|**securityGroupIds** | **List<String>** | The IDs of the security groups. | [optional] | -|**subnetIds** | **List<String>** | The IDs of the Subnets. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the VM groups. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the VM groups. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the VMs, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**vmCounts** | **List<Integer>** | The number of VMs in the VM group. | [optional] | -|**vmGroupIds** | **List<String>** | The IDs of the VM groups. | [optional] | -|**vmGroupNames** | **List<String>** | The names of the VM groups. | [optional] | -|**vmTemplateIds** | **List<String>** | The IDs of the VM templates. | [optional] | - - - diff --git a/docs/FiltersVmTemplate.md b/docs/FiltersVmTemplate.md deleted file mode 100644 index ea8fe604..00000000 --- a/docs/FiltersVmTemplate.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# FiltersVmTemplate - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cpuCores** | **List<Integer>** | The number of vCores. | [optional] | -|**cpuGenerations** | **List<String>** | The processor generations (for example, `v4`). | [optional] | -|**cpuPerformances** | **List<String>** | The performances of the VMs. | [optional] | -|**descriptions** | **List<String>** | The descriptions of the VM templates. | [optional] | -|**imageIds** | **List<String>** | The IDs of the OMIs. | [optional] | -|**keypairNames** | **List<String>** | The names of the keypairs. | [optional] | -|**rams** | **List<Integer>** | The amount of RAM. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the VM templates. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the VM templates. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the VM templates, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**vmTemplateIds** | **List<String>** | The IDs of the VM templates. | [optional] | -|**vmTemplateNames** | **List<String>** | The names of the VM templates. | [optional] | - - - diff --git a/docs/FiltersVmType.md b/docs/FiltersVmType.md deleted file mode 100644 index c97ead28..00000000 --- a/docs/FiltersVmType.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# FiltersVmType - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsuOptimized** | **Boolean** | This parameter is not available. It is present in our API for the sake of historical compatibility with AWS. | [optional] | -|**ephemeralsTypes** | **List<String>** | The types of ephemeral storage disk. | [optional] | -|**eths** | **List<Integer>** | The number of Ethernet interfaces available. | [optional] | -|**gpus** | **List<Integer>** | The number of GPUs available. | [optional] | -|**memorySizes** | **List<Float>** | The amounts of memory, in gibibytes (GiB). | [optional] | -|**vcoreCounts** | **List<Integer>** | The numbers of vCores. | [optional] | -|**vmTypeNames** | **List<String>** | The names of the VM types. For more information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). | [optional] | -|**volumeCounts** | **List<Integer>** | The maximum number of ephemeral storage disks. | [optional] | -|**volumeSizes** | **List<Integer>** | The size of one ephemeral storage disk, in gibibytes (GiB). | [optional] | - - - diff --git a/docs/FiltersVmsState.md b/docs/FiltersVmsState.md deleted file mode 100644 index 314da9a4..00000000 --- a/docs/FiltersVmsState.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# FiltersVmsState - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**maintenanceEventCodes** | **List<String>** | The code for the scheduled event (`system-reboot` \\| `system-maintenance`). | [optional] | -|**maintenanceEventDescriptions** | **List<String>** | The description of the scheduled event. | [optional] | -|**maintenanceEventsNotAfter** | **List<LocalDate>** | The latest date and time (UTC) the event can end. | [optional] | -|**maintenanceEventsNotBefore** | **List<LocalDate>** | The earliest date and time (UTC) the event can start. | [optional] | -|**subregionNames** | **List<String>** | The names of the Subregions of the VMs. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | [optional] | -|**vmStates** | **List<String>** | The states of the VMs (`pending` \\| `running` \\| `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). | [optional] | - - - diff --git a/docs/FiltersVolume.md b/docs/FiltersVolume.md deleted file mode 100644 index 12a02986..00000000 --- a/docs/FiltersVolume.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# FiltersVolume - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**creationDates** | **List<OffsetDateTime>** | The dates and times at which the volumes were created, in ISO 8601 date-time format (for example, `2020-06-30T00:00:00.000Z`). | [optional] | -|**linkVolumeDeleteOnVmDeletion** | **Boolean** | Whether the volumes are deleted or not when terminating the VMs. | [optional] | -|**linkVolumeDeviceNames** | **List<String>** | The VM device names. | [optional] | -|**linkVolumeLinkDates** | **List<OffsetDateTime>** | The dates and times at which the volumes were attached, in ISO 8601 date-time format (for example, `2020-06-30T00:00:00.000Z`). | [optional] | -|**linkVolumeLinkStates** | **List<String>** | The attachment states of the volumes (`attaching` \\| `detaching` \\| `attached` \\| `detached`). | [optional] | -|**linkVolumeVmIds** | **List<String>** | One or more IDs of VMs. | [optional] | -|**snapshotIds** | **List<String>** | The snapshots from which the volumes were created. | [optional] | -|**subregionNames** | **List<String>** | The names of the Subregions in which the volumes were created. | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the volumes. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the volumes. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the volumes, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**volumeIds** | **List<String>** | The IDs of the volumes. | [optional] | -|**volumeSizes** | **List<Integer>** | The sizes of the volumes, in gibibytes (GiB). | [optional] | -|**volumeStates** | **List<String>** | The states of the volumes (`creating` \\| `available` \\| `in-use` \\| `updating` \\| `deleting` \\| `error`). | [optional] | -|**volumeTypes** | **List<String>** | The types of the volumes (`standard` \\| `gp2` \\| `io1`). | [optional] | - - - diff --git a/docs/FiltersVpnConnection.md b/docs/FiltersVpnConnection.md deleted file mode 100644 index 204fed6e..00000000 --- a/docs/FiltersVpnConnection.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# FiltersVpnConnection - -One or more filters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpAsns** | **List<Integer>** | The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections. | [optional] | -|**clientGatewayIds** | **List<String>** | The IDs of the client gateways. | [optional] | -|**connectionTypes** | **List<String>** | The types of the VPN connections (always `ipsec.1`). | [optional] | -|**routeDestinationIpRanges** | **List<String>** | The destination IP ranges. | [optional] | -|**states** | **List<String>** | The states of the VPN connections (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**staticRoutesOnly** | **Boolean** | If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) and [DeleteVpnConnectionRoute](#deletevpnconnectionroute). | [optional] | -|**tagKeys** | **List<String>** | The keys of the tags associated with the VPN connections. | [optional] | -|**tagValues** | **List<String>** | The values of the tags associated with the VPN connections. | [optional] | -|**tags** | **List<String>** | The key/value combination of the tags associated with the VPN connections, in the following format: &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. | [optional] | -|**virtualGatewayIds** | **List<String>** | The IDs of the virtual gateways. | [optional] | -|**vpnConnectionIds** | **List<String>** | The IDs of the VPN connections. | [optional] | - - - diff --git a/docs/FlexibleGpu.md b/docs/FlexibleGpu.md deleted file mode 100644 index 9f829ff0..00000000 --- a/docs/FlexibleGpu.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# FlexibleGpu - -Information about the flexible GPU (fGPU). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the fGPU is deleted when the VM is terminated. | [optional] | -|**flexibleGpuId** | **String** | The ID of the fGPU. | [optional] | -|**generation** | **String** | The compatible processor generation. | [optional] | -|**modelName** | **String** | The model of fGPU. For more information, see [About Flexible GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). | [optional] | -|**state** | **String** | The state of the fGPU (`allocated` \\| `attaching` \\| `attached` \\| `detaching`). | [optional] | -|**subregionName** | **String** | The Subregion where the fGPU is located. | [optional] | -|**vmId** | **String** | The ID of the VM the fGPU is attached to, if any. | [optional] | - - - diff --git a/docs/FlexibleGpuApi.md b/docs/FlexibleGpuApi.md deleted file mode 100644 index 191a0621..00000000 --- a/docs/FlexibleGpuApi.md +++ /dev/null @@ -1,491 +0,0 @@ -# FlexibleGpuApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createFlexibleGpu**](FlexibleGpuApi.md#createFlexibleGpu) | **POST** /CreateFlexibleGpu | | -| [**deleteFlexibleGpu**](FlexibleGpuApi.md#deleteFlexibleGpu) | **POST** /DeleteFlexibleGpu | | -| [**linkFlexibleGpu**](FlexibleGpuApi.md#linkFlexibleGpu) | **POST** /LinkFlexibleGpu | | -| [**readFlexibleGpuCatalog**](FlexibleGpuApi.md#readFlexibleGpuCatalog) | **POST** /ReadFlexibleGpuCatalog | | -| [**readFlexibleGpus**](FlexibleGpuApi.md#readFlexibleGpus) | **POST** /ReadFlexibleGpus | | -| [**unlinkFlexibleGpu**](FlexibleGpuApi.md#unlinkFlexibleGpu) | **POST** /UnlinkFlexibleGpu | | -| [**updateFlexibleGpu**](FlexibleGpuApi.md#updateFlexibleGpu) | **POST** /UpdateFlexibleGpu | | - - - -# **createFlexibleGpu** -> CreateFlexibleGpuResponse createFlexibleGpu(createFlexibleGpuRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - CreateFlexibleGpuRequest createFlexibleGpuRequest = new CreateFlexibleGpuRequest(); // CreateFlexibleGpuRequest | - try { - CreateFlexibleGpuResponse result = apiInstance.createFlexibleGpu(createFlexibleGpuRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#createFlexibleGpu"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createFlexibleGpuRequest** | [**CreateFlexibleGpuRequest**](CreateFlexibleGpuRequest.md)| | [optional] | - -### Return type - -[**CreateFlexibleGpuResponse**](CreateFlexibleGpuResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteFlexibleGpu** -> DeleteFlexibleGpuResponse deleteFlexibleGpu(deleteFlexibleGpuRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest = new DeleteFlexibleGpuRequest(); // DeleteFlexibleGpuRequest | - try { - DeleteFlexibleGpuResponse result = apiInstance.deleteFlexibleGpu(deleteFlexibleGpuRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#deleteFlexibleGpu"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteFlexibleGpuRequest** | [**DeleteFlexibleGpuRequest**](DeleteFlexibleGpuRequest.md)| | [optional] | - -### Return type - -[**DeleteFlexibleGpuResponse**](DeleteFlexibleGpuResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **linkFlexibleGpu** -> LinkFlexibleGpuResponse linkFlexibleGpu(linkFlexibleGpuRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - LinkFlexibleGpuRequest linkFlexibleGpuRequest = new LinkFlexibleGpuRequest(); // LinkFlexibleGpuRequest | - try { - LinkFlexibleGpuResponse result = apiInstance.linkFlexibleGpu(linkFlexibleGpuRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#linkFlexibleGpu"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkFlexibleGpuRequest** | [**LinkFlexibleGpuRequest**](LinkFlexibleGpuRequest.md)| | [optional] | - -### Return type - -[**LinkFlexibleGpuResponse**](LinkFlexibleGpuResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readFlexibleGpuCatalog** -> ReadFlexibleGpuCatalogResponse readFlexibleGpuCatalog(readFlexibleGpuCatalogRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest = new ReadFlexibleGpuCatalogRequest(); // ReadFlexibleGpuCatalogRequest | - try { - ReadFlexibleGpuCatalogResponse result = apiInstance.readFlexibleGpuCatalog(readFlexibleGpuCatalogRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#readFlexibleGpuCatalog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readFlexibleGpuCatalogRequest** | [**ReadFlexibleGpuCatalogRequest**](ReadFlexibleGpuCatalogRequest.md)| | [optional] | - -### Return type - -[**ReadFlexibleGpuCatalogResponse**](ReadFlexibleGpuCatalogResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readFlexibleGpus** -> ReadFlexibleGpusResponse readFlexibleGpus(readFlexibleGpusRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - ReadFlexibleGpusRequest readFlexibleGpusRequest = new ReadFlexibleGpusRequest(); // ReadFlexibleGpusRequest | - try { - ReadFlexibleGpusResponse result = apiInstance.readFlexibleGpus(readFlexibleGpusRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#readFlexibleGpus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readFlexibleGpusRequest** | [**ReadFlexibleGpusRequest**](ReadFlexibleGpusRequest.md)| | [optional] | - -### Return type - -[**ReadFlexibleGpusResponse**](ReadFlexibleGpusResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **unlinkFlexibleGpu** -> UnlinkFlexibleGpuResponse unlinkFlexibleGpu(unlinkFlexibleGpuRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest = new UnlinkFlexibleGpuRequest(); // UnlinkFlexibleGpuRequest | - try { - UnlinkFlexibleGpuResponse result = apiInstance.unlinkFlexibleGpu(unlinkFlexibleGpuRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#unlinkFlexibleGpu"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkFlexibleGpuRequest** | [**UnlinkFlexibleGpuRequest**](UnlinkFlexibleGpuRequest.md)| | [optional] | - -### Return type - -[**UnlinkFlexibleGpuResponse**](UnlinkFlexibleGpuResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateFlexibleGpu** -> UpdateFlexibleGpuResponse updateFlexibleGpu(updateFlexibleGpuRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.FlexibleGpuApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - FlexibleGpuApi apiInstance = new FlexibleGpuApi(defaultClient); - UpdateFlexibleGpuRequest updateFlexibleGpuRequest = new UpdateFlexibleGpuRequest(); // UpdateFlexibleGpuRequest | - try { - UpdateFlexibleGpuResponse result = apiInstance.updateFlexibleGpu(updateFlexibleGpuRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FlexibleGpuApi#updateFlexibleGpu"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateFlexibleGpuRequest** | [**UpdateFlexibleGpuRequest**](UpdateFlexibleGpuRequest.md)| | [optional] | - -### Return type - -[**UpdateFlexibleGpuResponse**](UpdateFlexibleGpuResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/FlexibleGpuCatalog.md b/docs/FlexibleGpuCatalog.md deleted file mode 100644 index 430b1838..00000000 --- a/docs/FlexibleGpuCatalog.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# FlexibleGpuCatalog - -Information about the flexible GPU (fGPU) that is available in the public catalog. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**generations** | **List<String>** | The processor generations that the fGPUs are compatible with. | [optional] | -|**maxCpu** | **Integer** | The maximum number of VM vCores that the fGPU is compatible with. | [optional] | -|**maxRam** | **Integer** | The maximum amount of VM memory that the fGPU is compatible with. | [optional] | -|**modelName** | **String** | The model of fGPU. | [optional] | -|**vram** | **Integer** | The amount of video RAM (VRAM) of the fGPU. | [optional] | - - - diff --git a/docs/HealthCheck.md b/docs/HealthCheck.md deleted file mode 100644 index 05e679a2..00000000 --- a/docs/HealthCheck.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# HealthCheck - -Information about the health check configuration. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**checkInterval** | **Integer** | The number of seconds between two requests (between `5` and `600` both included). | | -|**healthyThreshold** | **Integer** | The number of consecutive successful requests before considering the VM as healthy (between `2` and `10` both included). | | -|**path** | **String** | If you use the HTTP or HTTPS protocols, the request URL path. | [optional] | -|**port** | **Integer** | The port number (between `1` and `65535`, both included). | | -|**protocol** | **String** | The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). | | -|**timeout** | **Integer** | The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between `2` and `60` both included). | | -|**unhealthyThreshold** | **Integer** | The number of consecutive failed requests before considering the VM as unhealthy (between `2` and `10` both included). | | - - - diff --git a/docs/Image.md b/docs/Image.md deleted file mode 100644 index d1be938b..00000000 --- a/docs/Image.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# Image - -Information about the OMI. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | The account alias of the owner of the OMI. | [optional] | -|**accountId** | **String** | The account ID of the owner of the OMI. | [optional] | -|**architecture** | **String** | The architecture of the OMI. | [optional] | -|**blockDeviceMappings** | [**List<BlockDeviceMappingImage>**](BlockDeviceMappingImage.md) | One or more block device mappings. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the OMI was created. | [optional] | -|**description** | **String** | The description of the OMI. | [optional] | -|**fileLocation** | **String** | The location from which the OMI files were created. | [optional] | -|**imageId** | **String** | The ID of the OMI. | [optional] | -|**imageName** | **String** | The name of the OMI. | [optional] | -|**imageType** | **String** | The type of the OMI. | [optional] | -|**permissionsToLaunch** | [**PermissionsOnResource**](PermissionsOnResource.md) | | [optional] | -|**productCodes** | **List<String>** | The product codes associated with the OMI. | [optional] | -|**rootDeviceName** | **String** | The name of the root device. | [optional] | -|**rootDeviceType** | **String** | The type of root device used by the OMI (always `bsu`). | [optional] | -|**state** | **String** | The state of the OMI (`pending` \\| `available` \\| `failed`). | [optional] | -|**stateComment** | [**StateComment**](StateComment.md) | | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the OMI. | [optional] | - - - diff --git a/docs/ImageApi.md b/docs/ImageApi.md deleted file mode 100644 index 71c16e54..00000000 --- a/docs/ImageApi.md +++ /dev/null @@ -1,440 +0,0 @@ -# ImageApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createImage**](ImageApi.md#createImage) | **POST** /CreateImage | | -| [**createImageExportTask**](ImageApi.md#createImageExportTask) | **POST** /CreateImageExportTask | | -| [**deleteImage**](ImageApi.md#deleteImage) | **POST** /DeleteImage | | -| [**readImageExportTasks**](ImageApi.md#readImageExportTasks) | **POST** /ReadImageExportTasks | | -| [**readImages**](ImageApi.md#readImages) | **POST** /ReadImages | | -| [**updateImage**](ImageApi.md#updateImage) | **POST** /UpdateImage | | - - - -# **createImage** -> CreateImageResponse createImage(createImageRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - CreateImageRequest createImageRequest = new CreateImageRequest(); // CreateImageRequest | - try { - CreateImageResponse result = apiInstance.createImage(createImageRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#createImage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createImageRequest** | [**CreateImageRequest**](CreateImageRequest.md)| | [optional] | - -### Return type - -[**CreateImageResponse**](CreateImageResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **createImageExportTask** -> CreateImageExportTaskResponse createImageExportTask(createImageExportTaskRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - CreateImageExportTaskRequest createImageExportTaskRequest = new CreateImageExportTaskRequest(); // CreateImageExportTaskRequest | - try { - CreateImageExportTaskResponse result = apiInstance.createImageExportTask(createImageExportTaskRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#createImageExportTask"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createImageExportTaskRequest** | [**CreateImageExportTaskRequest**](CreateImageExportTaskRequest.md)| | [optional] | - -### Return type - -[**CreateImageExportTaskResponse**](CreateImageExportTaskResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteImage** -> DeleteImageResponse deleteImage(deleteImageRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - DeleteImageRequest deleteImageRequest = new DeleteImageRequest(); // DeleteImageRequest | - try { - DeleteImageResponse result = apiInstance.deleteImage(deleteImageRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#deleteImage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteImageRequest** | [**DeleteImageRequest**](DeleteImageRequest.md)| | [optional] | - -### Return type - -[**DeleteImageResponse**](DeleteImageResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readImageExportTasks** -> ReadImageExportTasksResponse readImageExportTasks(readImageExportTasksRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - ReadImageExportTasksRequest readImageExportTasksRequest = new ReadImageExportTasksRequest(); // ReadImageExportTasksRequest | - try { - ReadImageExportTasksResponse result = apiInstance.readImageExportTasks(readImageExportTasksRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#readImageExportTasks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readImageExportTasksRequest** | [**ReadImageExportTasksRequest**](ReadImageExportTasksRequest.md)| | [optional] | - -### Return type - -[**ReadImageExportTasksResponse**](ReadImageExportTasksResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readImages** -> ReadImagesResponse readImages(readImagesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - ReadImagesRequest readImagesRequest = new ReadImagesRequest(); // ReadImagesRequest | - try { - ReadImagesResponse result = apiInstance.readImages(readImagesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#readImages"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readImagesRequest** | [**ReadImagesRequest**](ReadImagesRequest.md)| | [optional] | - -### Return type - -[**ReadImagesResponse**](ReadImagesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateImage** -> UpdateImageResponse updateImage(updateImageRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ImageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ImageApi apiInstance = new ImageApi(defaultClient); - UpdateImageRequest updateImageRequest = new UpdateImageRequest(); // UpdateImageRequest | - try { - UpdateImageResponse result = apiInstance.updateImage(updateImageRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ImageApi#updateImage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateImageRequest** | [**UpdateImageRequest**](UpdateImageRequest.md)| | [optional] | - -### Return type - -[**UpdateImageResponse**](UpdateImageResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/ImageExportTask.md b/docs/ImageExportTask.md deleted file mode 100644 index 28e89d6e..00000000 --- a/docs/ImageExportTask.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# ImageExportTask - -Information about the OMI export task. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**comment** | **String** | If the OMI export task fails, an error message appears. | [optional] | -|**imageId** | **String** | The ID of the OMI to be exported. | [optional] | -|**osuExport** | [**OsuExportImageExportTask**](OsuExportImageExportTask.md) | | [optional] | -|**progress** | **Integer** | The progress of the OMI export task, as a percentage. | [optional] | -|**state** | **String** | The state of the OMI export task (`pending/queued` \\| `pending` \\| `completed` \\| `failed` \\| `cancelled`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the image export task. | [optional] | -|**taskId** | **String** | The ID of the OMI export task. | [optional] | - - - diff --git a/docs/InternetService.md b/docs/InternetService.md deleted file mode 100644 index 809fd969..00000000 --- a/docs/InternetService.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# InternetService - -Information about the Internet service. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**internetServiceId** | **String** | The ID of the Internet service. | [optional] | -|**netId** | **String** | The ID of the Net attached to the Internet service. | [optional] | -|**state** | **String** | The state of the attachment of the Internet service to the Net (always `available`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the Internet service. | [optional] | - - - diff --git a/docs/InternetServiceApi.md b/docs/InternetServiceApi.md deleted file mode 100644 index 5cd626d1..00000000 --- a/docs/InternetServiceApi.md +++ /dev/null @@ -1,373 +0,0 @@ -# InternetServiceApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createInternetService**](InternetServiceApi.md#createInternetService) | **POST** /CreateInternetService | | -| [**deleteInternetService**](InternetServiceApi.md#deleteInternetService) | **POST** /DeleteInternetService | | -| [**linkInternetService**](InternetServiceApi.md#linkInternetService) | **POST** /LinkInternetService | | -| [**readInternetServices**](InternetServiceApi.md#readInternetServices) | **POST** /ReadInternetServices | | -| [**unlinkInternetService**](InternetServiceApi.md#unlinkInternetService) | **POST** /UnlinkInternetService | | - - - -# **createInternetService** -> CreateInternetServiceResponse createInternetService(createInternetServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.InternetServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InternetServiceApi apiInstance = new InternetServiceApi(defaultClient); - CreateInternetServiceRequest createInternetServiceRequest = new CreateInternetServiceRequest(); // CreateInternetServiceRequest | - try { - CreateInternetServiceResponse result = apiInstance.createInternetService(createInternetServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InternetServiceApi#createInternetService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createInternetServiceRequest** | [**CreateInternetServiceRequest**](CreateInternetServiceRequest.md)| | [optional] | - -### Return type - -[**CreateInternetServiceResponse**](CreateInternetServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteInternetService** -> DeleteInternetServiceResponse deleteInternetService(deleteInternetServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.InternetServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InternetServiceApi apiInstance = new InternetServiceApi(defaultClient); - DeleteInternetServiceRequest deleteInternetServiceRequest = new DeleteInternetServiceRequest(); // DeleteInternetServiceRequest | - try { - DeleteInternetServiceResponse result = apiInstance.deleteInternetService(deleteInternetServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InternetServiceApi#deleteInternetService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteInternetServiceRequest** | [**DeleteInternetServiceRequest**](DeleteInternetServiceRequest.md)| | [optional] | - -### Return type - -[**DeleteInternetServiceResponse**](DeleteInternetServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkInternetService** -> LinkInternetServiceResponse linkInternetService(linkInternetServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.InternetServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InternetServiceApi apiInstance = new InternetServiceApi(defaultClient); - LinkInternetServiceRequest linkInternetServiceRequest = new LinkInternetServiceRequest(); // LinkInternetServiceRequest | - try { - LinkInternetServiceResponse result = apiInstance.linkInternetService(linkInternetServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InternetServiceApi#linkInternetService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkInternetServiceRequest** | [**LinkInternetServiceRequest**](LinkInternetServiceRequest.md)| | [optional] | - -### Return type - -[**LinkInternetServiceResponse**](LinkInternetServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readInternetServices** -> ReadInternetServicesResponse readInternetServices(readInternetServicesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.InternetServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InternetServiceApi apiInstance = new InternetServiceApi(defaultClient); - ReadInternetServicesRequest readInternetServicesRequest = new ReadInternetServicesRequest(); // ReadInternetServicesRequest | - try { - ReadInternetServicesResponse result = apiInstance.readInternetServices(readInternetServicesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InternetServiceApi#readInternetServices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readInternetServicesRequest** | [**ReadInternetServicesRequest**](ReadInternetServicesRequest.md)| | [optional] | - -### Return type - -[**ReadInternetServicesResponse**](ReadInternetServicesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkInternetService** -> UnlinkInternetServiceResponse unlinkInternetService(unlinkInternetServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.InternetServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InternetServiceApi apiInstance = new InternetServiceApi(defaultClient); - UnlinkInternetServiceRequest unlinkInternetServiceRequest = new UnlinkInternetServiceRequest(); // UnlinkInternetServiceRequest | - try { - UnlinkInternetServiceResponse result = apiInstance.unlinkInternetService(unlinkInternetServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InternetServiceApi#unlinkInternetService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkInternetServiceRequest** | [**UnlinkInternetServiceRequest**](UnlinkInternetServiceRequest.md)| | [optional] | - -### Return type - -[**UnlinkInternetServiceResponse**](UnlinkInternetServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/Keypair.md b/docs/Keypair.md deleted file mode 100644 index 23b8c569..00000000 --- a/docs/Keypair.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Keypair - -Information about the keypair. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keypairFingerprint** | **String** | The MD5 public key fingerprint as specified in section 4 of RFC 4716. | [optional] | -|**keypairName** | **String** | The name of the keypair. | [optional] | -|**keypairType** | **String** | The type of the keypair (`ssh-rsa`, `ssh-ed25519`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`). | [optional] | - - - diff --git a/docs/KeypairApi.md b/docs/KeypairApi.md deleted file mode 100644 index 803deb36..00000000 --- a/docs/KeypairApi.md +++ /dev/null @@ -1,228 +0,0 @@ -# KeypairApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createKeypair**](KeypairApi.md#createKeypair) | **POST** /CreateKeypair | | -| [**deleteKeypair**](KeypairApi.md#deleteKeypair) | **POST** /DeleteKeypair | | -| [**readKeypairs**](KeypairApi.md#readKeypairs) | **POST** /ReadKeypairs | | - - - -# **createKeypair** -> CreateKeypairResponse createKeypair(createKeypairRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.KeypairApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - KeypairApi apiInstance = new KeypairApi(defaultClient); - CreateKeypairRequest createKeypairRequest = new CreateKeypairRequest(); // CreateKeypairRequest | - try { - CreateKeypairResponse result = apiInstance.createKeypair(createKeypairRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeypairApi#createKeypair"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createKeypairRequest** | [**CreateKeypairRequest**](CreateKeypairRequest.md)| | [optional] | - -### Return type - -[**CreateKeypairResponse**](CreateKeypairResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteKeypair** -> DeleteKeypairResponse deleteKeypair(deleteKeypairRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.KeypairApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - KeypairApi apiInstance = new KeypairApi(defaultClient); - DeleteKeypairRequest deleteKeypairRequest = new DeleteKeypairRequest(); // DeleteKeypairRequest | - try { - DeleteKeypairResponse result = apiInstance.deleteKeypair(deleteKeypairRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeypairApi#deleteKeypair"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteKeypairRequest** | [**DeleteKeypairRequest**](DeleteKeypairRequest.md)| | [optional] | - -### Return type - -[**DeleteKeypairResponse**](DeleteKeypairResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readKeypairs** -> ReadKeypairsResponse readKeypairs(readKeypairsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.KeypairApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - KeypairApi apiInstance = new KeypairApi(defaultClient); - ReadKeypairsRequest readKeypairsRequest = new ReadKeypairsRequest(); // ReadKeypairsRequest | - try { - ReadKeypairsResponse result = apiInstance.readKeypairs(readKeypairsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeypairApi#readKeypairs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readKeypairsRequest** | [**ReadKeypairsRequest**](ReadKeypairsRequest.md)| | [optional] | - -### Return type - -[**ReadKeypairsResponse**](ReadKeypairsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/KeypairCreated.md b/docs/KeypairCreated.md deleted file mode 100644 index 673d25f8..00000000 --- a/docs/KeypairCreated.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# KeypairCreated - -Information about the created keypair. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keypairFingerprint** | **String** | The MD5 public key fingerprint, as specified in section 4 of RFC 4716. | [optional] | -|**keypairName** | **String** | The name of the keypair. | [optional] | -|**keypairType** | **String** | The type of the keypair (`ssh-rsa`, `ssh-ed25519`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`). | [optional] | -|**privateKey** | **String** | The private key, returned only if you are creating a keypair (not if you are importing). When you save this private key in a .rsa file, make sure you replace the `\\n` escape sequences with real line breaks. | [optional] | - - - diff --git a/docs/LinkFlexibleGpuRequest.md b/docs/LinkFlexibleGpuRequest.md deleted file mode 100644 index 46173074..00000000 --- a/docs/LinkFlexibleGpuRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LinkFlexibleGpuRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flexibleGpuId** | **String** | The ID of the fGPU you want to attach. | | -|**vmId** | **String** | The ID of the VM you want to attach the fGPU to. | | - - - diff --git a/docs/LinkFlexibleGpuResponse.md b/docs/LinkFlexibleGpuResponse.md deleted file mode 100644 index b0e851e8..00000000 --- a/docs/LinkFlexibleGpuResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LinkFlexibleGpuResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkInternetServiceRequest.md b/docs/LinkInternetServiceRequest.md deleted file mode 100644 index a2b5d111..00000000 --- a/docs/LinkInternetServiceRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LinkInternetServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**internetServiceId** | **String** | The ID of the Internet service you want to attach. | | -|**netId** | **String** | The ID of the Net to which you want to attach the Internet service. | | - - - diff --git a/docs/LinkInternetServiceResponse.md b/docs/LinkInternetServiceResponse.md deleted file mode 100644 index 26b6adde..00000000 --- a/docs/LinkInternetServiceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LinkInternetServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkLoadBalancerBackendMachinesRequest.md b/docs/LinkLoadBalancerBackendMachinesRequest.md deleted file mode 100644 index dd5c3fe5..00000000 --- a/docs/LinkLoadBalancerBackendMachinesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# LinkLoadBalancerBackendMachinesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendIps** | **List<String>** | One or more public IPs of backend VMs. | [optional] | -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | - - - diff --git a/docs/LinkLoadBalancerBackendMachinesResponse.md b/docs/LinkLoadBalancerBackendMachinesResponse.md deleted file mode 100644 index 5bb562c5..00000000 --- a/docs/LinkLoadBalancerBackendMachinesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LinkLoadBalancerBackendMachinesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkNic.md b/docs/LinkNic.md deleted file mode 100644 index 6dd86100..00000000 --- a/docs/LinkNic.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LinkNic - -Information about the NIC attachment. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the NIC is deleted when the VM is terminated. | [optional] | -|**deviceNumber** | **Integer** | The device index for the NIC attachment (between `1` and `7`, both included). | [optional] | -|**linkNicId** | **String** | The ID of the NIC to attach. | [optional] | -|**state** | **String** | The state of the attachment (`attaching` \\| `attached` \\| `detaching` \\| `detached`). | [optional] | -|**vmAccountId** | **String** | The account ID of the owner of the VM. | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | - - - diff --git a/docs/LinkNicLight.md b/docs/LinkNicLight.md deleted file mode 100644 index 46fc00b8..00000000 --- a/docs/LinkNicLight.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LinkNicLight - -Information about the network interface card (NIC). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the NIC is deleted when the VM is terminated. | [optional] | -|**deviceNumber** | **Integer** | The device index for the NIC attachment (between `1` and `7`, both included). | [optional] | -|**linkNicId** | **String** | The ID of the NIC to attach. | [optional] | -|**state** | **String** | The state of the attachment (`attaching` \\| `attached` \\| `detaching` \\| `detached`). | [optional] | - - - diff --git a/docs/LinkNicRequest.md b/docs/LinkNicRequest.md deleted file mode 100644 index ca046a50..00000000 --- a/docs/LinkNicRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# LinkNicRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deviceNumber** | **Integer** | The index of the VM device for the NIC attachment (between `1` and `7`, both included). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nicId** | **String** | The ID of the NIC you want to attach. | | -|**vmId** | **String** | The ID of the VM to which you want to attach the NIC. | | - - - diff --git a/docs/LinkNicResponse.md b/docs/LinkNicResponse.md deleted file mode 100644 index 700d76b2..00000000 --- a/docs/LinkNicResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LinkNicResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkNicId** | **String** | The ID of the NIC attachment. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkNicToUpdate.md b/docs/LinkNicToUpdate.md deleted file mode 100644 index 98eb57d6..00000000 --- a/docs/LinkNicToUpdate.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LinkNicToUpdate - -Information about the NIC attachment. If you are modifying the `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC attachment. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the NIC is deleted when the VM is terminated. If false, the NIC is detached from the VM. | [optional] | -|**linkNicId** | **String** | The ID of the NIC attachment. | [optional] | - - - diff --git a/docs/LinkPrivateIpsRequest.md b/docs/LinkPrivateIpsRequest.md deleted file mode 100644 index ce9a91b0..00000000 --- a/docs/LinkPrivateIpsRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LinkPrivateIpsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**allowRelink** | **Boolean** | If true, allows an IP that is already assigned to another NIC in the same Subnet to be assigned to the NIC you specified. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nicId** | **String** | The ID of the NIC. | | -|**privateIps** | **List<String>** | The secondary private IP or IPs you want to assign to the NIC within the IP range of the Subnet. | [optional] | -|**secondaryPrivateIpCount** | **Integer** | The number of secondary private IPs to assign to the NIC. | [optional] | - - - diff --git a/docs/LinkPrivateIpsResponse.md b/docs/LinkPrivateIpsResponse.md deleted file mode 100644 index 847bb13b..00000000 --- a/docs/LinkPrivateIpsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LinkPrivateIpsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkPublicIp.md b/docs/LinkPublicIp.md deleted file mode 100644 index 5ccd487e..00000000 --- a/docs/LinkPublicIp.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LinkPublicIp - -Information about the public IP association. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkPublicIpId** | **String** | (Required in a Net) The ID representing the association of the public IP with the VM or the NIC. | [optional] | -|**publicDnsName** | **String** | The name of the public DNS. | [optional] | -|**publicIp** | **String** | The public IP associated with the NIC. | [optional] | -|**publicIpAccountId** | **String** | The account ID of the owner of the public IP. | [optional] | -|**publicIpId** | **String** | The allocation ID of the public IP. | [optional] | - - - diff --git a/docs/LinkPublicIpLightForVm.md b/docs/LinkPublicIpLightForVm.md deleted file mode 100644 index 45297ecf..00000000 --- a/docs/LinkPublicIpLightForVm.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# LinkPublicIpLightForVm - -Information about the public IP associated with the NIC. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**publicDnsName** | **String** | The name of the public DNS. | [optional] | -|**publicIp** | **String** | The public IP associated with the NIC. | [optional] | -|**publicIpAccountId** | **String** | The account ID of the owner of the public IP. | [optional] | - - - diff --git a/docs/LinkPublicIpRequest.md b/docs/LinkPublicIpRequest.md deleted file mode 100644 index 2531b0be..00000000 --- a/docs/LinkPublicIpRequest.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LinkPublicIpRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**allowRelink** | **Boolean** | If true, allows the public IP to be associated with the VM or NIC that you specify even if it is already associated with another VM or NIC. If false, prevents the public IP from being associated with the VM or NIC that you specify if it is already associated with another VM or NIC. (By default, true in the public Cloud, false in a Net.) | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nicId** | **String** | (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC attached. Otherwise, you need to specify the `VmId` parameter instead. You cannot specify both parameters at the same time. | [optional] | -|**privateIp** | **String** | (Net only) The primary or secondary private IP of the specified NIC. By default, the primary private IP. | [optional] | -|**publicIp** | **String** | The public IP. This parameter is required unless you use the `PublicIpId` parameter. | [optional] | -|**publicIpId** | **String** | The allocation ID of the public IP. This parameter is required unless you use the `PublicIp` parameter. | [optional] | -|**vmId** | **String** | The ID of the VM.<br /> - In the public Cloud, this parameter is required.<br /> - In a Net, this parameter is required if the VM has only one NIC. Otherwise, you need to specify the `NicId` parameter instead. You cannot specify both parameters at the same time. | [optional] | - - - diff --git a/docs/LinkPublicIpResponse.md b/docs/LinkPublicIpResponse.md deleted file mode 100644 index 6ffb329f..00000000 --- a/docs/LinkPublicIpResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LinkPublicIpResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkPublicIpId** | **String** | (Net only) The ID representing the association of the public IP with the VM or the NIC. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkRouteTable.md b/docs/LinkRouteTable.md deleted file mode 100644 index aa309d56..00000000 --- a/docs/LinkRouteTable.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LinkRouteTable - -One or more associations between the route table and the Subnets. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkRouteTableId** | **String** | The ID of the association between the route table and the Net or Subnet. | [optional] | -|**main** | **Boolean** | If true, the route table is the main one. | [optional] | -|**netId** | **String** | The ID of the Net, if the route table is not explicitly linked to a Subnet. | [optional] | -|**routeTableId** | **String** | The ID of the route table. | [optional] | -|**subnetId** | **String** | The ID of the Subnet, if the route table is explicitly linked to a Subnet. | [optional] | - - - diff --git a/docs/LinkRouteTableRequest.md b/docs/LinkRouteTableRequest.md deleted file mode 100644 index 74c33ed3..00000000 --- a/docs/LinkRouteTableRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LinkRouteTableRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**routeTableId** | **String** | The ID of the route table. | | -|**subnetId** | **String** | The ID of the Subnet. | | - - - diff --git a/docs/LinkRouteTableResponse.md b/docs/LinkRouteTableResponse.md deleted file mode 100644 index f1e5e7ba..00000000 --- a/docs/LinkRouteTableResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LinkRouteTableResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkRouteTableId** | **String** | The ID of the association between the route table and the Subnet. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkVirtualGatewayRequest.md b/docs/LinkVirtualGatewayRequest.md deleted file mode 100644 index 4b19316e..00000000 --- a/docs/LinkVirtualGatewayRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LinkVirtualGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net to which you want to attach the virtual gateway. | | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | | - - - diff --git a/docs/LinkVirtualGatewayResponse.md b/docs/LinkVirtualGatewayResponse.md deleted file mode 100644 index 8b3ca392..00000000 --- a/docs/LinkVirtualGatewayResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LinkVirtualGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netToVirtualGatewayLink** | [**NetToVirtualGatewayLink**](NetToVirtualGatewayLink.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkVolumeRequest.md b/docs/LinkVolumeRequest.md deleted file mode 100644 index 09a70d2e..00000000 --- a/docs/LinkVolumeRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# LinkVolumeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deviceName** | **String** | The name of the device. For a root device, you must use `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, and the second `X` is a letter between `a` and `z`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmId** | **String** | The ID of the VM you want to attach the volume to. | | -|**volumeId** | **String** | The ID of the volume you want to attach. | | - - - diff --git a/docs/LinkVolumeResponse.md b/docs/LinkVolumeResponse.md deleted file mode 100644 index cbbcf93c..00000000 --- a/docs/LinkVolumeResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LinkVolumeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/LinkedVolume.md b/docs/LinkedVolume.md deleted file mode 100644 index 6166c613..00000000 --- a/docs/LinkedVolume.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LinkedVolume - -Information about volume attachment. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. | [optional] | -|**deviceName** | **String** | The name of the device. | [optional] | -|**state** | **String** | The state of the attachment of the volume (`attaching` \\| `detaching` \\| `attached` \\| `detached`). | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | -|**volumeId** | **String** | The ID of the volume. | [optional] | - - - diff --git a/docs/Listener.md b/docs/Listener.md deleted file mode 100644 index a2a15007..00000000 --- a/docs/Listener.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Listener - -Information about the listener. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendPort** | **Integer** | The port on which the backend VM is listening (between `1` and `65535`, both included). | [optional] | -|**backendProtocol** | **String** | The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). | [optional] | -|**loadBalancerPort** | **Integer** | The port on which the load balancer is listening (between `1` and `65535`, both included). | [optional] | -|**loadBalancerProtocol** | **String** | The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). | [optional] | -|**policyNames** | **List<String>** | The names of the policies. If there are no policies enabled, the list is empty. | [optional] | -|**serverCertificateId** | **String** | The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see [Resource Identifiers > OUTSCALE Resource Names (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). | [optional] | - - - diff --git a/docs/ListenerApi.md b/docs/ListenerApi.md deleted file mode 100644 index b303167c..00000000 --- a/docs/ListenerApi.md +++ /dev/null @@ -1,428 +0,0 @@ -# ListenerApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createListenerRule**](ListenerApi.md#createListenerRule) | **POST** /CreateListenerRule | | -| [**createLoadBalancerListeners**](ListenerApi.md#createLoadBalancerListeners) | **POST** /CreateLoadBalancerListeners | | -| [**deleteListenerRule**](ListenerApi.md#deleteListenerRule) | **POST** /DeleteListenerRule | | -| [**deleteLoadBalancerListeners**](ListenerApi.md#deleteLoadBalancerListeners) | **POST** /DeleteLoadBalancerListeners | | -| [**readListenerRules**](ListenerApi.md#readListenerRules) | **POST** /ReadListenerRules | | -| [**updateListenerRule**](ListenerApi.md#updateListenerRule) | **POST** /UpdateListenerRule | | - - - -# **createListenerRule** -> CreateListenerRuleResponse createListenerRule(createListenerRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - CreateListenerRuleRequest createListenerRuleRequest = new CreateListenerRuleRequest(); // CreateListenerRuleRequest | - try { - CreateListenerRuleResponse result = apiInstance.createListenerRule(createListenerRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#createListenerRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createListenerRuleRequest** | [**CreateListenerRuleRequest**](CreateListenerRuleRequest.md)| | [optional] | - -### Return type - -[**CreateListenerRuleResponse**](CreateListenerRuleResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **createLoadBalancerListeners** -> CreateLoadBalancerListenersResponse createLoadBalancerListeners(createLoadBalancerListenersRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest = new CreateLoadBalancerListenersRequest(); // CreateLoadBalancerListenersRequest | - try { - CreateLoadBalancerListenersResponse result = apiInstance.createLoadBalancerListeners(createLoadBalancerListenersRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#createLoadBalancerListeners"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createLoadBalancerListenersRequest** | [**CreateLoadBalancerListenersRequest**](CreateLoadBalancerListenersRequest.md)| | [optional] | - -### Return type - -[**CreateLoadBalancerListenersResponse**](CreateLoadBalancerListenersResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteListenerRule** -> DeleteListenerRuleResponse deleteListenerRule(deleteListenerRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - DeleteListenerRuleRequest deleteListenerRuleRequest = new DeleteListenerRuleRequest(); // DeleteListenerRuleRequest | - try { - DeleteListenerRuleResponse result = apiInstance.deleteListenerRule(deleteListenerRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#deleteListenerRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteListenerRuleRequest** | [**DeleteListenerRuleRequest**](DeleteListenerRuleRequest.md)| | [optional] | - -### Return type - -[**DeleteListenerRuleResponse**](DeleteListenerRuleResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteLoadBalancerListeners** -> DeleteLoadBalancerListenersResponse deleteLoadBalancerListeners(deleteLoadBalancerListenersRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest = new DeleteLoadBalancerListenersRequest(); // DeleteLoadBalancerListenersRequest | - try { - DeleteLoadBalancerListenersResponse result = apiInstance.deleteLoadBalancerListeners(deleteLoadBalancerListenersRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#deleteLoadBalancerListeners"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteLoadBalancerListenersRequest** | [**DeleteLoadBalancerListenersRequest**](DeleteLoadBalancerListenersRequest.md)| | [optional] | - -### Return type - -[**DeleteLoadBalancerListenersResponse**](DeleteLoadBalancerListenersResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readListenerRules** -> ReadListenerRulesResponse readListenerRules(readListenerRulesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - ReadListenerRulesRequest readListenerRulesRequest = new ReadListenerRulesRequest(); // ReadListenerRulesRequest | - try { - ReadListenerRulesResponse result = apiInstance.readListenerRules(readListenerRulesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#readListenerRules"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readListenerRulesRequest** | [**ReadListenerRulesRequest**](ReadListenerRulesRequest.md)| | [optional] | - -### Return type - -[**ReadListenerRulesResponse**](ReadListenerRulesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateListenerRule** -> UpdateListenerRuleResponse updateListenerRule(updateListenerRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ListenerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ListenerApi apiInstance = new ListenerApi(defaultClient); - UpdateListenerRuleRequest updateListenerRuleRequest = new UpdateListenerRuleRequest(); // UpdateListenerRuleRequest | - try { - UpdateListenerRuleResponse result = apiInstance.updateListenerRule(updateListenerRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ListenerApi#updateListenerRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateListenerRuleRequest** | [**UpdateListenerRuleRequest**](UpdateListenerRuleRequest.md)| | [optional] | - -### Return type - -[**UpdateListenerRuleResponse**](UpdateListenerRuleResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/ListenerForCreation.md b/docs/ListenerForCreation.md deleted file mode 100644 index 01227482..00000000 --- a/docs/ListenerForCreation.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ListenerForCreation - -Information about the listener to create. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendPort** | **Integer** | The port on which the backend VM is listening (between `1` and `65535`, both included). | | -|**backendProtocol** | **String** | The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). | [optional] | -|**loadBalancerPort** | **Integer** | The port on which the load balancer is listening (between `1` and `65535`, both included). | | -|**loadBalancerProtocol** | **String** | The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). | | -|**serverCertificateId** | **String** | The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see [Resource Identifiers > OUTSCALE Resource Names (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). | [optional] | - - - diff --git a/docs/ListenerRule.md b/docs/ListenerRule.md deleted file mode 100644 index b0ce047f..00000000 --- a/docs/ListenerRule.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# ListenerRule - -Information about the listener rule. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**action** | **String** | The type of action for the rule (always `forward`). | [optional] | -|**hostNamePattern** | **String** | A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?]. | [optional] | -|**listenerId** | **Integer** | The ID of the listener. | [optional] | -|**listenerRuleId** | **Integer** | The ID of the listener rule. | [optional] | -|**listenerRuleName** | **String** | A human-readable name for the listener rule. | [optional] | -|**pathPattern** | **String** | A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~&quot;'@:+?]. | [optional] | -|**priority** | **Integer** | The priority level of the listener rule, between `1` and `19999` both included. Each rule must have a unique priority level. Otherwise, an error is returned. | [optional] | -|**vmIds** | **List<String>** | The IDs of the backend VMs. | [optional] | - - - diff --git a/docs/ListenerRuleForCreation.md b/docs/ListenerRuleForCreation.md deleted file mode 100644 index 21b162ce..00000000 --- a/docs/ListenerRuleForCreation.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ListenerRuleForCreation - -Information about the listener rule. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**action** | **String** | The type of action for the rule (always `forward`). | [optional] | -|**hostNamePattern** | **String** | A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?]. | [optional] | -|**listenerRuleName** | **String** | A human-readable name for the listener rule. | | -|**pathPattern** | **String** | A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~&quot;'@:+?]. | [optional] | -|**priority** | **Integer** | The priority level of the listener rule, between `1` and `19999` both included. Each rule must have a unique priority level. Otherwise, an error is returned. | | - - - diff --git a/docs/LoadBalancer.md b/docs/LoadBalancer.md deleted file mode 100644 index 44159197..00000000 --- a/docs/LoadBalancer.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# LoadBalancer - -Information about the load balancer. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessLog** | [**AccessLog**](AccessLog.md) | | [optional] | -|**applicationStickyCookiePolicies** | [**List<ApplicationStickyCookiePolicy>**](ApplicationStickyCookiePolicy.md) | The stickiness policies defined for the load balancer. | [optional] | -|**backendIps** | **List<String>** | One or more public IPs of backend VMs. | [optional] | -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs for the load balancer. | [optional] | -|**dnsName** | **String** | The DNS name of the load balancer. | [optional] | -|**healthCheck** | [**HealthCheck**](HealthCheck.md) | | [optional] | -|**listeners** | [**List<Listener>**](Listener.md) | The listeners for the load balancer. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | [optional] | -|**loadBalancerStickyCookiePolicies** | [**List<LoadBalancerStickyCookiePolicy>**](LoadBalancerStickyCookiePolicy.md) | The policies defined for the load balancer. | [optional] | -|**loadBalancerType** | **String** | The type of load balancer. Valid only for load balancers in a Net.<br /> If `LoadBalancerType` is `internet-facing`, the load balancer has a public DNS name that resolves to a public IP.<br /> If `LoadBalancerType` is `internal`, the load balancer has a public DNS name that resolves to a private IP. | [optional] | -|**netId** | **String** | The ID of the Net for the load balancer. | [optional] | -|**publicIp** | **String** | (internet-facing only) The public IP associated with the load balancer. | [optional] | -|**securedCookies** | **Boolean** | Whether secure cookies are enabled for the load balancer. | [optional] | -|**securityGroups** | **List<String>** | One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net. | [optional] | -|**sourceSecurityGroup** | [**SourceSecurityGroup**](SourceSecurityGroup.md) | | [optional] | -|**subnets** | **List<String>** | The ID of the Subnet in which the load balancer was created. | [optional] | -|**subregionNames** | **List<String>** | The ID of the Subregion in which the load balancer was created. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the load balancer. | [optional] | - - - diff --git a/docs/LoadBalancerApi.md b/docs/LoadBalancerApi.md deleted file mode 100644 index 7560cd4a..00000000 --- a/docs/LoadBalancerApi.md +++ /dev/null @@ -1,848 +0,0 @@ -# LoadBalancerApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createLoadBalancer**](LoadBalancerApi.md#createLoadBalancer) | **POST** /CreateLoadBalancer | | -| [**createLoadBalancerTags**](LoadBalancerApi.md#createLoadBalancerTags) | **POST** /CreateLoadBalancerTags | | -| [**deleteLoadBalancer**](LoadBalancerApi.md#deleteLoadBalancer) | **POST** /DeleteLoadBalancer | | -| [**deleteLoadBalancerTags**](LoadBalancerApi.md#deleteLoadBalancerTags) | **POST** /DeleteLoadBalancerTags | | -| [**deregisterVmsInLoadBalancer**](LoadBalancerApi.md#deregisterVmsInLoadBalancer) | **POST** /DeregisterVmsInLoadBalancer | | -| [**linkLoadBalancerBackendMachines**](LoadBalancerApi.md#linkLoadBalancerBackendMachines) | **POST** /LinkLoadBalancerBackendMachines | | -| [**readLoadBalancerTags**](LoadBalancerApi.md#readLoadBalancerTags) | **POST** /ReadLoadBalancerTags | | -| [**readLoadBalancers**](LoadBalancerApi.md#readLoadBalancers) | **POST** /ReadLoadBalancers | | -| [**readVmsHealth**](LoadBalancerApi.md#readVmsHealth) | **POST** /ReadVmsHealth | | -| [**registerVmsInLoadBalancer**](LoadBalancerApi.md#registerVmsInLoadBalancer) | **POST** /RegisterVmsInLoadBalancer | | -| [**unlinkLoadBalancerBackendMachines**](LoadBalancerApi.md#unlinkLoadBalancerBackendMachines) | **POST** /UnlinkLoadBalancerBackendMachines | | -| [**updateLoadBalancer**](LoadBalancerApi.md#updateLoadBalancer) | **POST** /UpdateLoadBalancer | | - - - -# **createLoadBalancer** -> CreateLoadBalancerResponse createLoadBalancer(createLoadBalancerRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - CreateLoadBalancerRequest createLoadBalancerRequest = new CreateLoadBalancerRequest(); // CreateLoadBalancerRequest | - try { - CreateLoadBalancerResponse result = apiInstance.createLoadBalancer(createLoadBalancerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#createLoadBalancer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createLoadBalancerRequest** | [**CreateLoadBalancerRequest**](CreateLoadBalancerRequest.md)| | [optional] | - -### Return type - -[**CreateLoadBalancerResponse**](CreateLoadBalancerResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **createLoadBalancerTags** -> CreateLoadBalancerTagsResponse createLoadBalancerTags(createLoadBalancerTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest = new CreateLoadBalancerTagsRequest(); // CreateLoadBalancerTagsRequest | - try { - CreateLoadBalancerTagsResponse result = apiInstance.createLoadBalancerTags(createLoadBalancerTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#createLoadBalancerTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createLoadBalancerTagsRequest** | [**CreateLoadBalancerTagsRequest**](CreateLoadBalancerTagsRequest.md)| | [optional] | - -### Return type - -[**CreateLoadBalancerTagsResponse**](CreateLoadBalancerTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteLoadBalancer** -> DeleteLoadBalancerResponse deleteLoadBalancer(deleteLoadBalancerRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - DeleteLoadBalancerRequest deleteLoadBalancerRequest = new DeleteLoadBalancerRequest(); // DeleteLoadBalancerRequest | - try { - DeleteLoadBalancerResponse result = apiInstance.deleteLoadBalancer(deleteLoadBalancerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#deleteLoadBalancer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteLoadBalancerRequest** | [**DeleteLoadBalancerRequest**](DeleteLoadBalancerRequest.md)| | [optional] | - -### Return type - -[**DeleteLoadBalancerResponse**](DeleteLoadBalancerResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteLoadBalancerTags** -> DeleteLoadBalancerTagsResponse deleteLoadBalancerTags(deleteLoadBalancerTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest = new DeleteLoadBalancerTagsRequest(); // DeleteLoadBalancerTagsRequest | - try { - DeleteLoadBalancerTagsResponse result = apiInstance.deleteLoadBalancerTags(deleteLoadBalancerTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#deleteLoadBalancerTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteLoadBalancerTagsRequest** | [**DeleteLoadBalancerTagsRequest**](DeleteLoadBalancerTagsRequest.md)| | [optional] | - -### Return type - -[**DeleteLoadBalancerTagsResponse**](DeleteLoadBalancerTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deregisterVmsInLoadBalancer** -> DeregisterVmsInLoadBalancerResponse deregisterVmsInLoadBalancer(deregisterVmsInLoadBalancerRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest = new DeregisterVmsInLoadBalancerRequest(); // DeregisterVmsInLoadBalancerRequest | - try { - DeregisterVmsInLoadBalancerResponse result = apiInstance.deregisterVmsInLoadBalancer(deregisterVmsInLoadBalancerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#deregisterVmsInLoadBalancer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deregisterVmsInLoadBalancerRequest** | [**DeregisterVmsInLoadBalancerRequest**](DeregisterVmsInLoadBalancerRequest.md)| | [optional] | - -### Return type - -[**DeregisterVmsInLoadBalancerResponse**](DeregisterVmsInLoadBalancerResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **linkLoadBalancerBackendMachines** -> LinkLoadBalancerBackendMachinesResponse linkLoadBalancerBackendMachines(linkLoadBalancerBackendMachinesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest = new LinkLoadBalancerBackendMachinesRequest(); // LinkLoadBalancerBackendMachinesRequest | - try { - LinkLoadBalancerBackendMachinesResponse result = apiInstance.linkLoadBalancerBackendMachines(linkLoadBalancerBackendMachinesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#linkLoadBalancerBackendMachines"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkLoadBalancerBackendMachinesRequest** | [**LinkLoadBalancerBackendMachinesRequest**](LinkLoadBalancerBackendMachinesRequest.md)| | [optional] | - -### Return type - -[**LinkLoadBalancerBackendMachinesResponse**](LinkLoadBalancerBackendMachinesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readLoadBalancerTags** -> ReadLoadBalancerTagsResponse readLoadBalancerTags(readLoadBalancerTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest = new ReadLoadBalancerTagsRequest(); // ReadLoadBalancerTagsRequest | - try { - ReadLoadBalancerTagsResponse result = apiInstance.readLoadBalancerTags(readLoadBalancerTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#readLoadBalancerTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readLoadBalancerTagsRequest** | [**ReadLoadBalancerTagsRequest**](ReadLoadBalancerTagsRequest.md)| | [optional] | - -### Return type - -[**ReadLoadBalancerTagsResponse**](ReadLoadBalancerTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readLoadBalancers** -> ReadLoadBalancersResponse readLoadBalancers(readLoadBalancersRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - ReadLoadBalancersRequest readLoadBalancersRequest = new ReadLoadBalancersRequest(); // ReadLoadBalancersRequest | - try { - ReadLoadBalancersResponse result = apiInstance.readLoadBalancers(readLoadBalancersRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#readLoadBalancers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readLoadBalancersRequest** | [**ReadLoadBalancersRequest**](ReadLoadBalancersRequest.md)| | [optional] | - -### Return type - -[**ReadLoadBalancersResponse**](ReadLoadBalancersResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readVmsHealth** -> ReadVmsHealthResponse readVmsHealth(readVmsHealthRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - ReadVmsHealthRequest readVmsHealthRequest = new ReadVmsHealthRequest(); // ReadVmsHealthRequest | - try { - ReadVmsHealthResponse result = apiInstance.readVmsHealth(readVmsHealthRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#readVmsHealth"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmsHealthRequest** | [**ReadVmsHealthRequest**](ReadVmsHealthRequest.md)| | [optional] | - -### Return type - -[**ReadVmsHealthResponse**](ReadVmsHealthResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **registerVmsInLoadBalancer** -> RegisterVmsInLoadBalancerResponse registerVmsInLoadBalancer(registerVmsInLoadBalancerRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest = new RegisterVmsInLoadBalancerRequest(); // RegisterVmsInLoadBalancerRequest | - try { - RegisterVmsInLoadBalancerResponse result = apiInstance.registerVmsInLoadBalancer(registerVmsInLoadBalancerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#registerVmsInLoadBalancer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **registerVmsInLoadBalancerRequest** | [**RegisterVmsInLoadBalancerRequest**](RegisterVmsInLoadBalancerRequest.md)| | [optional] | - -### Return type - -[**RegisterVmsInLoadBalancerResponse**](RegisterVmsInLoadBalancerResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **unlinkLoadBalancerBackendMachines** -> UnlinkLoadBalancerBackendMachinesResponse unlinkLoadBalancerBackendMachines(unlinkLoadBalancerBackendMachinesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest = new UnlinkLoadBalancerBackendMachinesRequest(); // UnlinkLoadBalancerBackendMachinesRequest | - try { - UnlinkLoadBalancerBackendMachinesResponse result = apiInstance.unlinkLoadBalancerBackendMachines(unlinkLoadBalancerBackendMachinesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#unlinkLoadBalancerBackendMachines"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkLoadBalancerBackendMachinesRequest** | [**UnlinkLoadBalancerBackendMachinesRequest**](UnlinkLoadBalancerBackendMachinesRequest.md)| | [optional] | - -### Return type - -[**UnlinkLoadBalancerBackendMachinesResponse**](UnlinkLoadBalancerBackendMachinesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateLoadBalancer** -> UpdateLoadBalancerResponse updateLoadBalancer(updateLoadBalancerRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerApi apiInstance = new LoadBalancerApi(defaultClient); - UpdateLoadBalancerRequest updateLoadBalancerRequest = new UpdateLoadBalancerRequest(); // UpdateLoadBalancerRequest | - try { - UpdateLoadBalancerResponse result = apiInstance.updateLoadBalancer(updateLoadBalancerRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerApi#updateLoadBalancer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateLoadBalancerRequest** | [**UpdateLoadBalancerRequest**](UpdateLoadBalancerRequest.md)| | [optional] | - -### Return type - -[**UpdateLoadBalancerResponse**](UpdateLoadBalancerResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/LoadBalancerLight.md b/docs/LoadBalancerLight.md deleted file mode 100644 index 2d59a03d..00000000 --- a/docs/LoadBalancerLight.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LoadBalancerLight - -Information about the load balancer. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancerName** | **String** | The name of the load balancer to which the listener is attached. | | -|**loadBalancerPort** | **Integer** | The port of load balancer on which the load balancer is listening (between `1` and `65535` both included). | | - - - diff --git a/docs/LoadBalancerPolicyApi.md b/docs/LoadBalancerPolicyApi.md deleted file mode 100644 index 48e8906d..00000000 --- a/docs/LoadBalancerPolicyApi.md +++ /dev/null @@ -1,148 +0,0 @@ -# LoadBalancerPolicyApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createLoadBalancerPolicy**](LoadBalancerPolicyApi.md#createLoadBalancerPolicy) | **POST** /CreateLoadBalancerPolicy | | -| [**deleteLoadBalancerPolicy**](LoadBalancerPolicyApi.md#deleteLoadBalancerPolicy) | **POST** /DeleteLoadBalancerPolicy | | - - - -# **createLoadBalancerPolicy** -> CreateLoadBalancerPolicyResponse createLoadBalancerPolicy(createLoadBalancerPolicyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerPolicyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerPolicyApi apiInstance = new LoadBalancerPolicyApi(defaultClient); - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest = new CreateLoadBalancerPolicyRequest(); // CreateLoadBalancerPolicyRequest | - try { - CreateLoadBalancerPolicyResponse result = apiInstance.createLoadBalancerPolicy(createLoadBalancerPolicyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerPolicyApi#createLoadBalancerPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createLoadBalancerPolicyRequest** | [**CreateLoadBalancerPolicyRequest**](CreateLoadBalancerPolicyRequest.md)| | [optional] | - -### Return type - -[**CreateLoadBalancerPolicyResponse**](CreateLoadBalancerPolicyResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteLoadBalancerPolicy** -> DeleteLoadBalancerPolicyResponse deleteLoadBalancerPolicy(deleteLoadBalancerPolicyRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LoadBalancerPolicyApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - LoadBalancerPolicyApi apiInstance = new LoadBalancerPolicyApi(defaultClient); - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest = new DeleteLoadBalancerPolicyRequest(); // DeleteLoadBalancerPolicyRequest | - try { - DeleteLoadBalancerPolicyResponse result = apiInstance.deleteLoadBalancerPolicy(deleteLoadBalancerPolicyRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LoadBalancerPolicyApi#deleteLoadBalancerPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteLoadBalancerPolicyRequest** | [**DeleteLoadBalancerPolicyRequest**](DeleteLoadBalancerPolicyRequest.md)| | [optional] | - -### Return type - -[**DeleteLoadBalancerPolicyResponse**](DeleteLoadBalancerPolicyResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/LoadBalancerStickyCookiePolicy.md b/docs/LoadBalancerStickyCookiePolicy.md deleted file mode 100644 index 458953b6..00000000 --- a/docs/LoadBalancerStickyCookiePolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LoadBalancerStickyCookiePolicy - -Information about the stickiness policy. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cookieExpirationPeriod** | **Integer** | The time period, in seconds, after which the cookie should be considered stale.<br /> If `1`, the stickiness session lasts for the duration of the browser session. | [optional] | -|**policyName** | **String** | The name of the stickiness policy. | [optional] | - - - diff --git a/docs/LoadBalancerTag.md b/docs/LoadBalancerTag.md deleted file mode 100644 index 4d161242..00000000 --- a/docs/LoadBalancerTag.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# LoadBalancerTag - -Information about the load balancer tag. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | The key of the tag. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | [optional] | -|**value** | **String** | The value of the tag. | [optional] | - - - diff --git a/docs/Location.md b/docs/Location.md deleted file mode 100644 index 3605d355..00000000 --- a/docs/Location.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Location - -Information about the DirectLink location. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | The location code, to be set as the `Location` parameter of the *CreateDirectLink* method when creating a DirectLink. | [optional] | -|**name** | **String** | The name and description of the location, corresponding to a datacenter. | [optional] | - - - diff --git a/docs/LocationApi.md b/docs/LocationApi.md deleted file mode 100644 index ae956185..00000000 --- a/docs/LocationApi.md +++ /dev/null @@ -1,71 +0,0 @@ -# LocationApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readLocations**](LocationApi.md#readLocations) | **POST** /ReadLocations | | - - - -# **readLocations** -> ReadLocationsResponse readLocations(readLocationsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.LocationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - LocationApi apiInstance = new LocationApi(defaultClient); - ReadLocationsRequest readLocationsRequest = new ReadLocationsRequest(); // ReadLocationsRequest | - try { - ReadLocationsResponse result = apiInstance.readLocations(readLocationsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LocationApi#readLocations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readLocationsRequest** | [**ReadLocationsRequest**](ReadLocationsRequest.md)| | [optional] | - -### Return type - -[**ReadLocationsResponse**](ReadLocationsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/Log.md b/docs/Log.md deleted file mode 100644 index 11fed8c8..00000000 --- a/docs/Log.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# Log - -Information about the log. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the logged call. | [optional] | -|**callDuration** | **Integer** | The duration of the logged call, in microseconds. | [optional] | -|**queryAccessKey** | **String** | The access key used for the logged call. | [optional] | -|**queryApiName** | **String** | The name of the API used by the logged call (always `oapi` for the OUTSCALE API). | [optional] | -|**queryApiVersion** | **String** | The version of the API used by the logged call. | [optional] | -|**queryCallName** | **String** | The name of the logged call. | [optional] | -|**queryDate** | **OffsetDateTime** | The date and time (UTC) of the logged call. | [optional] | -|**queryHeaderRaw** | **String** | The raw header of the HTTP request of the logged call. | [optional] | -|**queryHeaderSize** | **Integer** | The size of the raw header of the HTTP request of the logged call, in bytes. | [optional] | -|**queryIpAddress** | **String** | The IP used for the logged call. | [optional] | -|**queryPayloadRaw** | **String** | The raw payload of the HTTP request of the logged call. | [optional] | -|**queryPayloadSize** | **Integer** | The size of the raw payload of the HTTP request of the logged call, in bytes. | [optional] | -|**queryUserAgent** | **String** | The user agent of the HTTP request of the logged call. | [optional] | -|**requestId** | **String** | The request ID provided in the response of the logged call. | [optional] | -|**responseSize** | **Integer** | The size of the response of the logged call, in bytes. | [optional] | -|**responseStatusCode** | **Integer** | The HTTP status code of the response of the logged call. | [optional] | - - - diff --git a/docs/MaintenanceEvent.md b/docs/MaintenanceEvent.md deleted file mode 100644 index e1a6dcc6..00000000 --- a/docs/MaintenanceEvent.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# MaintenanceEvent - -Information about the maintenance event. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | The code of the event (`system-reboot` \\| `system-maintenance`). | [optional] | -|**description** | **String** | The description of the event. | [optional] | -|**notAfter** | **LocalDate** | The latest scheduled end date and time (UTC) for the event. | [optional] | -|**notBefore** | **LocalDate** | The earliest scheduled start date and time (UTC) for the event. | [optional] | - - - diff --git a/docs/NatService.md b/docs/NatService.md deleted file mode 100644 index 52a7d997..00000000 --- a/docs/NatService.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# NatService - -Information about the NAT service. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientToken** | **String** | The idempotency token provided when creating the NAT service. | [optional] | -|**natServiceId** | **String** | The ID of the NAT service. | [optional] | -|**netId** | **String** | The ID of the Net in which the NAT service is. | [optional] | -|**publicIps** | [**List<PublicIpLight>**](PublicIpLight.md) | Information about the public IP or IPs associated with the NAT service. | [optional] | -|**state** | **String** | The state of the NAT service (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**subnetId** | **String** | The ID of the Subnet in which the NAT service is. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the NAT service. | [optional] | - - - diff --git a/docs/NatServiceApi.md b/docs/NatServiceApi.md deleted file mode 100644 index 71c1b83e..00000000 --- a/docs/NatServiceApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# NatServiceApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createNatService**](NatServiceApi.md#createNatService) | **POST** /CreateNatService | | -| [**deleteNatService**](NatServiceApi.md#deleteNatService) | **POST** /DeleteNatService | | -| [**readNatServices**](NatServiceApi.md#readNatServices) | **POST** /ReadNatServices | | - - - -# **createNatService** -> CreateNatServiceResponse createNatService(createNatServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NatServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NatServiceApi apiInstance = new NatServiceApi(defaultClient); - CreateNatServiceRequest createNatServiceRequest = new CreateNatServiceRequest(); // CreateNatServiceRequest | - try { - CreateNatServiceResponse result = apiInstance.createNatService(createNatServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NatServiceApi#createNatService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createNatServiceRequest** | [**CreateNatServiceRequest**](CreateNatServiceRequest.md)| | [optional] | - -### Return type - -[**CreateNatServiceResponse**](CreateNatServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteNatService** -> DeleteNatServiceResponse deleteNatService(deleteNatServiceRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NatServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NatServiceApi apiInstance = new NatServiceApi(defaultClient); - DeleteNatServiceRequest deleteNatServiceRequest = new DeleteNatServiceRequest(); // DeleteNatServiceRequest | - try { - DeleteNatServiceResponse result = apiInstance.deleteNatService(deleteNatServiceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NatServiceApi#deleteNatService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteNatServiceRequest** | [**DeleteNatServiceRequest**](DeleteNatServiceRequest.md)| | [optional] | - -### Return type - -[**DeleteNatServiceResponse**](DeleteNatServiceResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readNatServices** -> ReadNatServicesResponse readNatServices(readNatServicesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NatServiceApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NatServiceApi apiInstance = new NatServiceApi(defaultClient); - ReadNatServicesRequest readNatServicesRequest = new ReadNatServicesRequest(); // ReadNatServicesRequest | - try { - ReadNatServicesResponse result = apiInstance.readNatServices(readNatServicesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NatServiceApi#readNatServices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNatServicesRequest** | [**ReadNatServicesRequest**](ReadNatServicesRequest.md)| | [optional] | - -### Return type - -[**ReadNatServicesResponse**](ReadNatServicesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/Net.md b/docs/Net.md deleted file mode 100644 index bcafe8eb..00000000 --- a/docs/Net.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Net - -Information about the Net. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSetId** | **String** | The ID of the DHCP options set (or `default` if you want to associate the default one). | [optional] | -|**ipRange** | **String** | The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**netId** | **String** | The ID of the Net. | [optional] | -|**state** | **String** | The state of the Net (`pending` \\| `available` \\| `deleting`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the Net. | [optional] | -|**tenancy** | **String** | The VM tenancy in a Net. | [optional] | - - - diff --git a/docs/NetAccessPoint.md b/docs/NetAccessPoint.md deleted file mode 100644 index c64a4b09..00000000 --- a/docs/NetAccessPoint.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# NetAccessPoint - -Information about the Net access point. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netAccessPointId** | **String** | The ID of the Net access point. | [optional] | -|**netId** | **String** | The ID of the Net with which the Net access point is associated. | [optional] | -|**routeTableIds** | **List<String>** | The ID of the route tables associated with the Net access point. | [optional] | -|**serviceName** | **String** | The name of the service with which the Net access point is associated. | [optional] | -|**state** | **String** | The state of the Net access point (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the Net access point. | [optional] | - - - diff --git a/docs/NetAccessPointApi.md b/docs/NetAccessPointApi.md deleted file mode 100644 index 90ecdb44..00000000 --- a/docs/NetAccessPointApi.md +++ /dev/null @@ -1,351 +0,0 @@ -# NetAccessPointApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createNetAccessPoint**](NetAccessPointApi.md#createNetAccessPoint) | **POST** /CreateNetAccessPoint | | -| [**deleteNetAccessPoint**](NetAccessPointApi.md#deleteNetAccessPoint) | **POST** /DeleteNetAccessPoint | | -| [**readNetAccessPointServices**](NetAccessPointApi.md#readNetAccessPointServices) | **POST** /ReadNetAccessPointServices | | -| [**readNetAccessPoints**](NetAccessPointApi.md#readNetAccessPoints) | **POST** /ReadNetAccessPoints | | -| [**updateNetAccessPoint**](NetAccessPointApi.md#updateNetAccessPoint) | **POST** /UpdateNetAccessPoint | | - - - -# **createNetAccessPoint** -> CreateNetAccessPointResponse createNetAccessPoint(createNetAccessPointRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetAccessPointApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetAccessPointApi apiInstance = new NetAccessPointApi(defaultClient); - CreateNetAccessPointRequest createNetAccessPointRequest = new CreateNetAccessPointRequest(); // CreateNetAccessPointRequest | - try { - CreateNetAccessPointResponse result = apiInstance.createNetAccessPoint(createNetAccessPointRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetAccessPointApi#createNetAccessPoint"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createNetAccessPointRequest** | [**CreateNetAccessPointRequest**](CreateNetAccessPointRequest.md)| | [optional] | - -### Return type - -[**CreateNetAccessPointResponse**](CreateNetAccessPointResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteNetAccessPoint** -> DeleteNetAccessPointResponse deleteNetAccessPoint(deleteNetAccessPointRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetAccessPointApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetAccessPointApi apiInstance = new NetAccessPointApi(defaultClient); - DeleteNetAccessPointRequest deleteNetAccessPointRequest = new DeleteNetAccessPointRequest(); // DeleteNetAccessPointRequest | - try { - DeleteNetAccessPointResponse result = apiInstance.deleteNetAccessPoint(deleteNetAccessPointRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetAccessPointApi#deleteNetAccessPoint"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteNetAccessPointRequest** | [**DeleteNetAccessPointRequest**](DeleteNetAccessPointRequest.md)| | [optional] | - -### Return type - -[**DeleteNetAccessPointResponse**](DeleteNetAccessPointResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readNetAccessPointServices** -> ReadNetAccessPointServicesResponse readNetAccessPointServices(readNetAccessPointServicesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetAccessPointApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - NetAccessPointApi apiInstance = new NetAccessPointApi(defaultClient); - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest = new ReadNetAccessPointServicesRequest(); // ReadNetAccessPointServicesRequest | - try { - ReadNetAccessPointServicesResponse result = apiInstance.readNetAccessPointServices(readNetAccessPointServicesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetAccessPointApi#readNetAccessPointServices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNetAccessPointServicesRequest** | [**ReadNetAccessPointServicesRequest**](ReadNetAccessPointServicesRequest.md)| | [optional] | - -### Return type - -[**ReadNetAccessPointServicesResponse**](ReadNetAccessPointServicesResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readNetAccessPoints** -> ReadNetAccessPointsResponse readNetAccessPoints(readNetAccessPointsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetAccessPointApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetAccessPointApi apiInstance = new NetAccessPointApi(defaultClient); - ReadNetAccessPointsRequest readNetAccessPointsRequest = new ReadNetAccessPointsRequest(); // ReadNetAccessPointsRequest | - try { - ReadNetAccessPointsResponse result = apiInstance.readNetAccessPoints(readNetAccessPointsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetAccessPointApi#readNetAccessPoints"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNetAccessPointsRequest** | [**ReadNetAccessPointsRequest**](ReadNetAccessPointsRequest.md)| | [optional] | - -### Return type - -[**ReadNetAccessPointsResponse**](ReadNetAccessPointsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateNetAccessPoint** -> UpdateNetAccessPointResponse updateNetAccessPoint(updateNetAccessPointRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetAccessPointApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetAccessPointApi apiInstance = new NetAccessPointApi(defaultClient); - UpdateNetAccessPointRequest updateNetAccessPointRequest = new UpdateNetAccessPointRequest(); // UpdateNetAccessPointRequest | - try { - UpdateNetAccessPointResponse result = apiInstance.updateNetAccessPoint(updateNetAccessPointRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetAccessPointApi#updateNetAccessPoint"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateNetAccessPointRequest** | [**UpdateNetAccessPointRequest**](UpdateNetAccessPointRequest.md)| | [optional] | - -### Return type - -[**UpdateNetAccessPointResponse**](UpdateNetAccessPointResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/NetApi.md b/docs/NetApi.md deleted file mode 100644 index 3ba398d7..00000000 --- a/docs/NetApi.md +++ /dev/null @@ -1,301 +0,0 @@ -# NetApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createNet**](NetApi.md#createNet) | **POST** /CreateNet | | -| [**deleteNet**](NetApi.md#deleteNet) | **POST** /DeleteNet | | -| [**readNets**](NetApi.md#readNets) | **POST** /ReadNets | | -| [**updateNet**](NetApi.md#updateNet) | **POST** /UpdateNet | | - - - -# **createNet** -> CreateNetResponse createNet(createNetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetApi apiInstance = new NetApi(defaultClient); - CreateNetRequest createNetRequest = new CreateNetRequest(); // CreateNetRequest | - try { - CreateNetResponse result = apiInstance.createNet(createNetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetApi#createNet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createNetRequest** | [**CreateNetRequest**](CreateNetRequest.md)| | [optional] | - -### Return type - -[**CreateNetResponse**](CreateNetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteNet** -> DeleteNetResponse deleteNet(deleteNetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetApi apiInstance = new NetApi(defaultClient); - DeleteNetRequest deleteNetRequest = new DeleteNetRequest(); // DeleteNetRequest | - try { - DeleteNetResponse result = apiInstance.deleteNet(deleteNetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetApi#deleteNet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteNetRequest** | [**DeleteNetRequest**](DeleteNetRequest.md)| | [optional] | - -### Return type - -[**DeleteNetResponse**](DeleteNetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readNets** -> ReadNetsResponse readNets(readNetsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetApi apiInstance = new NetApi(defaultClient); - ReadNetsRequest readNetsRequest = new ReadNetsRequest(); // ReadNetsRequest | - try { - ReadNetsResponse result = apiInstance.readNets(readNetsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetApi#readNets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNetsRequest** | [**ReadNetsRequest**](ReadNetsRequest.md)| | [optional] | - -### Return type - -[**ReadNetsResponse**](ReadNetsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateNet** -> UpdateNetResponse updateNet(updateNetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetApi apiInstance = new NetApi(defaultClient); - UpdateNetRequest updateNetRequest = new UpdateNetRequest(); // UpdateNetRequest | - try { - UpdateNetResponse result = apiInstance.updateNet(updateNetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetApi#updateNet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateNetRequest** | [**UpdateNetRequest**](UpdateNetRequest.md)| | [optional] | - -### Return type - -[**UpdateNetResponse**](UpdateNetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/NetPeering.md b/docs/NetPeering.md deleted file mode 100644 index ac00d877..00000000 --- a/docs/NetPeering.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# NetPeering - -Information about the Net peering. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accepterNet** | [**AccepterNet**](AccepterNet.md) | | [optional] | -|**expirationDate** | **OffsetDateTime** | The date and time (UTC) at which the Net peerings expire. | [optional] | -|**netPeeringId** | **String** | The ID of the Net peering. | [optional] | -|**sourceNet** | [**SourceNet**](SourceNet.md) | | [optional] | -|**state** | [**NetPeeringState**](NetPeeringState.md) | | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the Net peering. | [optional] | - - - diff --git a/docs/NetPeeringApi.md b/docs/NetPeeringApi.md deleted file mode 100644 index e0058b8d..00000000 --- a/docs/NetPeeringApi.md +++ /dev/null @@ -1,376 +0,0 @@ -# NetPeeringApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**acceptNetPeering**](NetPeeringApi.md#acceptNetPeering) | **POST** /AcceptNetPeering | | -| [**createNetPeering**](NetPeeringApi.md#createNetPeering) | **POST** /CreateNetPeering | | -| [**deleteNetPeering**](NetPeeringApi.md#deleteNetPeering) | **POST** /DeleteNetPeering | | -| [**readNetPeerings**](NetPeeringApi.md#readNetPeerings) | **POST** /ReadNetPeerings | | -| [**rejectNetPeering**](NetPeeringApi.md#rejectNetPeering) | **POST** /RejectNetPeering | | - - - -# **acceptNetPeering** -> AcceptNetPeeringResponse acceptNetPeering(acceptNetPeeringRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetPeeringApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetPeeringApi apiInstance = new NetPeeringApi(defaultClient); - AcceptNetPeeringRequest acceptNetPeeringRequest = new AcceptNetPeeringRequest(); // AcceptNetPeeringRequest | - try { - AcceptNetPeeringResponse result = apiInstance.acceptNetPeering(acceptNetPeeringRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetPeeringApi#acceptNetPeering"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **acceptNetPeeringRequest** | [**AcceptNetPeeringRequest**](AcceptNetPeeringRequest.md)| | [optional] | - -### Return type - -[**AcceptNetPeeringResponse**](AcceptNetPeeringResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **createNetPeering** -> CreateNetPeeringResponse createNetPeering(createNetPeeringRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetPeeringApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetPeeringApi apiInstance = new NetPeeringApi(defaultClient); - CreateNetPeeringRequest createNetPeeringRequest = new CreateNetPeeringRequest(); // CreateNetPeeringRequest | - try { - CreateNetPeeringResponse result = apiInstance.createNetPeering(createNetPeeringRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetPeeringApi#createNetPeering"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createNetPeeringRequest** | [**CreateNetPeeringRequest**](CreateNetPeeringRequest.md)| | [optional] | - -### Return type - -[**CreateNetPeeringResponse**](CreateNetPeeringResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteNetPeering** -> DeleteNetPeeringResponse deleteNetPeering(deleteNetPeeringRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetPeeringApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetPeeringApi apiInstance = new NetPeeringApi(defaultClient); - DeleteNetPeeringRequest deleteNetPeeringRequest = new DeleteNetPeeringRequest(); // DeleteNetPeeringRequest | - try { - DeleteNetPeeringResponse result = apiInstance.deleteNetPeering(deleteNetPeeringRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetPeeringApi#deleteNetPeering"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteNetPeeringRequest** | [**DeleteNetPeeringRequest**](DeleteNetPeeringRequest.md)| | [optional] | - -### Return type - -[**DeleteNetPeeringResponse**](DeleteNetPeeringResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readNetPeerings** -> ReadNetPeeringsResponse readNetPeerings(readNetPeeringsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetPeeringApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetPeeringApi apiInstance = new NetPeeringApi(defaultClient); - ReadNetPeeringsRequest readNetPeeringsRequest = new ReadNetPeeringsRequest(); // ReadNetPeeringsRequest | - try { - ReadNetPeeringsResponse result = apiInstance.readNetPeerings(readNetPeeringsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetPeeringApi#readNetPeerings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNetPeeringsRequest** | [**ReadNetPeeringsRequest**](ReadNetPeeringsRequest.md)| | [optional] | - -### Return type - -[**ReadNetPeeringsResponse**](ReadNetPeeringsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **rejectNetPeering** -> RejectNetPeeringResponse rejectNetPeering(rejectNetPeeringRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NetPeeringApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NetPeeringApi apiInstance = new NetPeeringApi(defaultClient); - RejectNetPeeringRequest rejectNetPeeringRequest = new RejectNetPeeringRequest(); // RejectNetPeeringRequest | - try { - RejectNetPeeringResponse result = apiInstance.rejectNetPeering(rejectNetPeeringRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetPeeringApi#rejectNetPeering"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rejectNetPeeringRequest** | [**RejectNetPeeringRequest**](RejectNetPeeringRequest.md)| | [optional] | - -### Return type - -[**RejectNetPeeringResponse**](RejectNetPeeringResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/NetPeeringState.md b/docs/NetPeeringState.md deleted file mode 100644 index 6419e747..00000000 --- a/docs/NetPeeringState.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# NetPeeringState - -Information about the state of the Net peering. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | Additional information about the state of the Net peering. | [optional] | -|**name** | **String** | The state of the Net peering (`pending-acceptance` \\| `active` \\| `rejected` \\| `failed` \\| `expired` \\| `deleted`). | [optional] | - - - diff --git a/docs/NetToVirtualGatewayLink.md b/docs/NetToVirtualGatewayLink.md deleted file mode 100644 index f2a3e1fb..00000000 --- a/docs/NetToVirtualGatewayLink.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# NetToVirtualGatewayLink - -Information about the attachment. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netId** | **String** | The ID of the Net to which the virtual gateway is attached. | [optional] | -|**state** | **String** | The state of the attachment (`attaching` \\| `attached` \\| `detaching` \\| `detached`). | [optional] | - - - diff --git a/docs/Nic.md b/docs/Nic.md deleted file mode 100644 index 05a8fb2b..00000000 --- a/docs/Nic.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# Nic - -Information about the NIC. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the NIC. | [optional] | -|**description** | **String** | The description of the NIC. | [optional] | -|**isSourceDestChecked** | **Boolean** | (Net only) If true, the source/destination check is enabled. If false, it is disabled. | [optional] | -|**linkNic** | [**LinkNic**](LinkNic.md) | | [optional] | -|**linkPublicIp** | [**LinkPublicIp**](LinkPublicIp.md) | | [optional] | -|**macAddress** | **String** | The Media Access Control (MAC) address of the NIC. | [optional] | -|**netId** | **String** | The ID of the Net for the NIC. | [optional] | -|**nicId** | **String** | The ID of the NIC. | [optional] | -|**privateDnsName** | **String** | The name of the private DNS. | [optional] | -|**privateIps** | [**List<PrivateIp>**](PrivateIp.md) | The private IPs of the NIC. | [optional] | -|**securityGroups** | [**List<SecurityGroupLight>**](SecurityGroupLight.md) | One or more IDs of security groups for the NIC. | [optional] | -|**state** | **String** | The state of the NIC (`available` \\| `attaching` \\| `in-use` \\| `detaching`). | [optional] | -|**subnetId** | **String** | The ID of the Subnet. | [optional] | -|**subregionName** | **String** | The Subregion in which the NIC is located. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the NIC. | [optional] | - - - diff --git a/docs/NicApi.md b/docs/NicApi.md deleted file mode 100644 index 3c404b42..00000000 --- a/docs/NicApi.md +++ /dev/null @@ -1,592 +0,0 @@ -# NicApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createNic**](NicApi.md#createNic) | **POST** /CreateNic | | -| [**deleteNic**](NicApi.md#deleteNic) | **POST** /DeleteNic | | -| [**linkNic**](NicApi.md#linkNic) | **POST** /LinkNic | | -| [**linkPrivateIps**](NicApi.md#linkPrivateIps) | **POST** /LinkPrivateIps | | -| [**readNics**](NicApi.md#readNics) | **POST** /ReadNics | | -| [**unlinkNic**](NicApi.md#unlinkNic) | **POST** /UnlinkNic | | -| [**unlinkPrivateIps**](NicApi.md#unlinkPrivateIps) | **POST** /UnlinkPrivateIps | | -| [**updateNic**](NicApi.md#updateNic) | **POST** /UpdateNic | | - - - -# **createNic** -> CreateNicResponse createNic(createNicRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - CreateNicRequest createNicRequest = new CreateNicRequest(); // CreateNicRequest | - try { - CreateNicResponse result = apiInstance.createNic(createNicRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#createNic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createNicRequest** | [**CreateNicRequest**](CreateNicRequest.md)| | [optional] | - -### Return type - -[**CreateNicResponse**](CreateNicResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteNic** -> DeleteNicResponse deleteNic(deleteNicRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - DeleteNicRequest deleteNicRequest = new DeleteNicRequest(); // DeleteNicRequest | - try { - DeleteNicResponse result = apiInstance.deleteNic(deleteNicRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#deleteNic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteNicRequest** | [**DeleteNicRequest**](DeleteNicRequest.md)| | [optional] | - -### Return type - -[**DeleteNicResponse**](DeleteNicResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkNic** -> LinkNicResponse linkNic(linkNicRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - LinkNicRequest linkNicRequest = new LinkNicRequest(); // LinkNicRequest | - try { - LinkNicResponse result = apiInstance.linkNic(linkNicRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#linkNic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkNicRequest** | [**LinkNicRequest**](LinkNicRequest.md)| | [optional] | - -### Return type - -[**LinkNicResponse**](LinkNicResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkPrivateIps** -> LinkPrivateIpsResponse linkPrivateIps(linkPrivateIpsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - LinkPrivateIpsRequest linkPrivateIpsRequest = new LinkPrivateIpsRequest(); // LinkPrivateIpsRequest | - try { - LinkPrivateIpsResponse result = apiInstance.linkPrivateIps(linkPrivateIpsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#linkPrivateIps"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkPrivateIpsRequest** | [**LinkPrivateIpsRequest**](LinkPrivateIpsRequest.md)| | [optional] | - -### Return type - -[**LinkPrivateIpsResponse**](LinkPrivateIpsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readNics** -> ReadNicsResponse readNics(readNicsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - ReadNicsRequest readNicsRequest = new ReadNicsRequest(); // ReadNicsRequest | - try { - ReadNicsResponse result = apiInstance.readNics(readNicsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#readNics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readNicsRequest** | [**ReadNicsRequest**](ReadNicsRequest.md)| | [optional] | - -### Return type - -[**ReadNicsResponse**](ReadNicsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkNic** -> UnlinkNicResponse unlinkNic(unlinkNicRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - UnlinkNicRequest unlinkNicRequest = new UnlinkNicRequest(); // UnlinkNicRequest | - try { - UnlinkNicResponse result = apiInstance.unlinkNic(unlinkNicRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#unlinkNic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkNicRequest** | [**UnlinkNicRequest**](UnlinkNicRequest.md)| | [optional] | - -### Return type - -[**UnlinkNicResponse**](UnlinkNicResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkPrivateIps** -> UnlinkPrivateIpsResponse unlinkPrivateIps(unlinkPrivateIpsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest = new UnlinkPrivateIpsRequest(); // UnlinkPrivateIpsRequest | - try { - UnlinkPrivateIpsResponse result = apiInstance.unlinkPrivateIps(unlinkPrivateIpsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#unlinkPrivateIps"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkPrivateIpsRequest** | [**UnlinkPrivateIpsRequest**](UnlinkPrivateIpsRequest.md)| | [optional] | - -### Return type - -[**UnlinkPrivateIpsResponse**](UnlinkPrivateIpsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateNic** -> UpdateNicResponse updateNic(updateNicRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.NicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NicApi apiInstance = new NicApi(defaultClient); - UpdateNicRequest updateNicRequest = new UpdateNicRequest(); // UpdateNicRequest | - try { - UpdateNicResponse result = apiInstance.updateNic(updateNicRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NicApi#updateNic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateNicRequest** | [**UpdateNicRequest**](UpdateNicRequest.md)| | [optional] | - -### Return type - -[**UpdateNicResponse**](UpdateNicResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/NicForVmCreation.md b/docs/NicForVmCreation.md deleted file mode 100644 index 83f87559..00000000 --- a/docs/NicForVmCreation.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# NicForVmCreation - -Information about the network interface card (NIC) when creating a virtual machine (VM). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see [UpdateNic](#updatenic). | [optional] | -|**description** | **String** | The description of the NIC, if you are creating a NIC when creating the VM. | [optional] | -|**deviceNumber** | **Integer** | The index of the VM device for the NIC attachment (between `0` and `7`, both included). This parameter is required if you create a NIC when creating the VM. | [optional] | -|**nicId** | **String** | The ID of the NIC, if you are attaching an existing NIC when creating a VM. | [optional] | -|**privateIps** | [**List<PrivateIpLight>**](PrivateIpLight.md) | One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP. | [optional] | -|**secondaryPrivateIpCount** | **Integer** | The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the `PrivateIps` parameter. | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the NIC, if you create a NIC when creating a VM. | [optional] | -|**subnetId** | **String** | The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM. | [optional] | - - - diff --git a/docs/NicLight.md b/docs/NicLight.md deleted file mode 100644 index a1af4e9b..00000000 --- a/docs/NicLight.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# NicLight - -Information about the network interface card (NIC). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the NIC. | [optional] | -|**description** | **String** | The description of the NIC. | [optional] | -|**isSourceDestChecked** | **Boolean** | (Net only) If true, the source/destination check is enabled. If false, it is disabled. | [optional] | -|**linkNic** | [**LinkNicLight**](LinkNicLight.md) | | [optional] | -|**linkPublicIp** | [**LinkPublicIpLightForVm**](LinkPublicIpLightForVm.md) | | [optional] | -|**macAddress** | **String** | The Media Access Control (MAC) address of the NIC. | [optional] | -|**netId** | **String** | The ID of the Net for the NIC. | [optional] | -|**nicId** | **String** | The ID of the NIC. | [optional] | -|**privateDnsName** | **String** | The name of the private DNS. | [optional] | -|**privateIps** | [**List<PrivateIpLightForVm>**](PrivateIpLightForVm.md) | The private IP or IPs of the NIC. | [optional] | -|**securityGroups** | [**List<SecurityGroupLight>**](SecurityGroupLight.md) | One or more IDs of security groups for the NIC. | [optional] | -|**state** | **String** | The state of the NIC (`available` \\| `attaching` \\| `in-use` \\| `detaching`). | [optional] | -|**subnetId** | **String** | The ID of the Subnet for the NIC. | [optional] | - - - diff --git a/docs/OsuApiKey.md b/docs/OsuApiKey.md deleted file mode 100644 index 2c9451e4..00000000 --- a/docs/OsuApiKey.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OsuApiKey - -Information about the OOS API key. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiKeyId** | **String** | The API key of the OOS account that enables you to access the bucket. | [optional] | -|**secretKey** | **String** | The secret key of the OOS account that enables you to access the bucket. | [optional] | - - - diff --git a/docs/OsuExportImageExportTask.md b/docs/OsuExportImageExportTask.md deleted file mode 100644 index 47020d76..00000000 --- a/docs/OsuExportImageExportTask.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OsuExportImageExportTask - -Information about the OMI export task. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**diskImageFormat** | **String** | The format of the export disk (`qcow2` \\| `raw`). | | -|**osuBucket** | **String** | The name of the OOS bucket the OMI is exported to. | | -|**osuManifestUrl** | **String** | The URL of the manifest file. | [optional] | -|**osuPrefix** | **String** | The prefix for the key of the OOS object corresponding to the image. | [optional] | - - - diff --git a/docs/OsuExportSnapshotExportTask.md b/docs/OsuExportSnapshotExportTask.md deleted file mode 100644 index e4fb49de..00000000 --- a/docs/OsuExportSnapshotExportTask.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OsuExportSnapshotExportTask - -Information about the snapshot export task. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**diskImageFormat** | **String** | The format of the export disk (`qcow2` \\| `raw`). | | -|**osuBucket** | **String** | The name of the OOS bucket the snapshot is exported to. | | -|**osuPrefix** | **String** | The prefix for the key of the OOS object corresponding to the snapshot. | [optional] | - - - diff --git a/docs/OsuExportToCreate.md b/docs/OsuExportToCreate.md deleted file mode 100644 index e0f546eb..00000000 --- a/docs/OsuExportToCreate.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# OsuExportToCreate - -Information about the OOS export task to create. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**diskImageFormat** | **String** | The format of the export disk (`qcow2` \\| `raw`). | | -|**osuApiKey** | [**OsuApiKey**](OsuApiKey.md) | | [optional] | -|**osuBucket** | **String** | The name of the OOS bucket where you want to export the object. | | -|**osuManifestUrl** | **String** | The URL of the manifest file. | [optional] | -|**osuPrefix** | **String** | The prefix for the key of the OOS object. | [optional] | - - - diff --git a/docs/PermissionsOnResource.md b/docs/PermissionsOnResource.md deleted file mode 100644 index 552dc87d..00000000 --- a/docs/PermissionsOnResource.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PermissionsOnResource - -Permissions for the resource. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountIds** | **List<String>** | One or more account IDs that the permission is associated with. | [optional] | -|**globalPermission** | **Boolean** | A global permission for all accounts.<br /> (Request) Set this parameter to true to make the resource public (if the parent parameter is `Additions`) or to make the resource private (if the parent parameter is `Removals`).<br /> (Response) If true, the resource is public. If false, the resource is private. | [optional] | - - - diff --git a/docs/PermissionsOnResourceCreation.md b/docs/PermissionsOnResourceCreation.md deleted file mode 100644 index 0178d7d8..00000000 --- a/docs/PermissionsOnResourceCreation.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PermissionsOnResourceCreation - -Information about the permissions for the resource.
Specify either the `Additions` or the `Removals` parameter. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**additions** | [**PermissionsOnResource**](PermissionsOnResource.md) | | [optional] | -|**removals** | [**PermissionsOnResource**](PermissionsOnResource.md) | | [optional] | - - - diff --git a/docs/Phase1Options.md b/docs/Phase1Options.md deleted file mode 100644 index 99ca5fb1..00000000 --- a/docs/Phase1Options.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# Phase1Options - -Information about Phase 1 of the Internet Key Exchange (IKE) negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 negotiations. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dpdTimeoutAction** | **String** | The action to carry out after a Dead Peer Detection (DPD) timeout occurs. | [optional] | -|**dpdTimeoutSeconds** | **Integer** | The maximum waiting time for a Dead Peer Detection (DPD) response before considering the peer as dead, in seconds. | [optional] | -|**ikeVersions** | **List<String>** | The Internet Key Exchange (IKE) versions allowed for the VPN tunnel. | [optional] | -|**phase1DhGroupNumbers** | **List<Integer>** | The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 1. | [optional] | -|**phase1EncryptionAlgorithms** | **List<String>** | The encryption algorithms allowed for the VPN tunnel for phase 1. | [optional] | -|**phase1IntegrityAlgorithms** | **List<String>** | The integrity algorithms allowed for the VPN tunnel for phase 1. | [optional] | -|**phase1LifetimeSeconds** | **Integer** | The lifetime for phase 1 of the IKE negotiation process, in seconds. | [optional] | -|**replayWindowSize** | **Integer** | The number of packets in an IKE replay window. | [optional] | -|**startupAction** | **String** | The action to carry out when establishing tunnels for a VPN connection. | [optional] | - - - diff --git a/docs/Phase2Options.md b/docs/Phase2Options.md deleted file mode 100644 index 5b9bca9a..00000000 --- a/docs/Phase2Options.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# Phase2Options - -Information about Phase 2 of the Internet Key Exchange (IKE) negotiation. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**phase2DhGroupNumbers** | **List<Integer>** | The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 2. | [optional] | -|**phase2EncryptionAlgorithms** | **List<String>** | The encryption algorithms allowed for the VPN tunnel for phase 2. | [optional] | -|**phase2IntegrityAlgorithms** | **List<String>** | The integrity algorithms allowed for the VPN tunnel for phase 2. | [optional] | -|**phase2LifetimeSeconds** | **Integer** | The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation process, in seconds. | [optional] | -|**preSharedKey** | **String** | The pre-shared key to establish the initial authentication between the client gateway and the virtual gateway. This key can contain any character except line breaks and double quotes (&quot;). | [optional] | - - - diff --git a/docs/Placement.md b/docs/Placement.md deleted file mode 100644 index 7079ad6b..00000000 --- a/docs/Placement.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Placement - -Information about the placement of the VM. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**subregionName** | **String** | The name of the Subregion. If you specify this parameter, you must not specify the `Nics` parameter. | [optional] | -|**tenancy** | **String** | The tenancy of the VM (`default`, `dedicated`, or a dedicated group ID). | [optional] | - - - diff --git a/docs/PrivateIp.md b/docs/PrivateIp.md deleted file mode 100644 index fdf422b4..00000000 --- a/docs/PrivateIp.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PrivateIp - -Information about the private IP. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isPrimary** | **Boolean** | If true, the IP is the primary private IP of the NIC. | [optional] | -|**linkPublicIp** | [**LinkPublicIp**](LinkPublicIp.md) | | [optional] | -|**privateDnsName** | **String** | The name of the private DNS. | [optional] | -|**privateIp** | **String** | The private IP of the NIC. | [optional] | - - - diff --git a/docs/PrivateIpLight.md b/docs/PrivateIpLight.md deleted file mode 100644 index d327a8b5..00000000 --- a/docs/PrivateIpLight.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PrivateIpLight - -Information about the private IP. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isPrimary** | **Boolean** | If true, the IP is the primary private IP of the NIC. | [optional] | -|**privateIp** | **String** | The private IP of the NIC. | [optional] | - - - diff --git a/docs/PrivateIpLightForVm.md b/docs/PrivateIpLightForVm.md deleted file mode 100644 index ba34d6c4..00000000 --- a/docs/PrivateIpLightForVm.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PrivateIpLightForVm - -Information about the private IP of the NIC. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isPrimary** | **Boolean** | If true, the IP is the primary private IP of the NIC. | [optional] | -|**linkPublicIp** | [**LinkPublicIpLightForVm**](LinkPublicIpLightForVm.md) | | [optional] | -|**privateDnsName** | **String** | The name of the private DNS. | [optional] | -|**privateIp** | **String** | The private IP. | [optional] | - - - diff --git a/docs/ProductType.md b/docs/ProductType.md deleted file mode 100644 index a3cf3310..00000000 --- a/docs/ProductType.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ProductType - -Information about the product type. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | The description of the product type. | [optional] | -|**productTypeId** | **String** | The ID of the product type. | [optional] | -|**vendor** | **String** | The vendor of the product type. | [optional] | - - - diff --git a/docs/ProductTypeApi.md b/docs/ProductTypeApi.md deleted file mode 100644 index 3bfa66ff..00000000 --- a/docs/ProductTypeApi.md +++ /dev/null @@ -1,141 +0,0 @@ -# ProductTypeApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createProductType**](ProductTypeApi.md#createProductType) | **POST** /CreateProductType | | -| [**readProductTypes**](ProductTypeApi.md#readProductTypes) | **POST** /ReadProductTypes | | - - - -# **createProductType** -> CreateProductTypeResponse createProductType(createProductTypeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ProductTypeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ProductTypeApi apiInstance = new ProductTypeApi(defaultClient); - CreateProductTypeRequest createProductTypeRequest = new CreateProductTypeRequest(); // CreateProductTypeRequest | - try { - CreateProductTypeResponse result = apiInstance.createProductType(createProductTypeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProductTypeApi#createProductType"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createProductTypeRequest** | [**CreateProductTypeRequest**](CreateProductTypeRequest.md)| | [optional] | - -### Return type - -[**CreateProductTypeResponse**](CreateProductTypeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readProductTypes** -> ReadProductTypesResponse readProductTypes(readProductTypesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ProductTypeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - ProductTypeApi apiInstance = new ProductTypeApi(defaultClient); - ReadProductTypesRequest readProductTypesRequest = new ReadProductTypesRequest(); // ReadProductTypesRequest | - try { - ReadProductTypesResponse result = apiInstance.readProductTypes(readProductTypesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProductTypeApi#readProductTypes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readProductTypesRequest** | [**ReadProductTypesRequest**](ReadProductTypesRequest.md)| | [optional] | - -### Return type - -[**ReadProductTypesResponse**](ReadProductTypesResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/PublicCatalogApi.md b/docs/PublicCatalogApi.md deleted file mode 100644 index ef6a5719..00000000 --- a/docs/PublicCatalogApi.md +++ /dev/null @@ -1,71 +0,0 @@ -# PublicCatalogApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readPublicCatalog**](PublicCatalogApi.md#readPublicCatalog) | **POST** /ReadPublicCatalog | | - - - -# **readPublicCatalog** -> ReadPublicCatalogResponse readPublicCatalog(readPublicCatalogRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicCatalogApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - PublicCatalogApi apiInstance = new PublicCatalogApi(defaultClient); - ReadPublicCatalogRequest readPublicCatalogRequest = new ReadPublicCatalogRequest(); // ReadPublicCatalogRequest | - try { - ReadPublicCatalogResponse result = apiInstance.readPublicCatalog(readPublicCatalogRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicCatalogApi#readPublicCatalog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readPublicCatalogRequest** | [**ReadPublicCatalogRequest**](ReadPublicCatalogRequest.md)| | [optional] | - -### Return type - -[**ReadPublicCatalogResponse**](ReadPublicCatalogResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/PublicIp.md b/docs/PublicIp.md deleted file mode 100644 index 996618d7..00000000 --- a/docs/PublicIp.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# PublicIp - -Information about the public IP. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkPublicIpId** | **String** | (Required in a Net) The ID representing the association of the public IP with the VM or the NIC. | [optional] | -|**nicAccountId** | **String** | The account ID of the owner of the NIC. | [optional] | -|**nicId** | **String** | The ID of the NIC the public IP is associated with (if any). | [optional] | -|**privateIp** | **String** | The private IP associated with the public IP. | [optional] | -|**publicIp** | **String** | The public IP. | [optional] | -|**publicIpId** | **String** | The allocation ID of the public IP. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the public IP. | [optional] | -|**vmId** | **String** | The ID of the VM the public IP is associated with (if any). | [optional] | - - - diff --git a/docs/PublicIpApi.md b/docs/PublicIpApi.md deleted file mode 100644 index f96e58ee..00000000 --- a/docs/PublicIpApi.md +++ /dev/null @@ -1,436 +0,0 @@ -# PublicIpApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createPublicIp**](PublicIpApi.md#createPublicIp) | **POST** /CreatePublicIp | | -| [**deletePublicIp**](PublicIpApi.md#deletePublicIp) | **POST** /DeletePublicIp | | -| [**linkPublicIp**](PublicIpApi.md#linkPublicIp) | **POST** /LinkPublicIp | | -| [**readPublicIpRanges**](PublicIpApi.md#readPublicIpRanges) | **POST** /ReadPublicIpRanges | | -| [**readPublicIps**](PublicIpApi.md#readPublicIps) | **POST** /ReadPublicIps | | -| [**unlinkPublicIp**](PublicIpApi.md#unlinkPublicIp) | **POST** /UnlinkPublicIp | | - - - -# **createPublicIp** -> CreatePublicIpResponse createPublicIp(createPublicIpRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - CreatePublicIpRequest createPublicIpRequest = new CreatePublicIpRequest(); // CreatePublicIpRequest | - try { - CreatePublicIpResponse result = apiInstance.createPublicIp(createPublicIpRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#createPublicIp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createPublicIpRequest** | [**CreatePublicIpRequest**](CreatePublicIpRequest.md)| | [optional] | - -### Return type - -[**CreatePublicIpResponse**](CreatePublicIpResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deletePublicIp** -> DeletePublicIpResponse deletePublicIp(deletePublicIpRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - DeletePublicIpRequest deletePublicIpRequest = new DeletePublicIpRequest(); // DeletePublicIpRequest | - try { - DeletePublicIpResponse result = apiInstance.deletePublicIp(deletePublicIpRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#deletePublicIp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deletePublicIpRequest** | [**DeletePublicIpRequest**](DeletePublicIpRequest.md)| | [optional] | - -### Return type - -[**DeletePublicIpResponse**](DeletePublicIpResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkPublicIp** -> LinkPublicIpResponse linkPublicIp(linkPublicIpRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - LinkPublicIpRequest linkPublicIpRequest = new LinkPublicIpRequest(); // LinkPublicIpRequest | - try { - LinkPublicIpResponse result = apiInstance.linkPublicIp(linkPublicIpRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#linkPublicIp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkPublicIpRequest** | [**LinkPublicIpRequest**](LinkPublicIpRequest.md)| | [optional] | - -### Return type - -[**LinkPublicIpResponse**](LinkPublicIpResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readPublicIpRanges** -> ReadPublicIpRangesResponse readPublicIpRanges(readPublicIpRangesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - ReadPublicIpRangesRequest readPublicIpRangesRequest = new ReadPublicIpRangesRequest(); // ReadPublicIpRangesRequest | - try { - ReadPublicIpRangesResponse result = apiInstance.readPublicIpRanges(readPublicIpRangesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#readPublicIpRanges"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readPublicIpRangesRequest** | [**ReadPublicIpRangesRequest**](ReadPublicIpRangesRequest.md)| | [optional] | - -### Return type - -[**ReadPublicIpRangesResponse**](ReadPublicIpRangesResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readPublicIps** -> ReadPublicIpsResponse readPublicIps(readPublicIpsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - ReadPublicIpsRequest readPublicIpsRequest = new ReadPublicIpsRequest(); // ReadPublicIpsRequest | - try { - ReadPublicIpsResponse result = apiInstance.readPublicIps(readPublicIpsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#readPublicIps"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readPublicIpsRequest** | [**ReadPublicIpsRequest**](ReadPublicIpsRequest.md)| | [optional] | - -### Return type - -[**ReadPublicIpsResponse**](ReadPublicIpsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkPublicIp** -> UnlinkPublicIpResponse unlinkPublicIp(unlinkPublicIpRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.PublicIpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - PublicIpApi apiInstance = new PublicIpApi(defaultClient); - UnlinkPublicIpRequest unlinkPublicIpRequest = new UnlinkPublicIpRequest(); // UnlinkPublicIpRequest | - try { - UnlinkPublicIpResponse result = apiInstance.unlinkPublicIp(unlinkPublicIpRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicIpApi#unlinkPublicIp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkPublicIpRequest** | [**UnlinkPublicIpRequest**](UnlinkPublicIpRequest.md)| | [optional] | - -### Return type - -[**UnlinkPublicIpResponse**](UnlinkPublicIpResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/PublicIpLight.md b/docs/PublicIpLight.md deleted file mode 100644 index cd93c223..00000000 --- a/docs/PublicIpLight.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PublicIpLight - -Information about the public IP. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**publicIp** | **String** | The public IP associated with the NAT service. | [optional] | -|**publicIpId** | **String** | The allocation ID of the public IP associated with the NAT service. | [optional] | - - - diff --git a/docs/Quota.md b/docs/Quota.md deleted file mode 100644 index b5908bfd..00000000 --- a/docs/Quota.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# Quota - -Information about the quota. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the quotas. | [optional] | -|**description** | **String** | The description of the quota. | [optional] | -|**maxValue** | **Integer** | The maximum value of the quota for the account (if there is no limit, `0`). | [optional] | -|**name** | **String** | The unique name of the quota. | [optional] | -|**quotaCollection** | **String** | The group name of the quota. | [optional] | -|**shortDescription** | **String** | The description of the quota. | [optional] | -|**usedValue** | **Integer** | The limit value currently used by the account. | [optional] | - - - diff --git a/docs/QuotaApi.md b/docs/QuotaApi.md deleted file mode 100644 index 8d4bdbec..00000000 --- a/docs/QuotaApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# QuotaApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readQuotas**](QuotaApi.md#readQuotas) | **POST** /ReadQuotas | | - - - -# **readQuotas** -> ReadQuotasResponse readQuotas(readQuotasRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.QuotaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - QuotaApi apiInstance = new QuotaApi(defaultClient); - ReadQuotasRequest readQuotasRequest = new ReadQuotasRequest(); // ReadQuotasRequest | - try { - ReadQuotasResponse result = apiInstance.readQuotas(readQuotasRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QuotaApi#readQuotas"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readQuotasRequest** | [**ReadQuotasRequest**](ReadQuotasRequest.md)| | [optional] | - -### Return type - -[**ReadQuotasResponse**](ReadQuotasResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/QuotaTypes.md b/docs/QuotaTypes.md deleted file mode 100644 index 734a724f..00000000 --- a/docs/QuotaTypes.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# QuotaTypes - -One or more quotas. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quotaType** | **String** | The resource ID if it is a resource-specific quota, `global` if it is not. | [optional] | -|**quotas** | [**List<Quota>**](Quota.md) | One or more quotas associated with the account. | [optional] | - - - diff --git a/docs/ReadAccessKeysRequest.md b/docs/ReadAccessKeysRequest.md deleted file mode 100644 index 1ccae2a5..00000000 --- a/docs/ReadAccessKeysRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadAccessKeysRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersAccessKeys**](FiltersAccessKeys.md) | | [optional] | -|**userName** | **String** | The name of the EIM user. By default, the user who sends the request (which can be the root account). | [optional] | - - - diff --git a/docs/ReadAccessKeysResponse.md b/docs/ReadAccessKeysResponse.md deleted file mode 100644 index 14123975..00000000 --- a/docs/ReadAccessKeysResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadAccessKeysResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeys** | [**List<AccessKey>**](AccessKey.md) | A list of access keys. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadAccountsRequest.md b/docs/ReadAccountsRequest.md deleted file mode 100644 index 2bd65e43..00000000 --- a/docs/ReadAccountsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadAccountsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadAccountsResponse.md b/docs/ReadAccountsResponse.md deleted file mode 100644 index 844c5953..00000000 --- a/docs/ReadAccountsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadAccountsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accounts** | [**List<Account>**](Account.md) | The list of the accounts. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadAdminPasswordRequest.md b/docs/ReadAdminPasswordRequest.md deleted file mode 100644 index f5977790..00000000 --- a/docs/ReadAdminPasswordRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadAdminPasswordRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmId** | **String** | The ID of the VM. | | - - - diff --git a/docs/ReadAdminPasswordResponse.md b/docs/ReadAdminPasswordResponse.md deleted file mode 100644 index 1b754dbf..00000000 --- a/docs/ReadAdminPasswordResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadAdminPasswordResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**adminPassword** | **String** | The password of the VM. After the first boot, returns an empty string. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | - - - diff --git a/docs/ReadApiAccessPolicyRequest.md b/docs/ReadApiAccessPolicyRequest.md deleted file mode 100644 index 3ce93ec2..00000000 --- a/docs/ReadApiAccessPolicyRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadApiAccessPolicyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadApiAccessPolicyResponse.md b/docs/ReadApiAccessPolicyResponse.md deleted file mode 100644 index 952a8ae6..00000000 --- a/docs/ReadApiAccessPolicyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadApiAccessPolicyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessPolicy** | [**ApiAccessPolicy**](ApiAccessPolicy.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadApiAccessRulesRequest.md b/docs/ReadApiAccessRulesRequest.md deleted file mode 100644 index e87cc8a8..00000000 --- a/docs/ReadApiAccessRulesRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadApiAccessRulesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersApiAccessRule**](FiltersApiAccessRule.md) | | [optional] | - - - diff --git a/docs/ReadApiAccessRulesResponse.md b/docs/ReadApiAccessRulesResponse.md deleted file mode 100644 index adb02a87..00000000 --- a/docs/ReadApiAccessRulesResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadApiAccessRulesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRules** | [**List<ApiAccessRule>**](ApiAccessRule.md) | A list of API access rules. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadApiLogsRequest.md b/docs/ReadApiLogsRequest.md deleted file mode 100644 index b005d556..00000000 --- a/docs/ReadApiLogsRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ReadApiLogsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersApiLog**](FiltersApiLog.md) | | [optional] | -|**nextPageToken** | **String** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | -|**with** | [**With**](With.md) | | [optional] | - - - diff --git a/docs/ReadApiLogsResponse.md b/docs/ReadApiLogsResponse.md deleted file mode 100644 index c01edc65..00000000 --- a/docs/ReadApiLogsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadApiLogsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**logs** | [**List<Log>**](Log.md) | Information about one or more logs. | [optional] | -|**nextPageToken** | **String** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadCasRequest.md b/docs/ReadCasRequest.md deleted file mode 100644 index e0385934..00000000 --- a/docs/ReadCasRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadCasRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersCa**](FiltersCa.md) | | [optional] | - - - diff --git a/docs/ReadCasResponse.md b/docs/ReadCasResponse.md deleted file mode 100644 index b3e8e48a..00000000 --- a/docs/ReadCasResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadCasResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cas** | [**List<Ca>**](Ca.md) | Information about one or more CAs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadCatalogRequest.md b/docs/ReadCatalogRequest.md deleted file mode 100644 index 9b067672..00000000 --- a/docs/ReadCatalogRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadCatalogRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadCatalogResponse.md b/docs/ReadCatalogResponse.md deleted file mode 100644 index a0ec2a42..00000000 --- a/docs/ReadCatalogResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadCatalogResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**catalog** | [**Catalog**](Catalog.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadCatalogsRequest.md b/docs/ReadCatalogsRequest.md deleted file mode 100644 index 58a5e572..00000000 --- a/docs/ReadCatalogsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadCatalogsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersCatalogs**](FiltersCatalogs.md) | | [optional] | - - - diff --git a/docs/ReadCatalogsResponse.md b/docs/ReadCatalogsResponse.md deleted file mode 100644 index 19e018fc..00000000 --- a/docs/ReadCatalogsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadCatalogsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**catalogs** | [**List<Catalogs>**](Catalogs.md) | Information about one or more catalogs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadClientGatewaysRequest.md b/docs/ReadClientGatewaysRequest.md deleted file mode 100644 index 78a7d028..00000000 --- a/docs/ReadClientGatewaysRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadClientGatewaysRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersClientGateway**](FiltersClientGateway.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadClientGatewaysResponse.md b/docs/ReadClientGatewaysResponse.md deleted file mode 100644 index 8c1156cf..00000000 --- a/docs/ReadClientGatewaysResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadClientGatewaysResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGateways** | [**List<ClientGateway>**](ClientGateway.md) | Information about one or more client gateways. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadConsoleOutputRequest.md b/docs/ReadConsoleOutputRequest.md deleted file mode 100644 index 0c5c9eb8..00000000 --- a/docs/ReadConsoleOutputRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadConsoleOutputRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmId** | **String** | The ID of the VM. | | - - - diff --git a/docs/ReadConsoleOutputResponse.md b/docs/ReadConsoleOutputResponse.md deleted file mode 100644 index b97d2cad..00000000 --- a/docs/ReadConsoleOutputResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadConsoleOutputResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**consoleOutput** | **String** | The Base64-encoded output of the console. If a command line tool is used, the output is decoded by the tool. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | - - - diff --git a/docs/ReadConsumptionAccountRequest.md b/docs/ReadConsumptionAccountRequest.md deleted file mode 100644 index d4f9a0e9..00000000 --- a/docs/ReadConsumptionAccountRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ReadConsumptionAccountRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**fromDate** | **LocalDate** | The beginning of the time period, in ISO 8601 date format (for example, `2020-06-14`). The date-time format is also accepted, but only with a time set to midnight (for example, `2020-06-14T00:00:00.000Z`). This value is included in the time period. | | -|**overall** | **Boolean** | By default or if false, returns only the consumption of the specific account that sends this request. If true, returns either the overall consumption of your paying account and all linked accounts (if the account that sends this request is a paying account) or returns nothing (if the account that sends this request is a linked account). | [optional] | -|**showPrice** | **Boolean** | If true, the response also includes the unit price of the consumed resource (`UnitPrice`) and the total price of the consumed resource during the specified time period (`Price`), in the currency of your account. | [optional] | -|**toDate** | **LocalDate** | The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). The date-time format is also accepted, but only with a time set to midnight (for example, `2020-06-30T00:00:00.000Z`). This value is excluded from the time period, and must be set to a later date than `FromDate`. | | - - - diff --git a/docs/ReadConsumptionAccountResponse.md b/docs/ReadConsumptionAccountResponse.md deleted file mode 100644 index 1b066c40..00000000 --- a/docs/ReadConsumptionAccountResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadConsumptionAccountResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**consumptionEntries** | [**List<ConsumptionEntry>**](ConsumptionEntry.md) | Information about the resources consumed during the specified time period. | [optional] | -|**currency** | **String** | The currency of your account for the `UnitPrice` and `Price` parameters, in the ISO-4217 format (for example, `EUR`). | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadDhcpOptionsRequest.md b/docs/ReadDhcpOptionsRequest.md deleted file mode 100644 index 3dcd847c..00000000 --- a/docs/ReadDhcpOptionsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadDhcpOptionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersDhcpOptions**](FiltersDhcpOptions.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadDhcpOptionsResponse.md b/docs/ReadDhcpOptionsResponse.md deleted file mode 100644 index f9fd6d90..00000000 --- a/docs/ReadDhcpOptionsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadDhcpOptionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSets** | [**List<DhcpOptionsSet>**](DhcpOptionsSet.md) | Information about one or more DHCP options sets. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadDirectLinkInterfacesRequest.md b/docs/ReadDirectLinkInterfacesRequest.md deleted file mode 100644 index 43ce29f2..00000000 --- a/docs/ReadDirectLinkInterfacesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadDirectLinkInterfacesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersDirectLinkInterface**](FiltersDirectLinkInterface.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadDirectLinkInterfacesResponse.md b/docs/ReadDirectLinkInterfacesResponse.md deleted file mode 100644 index d5dff1d6..00000000 --- a/docs/ReadDirectLinkInterfacesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadDirectLinkInterfacesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkInterfaces** | [**List<DirectLinkInterfaces>**](DirectLinkInterfaces.md) | Information about one or more DirectLink interfaces. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadDirectLinksRequest.md b/docs/ReadDirectLinksRequest.md deleted file mode 100644 index 8225add4..00000000 --- a/docs/ReadDirectLinksRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadDirectLinksRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersDirectLink**](FiltersDirectLink.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadDirectLinksResponse.md b/docs/ReadDirectLinksResponse.md deleted file mode 100644 index 31486df4..00000000 --- a/docs/ReadDirectLinksResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadDirectLinksResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinks** | [**List<DirectLink>**](DirectLink.md) | Information about one or more DirectLinks. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadFlexibleGpuCatalogRequest.md b/docs/ReadFlexibleGpuCatalogRequest.md deleted file mode 100644 index eb81562d..00000000 --- a/docs/ReadFlexibleGpuCatalogRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadFlexibleGpuCatalogRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadFlexibleGpuCatalogResponse.md b/docs/ReadFlexibleGpuCatalogResponse.md deleted file mode 100644 index 457cfeee..00000000 --- a/docs/ReadFlexibleGpuCatalogResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadFlexibleGpuCatalogResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**flexibleGpuCatalog** | [**List<FlexibleGpuCatalog>**](FlexibleGpuCatalog.md) | Information about one or more fGPUs available in the public catalog. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadFlexibleGpusRequest.md b/docs/ReadFlexibleGpusRequest.md deleted file mode 100644 index 720484d2..00000000 --- a/docs/ReadFlexibleGpusRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadFlexibleGpusRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersFlexibleGpu**](FiltersFlexibleGpu.md) | | [optional] | - - - diff --git a/docs/ReadFlexibleGpusResponse.md b/docs/ReadFlexibleGpusResponse.md deleted file mode 100644 index 64dd764a..00000000 --- a/docs/ReadFlexibleGpusResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadFlexibleGpusResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**flexibleGpus** | [**List<FlexibleGpu>**](FlexibleGpu.md) | Information about one or more fGPUs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadImageExportTasksRequest.md b/docs/ReadImageExportTasksRequest.md deleted file mode 100644 index 250191c3..00000000 --- a/docs/ReadImageExportTasksRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadImageExportTasksRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersExportTask**](FiltersExportTask.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadImageExportTasksResponse.md b/docs/ReadImageExportTasksResponse.md deleted file mode 100644 index cdeec83d..00000000 --- a/docs/ReadImageExportTasksResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadImageExportTasksResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**imageExportTasks** | [**List<ImageExportTask>**](ImageExportTask.md) | Information about one or more image export tasks. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadImagesRequest.md b/docs/ReadImagesRequest.md deleted file mode 100644 index 56341ae4..00000000 --- a/docs/ReadImagesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadImagesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersImage**](FiltersImage.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadImagesResponse.md b/docs/ReadImagesResponse.md deleted file mode 100644 index 63b4e9ff..00000000 --- a/docs/ReadImagesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadImagesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**images** | [**List<Image>**](Image.md) | Information about one or more OMIs. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadInternetServicesRequest.md b/docs/ReadInternetServicesRequest.md deleted file mode 100644 index 4443db99..00000000 --- a/docs/ReadInternetServicesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadInternetServicesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersInternetService**](FiltersInternetService.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadInternetServicesResponse.md b/docs/ReadInternetServicesResponse.md deleted file mode 100644 index 0047c623..00000000 --- a/docs/ReadInternetServicesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadInternetServicesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**internetServices** | [**List<InternetService>**](InternetService.md) | Information about one or more Internet services. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadKeypairsRequest.md b/docs/ReadKeypairsRequest.md deleted file mode 100644 index 0f35e194..00000000 --- a/docs/ReadKeypairsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadKeypairsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersKeypair**](FiltersKeypair.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadKeypairsResponse.md b/docs/ReadKeypairsResponse.md deleted file mode 100644 index 7ab63741..00000000 --- a/docs/ReadKeypairsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadKeypairsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**keypairs** | [**List<Keypair>**](Keypair.md) | Information about one or more keypairs. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadListenerRulesRequest.md b/docs/ReadListenerRulesRequest.md deleted file mode 100644 index b4ff7d57..00000000 --- a/docs/ReadListenerRulesRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadListenerRulesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersListenerRule**](FiltersListenerRule.md) | | [optional] | - - - diff --git a/docs/ReadListenerRulesResponse.md b/docs/ReadListenerRulesResponse.md deleted file mode 100644 index 92b1d9c9..00000000 --- a/docs/ReadListenerRulesResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadListenerRulesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**listenerRules** | [**List<ListenerRule>**](ListenerRule.md) | The list of the rules to describe. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadLoadBalancerTagsRequest.md b/docs/ReadLoadBalancerTagsRequest.md deleted file mode 100644 index 82e2bef6..00000000 --- a/docs/ReadLoadBalancerTagsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadLoadBalancerTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerNames** | **List<String>** | One or more load balancer names. | | - - - diff --git a/docs/ReadLoadBalancerTagsResponse.md b/docs/ReadLoadBalancerTagsResponse.md deleted file mode 100644 index 4624952b..00000000 --- a/docs/ReadLoadBalancerTagsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadLoadBalancerTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**tags** | [**List<LoadBalancerTag>**](LoadBalancerTag.md) | Information about one or more load balancer tags. | [optional] | - - - diff --git a/docs/ReadLoadBalancersRequest.md b/docs/ReadLoadBalancersRequest.md deleted file mode 100644 index 5c55b0ae..00000000 --- a/docs/ReadLoadBalancersRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadLoadBalancersRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersLoadBalancer**](FiltersLoadBalancer.md) | | [optional] | - - - diff --git a/docs/ReadLoadBalancersResponse.md b/docs/ReadLoadBalancersResponse.md deleted file mode 100644 index e9cda3a7..00000000 --- a/docs/ReadLoadBalancersResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadLoadBalancersResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancers** | [**List<LoadBalancer>**](LoadBalancer.md) | Information about one or more load balancers. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadLocationsRequest.md b/docs/ReadLocationsRequest.md deleted file mode 100644 index 6d96ef2d..00000000 --- a/docs/ReadLocationsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadLocationsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadLocationsResponse.md b/docs/ReadLocationsResponse.md deleted file mode 100644 index b89a324b..00000000 --- a/docs/ReadLocationsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadLocationsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**locations** | [**List<Location>**](Location.md) | Information about one or more locations. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadNatServicesRequest.md b/docs/ReadNatServicesRequest.md deleted file mode 100644 index 3b7b5ae2..00000000 --- a/docs/ReadNatServicesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadNatServicesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersNatService**](FiltersNatService.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadNatServicesResponse.md b/docs/ReadNatServicesResponse.md deleted file mode 100644 index d2a3ceab..00000000 --- a/docs/ReadNatServicesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadNatServicesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**natServices** | [**List<NatService>**](NatService.md) | Information about one or more NAT services. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadNetAccessPointServicesRequest.md b/docs/ReadNetAccessPointServicesRequest.md deleted file mode 100644 index 5bc5c41a..00000000 --- a/docs/ReadNetAccessPointServicesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadNetAccessPointServicesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersService**](FiltersService.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadNetAccessPointServicesResponse.md b/docs/ReadNetAccessPointServicesResponse.md deleted file mode 100644 index b97db178..00000000 --- a/docs/ReadNetAccessPointServicesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadNetAccessPointServicesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**services** | [**List<Service>**](Service.md) | The names of the services you can use for Net access points. | [optional] | - - - diff --git a/docs/ReadNetAccessPointsRequest.md b/docs/ReadNetAccessPointsRequest.md deleted file mode 100644 index 3367e28b..00000000 --- a/docs/ReadNetAccessPointsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadNetAccessPointsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersNetAccessPoint**](FiltersNetAccessPoint.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadNetAccessPointsResponse.md b/docs/ReadNetAccessPointsResponse.md deleted file mode 100644 index 39b243d3..00000000 --- a/docs/ReadNetAccessPointsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadNetAccessPointsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netAccessPoints** | [**List<NetAccessPoint>**](NetAccessPoint.md) | One or more Net access points. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadNetPeeringsRequest.md b/docs/ReadNetPeeringsRequest.md deleted file mode 100644 index 8955d99c..00000000 --- a/docs/ReadNetPeeringsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadNetPeeringsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersNetPeering**](FiltersNetPeering.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadNetPeeringsResponse.md b/docs/ReadNetPeeringsResponse.md deleted file mode 100644 index 34b24c48..00000000 --- a/docs/ReadNetPeeringsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadNetPeeringsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netPeerings** | [**List<NetPeering>**](NetPeering.md) | Information about one or more Net peerings. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadNetsRequest.md b/docs/ReadNetsRequest.md deleted file mode 100644 index e9787383..00000000 --- a/docs/ReadNetsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadNetsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersNet**](FiltersNet.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadNetsResponse.md b/docs/ReadNetsResponse.md deleted file mode 100644 index cf1fc6a9..00000000 --- a/docs/ReadNetsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadNetsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nets** | [**List<Net>**](Net.md) | Information about the described Nets. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadNicsRequest.md b/docs/ReadNicsRequest.md deleted file mode 100644 index 9c4416e3..00000000 --- a/docs/ReadNicsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadNicsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersNic**](FiltersNic.md) | | [optional] | - - - diff --git a/docs/ReadNicsResponse.md b/docs/ReadNicsResponse.md deleted file mode 100644 index 89307fec..00000000 --- a/docs/ReadNicsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadNicsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nics** | [**List<Nic>**](Nic.md) | Information about one or more NICs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadProductTypesRequest.md b/docs/ReadProductTypesRequest.md deleted file mode 100644 index b7d4ce75..00000000 --- a/docs/ReadProductTypesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadProductTypesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersProductType**](FiltersProductType.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadProductTypesResponse.md b/docs/ReadProductTypesResponse.md deleted file mode 100644 index c2da4e4e..00000000 --- a/docs/ReadProductTypesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadProductTypesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**productTypes** | [**List<ProductType>**](ProductType.md) | Information about one or more product types. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadPublicCatalogRequest.md b/docs/ReadPublicCatalogRequest.md deleted file mode 100644 index ad6f1bb4..00000000 --- a/docs/ReadPublicCatalogRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadPublicCatalogRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadPublicCatalogResponse.md b/docs/ReadPublicCatalogResponse.md deleted file mode 100644 index 9aee93ce..00000000 --- a/docs/ReadPublicCatalogResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadPublicCatalogResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**catalog** | [**Catalog**](Catalog.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadPublicIpRangesRequest.md b/docs/ReadPublicIpRangesRequest.md deleted file mode 100644 index 46dbfd26..00000000 --- a/docs/ReadPublicIpRangesRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadPublicIpRangesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadPublicIpRangesResponse.md b/docs/ReadPublicIpRangesResponse.md deleted file mode 100644 index 88897aa5..00000000 --- a/docs/ReadPublicIpRangesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadPublicIpRangesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**publicIps** | **List<String>** | The list of public IPv4 addresses used in the Region, in CIDR notation. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadPublicIpsRequest.md b/docs/ReadPublicIpsRequest.md deleted file mode 100644 index 9b602110..00000000 --- a/docs/ReadPublicIpsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadPublicIpsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersPublicIp**](FiltersPublicIp.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadPublicIpsResponse.md b/docs/ReadPublicIpsResponse.md deleted file mode 100644 index ccb7961d..00000000 --- a/docs/ReadPublicIpsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadPublicIpsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**publicIps** | [**List<PublicIp>**](PublicIp.md) | Information about one or more public IPs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadQuotasRequest.md b/docs/ReadQuotasRequest.md deleted file mode 100644 index 80cb1e71..00000000 --- a/docs/ReadQuotasRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadQuotasRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersQuota**](FiltersQuota.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadQuotasResponse.md b/docs/ReadQuotasResponse.md deleted file mode 100644 index 3c792db4..00000000 --- a/docs/ReadQuotasResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadQuotasResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**quotaTypes** | [**List<QuotaTypes>**](QuotaTypes.md) | Information about one or more quotas. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadRegionsRequest.md b/docs/ReadRegionsRequest.md deleted file mode 100644 index 265fb16c..00000000 --- a/docs/ReadRegionsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadRegionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadRegionsResponse.md b/docs/ReadRegionsResponse.md deleted file mode 100644 index b48d56b2..00000000 --- a/docs/ReadRegionsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadRegionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**regions** | [**List<Region>**](Region.md) | Information about one or more Regions. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadRouteTablesRequest.md b/docs/ReadRouteTablesRequest.md deleted file mode 100644 index ce0d3906..00000000 --- a/docs/ReadRouteTablesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadRouteTablesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersRouteTable**](FiltersRouteTable.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadRouteTablesResponse.md b/docs/ReadRouteTablesResponse.md deleted file mode 100644 index 309d573f..00000000 --- a/docs/ReadRouteTablesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadRouteTablesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTables** | [**List<RouteTable>**](RouteTable.md) | Information about one or more route tables. | [optional] | - - - diff --git a/docs/ReadSecretAccessKeyRequest.md b/docs/ReadSecretAccessKeyRequest.md deleted file mode 100644 index 8b285aaa..00000000 --- a/docs/ReadSecretAccessKeyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadSecretAccessKeyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | The ID of the access key. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/ReadSecretAccessKeyResponse.md b/docs/ReadSecretAccessKeyResponse.md deleted file mode 100644 index c8ef04cf..00000000 --- a/docs/ReadSecretAccessKeyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadSecretAccessKeyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKey** | [**AccessKeySecretKey**](AccessKeySecretKey.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadSecurityGroupsRequest.md b/docs/ReadSecurityGroupsRequest.md deleted file mode 100644 index 8c0d9445..00000000 --- a/docs/ReadSecurityGroupsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadSecurityGroupsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersSecurityGroup**](FiltersSecurityGroup.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadSecurityGroupsResponse.md b/docs/ReadSecurityGroupsResponse.md deleted file mode 100644 index 42219e8d..00000000 --- a/docs/ReadSecurityGroupsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadSecurityGroupsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**securityGroups** | [**List<SecurityGroup>**](SecurityGroup.md) | Information about one or more security groups. | [optional] | - - - diff --git a/docs/ReadServerCertificatesRequest.md b/docs/ReadServerCertificatesRequest.md deleted file mode 100644 index a2e3bc38..00000000 --- a/docs/ReadServerCertificatesRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadServerCertificatesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersServerCertificate**](FiltersServerCertificate.md) | | [optional] | - - - diff --git a/docs/ReadServerCertificatesResponse.md b/docs/ReadServerCertificatesResponse.md deleted file mode 100644 index d4e0640a..00000000 --- a/docs/ReadServerCertificatesResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadServerCertificatesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**serverCertificates** | [**List<ServerCertificate>**](ServerCertificate.md) | Information about one or more server certificates. | [optional] | - - - diff --git a/docs/ReadSnapshotExportTasksRequest.md b/docs/ReadSnapshotExportTasksRequest.md deleted file mode 100644 index efceb2a2..00000000 --- a/docs/ReadSnapshotExportTasksRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadSnapshotExportTasksRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersExportTask**](FiltersExportTask.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadSnapshotExportTasksResponse.md b/docs/ReadSnapshotExportTasksResponse.md deleted file mode 100644 index bc857f87..00000000 --- a/docs/ReadSnapshotExportTasksResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadSnapshotExportTasksResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**snapshotExportTasks** | [**List<SnapshotExportTask>**](SnapshotExportTask.md) | Information about one or more snapshot export tasks. | [optional] | - - - diff --git a/docs/ReadSnapshotsRequest.md b/docs/ReadSnapshotsRequest.md deleted file mode 100644 index 28a6a17d..00000000 --- a/docs/ReadSnapshotsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadSnapshotsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersSnapshot**](FiltersSnapshot.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadSnapshotsResponse.md b/docs/ReadSnapshotsResponse.md deleted file mode 100644 index 851de09d..00000000 --- a/docs/ReadSnapshotsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadSnapshotsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**snapshots** | [**List<Snapshot>**](Snapshot.md) | Information about one or more snapshots and their permissions. | [optional] | - - - diff --git a/docs/ReadSubnetsRequest.md b/docs/ReadSubnetsRequest.md deleted file mode 100644 index 8e3ac605..00000000 --- a/docs/ReadSubnetsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadSubnetsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersSubnet**](FiltersSubnet.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadSubnetsResponse.md b/docs/ReadSubnetsResponse.md deleted file mode 100644 index 7e5f430d..00000000 --- a/docs/ReadSubnetsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadSubnetsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**subnets** | [**List<Subnet>**](Subnet.md) | Information about one or more Subnets. | [optional] | - - - diff --git a/docs/ReadSubregionsRequest.md b/docs/ReadSubregionsRequest.md deleted file mode 100644 index 8817c860..00000000 --- a/docs/ReadSubregionsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadSubregionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersSubregion**](FiltersSubregion.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadSubregionsResponse.md b/docs/ReadSubregionsResponse.md deleted file mode 100644 index af511bf7..00000000 --- a/docs/ReadSubregionsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadSubregionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**subregions** | [**List<Subregion>**](Subregion.md) | Information about one or more Subregions. | [optional] | - - - diff --git a/docs/ReadTagsRequest.md b/docs/ReadTagsRequest.md deleted file mode 100644 index 6fe5d135..00000000 --- a/docs/ReadTagsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadTagsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersTag**](FiltersTag.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadTagsResponse.md b/docs/ReadTagsResponse.md deleted file mode 100644 index 892279c3..00000000 --- a/docs/ReadTagsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadTagsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**tags** | [**List<Tag>**](Tag.md) | Information about one or more tags. | [optional] | - - - diff --git a/docs/ReadVirtualGatewaysRequest.md b/docs/ReadVirtualGatewaysRequest.md deleted file mode 100644 index 7167cc7c..00000000 --- a/docs/ReadVirtualGatewaysRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadVirtualGatewaysRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVirtualGateway**](FiltersVirtualGateway.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVirtualGatewaysResponse.md b/docs/ReadVirtualGatewaysResponse.md deleted file mode 100644 index 297b45ee..00000000 --- a/docs/ReadVirtualGatewaysResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVirtualGatewaysResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**virtualGateways** | [**List<VirtualGateway>**](VirtualGateway.md) | Information about one or more virtual gateways. | [optional] | - - - diff --git a/docs/ReadVmGroupsRequest.md b/docs/ReadVmGroupsRequest.md deleted file mode 100644 index 407c5c75..00000000 --- a/docs/ReadVmGroupsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadVmGroupsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVmGroup**](FiltersVmGroup.md) | | [optional] | - - - diff --git a/docs/ReadVmGroupsResponse.md b/docs/ReadVmGroupsResponse.md deleted file mode 100644 index fc34d5c6..00000000 --- a/docs/ReadVmGroupsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadVmGroupsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmGroups** | [**List<VmGroup>**](VmGroup.md) | | [optional] | - - - diff --git a/docs/ReadVmTemplatesRequest.md b/docs/ReadVmTemplatesRequest.md deleted file mode 100644 index d64b2330..00000000 --- a/docs/ReadVmTemplatesRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadVmTemplatesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVmTemplate**](FiltersVmTemplate.md) | | [optional] | - - - diff --git a/docs/ReadVmTemplatesResponse.md b/docs/ReadVmTemplatesResponse.md deleted file mode 100644 index 6e91fbdf..00000000 --- a/docs/ReadVmTemplatesResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadVmTemplatesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmTemplates** | [**List<VmTemplate>**](VmTemplate.md) | Information about one or more VM templates. | [optional] | - - - diff --git a/docs/ReadVmTypesRequest.md b/docs/ReadVmTypesRequest.md deleted file mode 100644 index 000b02c3..00000000 --- a/docs/ReadVmTypesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadVmTypesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVmType**](FiltersVmType.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVmTypesResponse.md b/docs/ReadVmTypesResponse.md deleted file mode 100644 index 2862d4ae..00000000 --- a/docs/ReadVmTypesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVmTypesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmTypes** | [**List<VmType>**](VmType.md) | Information about one or more VM types. | [optional] | - - - diff --git a/docs/ReadVmsHealthRequest.md b/docs/ReadVmsHealthRequest.md deleted file mode 100644 index 7159b541..00000000 --- a/docs/ReadVmsHealthRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVmsHealthRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | - - - diff --git a/docs/ReadVmsHealthResponse.md b/docs/ReadVmsHealthResponse.md deleted file mode 100644 index 27bd77ed..00000000 --- a/docs/ReadVmsHealthResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadVmsHealthResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendVmHealth** | [**List<BackendVmHealth>**](BackendVmHealth.md) | Information about the health of one or more backend VMs. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ReadVmsRequest.md b/docs/ReadVmsRequest.md deleted file mode 100644 index df4d471c..00000000 --- a/docs/ReadVmsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVm**](FiltersVm.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVmsResponse.md b/docs/ReadVmsResponse.md deleted file mode 100644 index de59df50..00000000 --- a/docs/ReadVmsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vms** | [**List<Vm>**](Vm.md) | Information about one or more VMs. | [optional] | - - - diff --git a/docs/ReadVmsStateRequest.md b/docs/ReadVmsStateRequest.md deleted file mode 100644 index 2f4b8c0c..00000000 --- a/docs/ReadVmsStateRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ReadVmsStateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**allVms** | **Boolean** | If true, includes the status of all VMs. By default or if set to false, only includes the status of running VMs. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVmsState**](FiltersVmsState.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVmsStateResponse.md b/docs/ReadVmsStateResponse.md deleted file mode 100644 index acfa9e50..00000000 --- a/docs/ReadVmsStateResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVmsStateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmStates** | [**List<VmStates>**](VmStates.md) | Information about one or more VM states. | [optional] | - - - diff --git a/docs/ReadVolumesRequest.md b/docs/ReadVolumesRequest.md deleted file mode 100644 index 8245a828..00000000 --- a/docs/ReadVolumesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadVolumesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVolume**](FiltersVolume.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVolumesResponse.md b/docs/ReadVolumesResponse.md deleted file mode 100644 index 3ad6fd51..00000000 --- a/docs/ReadVolumesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVolumesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**volumes** | [**List<Volume>**](Volume.md) | Information about one or more volumes. | [optional] | - - - diff --git a/docs/ReadVpnConnectionsRequest.md b/docs/ReadVpnConnectionsRequest.md deleted file mode 100644 index dd18704d..00000000 --- a/docs/ReadVpnConnectionsRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReadVpnConnectionsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**filters** | [**FiltersVpnConnection**](FiltersVpnConnection.md) | | [optional] | -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**resultsPerPage** | **Integer** | The maximum number of logs returned in a single response (between `1`and `1000`, both included). By default, `100`. | [optional] | - - - diff --git a/docs/ReadVpnConnectionsResponse.md b/docs/ReadVpnConnectionsResponse.md deleted file mode 100644 index 0658ed8b..00000000 --- a/docs/ReadVpnConnectionsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReadVpnConnectionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextPageToken** | **byte[]** | The token to request the next page of results. Each token refers to a specific page. | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vpnConnections** | [**List<VpnConnection>**](VpnConnection.md) | Information about one or more VPN connections. | [optional] | - - - diff --git a/docs/RebootVmsRequest.md b/docs/RebootVmsRequest.md deleted file mode 100644 index e7d2a57b..00000000 --- a/docs/RebootVmsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# RebootVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of the VMs you want to reboot. | | - - - diff --git a/docs/RebootVmsResponse.md b/docs/RebootVmsResponse.md deleted file mode 100644 index 17f9d26d..00000000 --- a/docs/RebootVmsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RebootVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/Region.md b/docs/Region.md deleted file mode 100644 index 5579bf9b..00000000 --- a/docs/Region.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Region - -Information about the Region. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**endpoint** | **String** | The hostname of the gateway to access the Region. | [optional] | -|**regionName** | **String** | The administrative name of the Region. | [optional] | - - - diff --git a/docs/RegionApi.md b/docs/RegionApi.md deleted file mode 100644 index 2424885a..00000000 --- a/docs/RegionApi.md +++ /dev/null @@ -1,71 +0,0 @@ -# RegionApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readRegions**](RegionApi.md#readRegions) | **POST** /ReadRegions | | - - - -# **readRegions** -> ReadRegionsResponse readRegions(readRegionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RegionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - RegionApi apiInstance = new RegionApi(defaultClient); - ReadRegionsRequest readRegionsRequest = new ReadRegionsRequest(); // ReadRegionsRequest | - try { - ReadRegionsResponse result = apiInstance.readRegions(readRegionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RegionApi#readRegions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readRegionsRequest** | [**ReadRegionsRequest**](ReadRegionsRequest.md)| | [optional] | - -### Return type - -[**ReadRegionsResponse**](ReadRegionsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/RegisterVmsInLoadBalancerRequest.md b/docs/RegisterVmsInLoadBalancerRequest.md deleted file mode 100644 index 9feb166f..00000000 --- a/docs/RegisterVmsInLoadBalancerRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# RegisterVmsInLoadBalancerRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs.<br /> Specifying the same ID several times has no effect as each backend VM has equal weight. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | - - - diff --git a/docs/RegisterVmsInLoadBalancerResponse.md b/docs/RegisterVmsInLoadBalancerResponse.md deleted file mode 100644 index caf7af3b..00000000 --- a/docs/RegisterVmsInLoadBalancerResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RegisterVmsInLoadBalancerResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/RejectNetPeeringRequest.md b/docs/RejectNetPeeringRequest.md deleted file mode 100644 index 21cd5b29..00000000 --- a/docs/RejectNetPeeringRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# RejectNetPeeringRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netPeeringId** | **String** | The ID of the Net peering you want to reject. | | - - - diff --git a/docs/RejectNetPeeringResponse.md b/docs/RejectNetPeeringResponse.md deleted file mode 100644 index 59c50ed3..00000000 --- a/docs/RejectNetPeeringResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RejectNetPeeringResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ResourceLoadBalancerTag.md b/docs/ResourceLoadBalancerTag.md deleted file mode 100644 index 46accb44..00000000 --- a/docs/ResourceLoadBalancerTag.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ResourceLoadBalancerTag - -Information about the tag. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | The key of the tag, with a minimum of 1 character. | | - - - diff --git a/docs/ResourceTag.md b/docs/ResourceTag.md deleted file mode 100644 index be434164..00000000 --- a/docs/ResourceTag.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ResourceTag - -Information about the tag. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | The key of the tag, with a minimum of 1 character. | | -|**value** | **String** | The value of the tag, between 0 and 255 characters. | | - - - diff --git a/docs/ResponseContext.md b/docs/ResponseContext.md deleted file mode 100644 index 7dd6ffda..00000000 --- a/docs/ResponseContext.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ResponseContext - -Information about the context of the response. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**requestId** | **String** | The ID of the request. | [optional] | - - - diff --git a/docs/Route.md b/docs/Route.md deleted file mode 100644 index 8492922b..00000000 --- a/docs/Route.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# Route - -Information about the route. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**creationMethod** | **String** | The method used to create the route. | [optional] | -|**destinationIpRange** | **String** | The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`). | [optional] | -|**destinationServiceId** | **String** | The ID of the OUTSCALE service. | [optional] | -|**gatewayId** | **String** | The ID of the Internet service or virtual gateway attached to the Net. | [optional] | -|**natServiceId** | **String** | The ID of a NAT service attached to the Net. | [optional] | -|**netAccessPointId** | **String** | The ID of the Net access point. | [optional] | -|**netPeeringId** | **String** | The ID of the Net peering. | [optional] | -|**nicId** | **String** | The ID of the NIC. | [optional] | -|**state** | **String** | The state of a route in the route table (always `active`). | [optional] | -|**vmAccountId** | **String** | The account ID of the owner of the VM. | [optional] | -|**vmId** | **String** | The ID of a VM specified in a route in the table. | [optional] | - - - diff --git a/docs/RouteApi.md b/docs/RouteApi.md deleted file mode 100644 index ee0d4973..00000000 --- a/docs/RouteApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# RouteApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createRoute**](RouteApi.md#createRoute) | **POST** /CreateRoute | | -| [**deleteRoute**](RouteApi.md#deleteRoute) | **POST** /DeleteRoute | | -| [**updateRoute**](RouteApi.md#updateRoute) | **POST** /UpdateRoute | | - - - -# **createRoute** -> CreateRouteResponse createRoute(createRouteRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteApi apiInstance = new RouteApi(defaultClient); - CreateRouteRequest createRouteRequest = new CreateRouteRequest(); // CreateRouteRequest | - try { - CreateRouteResponse result = apiInstance.createRoute(createRouteRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteApi#createRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createRouteRequest** | [**CreateRouteRequest**](CreateRouteRequest.md)| | [optional] | - -### Return type - -[**CreateRouteResponse**](CreateRouteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteRoute** -> DeleteRouteResponse deleteRoute(deleteRouteRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteApi apiInstance = new RouteApi(defaultClient); - DeleteRouteRequest deleteRouteRequest = new DeleteRouteRequest(); // DeleteRouteRequest | - try { - DeleteRouteResponse result = apiInstance.deleteRoute(deleteRouteRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteApi#deleteRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteRouteRequest** | [**DeleteRouteRequest**](DeleteRouteRequest.md)| | [optional] | - -### Return type - -[**DeleteRouteResponse**](DeleteRouteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateRoute** -> UpdateRouteResponse updateRoute(updateRouteRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteApi apiInstance = new RouteApi(defaultClient); - UpdateRouteRequest updateRouteRequest = new UpdateRouteRequest(); // UpdateRouteRequest | - try { - UpdateRouteResponse result = apiInstance.updateRoute(updateRouteRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteApi#updateRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateRouteRequest** | [**UpdateRouteRequest**](UpdateRouteRequest.md)| | [optional] | - -### Return type - -[**UpdateRouteResponse**](UpdateRouteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/RouteLight.md b/docs/RouteLight.md deleted file mode 100644 index 21bf75d4..00000000 --- a/docs/RouteLight.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# RouteLight - -Information about the route. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`). | [optional] | -|**routeType** | **String** | The type of route (always `static`). | [optional] | -|**state** | **String** | The current state of the static route (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | - - - diff --git a/docs/RoutePropagatingVirtualGateway.md b/docs/RoutePropagatingVirtualGateway.md deleted file mode 100644 index 92c7d993..00000000 --- a/docs/RoutePropagatingVirtualGateway.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# RoutePropagatingVirtualGateway - -Information about the route propagating virtual gateway. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | [optional] | - - - diff --git a/docs/RouteTable.md b/docs/RouteTable.md deleted file mode 100644 index 14987f11..00000000 --- a/docs/RouteTable.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# RouteTable - -Information about the route table. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkRouteTables** | [**List<LinkRouteTable>**](LinkRouteTable.md) | One or more associations between the route table and Subnets. | [optional] | -|**netId** | **String** | The ID of the Net for the route table. | [optional] | -|**routePropagatingVirtualGateways** | [**List<RoutePropagatingVirtualGateway>**](RoutePropagatingVirtualGateway.md) | Information about virtual gateways propagating routes. | [optional] | -|**routeTableId** | **String** | The ID of the route table. | [optional] | -|**routes** | [**List<Route>**](Route.md) | One or more routes in the route table. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the route table. | [optional] | - - - diff --git a/docs/RouteTableApi.md b/docs/RouteTableApi.md deleted file mode 100644 index 70c232c1..00000000 --- a/docs/RouteTableApi.md +++ /dev/null @@ -1,446 +0,0 @@ -# RouteTableApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createRouteTable**](RouteTableApi.md#createRouteTable) | **POST** /CreateRouteTable | | -| [**deleteRouteTable**](RouteTableApi.md#deleteRouteTable) | **POST** /DeleteRouteTable | | -| [**linkRouteTable**](RouteTableApi.md#linkRouteTable) | **POST** /LinkRouteTable | | -| [**readRouteTables**](RouteTableApi.md#readRouteTables) | **POST** /ReadRouteTables | | -| [**unlinkRouteTable**](RouteTableApi.md#unlinkRouteTable) | **POST** /UnlinkRouteTable | | -| [**updateRouteTableLink**](RouteTableApi.md#updateRouteTableLink) | **POST** /UpdateRouteTableLink | | - - - -# **createRouteTable** -> CreateRouteTableResponse createRouteTable(createRouteTableRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - CreateRouteTableRequest createRouteTableRequest = new CreateRouteTableRequest(); // CreateRouteTableRequest | - try { - CreateRouteTableResponse result = apiInstance.createRouteTable(createRouteTableRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#createRouteTable"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createRouteTableRequest** | [**CreateRouteTableRequest**](CreateRouteTableRequest.md)| | [optional] | - -### Return type - -[**CreateRouteTableResponse**](CreateRouteTableResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteRouteTable** -> DeleteRouteTableResponse deleteRouteTable(deleteRouteTableRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - DeleteRouteTableRequest deleteRouteTableRequest = new DeleteRouteTableRequest(); // DeleteRouteTableRequest | - try { - DeleteRouteTableResponse result = apiInstance.deleteRouteTable(deleteRouteTableRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#deleteRouteTable"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteRouteTableRequest** | [**DeleteRouteTableRequest**](DeleteRouteTableRequest.md)| | [optional] | - -### Return type - -[**DeleteRouteTableResponse**](DeleteRouteTableResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkRouteTable** -> LinkRouteTableResponse linkRouteTable(linkRouteTableRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - LinkRouteTableRequest linkRouteTableRequest = new LinkRouteTableRequest(); // LinkRouteTableRequest | - try { - LinkRouteTableResponse result = apiInstance.linkRouteTable(linkRouteTableRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#linkRouteTable"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkRouteTableRequest** | [**LinkRouteTableRequest**](LinkRouteTableRequest.md)| | [optional] | - -### Return type - -[**LinkRouteTableResponse**](LinkRouteTableResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readRouteTables** -> ReadRouteTablesResponse readRouteTables(readRouteTablesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - ReadRouteTablesRequest readRouteTablesRequest = new ReadRouteTablesRequest(); // ReadRouteTablesRequest | - try { - ReadRouteTablesResponse result = apiInstance.readRouteTables(readRouteTablesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#readRouteTables"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readRouteTablesRequest** | [**ReadRouteTablesRequest**](ReadRouteTablesRequest.md)| | [optional] | - -### Return type - -[**ReadRouteTablesResponse**](ReadRouteTablesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkRouteTable** -> UnlinkRouteTableResponse unlinkRouteTable(unlinkRouteTableRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - UnlinkRouteTableRequest unlinkRouteTableRequest = new UnlinkRouteTableRequest(); // UnlinkRouteTableRequest | - try { - UnlinkRouteTableResponse result = apiInstance.unlinkRouteTable(unlinkRouteTableRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#unlinkRouteTable"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkRouteTableRequest** | [**UnlinkRouteTableRequest**](UnlinkRouteTableRequest.md)| | [optional] | - -### Return type - -[**UnlinkRouteTableResponse**](UnlinkRouteTableResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateRouteTableLink** -> UpdateRouteTableLinkResponse updateRouteTableLink(updateRouteTableLinkRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.RouteTableApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - RouteTableApi apiInstance = new RouteTableApi(defaultClient); - UpdateRouteTableLinkRequest updateRouteTableLinkRequest = new UpdateRouteTableLinkRequest(); // UpdateRouteTableLinkRequest | - try { - UpdateRouteTableLinkResponse result = apiInstance.updateRouteTableLink(updateRouteTableLinkRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RouteTableApi#updateRouteTableLink"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateRouteTableLinkRequest** | [**UpdateRouteTableLinkRequest**](UpdateRouteTableLinkRequest.md)| | [optional] | - -### Return type - -[**UpdateRouteTableLinkResponse**](UpdateRouteTableLinkResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/ScaleDownVmGroupRequest.md b/docs/ScaleDownVmGroupRequest.md deleted file mode 100644 index 9a1fe0ce..00000000 --- a/docs/ScaleDownVmGroupRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ScaleDownVmGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmGroupId** | **String** | The ID of the VM group you want to scale down. | | -|**vmSubtraction** | **Integer** | The number of VMs you want to delete from the VM group. | | - - - diff --git a/docs/ScaleDownVmGroupResponse.md b/docs/ScaleDownVmGroupResponse.md deleted file mode 100644 index 6785e1ec..00000000 --- a/docs/ScaleDownVmGroupResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ScaleDownVmGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/ScaleUpVmGroupRequest.md b/docs/ScaleUpVmGroupRequest.md deleted file mode 100644 index 72e04c89..00000000 --- a/docs/ScaleUpVmGroupRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ScaleUpVmGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmAddition** | **Integer** | The number of VMs you want to add to the VM group. | | -|**vmGroupId** | **String** | The ID of the VM group you want to scale up. | | - - - diff --git a/docs/ScaleUpVmGroupResponse.md b/docs/ScaleUpVmGroupResponse.md deleted file mode 100644 index dbb67e2b..00000000 --- a/docs/ScaleUpVmGroupResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ScaleUpVmGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/SecurityGroup.md b/docs/SecurityGroup.md deleted file mode 100644 index ad1ae4e4..00000000 --- a/docs/SecurityGroup.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# SecurityGroup - -Information about the security group. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID that has been granted permission. | [optional] | -|**description** | **String** | The description of the security group. | [optional] | -|**inboundRules** | [**List<SecurityGroupRule>**](SecurityGroupRule.md) | The inbound rules associated with the security group. | [optional] | -|**netId** | **String** | The ID of the Net for the security group. | [optional] | -|**outboundRules** | [**List<SecurityGroupRule>**](SecurityGroupRule.md) | The outbound rules associated with the security group. | [optional] | -|**securityGroupId** | **String** | The ID of the security group. | [optional] | -|**securityGroupName** | **String** | The name of the security group. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the security group. | [optional] | - - - diff --git a/docs/SecurityGroupApi.md b/docs/SecurityGroupApi.md deleted file mode 100644 index 755bb575..00000000 --- a/docs/SecurityGroupApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# SecurityGroupApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSecurityGroup**](SecurityGroupApi.md#createSecurityGroup) | **POST** /CreateSecurityGroup | | -| [**deleteSecurityGroup**](SecurityGroupApi.md#deleteSecurityGroup) | **POST** /DeleteSecurityGroup | | -| [**readSecurityGroups**](SecurityGroupApi.md#readSecurityGroups) | **POST** /ReadSecurityGroups | | - - - -# **createSecurityGroup** -> CreateSecurityGroupResponse createSecurityGroup(createSecurityGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SecurityGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SecurityGroupApi apiInstance = new SecurityGroupApi(defaultClient); - CreateSecurityGroupRequest createSecurityGroupRequest = new CreateSecurityGroupRequest(); // CreateSecurityGroupRequest | - try { - CreateSecurityGroupResponse result = apiInstance.createSecurityGroup(createSecurityGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityGroupApi#createSecurityGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createSecurityGroupRequest** | [**CreateSecurityGroupRequest**](CreateSecurityGroupRequest.md)| | [optional] | - -### Return type - -[**CreateSecurityGroupResponse**](CreateSecurityGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteSecurityGroup** -> DeleteSecurityGroupResponse deleteSecurityGroup(deleteSecurityGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SecurityGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SecurityGroupApi apiInstance = new SecurityGroupApi(defaultClient); - DeleteSecurityGroupRequest deleteSecurityGroupRequest = new DeleteSecurityGroupRequest(); // DeleteSecurityGroupRequest | - try { - DeleteSecurityGroupResponse result = apiInstance.deleteSecurityGroup(deleteSecurityGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityGroupApi#deleteSecurityGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteSecurityGroupRequest** | [**DeleteSecurityGroupRequest**](DeleteSecurityGroupRequest.md)| | [optional] | - -### Return type - -[**DeleteSecurityGroupResponse**](DeleteSecurityGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readSecurityGroups** -> ReadSecurityGroupsResponse readSecurityGroups(readSecurityGroupsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SecurityGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SecurityGroupApi apiInstance = new SecurityGroupApi(defaultClient); - ReadSecurityGroupsRequest readSecurityGroupsRequest = new ReadSecurityGroupsRequest(); // ReadSecurityGroupsRequest | - try { - ReadSecurityGroupsResponse result = apiInstance.readSecurityGroups(readSecurityGroupsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityGroupApi#readSecurityGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSecurityGroupsRequest** | [**ReadSecurityGroupsRequest**](ReadSecurityGroupsRequest.md)| | [optional] | - -### Return type - -[**ReadSecurityGroupsResponse**](ReadSecurityGroupsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/SecurityGroupLight.md b/docs/SecurityGroupLight.md deleted file mode 100644 index 67a18b83..00000000 --- a/docs/SecurityGroupLight.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SecurityGroupLight - -Information about the security group. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**securityGroupId** | **String** | The ID of the security group. | [optional] | -|**securityGroupName** | **String** | The name of the security group. | [optional] | - - - diff --git a/docs/SecurityGroupRule.md b/docs/SecurityGroupRule.md deleted file mode 100644 index ea7bf513..00000000 --- a/docs/SecurityGroupRule.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SecurityGroupRule - -Information about the security group rule. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**fromPortRange** | **Integer** | The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. | [optional] | -|**ipProtocol** | **String** | The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. In a Net, this can also be an IP protocol number. For more information, see the [IANA.org website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). | [optional] | -|**ipRanges** | **List<String>** | One or more IP ranges for the security group rules, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**securityGroupsMembers** | [**List<SecurityGroupsMember>**](SecurityGroupsMember.md) | Information about one or more source or destination security groups. | [optional] | -|**serviceIds** | **List<String>** | One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see [ReadNetAccessPointServices](#readnetaccesspointservices). | [optional] | -|**toPortRange** | **Integer** | The end of the port range for the TCP and UDP protocols, or an ICMP code number. | [optional] | - - - diff --git a/docs/SecurityGroupRuleApi.md b/docs/SecurityGroupRuleApi.md deleted file mode 100644 index 34771d0d..00000000 --- a/docs/SecurityGroupRuleApi.md +++ /dev/null @@ -1,154 +0,0 @@ -# SecurityGroupRuleApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSecurityGroupRule**](SecurityGroupRuleApi.md#createSecurityGroupRule) | **POST** /CreateSecurityGroupRule | | -| [**deleteSecurityGroupRule**](SecurityGroupRuleApi.md#deleteSecurityGroupRule) | **POST** /DeleteSecurityGroupRule | | - - - -# **createSecurityGroupRule** -> CreateSecurityGroupRuleResponse createSecurityGroupRule(createSecurityGroupRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SecurityGroupRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SecurityGroupRuleApi apiInstance = new SecurityGroupRuleApi(defaultClient); - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest = new CreateSecurityGroupRuleRequest(); // CreateSecurityGroupRuleRequest | - try { - CreateSecurityGroupRuleResponse result = apiInstance.createSecurityGroupRule(createSecurityGroupRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityGroupRuleApi#createSecurityGroupRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createSecurityGroupRuleRequest** | [**CreateSecurityGroupRuleRequest**](CreateSecurityGroupRuleRequest.md)| | [optional] | - -### Return type - -[**CreateSecurityGroupRuleResponse**](CreateSecurityGroupRuleResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteSecurityGroupRule** -> DeleteSecurityGroupRuleResponse deleteSecurityGroupRule(deleteSecurityGroupRuleRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SecurityGroupRuleApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SecurityGroupRuleApi apiInstance = new SecurityGroupRuleApi(defaultClient); - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest = new DeleteSecurityGroupRuleRequest(); // DeleteSecurityGroupRuleRequest | - try { - DeleteSecurityGroupRuleResponse result = apiInstance.deleteSecurityGroupRule(deleteSecurityGroupRuleRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityGroupRuleApi#deleteSecurityGroupRule"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteSecurityGroupRuleRequest** | [**DeleteSecurityGroupRuleRequest**](DeleteSecurityGroupRuleRequest.md)| | [optional] | - -### Return type - -[**DeleteSecurityGroupRuleResponse**](DeleteSecurityGroupRuleResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/SecurityGroupsMember.md b/docs/SecurityGroupsMember.md deleted file mode 100644 index b1c91769..00000000 --- a/docs/SecurityGroupsMember.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SecurityGroupsMember - -Information about a source or destination security group. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID that owns the source or destination security group. | [optional] | -|**securityGroupId** | **String** | The ID of a source or destination security group that you want to link to the security group of the rule. | [optional] | -|**securityGroupName** | **String** | (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule. | [optional] | - - - diff --git a/docs/ServerCertificate.md b/docs/ServerCertificate.md deleted file mode 100644 index 866a7e55..00000000 --- a/docs/ServerCertificate.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# ServerCertificate - -Information about the server certificate. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**expirationDate** | **LocalDate** | The date on which the server certificate expires. | [optional] | -|**id** | **String** | The ID of the server certificate. | [optional] | -|**name** | **String** | The name of the server certificate. | [optional] | -|**orn** | **String** | The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see [Resource Identifiers > OUTSCALE Resource Names (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). | [optional] | -|**path** | **String** | The path to the server certificate. | [optional] | -|**uploadDate** | **LocalDate** | The date on which the server certificate has been uploaded. | [optional] | - - - diff --git a/docs/ServerCertificateApi.md b/docs/ServerCertificateApi.md deleted file mode 100644 index 7b2b5159..00000000 --- a/docs/ServerCertificateApi.md +++ /dev/null @@ -1,288 +0,0 @@ -# ServerCertificateApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createServerCertificate**](ServerCertificateApi.md#createServerCertificate) | **POST** /CreateServerCertificate | | -| [**deleteServerCertificate**](ServerCertificateApi.md#deleteServerCertificate) | **POST** /DeleteServerCertificate | | -| [**readServerCertificates**](ServerCertificateApi.md#readServerCertificates) | **POST** /ReadServerCertificates | | -| [**updateServerCertificate**](ServerCertificateApi.md#updateServerCertificate) | **POST** /UpdateServerCertificate | | - - - -# **createServerCertificate** -> CreateServerCertificateResponse createServerCertificate(createServerCertificateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ServerCertificateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ServerCertificateApi apiInstance = new ServerCertificateApi(defaultClient); - CreateServerCertificateRequest createServerCertificateRequest = new CreateServerCertificateRequest(); // CreateServerCertificateRequest | - try { - CreateServerCertificateResponse result = apiInstance.createServerCertificate(createServerCertificateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ServerCertificateApi#createServerCertificate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createServerCertificateRequest** | [**CreateServerCertificateRequest**](CreateServerCertificateRequest.md)| | [optional] | - -### Return type - -[**CreateServerCertificateResponse**](CreateServerCertificateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteServerCertificate** -> DeleteServerCertificateResponse deleteServerCertificate(deleteServerCertificateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ServerCertificateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ServerCertificateApi apiInstance = new ServerCertificateApi(defaultClient); - DeleteServerCertificateRequest deleteServerCertificateRequest = new DeleteServerCertificateRequest(); // DeleteServerCertificateRequest | - try { - DeleteServerCertificateResponse result = apiInstance.deleteServerCertificate(deleteServerCertificateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ServerCertificateApi#deleteServerCertificate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteServerCertificateRequest** | [**DeleteServerCertificateRequest**](DeleteServerCertificateRequest.md)| | [optional] | - -### Return type - -[**DeleteServerCertificateResponse**](DeleteServerCertificateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readServerCertificates** -> ReadServerCertificatesResponse readServerCertificates(readServerCertificatesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ServerCertificateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ServerCertificateApi apiInstance = new ServerCertificateApi(defaultClient); - ReadServerCertificatesRequest readServerCertificatesRequest = new ReadServerCertificatesRequest(); // ReadServerCertificatesRequest | - try { - ReadServerCertificatesResponse result = apiInstance.readServerCertificates(readServerCertificatesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ServerCertificateApi#readServerCertificates"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readServerCertificatesRequest** | [**ReadServerCertificatesRequest**](ReadServerCertificatesRequest.md)| | [optional] | - -### Return type - -[**ReadServerCertificatesResponse**](ReadServerCertificatesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateServerCertificate** -> UpdateServerCertificateResponse updateServerCertificate(updateServerCertificateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.ServerCertificateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ServerCertificateApi apiInstance = new ServerCertificateApi(defaultClient); - UpdateServerCertificateRequest updateServerCertificateRequest = new UpdateServerCertificateRequest(); // UpdateServerCertificateRequest | - try { - UpdateServerCertificateResponse result = apiInstance.updateServerCertificate(updateServerCertificateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ServerCertificateApi#updateServerCertificate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateServerCertificateRequest** | [**UpdateServerCertificateRequest**](UpdateServerCertificateRequest.md)| | [optional] | - -### Return type - -[**UpdateServerCertificateResponse**](UpdateServerCertificateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/Service.md b/docs/Service.md deleted file mode 100644 index 02a71541..00000000 --- a/docs/Service.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Service - -Information about the service. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipRanges** | **List<String>** | The list of network prefixes used by the service, in CIDR notation. | [optional] | -|**serviceId** | **String** | The ID of the service. | [optional] | -|**serviceName** | **String** | The name of the service. | [optional] | - - - diff --git a/docs/Snapshot.md b/docs/Snapshot.md deleted file mode 100644 index 36ab6e9d..00000000 --- a/docs/Snapshot.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# Snapshot - -Information about the snapshot. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountAlias** | **String** | The account alias of the owner of the snapshot. | [optional] | -|**accountId** | **String** | The account ID of the owner of the snapshot. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the snapshot was created. | [optional] | -|**description** | **String** | The description of the snapshot. | [optional] | -|**permissionsToCreateVolume** | [**PermissionsOnResource**](PermissionsOnResource.md) | | [optional] | -|**progress** | **Integer** | The progress of the snapshot, as a percentage. | [optional] | -|**snapshotId** | **String** | The ID of the snapshot. | [optional] | -|**state** | **String** | The state of the snapshot (`in-queue` \\| `pending` \\| `completed` \\| `error` \\| `deleting`)). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the snapshot. | [optional] | -|**volumeId** | **String** | The ID of the volume used to create the snapshot. | [optional] | -|**volumeSize** | **Integer** | The size of the volume used to create the snapshot, in gibibytes (GiB). | [optional] | - - - diff --git a/docs/SnapshotApi.md b/docs/SnapshotApi.md deleted file mode 100644 index 5b79e05d..00000000 --- a/docs/SnapshotApi.md +++ /dev/null @@ -1,440 +0,0 @@ -# SnapshotApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSnapshot**](SnapshotApi.md#createSnapshot) | **POST** /CreateSnapshot | | -| [**createSnapshotExportTask**](SnapshotApi.md#createSnapshotExportTask) | **POST** /CreateSnapshotExportTask | | -| [**deleteSnapshot**](SnapshotApi.md#deleteSnapshot) | **POST** /DeleteSnapshot | | -| [**readSnapshotExportTasks**](SnapshotApi.md#readSnapshotExportTasks) | **POST** /ReadSnapshotExportTasks | | -| [**readSnapshots**](SnapshotApi.md#readSnapshots) | **POST** /ReadSnapshots | | -| [**updateSnapshot**](SnapshotApi.md#updateSnapshot) | **POST** /UpdateSnapshot | | - - - -# **createSnapshot** -> CreateSnapshotResponse createSnapshot(createSnapshotRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - CreateSnapshotRequest createSnapshotRequest = new CreateSnapshotRequest(); // CreateSnapshotRequest | - try { - CreateSnapshotResponse result = apiInstance.createSnapshot(createSnapshotRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#createSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createSnapshotRequest** | [**CreateSnapshotRequest**](CreateSnapshotRequest.md)| | [optional] | - -### Return type - -[**CreateSnapshotResponse**](CreateSnapshotResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **createSnapshotExportTask** -> CreateSnapshotExportTaskResponse createSnapshotExportTask(createSnapshotExportTaskRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest = new CreateSnapshotExportTaskRequest(); // CreateSnapshotExportTaskRequest | - try { - CreateSnapshotExportTaskResponse result = apiInstance.createSnapshotExportTask(createSnapshotExportTaskRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#createSnapshotExportTask"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createSnapshotExportTaskRequest** | [**CreateSnapshotExportTaskRequest**](CreateSnapshotExportTaskRequest.md)| | [optional] | - -### Return type - -[**CreateSnapshotExportTaskResponse**](CreateSnapshotExportTaskResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteSnapshot** -> DeleteSnapshotResponse deleteSnapshot(deleteSnapshotRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - DeleteSnapshotRequest deleteSnapshotRequest = new DeleteSnapshotRequest(); // DeleteSnapshotRequest | - try { - DeleteSnapshotResponse result = apiInstance.deleteSnapshot(deleteSnapshotRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#deleteSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteSnapshotRequest** | [**DeleteSnapshotRequest**](DeleteSnapshotRequest.md)| | [optional] | - -### Return type - -[**DeleteSnapshotResponse**](DeleteSnapshotResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readSnapshotExportTasks** -> ReadSnapshotExportTasksResponse readSnapshotExportTasks(readSnapshotExportTasksRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest = new ReadSnapshotExportTasksRequest(); // ReadSnapshotExportTasksRequest | - try { - ReadSnapshotExportTasksResponse result = apiInstance.readSnapshotExportTasks(readSnapshotExportTasksRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#readSnapshotExportTasks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSnapshotExportTasksRequest** | [**ReadSnapshotExportTasksRequest**](ReadSnapshotExportTasksRequest.md)| | [optional] | - -### Return type - -[**ReadSnapshotExportTasksResponse**](ReadSnapshotExportTasksResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readSnapshots** -> ReadSnapshotsResponse readSnapshots(readSnapshotsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - ReadSnapshotsRequest readSnapshotsRequest = new ReadSnapshotsRequest(); // ReadSnapshotsRequest | - try { - ReadSnapshotsResponse result = apiInstance.readSnapshots(readSnapshotsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#readSnapshots"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSnapshotsRequest** | [**ReadSnapshotsRequest**](ReadSnapshotsRequest.md)| | [optional] | - -### Return type - -[**ReadSnapshotsResponse**](ReadSnapshotsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateSnapshot** -> UpdateSnapshotResponse updateSnapshot(updateSnapshotRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SnapshotApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SnapshotApi apiInstance = new SnapshotApi(defaultClient); - UpdateSnapshotRequest updateSnapshotRequest = new UpdateSnapshotRequest(); // UpdateSnapshotRequest | - try { - UpdateSnapshotResponse result = apiInstance.updateSnapshot(updateSnapshotRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SnapshotApi#updateSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateSnapshotRequest** | [**UpdateSnapshotRequest**](UpdateSnapshotRequest.md)| | [optional] | - -### Return type - -[**UpdateSnapshotResponse**](UpdateSnapshotResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/SnapshotExportTask.md b/docs/SnapshotExportTask.md deleted file mode 100644 index fbbf19be..00000000 --- a/docs/SnapshotExportTask.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# SnapshotExportTask - -Information about the snapshot export task. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**comment** | **String** | If the snapshot export task fails, an error message appears. | [optional] | -|**osuExport** | [**OsuExportSnapshotExportTask**](OsuExportSnapshotExportTask.md) | | [optional] | -|**progress** | **Integer** | The progress of the snapshot export task, as a percentage. | [optional] | -|**snapshotId** | **String** | The ID of the snapshot to be exported. | [optional] | -|**state** | **String** | The state of the snapshot export task (`pending` \\| `active` \\| `completed` \\| `failed`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the snapshot export task. | [optional] | -|**taskId** | **String** | The ID of the snapshot export task. | [optional] | - - - diff --git a/docs/SourceNet.md b/docs/SourceNet.md deleted file mode 100644 index 5f832f53..00000000 --- a/docs/SourceNet.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SourceNet - -Information about the source Net. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The account ID of the owner of the source Net. | [optional] | -|**ipRange** | **String** | The IP range for the source Net, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**netId** | **String** | The ID of the source Net. | [optional] | - - - diff --git a/docs/SourceSecurityGroup.md b/docs/SourceSecurityGroup.md deleted file mode 100644 index f511b2f8..00000000 --- a/docs/SourceSecurityGroup.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SourceSecurityGroup - -Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.
To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**securityGroupAccountId** | **String** | The account ID of the owner of the security group. | [optional] | -|**securityGroupName** | **String** | The name of the security group. | [optional] | - - - diff --git a/docs/StartVmsRequest.md b/docs/StartVmsRequest.md deleted file mode 100644 index 683f5ec0..00000000 --- a/docs/StartVmsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# StartVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | | - - - diff --git a/docs/StartVmsResponse.md b/docs/StartVmsResponse.md deleted file mode 100644 index 513e8342..00000000 --- a/docs/StartVmsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# StartVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vms** | [**List<VmState>**](VmState.md) | Information about one or more started VMs. | [optional] | - - - diff --git a/docs/StateComment.md b/docs/StateComment.md deleted file mode 100644 index ff929d74..00000000 --- a/docs/StateComment.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# StateComment - -Information about the change of state. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**stateCode** | **String** | The code of the change of state. | [optional] | -|**stateMessage** | **String** | A message explaining the change of state. | [optional] | - - - diff --git a/docs/StopVmsRequest.md b/docs/StopVmsRequest.md deleted file mode 100644 index 9057635c..00000000 --- a/docs/StopVmsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# StopVmsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**forceStop** | **Boolean** | Forces the VM to stop. | [optional] | -|**vmIds** | **List<String>** | One or more IDs of VMs. | | - - - diff --git a/docs/StopVmsResponse.md b/docs/StopVmsResponse.md deleted file mode 100644 index dead86b8..00000000 --- a/docs/StopVmsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# StopVmsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vms** | [**List<VmState>**](VmState.md) | Information about one or more stopped VMs. | [optional] | - - - diff --git a/docs/Subnet.md b/docs/Subnet.md deleted file mode 100644 index 2ee2c783..00000000 --- a/docs/Subnet.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# Subnet - -Information about the Subnet. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**availableIpsCount** | **Integer** | The number of available IPs in the Subnets. | [optional] | -|**ipRange** | **String** | The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`). | [optional] | -|**mapPublicIpOnLaunch** | **Boolean** | If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet. | [optional] | -|**netId** | **String** | The ID of the Net in which the Subnet is. | [optional] | -|**state** | **String** | The state of the Subnet (`pending` \\| `available` \\| `deleted`). | [optional] | -|**subnetId** | **String** | The ID of the Subnet. | [optional] | -|**subregionName** | **String** | The name of the Subregion in which the Subnet is located. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the Subnet. | [optional] | - - - diff --git a/docs/SubnetApi.md b/docs/SubnetApi.md deleted file mode 100644 index 5036dd15..00000000 --- a/docs/SubnetApi.md +++ /dev/null @@ -1,301 +0,0 @@ -# SubnetApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSubnet**](SubnetApi.md#createSubnet) | **POST** /CreateSubnet | | -| [**deleteSubnet**](SubnetApi.md#deleteSubnet) | **POST** /DeleteSubnet | | -| [**readSubnets**](SubnetApi.md#readSubnets) | **POST** /ReadSubnets | | -| [**updateSubnet**](SubnetApi.md#updateSubnet) | **POST** /UpdateSubnet | | - - - -# **createSubnet** -> CreateSubnetResponse createSubnet(createSubnetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SubnetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SubnetApi apiInstance = new SubnetApi(defaultClient); - CreateSubnetRequest createSubnetRequest = new CreateSubnetRequest(); // CreateSubnetRequest | - try { - CreateSubnetResponse result = apiInstance.createSubnet(createSubnetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SubnetApi#createSubnet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createSubnetRequest** | [**CreateSubnetRequest**](CreateSubnetRequest.md)| | [optional] | - -### Return type - -[**CreateSubnetResponse**](CreateSubnetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **409** | The HTTP 409 response (Conflict). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteSubnet** -> DeleteSubnetResponse deleteSubnet(deleteSubnetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SubnetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SubnetApi apiInstance = new SubnetApi(defaultClient); - DeleteSubnetRequest deleteSubnetRequest = new DeleteSubnetRequest(); // DeleteSubnetRequest | - try { - DeleteSubnetResponse result = apiInstance.deleteSubnet(deleteSubnetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SubnetApi#deleteSubnet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteSubnetRequest** | [**DeleteSubnetRequest**](DeleteSubnetRequest.md)| | [optional] | - -### Return type - -[**DeleteSubnetResponse**](DeleteSubnetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readSubnets** -> ReadSubnetsResponse readSubnets(readSubnetsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SubnetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SubnetApi apiInstance = new SubnetApi(defaultClient); - ReadSubnetsRequest readSubnetsRequest = new ReadSubnetsRequest(); // ReadSubnetsRequest | - try { - ReadSubnetsResponse result = apiInstance.readSubnets(readSubnetsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SubnetApi#readSubnets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSubnetsRequest** | [**ReadSubnetsRequest**](ReadSubnetsRequest.md)| | [optional] | - -### Return type - -[**ReadSubnetsResponse**](ReadSubnetsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateSubnet** -> UpdateSubnetResponse updateSubnet(updateSubnetRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SubnetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SubnetApi apiInstance = new SubnetApi(defaultClient); - UpdateSubnetRequest updateSubnetRequest = new UpdateSubnetRequest(); // UpdateSubnetRequest | - try { - UpdateSubnetResponse result = apiInstance.updateSubnet(updateSubnetRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SubnetApi#updateSubnet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateSubnetRequest** | [**UpdateSubnetRequest**](UpdateSubnetRequest.md)| | [optional] | - -### Return type - -[**UpdateSubnetResponse**](UpdateSubnetResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/Subregion.md b/docs/Subregion.md deleted file mode 100644 index 94ec3160..00000000 --- a/docs/Subregion.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# Subregion - -Information about the Subregion. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**locationCode** | **String** | The location code of the Subregion. | [optional] | -|**regionName** | **String** | The name of the Region containing the Subregion. | [optional] | -|**state** | **String** | The state of the Subregion. | [optional] | -|**subregionName** | **String** | The name of the Subregion. | [optional] | - - - diff --git a/docs/SubregionApi.md b/docs/SubregionApi.md deleted file mode 100644 index 9d687ba7..00000000 --- a/docs/SubregionApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# SubregionApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**readSubregions**](SubregionApi.md#readSubregions) | **POST** /ReadSubregions | | - - - -# **readSubregions** -> ReadSubregionsResponse readSubregions(readSubregionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.SubregionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - SubregionApi apiInstance = new SubregionApi(defaultClient); - ReadSubregionsRequest readSubregionsRequest = new ReadSubregionsRequest(); // ReadSubregionsRequest | - try { - ReadSubregionsResponse result = apiInstance.readSubregions(readSubregionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SubregionApi#readSubregions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readSubregionsRequest** | [**ReadSubregionsRequest**](ReadSubregionsRequest.md)| | [optional] | - -### Return type - -[**ReadSubregionsResponse**](ReadSubregionsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/Tag.md b/docs/Tag.md deleted file mode 100644 index 8379f13f..00000000 --- a/docs/Tag.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# Tag - -Information about the tag. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | The key of the tag, with a minimum of 1 character. | [optional] | -|**resourceId** | **String** | The ID of the resource. | [optional] | -|**resourceType** | **String** | The type of the resource. | [optional] | -|**value** | **String** | The value of the tag, between 0 and 255 characters. | [optional] | - - - diff --git a/docs/TagApi.md b/docs/TagApi.md deleted file mode 100644 index d8d5c33a..00000000 --- a/docs/TagApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# TagApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createTags**](TagApi.md#createTags) | **POST** /CreateTags | | -| [**deleteTags**](TagApi.md#deleteTags) | **POST** /DeleteTags | | -| [**readTags**](TagApi.md#readTags) | **POST** /ReadTags | | - - - -# **createTags** -> CreateTagsResponse createTags(createTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.TagApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - TagApi apiInstance = new TagApi(defaultClient); - CreateTagsRequest createTagsRequest = new CreateTagsRequest(); // CreateTagsRequest | - try { - CreateTagsResponse result = apiInstance.createTags(createTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TagApi#createTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createTagsRequest** | [**CreateTagsRequest**](CreateTagsRequest.md)| | [optional] | - -### Return type - -[**CreateTagsResponse**](CreateTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteTags** -> DeleteTagsResponse deleteTags(deleteTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.TagApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - TagApi apiInstance = new TagApi(defaultClient); - DeleteTagsRequest deleteTagsRequest = new DeleteTagsRequest(); // DeleteTagsRequest | - try { - DeleteTagsResponse result = apiInstance.deleteTags(deleteTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TagApi#deleteTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteTagsRequest** | [**DeleteTagsRequest**](DeleteTagsRequest.md)| | [optional] | - -### Return type - -[**DeleteTagsResponse**](DeleteTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readTags** -> ReadTagsResponse readTags(readTagsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.TagApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - TagApi apiInstance = new TagApi(defaultClient); - ReadTagsRequest readTagsRequest = new ReadTagsRequest(); // ReadTagsRequest | - try { - ReadTagsResponse result = apiInstance.readTags(readTagsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TagApi#readTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readTagsRequest** | [**ReadTagsRequest**](ReadTagsRequest.md)| | [optional] | - -### Return type - -[**ReadTagsResponse**](ReadTagsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/TaskApi.md b/docs/TaskApi.md deleted file mode 100644 index 4a585499..00000000 --- a/docs/TaskApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# TaskApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteExportTask**](TaskApi.md#deleteExportTask) | **POST** /DeleteExportTask | | - - - -# **deleteExportTask** -> DeleteExportTaskResponse deleteExportTask(deleteExportTaskRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.TaskApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - TaskApi apiInstance = new TaskApi(defaultClient); - DeleteExportTaskRequest deleteExportTaskRequest = new DeleteExportTaskRequest(); // DeleteExportTaskRequest | - try { - DeleteExportTaskResponse result = apiInstance.deleteExportTask(deleteExportTaskRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskApi#deleteExportTask"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteExportTaskRequest** | [**DeleteExportTaskRequest**](DeleteExportTaskRequest.md)| | [optional] | - -### Return type - -[**DeleteExportTaskResponse**](DeleteExportTaskResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/UnlinkFlexibleGpuRequest.md b/docs/UnlinkFlexibleGpuRequest.md deleted file mode 100644 index 158df91e..00000000 --- a/docs/UnlinkFlexibleGpuRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UnlinkFlexibleGpuRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flexibleGpuId** | **String** | The ID of the fGPU you want to detach from your VM. | | - - - diff --git a/docs/UnlinkFlexibleGpuResponse.md b/docs/UnlinkFlexibleGpuResponse.md deleted file mode 100644 index ce2c2422..00000000 --- a/docs/UnlinkFlexibleGpuResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkFlexibleGpuResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkInternetServiceRequest.md b/docs/UnlinkInternetServiceRequest.md deleted file mode 100644 index fb398828..00000000 --- a/docs/UnlinkInternetServiceRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnlinkInternetServiceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**internetServiceId** | **String** | The ID of the Internet service you want to detach. | | -|**netId** | **String** | The ID of the Net from which you want to detach the Internet service. | | - - - diff --git a/docs/UnlinkInternetServiceResponse.md b/docs/UnlinkInternetServiceResponse.md deleted file mode 100644 index c6c3e8b3..00000000 --- a/docs/UnlinkInternetServiceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkInternetServiceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkLoadBalancerBackendMachinesRequest.md b/docs/UnlinkLoadBalancerBackendMachinesRequest.md deleted file mode 100644 index c3b4254c..00000000 --- a/docs/UnlinkLoadBalancerBackendMachinesRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UnlinkLoadBalancerBackendMachinesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendIps** | **List<String>** | One or more public IPs of backend VMs. | [optional] | -|**backendVmIds** | **List<String>** | One or more IDs of backend VMs. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | - - - diff --git a/docs/UnlinkLoadBalancerBackendMachinesResponse.md b/docs/UnlinkLoadBalancerBackendMachinesResponse.md deleted file mode 100644 index c68ab726..00000000 --- a/docs/UnlinkLoadBalancerBackendMachinesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkLoadBalancerBackendMachinesResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkNicRequest.md b/docs/UnlinkNicRequest.md deleted file mode 100644 index 66e3fc39..00000000 --- a/docs/UnlinkNicRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UnlinkNicRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**linkNicId** | **String** | The ID of the attachment operation. | | - - - diff --git a/docs/UnlinkNicResponse.md b/docs/UnlinkNicResponse.md deleted file mode 100644 index 504e1b29..00000000 --- a/docs/UnlinkNicResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkNicResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkPrivateIpsRequest.md b/docs/UnlinkPrivateIpsRequest.md deleted file mode 100644 index fd120e87..00000000 --- a/docs/UnlinkPrivateIpsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnlinkPrivateIpsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**nicId** | **String** | The ID of the NIC. | | -|**privateIps** | **List<String>** | One or more secondary private IPs you want to unassign from the NIC. | | - - - diff --git a/docs/UnlinkPrivateIpsResponse.md b/docs/UnlinkPrivateIpsResponse.md deleted file mode 100644 index b3510433..00000000 --- a/docs/UnlinkPrivateIpsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkPrivateIpsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkPublicIpRequest.md b/docs/UnlinkPublicIpRequest.md deleted file mode 100644 index 8c1adf0b..00000000 --- a/docs/UnlinkPublicIpRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnlinkPublicIpRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**linkPublicIpId** | **String** | The ID representing the association of the public IP with the VM or the NIC. This parameter is required unless you use the `PublicIp` parameter. | [optional] | -|**publicIp** | **String** | The public IP. This parameter is required unless you use the `LinkPublicIpId` parameter. | [optional] | - - - diff --git a/docs/UnlinkPublicIpResponse.md b/docs/UnlinkPublicIpResponse.md deleted file mode 100644 index 43f6d191..00000000 --- a/docs/UnlinkPublicIpResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkPublicIpResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkRouteTableRequest.md b/docs/UnlinkRouteTableRequest.md deleted file mode 100644 index 1357e719..00000000 --- a/docs/UnlinkRouteTableRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UnlinkRouteTableRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**linkRouteTableId** | **String** | The ID of the association between the route table and the Subnet. | | - - - diff --git a/docs/UnlinkRouteTableResponse.md b/docs/UnlinkRouteTableResponse.md deleted file mode 100644 index 67f849a9..00000000 --- a/docs/UnlinkRouteTableResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkRouteTableResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkVirtualGatewayRequest.md b/docs/UnlinkVirtualGatewayRequest.md deleted file mode 100644 index f63d3a24..00000000 --- a/docs/UnlinkVirtualGatewayRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnlinkVirtualGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net from which you want to detach the virtual gateway. | | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | | - - - diff --git a/docs/UnlinkVirtualGatewayResponse.md b/docs/UnlinkVirtualGatewayResponse.md deleted file mode 100644 index 42c5c86b..00000000 --- a/docs/UnlinkVirtualGatewayResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkVirtualGatewayResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UnlinkVolumeRequest.md b/docs/UnlinkVolumeRequest.md deleted file mode 100644 index 5a799fe7..00000000 --- a/docs/UnlinkVolumeRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnlinkVolumeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**forceUnlink** | **Boolean** | Forces the detachment of the volume in case of previous failure. Important: This action may damage your data or file systems. | [optional] | -|**volumeId** | **String** | The ID of the volume you want to detach. | | - - - diff --git a/docs/UnlinkVolumeResponse.md b/docs/UnlinkVolumeResponse.md deleted file mode 100644 index 6857ea85..00000000 --- a/docs/UnlinkVolumeResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UnlinkVolumeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateAccessKeyRequest.md b/docs/UpdateAccessKeyRequest.md deleted file mode 100644 index c7a07cb3..00000000 --- a/docs/UpdateAccessKeyRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UpdateAccessKeyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | The ID of the access key. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**expirationDate** | **OffsetDateTime** | The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). If not specified, the access key is set to not expire. | [optional] | -|**state** | **String** | The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set to `ACTIVE`, the access key is enabled and can be used to send requests. When set to `INACTIVE`, the access key is disabled. | | -|**userName** | **String** | The name of the EIM user that the access key you want to modify is associated with. If you do not specify a user name, this action modifies the access key of the user who sends the request (which can be the root account). | [optional] | - - - diff --git a/docs/UpdateAccessKeyResponse.md b/docs/UpdateAccessKeyResponse.md deleted file mode 100644 index f77c5cf0..00000000 --- a/docs/UpdateAccessKeyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateAccessKeyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKey** | [**AccessKey**](AccessKey.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateAccountRequest.md b/docs/UpdateAccountRequest.md deleted file mode 100644 index 18cd660e..00000000 --- a/docs/UpdateAccountRequest.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# UpdateAccountRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**additionalEmails** | **List<String>** | One or more additional email addresses for the account. These addresses are used for notifications only. If you already have a list of additional emails registered, you cannot add to it, only replace it. To remove all registered additional emails, specify an empty list. | [optional] | -|**city** | **String** | The new city of the account owner. | [optional] | -|**companyName** | **String** | The new name of the company for the account. | [optional] | -|**country** | **String** | The new country of the account owner. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**email** | **String** | The main email address for the account. This address is used for your credentials and notifications. | [optional] | -|**firstName** | **String** | The new first name of the account owner. | [optional] | -|**jobTitle** | **String** | The new job title of the account owner. | [optional] | -|**lastName** | **String** | The new last name of the account owner. | [optional] | -|**mobileNumber** | **String** | The new mobile phone number of the account owner. | [optional] | -|**phoneNumber** | **String** | The new landline phone number of the account owner. | [optional] | -|**stateProvince** | **String** | The new state/province of the account owner. | [optional] | -|**vatNumber** | **String** | The new value added tax (VAT) number for the account. | [optional] | -|**zipCode** | **String** | The new ZIP code of the city. | [optional] | - - - diff --git a/docs/UpdateAccountResponse.md b/docs/UpdateAccountResponse.md deleted file mode 100644 index 93142343..00000000 --- a/docs/UpdateAccountResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateAccountResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**account** | [**Account**](Account.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateApiAccessPolicyRequest.md b/docs/UpdateApiAccessPolicyRequest.md deleted file mode 100644 index bfcd40db..00000000 --- a/docs/UpdateApiAccessPolicyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateApiAccessPolicyRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**maxAccessKeyExpirationSeconds** | **Long** | The maximum possible lifetime for your access keys, in seconds (between `0` and `3153600000`, both included). If set to `O`, your access keys can have unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access keys must have an expiration date. This value must be greater than the remaining lifetime of each access key of your account. | | -|**requireTrustedEnv** | **Boolean** | If true, a trusted session is activated, provided that you specify the `MaxAccessKeyExpirationSeconds` parameter with a value greater than `0`.<br /> Enabling this will require you and all your users to log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see [About Authentication > Multi-Factor Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_factor_authentication). | | - - - diff --git a/docs/UpdateApiAccessPolicyResponse.md b/docs/UpdateApiAccessPolicyResponse.md deleted file mode 100644 index 83078877..00000000 --- a/docs/UpdateApiAccessPolicyResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateApiAccessPolicyResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessPolicy** | [**ApiAccessPolicy**](ApiAccessPolicy.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateApiAccessRuleRequest.md b/docs/UpdateApiAccessRuleRequest.md deleted file mode 100644 index aa814f23..00000000 --- a/docs/UpdateApiAccessRuleRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# UpdateApiAccessRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRuleId** | **String** | The ID of the API access rule you want to update. | | -|**caIds** | **List<String>** | One or more IDs of Client Certificate Authorities (CAs). | [optional] | -|**cns** | **List<String>** | One or more Client Certificate Common Names (CNs). | [optional] | -|**description** | **String** | A new description for the API access rule. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**ipRanges** | **List<String>** | One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). | [optional] | - - - diff --git a/docs/UpdateApiAccessRuleResponse.md b/docs/UpdateApiAccessRuleResponse.md deleted file mode 100644 index cc568723..00000000 --- a/docs/UpdateApiAccessRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateApiAccessRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiAccessRule** | [**ApiAccessRule**](ApiAccessRule.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateCaRequest.md b/docs/UpdateCaRequest.md deleted file mode 100644 index 5c7325ad..00000000 --- a/docs/UpdateCaRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateCaRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**caId** | **String** | The ID of the CA. | | -|**description** | **String** | The description of the CA. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | - - - diff --git a/docs/UpdateCaResponse.md b/docs/UpdateCaResponse.md deleted file mode 100644 index 5495986e..00000000 --- a/docs/UpdateCaResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateCaResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ca** | [**Ca**](Ca.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateDirectLinkInterfaceRequest.md b/docs/UpdateDirectLinkInterfaceRequest.md deleted file mode 100644 index 8a56ca4a..00000000 --- a/docs/UpdateDirectLinkInterfaceRequest.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# UpdateDirectLinkInterfaceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkInterfaceId** | **String** | The ID of the DirectLink interface you want to update. | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**mtu** | [**MtuEnum**](#MtuEnum) | The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always `1500`). | | - - - -## Enum: MtuEnum - -| Name | Value | -|---- | -----| -| NUMBER_1500 | 1500 | - - - diff --git a/docs/UpdateDirectLinkInterfaceResponse.md b/docs/UpdateDirectLinkInterfaceResponse.md deleted file mode 100644 index 104c42e0..00000000 --- a/docs/UpdateDirectLinkInterfaceResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateDirectLinkInterfaceResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**directLinkInterface** | [**DirectLinkInterfaces**](DirectLinkInterfaces.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateFlexibleGpuRequest.md b/docs/UpdateFlexibleGpuRequest.md deleted file mode 100644 index aba72f57..00000000 --- a/docs/UpdateFlexibleGpuRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateFlexibleGpuRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deleteOnVmDeletion** | **Boolean** | If true, the fGPU is deleted when the VM is terminated. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**flexibleGpuId** | **String** | The ID of the fGPU you want to modify. | | - - - diff --git a/docs/UpdateFlexibleGpuResponse.md b/docs/UpdateFlexibleGpuResponse.md deleted file mode 100644 index bf9fb47e..00000000 --- a/docs/UpdateFlexibleGpuResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateFlexibleGpuResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**flexibleGpu** | [**FlexibleGpu**](FlexibleGpu.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateImageRequest.md b/docs/UpdateImageRequest.md deleted file mode 100644 index 8f775d7f..00000000 --- a/docs/UpdateImageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UpdateImageRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A new description for the image. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**imageId** | **String** | The ID of the OMI you want to modify. | | -|**permissionsToLaunch** | [**PermissionsOnResourceCreation**](PermissionsOnResourceCreation.md) | | [optional] | - - - diff --git a/docs/UpdateImageResponse.md b/docs/UpdateImageResponse.md deleted file mode 100644 index 211835e8..00000000 --- a/docs/UpdateImageResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateImageResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**image** | [**Image**](Image.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateListenerRuleRequest.md b/docs/UpdateListenerRuleRequest.md deleted file mode 100644 index 4f025fb5..00000000 --- a/docs/UpdateListenerRuleRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UpdateListenerRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**hostPattern** | **String** | A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?]. | [optional] | -|**listenerRuleName** | **String** | The name of the listener rule. | | -|**pathPattern** | **String** | A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~&quot;'@:+?]. | [optional] | - - - diff --git a/docs/UpdateListenerRuleResponse.md b/docs/UpdateListenerRuleResponse.md deleted file mode 100644 index 8bf9caac..00000000 --- a/docs/UpdateListenerRuleResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateListenerRuleResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**listenerRule** | [**ListenerRule**](ListenerRule.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateLoadBalancerRequest.md b/docs/UpdateLoadBalancerRequest.md deleted file mode 100644 index 8be8dc43..00000000 --- a/docs/UpdateLoadBalancerRequest.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# UpdateLoadBalancerRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessLog** | [**AccessLog**](AccessLog.md) | | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**healthCheck** | [**HealthCheck**](HealthCheck.md) | | [optional] | -|**loadBalancerName** | **String** | The name of the load balancer. | | -|**loadBalancerPort** | **Integer** | The port on which the load balancer is listening (between `1` and `65535`, both included). This parameter is required if you want to update the server certificate. | [optional] | -|**policyNames** | **List<String>** | The name of the policy you want to enable for the listener. | [optional] | -|**publicIp** | **String** | (internet-facing only) The public IP you want to associate with the load balancer. The former public IP of the load balancer is then disassociated. If you specify an empty string and the former public IP belonged to you, it is disassociated and replaced by a public IP owned by 3DS OUTSCALE. | [optional] | -|**securedCookies** | **Boolean** | If true, secure cookies are enabled for the load balancer. | [optional] | -|**securityGroups** | **List<String>** | (Net only) One or more IDs of security groups you want to assign to the load balancer. You need to specify the already assigned security groups that you want to keep along with the new ones you are assigning. If the list is empty, the default security group of the Net is assigned to the load balancer. | [optional] | -|**serverCertificateId** | **String** | The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see [Resource Identifiers > OUTSCALE Resource Names (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). If this parameter is specified, you must also specify the `LoadBalancerPort` parameter. | [optional] | - - - diff --git a/docs/UpdateLoadBalancerResponse.md b/docs/UpdateLoadBalancerResponse.md deleted file mode 100644 index 35f866b6..00000000 --- a/docs/UpdateLoadBalancerResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateLoadBalancerResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateNetAccessPointRequest.md b/docs/UpdateNetAccessPointRequest.md deleted file mode 100644 index 68c7304f..00000000 --- a/docs/UpdateNetAccessPointRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UpdateNetAccessPointRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addRouteTableIds** | **List<String>** | One or more IDs of route tables to associate with the specified Net access point. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netAccessPointId** | **String** | The ID of the Net access point. | | -|**removeRouteTableIds** | **List<String>** | One or more IDs of route tables to disassociate from the specified Net access point. | [optional] | - - - diff --git a/docs/UpdateNetAccessPointResponse.md b/docs/UpdateNetAccessPointResponse.md deleted file mode 100644 index 98dab5fd..00000000 --- a/docs/UpdateNetAccessPointResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateNetAccessPointResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**netAccessPoint** | [**NetAccessPoint**](NetAccessPoint.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateNetRequest.md b/docs/UpdateNetRequest.md deleted file mode 100644 index 63899b39..00000000 --- a/docs/UpdateNetRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateNetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dhcpOptionsSetId** | **String** | The ID of the DHCP options set (or `default` if you want to associate the default one). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**netId** | **String** | The ID of the Net. | | - - - diff --git a/docs/UpdateNetResponse.md b/docs/UpdateNetResponse.md deleted file mode 100644 index 59ce09c9..00000000 --- a/docs/UpdateNetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateNetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**net** | [**Net**](Net.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateNicRequest.md b/docs/UpdateNicRequest.md deleted file mode 100644 index 3b30ff13..00000000 --- a/docs/UpdateNicRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UpdateNicRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A new description for the NIC. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**linkNic** | [**LinkNicToUpdate**](LinkNicToUpdate.md) | | [optional] | -|**nicId** | **String** | The ID of the NIC you want to modify. | | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the NIC.<br /> You must specify at least one group, even if you use the default security group in the Net. | [optional] | - - - diff --git a/docs/UpdateNicResponse.md b/docs/UpdateNicResponse.md deleted file mode 100644 index afdf040b..00000000 --- a/docs/UpdateNicResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateNicResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nic** | [**Nic**](Nic.md) | | [optional] | -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | - - - diff --git a/docs/UpdateRoutePropagationRequest.md b/docs/UpdateRoutePropagationRequest.md deleted file mode 100644 index fb2f8133..00000000 --- a/docs/UpdateRoutePropagationRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UpdateRoutePropagationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**enable** | **Boolean** | If true, a virtual gateway can propagate routes to a specified route table of a Net. If false, the propagation is disabled. | | -|**routeTableId** | **String** | The ID of the route table. | | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | | - - - diff --git a/docs/UpdateRoutePropagationResponse.md b/docs/UpdateRoutePropagationResponse.md deleted file mode 100644 index 956917b4..00000000 --- a/docs/UpdateRoutePropagationResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateRoutePropagationResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTable** | [**RouteTable**](RouteTable.md) | | [optional] | - - - diff --git a/docs/UpdateRouteRequest.md b/docs/UpdateRouteRequest.md deleted file mode 100644 index 006c0f83..00000000 --- a/docs/UpdateRouteRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# UpdateRouteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**destinationIpRange** | **String** | The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`). | | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**gatewayId** | **String** | The ID of an Internet service or virtual gateway attached to your Net. | [optional] | -|**natServiceId** | **String** | The ID of a NAT service. | [optional] | -|**netPeeringId** | **String** | The ID of a Net peering. | [optional] | -|**nicId** | **String** | The ID of a network interface card (NIC). | [optional] | -|**routeTableId** | **String** | The ID of the route table. | | -|**vmId** | **String** | The ID of a NAT VM in your Net. | [optional] | - - - diff --git a/docs/UpdateRouteResponse.md b/docs/UpdateRouteResponse.md deleted file mode 100644 index c177a694..00000000 --- a/docs/UpdateRouteResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateRouteResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**routeTable** | [**RouteTable**](RouteTable.md) | | [optional] | - - - diff --git a/docs/UpdateServerCertificateRequest.md b/docs/UpdateServerCertificateRequest.md deleted file mode 100644 index 9b3df348..00000000 --- a/docs/UpdateServerCertificateRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# UpdateServerCertificateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**name** | **String** | The name of the server certificate you want to modify. | | -|**newName** | **String** | A new name for the server certificate. | [optional] | -|**newPath** | **String** | A new path for the server certificate. | [optional] | - - - diff --git a/docs/UpdateServerCertificateResponse.md b/docs/UpdateServerCertificateResponse.md deleted file mode 100644 index a9cf38a7..00000000 --- a/docs/UpdateServerCertificateResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateServerCertificateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**serverCertificate** | [**ServerCertificate**](ServerCertificate.md) | | [optional] | - - - diff --git a/docs/UpdateSnapshotRequest.md b/docs/UpdateSnapshotRequest.md deleted file mode 100644 index e9580aa7..00000000 --- a/docs/UpdateSnapshotRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateSnapshotRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**permissionsToCreateVolume** | [**PermissionsOnResourceCreation**](PermissionsOnResourceCreation.md) | | | -|**snapshotId** | **String** | The ID of the snapshot. | | - - - diff --git a/docs/UpdateSnapshotResponse.md b/docs/UpdateSnapshotResponse.md deleted file mode 100644 index d38a138a..00000000 --- a/docs/UpdateSnapshotResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateSnapshotResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**snapshot** | [**Snapshot**](Snapshot.md) | | [optional] | - - - diff --git a/docs/UpdateSubnetRequest.md b/docs/UpdateSubnetRequest.md deleted file mode 100644 index 0ccf073e..00000000 --- a/docs/UpdateSubnetRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UpdateSubnetRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**mapPublicIpOnLaunch** | **Boolean** | If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet. | | -|**subnetId** | **String** | The ID of the Subnet. | | - - - diff --git a/docs/UpdateSubnetResponse.md b/docs/UpdateSubnetResponse.md deleted file mode 100644 index dff8cc21..00000000 --- a/docs/UpdateSubnetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateSubnetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**subnet** | [**Subnet**](Subnet.md) | | [optional] | - - - diff --git a/docs/UpdateVmGroupRequest.md b/docs/UpdateVmGroupRequest.md deleted file mode 100644 index 7f93c522..00000000 --- a/docs/UpdateVmGroupRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# UpdateVmGroupRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A new description for the VM group. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | New tags for your VM group. | [optional] | -|**vmGroupId** | **String** | The ID of the VM group you want to update. | | -|**vmGroupName** | **String** | A new name for your VM group. | [optional] | -|**vmTemplateId** | **String** | A new VM template ID for your VM group. | [optional] | - - - diff --git a/docs/UpdateVmGroupResponse.md b/docs/UpdateVmGroupResponse.md deleted file mode 100644 index 686f292e..00000000 --- a/docs/UpdateVmGroupResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateVmGroupResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmGroup** | [**VmGroup**](VmGroup.md) | | [optional] | - - - diff --git a/docs/UpdateVmRequest.md b/docs/UpdateVmRequest.md deleted file mode 100644 index bf63ec52..00000000 --- a/docs/UpdateVmRequest.md +++ /dev/null @@ -1,35 +0,0 @@ - - -# UpdateVmRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**blockDeviceMappings** | [**List<BlockDeviceMappingVmUpdate>**](BlockDeviceMappingVmUpdate.md) | One or more block device mappings of the VM. | [optional] | -|**bsuOptimized** | **Boolean** | This parameter is not available. It is present in our API for the sake of historical compatibility with AWS. | [optional] | -|**deletionProtection** | **Boolean** | If true, you cannot delete the VM unless you change this parameter back to false. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**isSourceDestChecked** | **Boolean** | (Net only) If true, the source/destination check is enabled. If false, it is disabled. | [optional] | -|**keypairName** | **String** | The name of a keypair you want to associate with the VM.<br /> When you replace the keypair of a VM with another one, the metadata of the VM is modified to reflect the new public key, but the replacement is still not effective in the operating system of the VM. To complete the replacement and effectively apply the new keypair, you need to perform other actions inside the VM. For more information, see [Modifying the Keypair of a VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a-VM.html). | [optional] | -|**nestedVirtualization** | **Boolean** | (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled. | [optional] | -|**performance** | [**PerformanceEnum**](#PerformanceEnum) | The performance of the VM (`medium` \\| `high` \\| `highest`). | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the VM. | [optional] | -|**userData** | **String** | The Base64-encoded MIME user data, limited to 500 kibibytes (KiB). | [optional] | -|**vmId** | **String** | The ID of the VM. | | -|**vmInitiatedShutdownBehavior** | **String** | The VM behavior when you stop it. If set to `stop`, the VM stops. If set to `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops and is terminated. | [optional] | -|**vmType** | **String** | The type of VM. For more information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). | [optional] | - - - -## Enum: PerformanceEnum - -| Name | Value | -|---- | -----| -| MEDIUM | "medium" | -| HIGH | "high" | -| HIGHEST | "highest" | - - - diff --git a/docs/UpdateVmResponse.md b/docs/UpdateVmResponse.md deleted file mode 100644 index 9bafcb53..00000000 --- a/docs/UpdateVmResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateVmResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vm** | [**Vm**](Vm.md) | | [optional] | - - - diff --git a/docs/UpdateVmTemplateRequest.md b/docs/UpdateVmTemplateRequest.md deleted file mode 100644 index 32da33a9..00000000 --- a/docs/UpdateVmTemplateRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UpdateVmTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | A new description for the VM template. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | New tags for your VM template. | [optional] | -|**vmTemplateId** | **String** | The ID of the VM template you want to update. | | -|**vmTemplateName** | **String** | A new name for your VM template. | [optional] | - - - diff --git a/docs/UpdateVmTemplateResponse.md b/docs/UpdateVmTemplateResponse.md deleted file mode 100644 index a826e2c9..00000000 --- a/docs/UpdateVmTemplateResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateVmTemplateResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vmTemplate** | [**VmTemplate**](VmTemplate.md) | | [optional] | - - - diff --git a/docs/UpdateVolumeRequest.md b/docs/UpdateVolumeRequest.md deleted file mode 100644 index 33e5af6a..00000000 --- a/docs/UpdateVolumeRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UpdateVolumeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**iops** | **Integer** | **Cold volume**: the new number of I/O operations per second (IOPS). This parameter can be specified only if you update an `io1` volume or if you change the type of the volume for an `io1`. This modification is instantaneous. <br /> **Hot volume**: the new number of I/O operations per second (IOPS). This parameter can be specified only if you update an `io1` volume. This modification is not instantaneous. <br /><br /> The maximum number of IOPS allowed for `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. | [optional] | -|**size** | **Integer** | **Cold volume**: the new size of the volume, in gibibytes (GiB). This value must be equal to or greater than the current size of the volume. This modification is not instantaneous. <br /> **Hot volume**: you cannot change the size of a hot volume. | [optional] | -|**volumeId** | **String** | The ID of the volume you want to update. | | -|**volumeType** | **String** | **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| `gp2`). This modification is instantaneous. If you update to an `io1` volume, you must also specify the `Iops` parameter.<br /> **Hot volume**: you cannot change the type of a hot volume. | [optional] | - - - diff --git a/docs/UpdateVolumeResponse.md b/docs/UpdateVolumeResponse.md deleted file mode 100644 index 6ce9d56b..00000000 --- a/docs/UpdateVolumeResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateVolumeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**volume** | [**Volume**](Volume.md) | | [optional] | - - - diff --git a/docs/UpdateVpnConnectionRequest.md b/docs/UpdateVpnConnectionRequest.md deleted file mode 100644 index f7938c08..00000000 --- a/docs/UpdateVpnConnectionRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UpdateVpnConnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGatewayId** | **String** | The ID of the client gateway. | [optional] | -|**dryRun** | **Boolean** | If true, checks whether you have the required permissions to perform the action. | [optional] | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | [optional] | -|**vpnConnectionId** | **String** | The ID of the VPN connection you want to modify. | | -|**vpnOptions** | [**VpnOptions**](VpnOptions.md) | | [optional] | - - - diff --git a/docs/UpdateVpnConnectionResponse.md b/docs/UpdateVpnConnectionResponse.md deleted file mode 100644 index 133d6ee7..00000000 --- a/docs/UpdateVpnConnectionResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UpdateVpnConnectionResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**responseContext** | [**ResponseContext**](ResponseContext.md) | | [optional] | -|**vpnConnection** | [**VpnConnection**](VpnConnection.md) | | [optional] | - - - diff --git a/docs/VgwTelemetry.md b/docs/VgwTelemetry.md deleted file mode 100644 index c1a68d71..00000000 --- a/docs/VgwTelemetry.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# VgwTelemetry - -Information about the current state of a VPN tunnel. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**acceptedRouteCount** | **Integer** | The number of routes accepted through BGP (Border Gateway Protocol) route exchanges. | [optional] | -|**lastStateChangeDate** | **OffsetDateTime** | The date and time (UTC) of the latest state update. | [optional] | -|**outsideIpAddress** | **String** | The IP on the OUTSCALE side of the tunnel. | [optional] | -|**state** | **String** | The state of the IPSEC tunnel (`UP` \\| `DOWN`). | [optional] | -|**stateDescription** | **String** | A description of the current state of the tunnel. | [optional] | - - - diff --git a/docs/VirtualGateway.md b/docs/VirtualGateway.md deleted file mode 100644 index 14e6a8ac..00000000 --- a/docs/VirtualGateway.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# VirtualGateway - -Information about the virtual gateway. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**connectionType** | **String** | The type of VPN connection supported by the virtual gateway (always `ipsec.1`). | [optional] | -|**netToVirtualGatewayLinks** | [**List<NetToVirtualGatewayLink>**](NetToVirtualGatewayLink.md) | The Net to which the virtual gateway is attached. | [optional] | -|**state** | **String** | The state of the virtual gateway (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the virtual gateway. | [optional] | -|**virtualGatewayId** | **String** | The ID of the virtual gateway. | [optional] | - - - diff --git a/docs/VirtualGatewayApi.md b/docs/VirtualGatewayApi.md deleted file mode 100644 index 137a50a4..00000000 --- a/docs/VirtualGatewayApi.md +++ /dev/null @@ -1,428 +0,0 @@ -# VirtualGatewayApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVirtualGateway**](VirtualGatewayApi.md#createVirtualGateway) | **POST** /CreateVirtualGateway | | -| [**deleteVirtualGateway**](VirtualGatewayApi.md#deleteVirtualGateway) | **POST** /DeleteVirtualGateway | | -| [**linkVirtualGateway**](VirtualGatewayApi.md#linkVirtualGateway) | **POST** /LinkVirtualGateway | | -| [**readVirtualGateways**](VirtualGatewayApi.md#readVirtualGateways) | **POST** /ReadVirtualGateways | | -| [**unlinkVirtualGateway**](VirtualGatewayApi.md#unlinkVirtualGateway) | **POST** /UnlinkVirtualGateway | | -| [**updateRoutePropagation**](VirtualGatewayApi.md#updateRoutePropagation) | **POST** /UpdateRoutePropagation | | - - - -# **createVirtualGateway** -> CreateVirtualGatewayResponse createVirtualGateway(createVirtualGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - CreateVirtualGatewayRequest createVirtualGatewayRequest = new CreateVirtualGatewayRequest(); // CreateVirtualGatewayRequest | - try { - CreateVirtualGatewayResponse result = apiInstance.createVirtualGateway(createVirtualGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#createVirtualGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVirtualGatewayRequest** | [**CreateVirtualGatewayRequest**](CreateVirtualGatewayRequest.md)| | [optional] | - -### Return type - -[**CreateVirtualGatewayResponse**](CreateVirtualGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteVirtualGateway** -> DeleteVirtualGatewayResponse deleteVirtualGateway(deleteVirtualGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest = new DeleteVirtualGatewayRequest(); // DeleteVirtualGatewayRequest | - try { - DeleteVirtualGatewayResponse result = apiInstance.deleteVirtualGateway(deleteVirtualGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#deleteVirtualGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVirtualGatewayRequest** | [**DeleteVirtualGatewayRequest**](DeleteVirtualGatewayRequest.md)| | [optional] | - -### Return type - -[**DeleteVirtualGatewayResponse**](DeleteVirtualGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **linkVirtualGateway** -> LinkVirtualGatewayResponse linkVirtualGateway(linkVirtualGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - LinkVirtualGatewayRequest linkVirtualGatewayRequest = new LinkVirtualGatewayRequest(); // LinkVirtualGatewayRequest | - try { - LinkVirtualGatewayResponse result = apiInstance.linkVirtualGateway(linkVirtualGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#linkVirtualGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkVirtualGatewayRequest** | [**LinkVirtualGatewayRequest**](LinkVirtualGatewayRequest.md)| | [optional] | - -### Return type - -[**LinkVirtualGatewayResponse**](LinkVirtualGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readVirtualGateways** -> ReadVirtualGatewaysResponse readVirtualGateways(readVirtualGatewaysRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - ReadVirtualGatewaysRequest readVirtualGatewaysRequest = new ReadVirtualGatewaysRequest(); // ReadVirtualGatewaysRequest | - try { - ReadVirtualGatewaysResponse result = apiInstance.readVirtualGateways(readVirtualGatewaysRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#readVirtualGateways"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVirtualGatewaysRequest** | [**ReadVirtualGatewaysRequest**](ReadVirtualGatewaysRequest.md)| | [optional] | - -### Return type - -[**ReadVirtualGatewaysResponse**](ReadVirtualGatewaysResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **unlinkVirtualGateway** -> UnlinkVirtualGatewayResponse unlinkVirtualGateway(unlinkVirtualGatewayRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest = new UnlinkVirtualGatewayRequest(); // UnlinkVirtualGatewayRequest | - try { - UnlinkVirtualGatewayResponse result = apiInstance.unlinkVirtualGateway(unlinkVirtualGatewayRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#unlinkVirtualGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkVirtualGatewayRequest** | [**UnlinkVirtualGatewayRequest**](UnlinkVirtualGatewayRequest.md)| | [optional] | - -### Return type - -[**UnlinkVirtualGatewayResponse**](UnlinkVirtualGatewayResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateRoutePropagation** -> UpdateRoutePropagationResponse updateRoutePropagation(updateRoutePropagationRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VirtualGatewayApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VirtualGatewayApi apiInstance = new VirtualGatewayApi(defaultClient); - UpdateRoutePropagationRequest updateRoutePropagationRequest = new UpdateRoutePropagationRequest(); // UpdateRoutePropagationRequest | - try { - UpdateRoutePropagationResponse result = apiInstance.updateRoutePropagation(updateRoutePropagationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VirtualGatewayApi#updateRoutePropagation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateRoutePropagationRequest** | [**UpdateRoutePropagationRequest**](UpdateRoutePropagationRequest.md)| | [optional] | - -### Return type - -[**UpdateRoutePropagationResponse**](UpdateRoutePropagationResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/Vm.md b/docs/Vm.md deleted file mode 100644 index 501987a4..00000000 --- a/docs/Vm.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# Vm - -Information about the VM. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**architecture** | **String** | The architecture of the VM (`i386` \\| `x86_64`). | [optional] | -|**blockDeviceMappings** | [**List<BlockDeviceMappingCreated>**](BlockDeviceMappingCreated.md) | The block device mapping of the VM. | [optional] | -|**bsuOptimized** | **Boolean** | This parameter is not available. It is present in our API for the sake of historical compatibility with AWS. | [optional] | -|**clientToken** | **String** | The idempotency token provided when launching the VM. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the VM was created. | [optional] | -|**deletionProtection** | **Boolean** | If true, you cannot delete the VM unless you change this parameter back to false. | [optional] | -|**hypervisor** | **String** | The hypervisor type of the VMs (`ovm` \\| `xen`). | [optional] | -|**imageId** | **String** | The ID of the OMI used to create the VM. | [optional] | -|**isSourceDestChecked** | **Boolean** | (Net only) If true, the source/destination check is enabled. If false, it is disabled. | [optional] | -|**keypairName** | **String** | The name of the keypair used when launching the VM. | [optional] | -|**launchNumber** | **Integer** | The number for the VM when launching a group of several VMs (for example, `0`, `1`, `2`, and so on). | [optional] | -|**nestedVirtualization** | **Boolean** | If true, nested virtualization is enabled. If false, it is disabled. | [optional] | -|**netId** | **String** | The ID of the Net in which the VM is running. | [optional] | -|**nics** | [**List<NicLight>**](NicLight.md) | (Net only) The network interface cards (NICs) the VMs are attached to. | [optional] | -|**osFamily** | **String** | Indicates the operating system (OS) of the VM. | [optional] | -|**performance** | **String** | The performance of the VM (`medium` \\| `high` \\| `highest`). | [optional] | -|**placement** | [**Placement**](Placement.md) | | [optional] | -|**privateDnsName** | **String** | The name of the private DNS. | [optional] | -|**privateIp** | **String** | The primary private IP of the VM. | [optional] | -|**productCodes** | **List<String>** | The product codes associated with the OMI used to create the VM. | [optional] | -|**publicDnsName** | **String** | The name of the public DNS. | [optional] | -|**publicIp** | **String** | The public IP of the VM. | [optional] | -|**reservationId** | **String** | The reservation ID of the VM. | [optional] | -|**rootDeviceName** | **String** | The name of the root device for the VM (for example, `/dev/sda1`). | [optional] | -|**rootDeviceType** | **String** | The type of root device used by the VM (always `bsu`). | [optional] | -|**securityGroups** | [**List<SecurityGroupLight>**](SecurityGroupLight.md) | One or more security groups associated with the VM. | [optional] | -|**state** | **String** | The state of the VM (`pending` \\| `running` \\| `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). | [optional] | -|**stateReason** | **String** | The reason explaining the current state of the VM. | [optional] | -|**subnetId** | **String** | The ID of the Subnet for the VM. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the VM. | [optional] | -|**userData** | **String** | The Base64-encoded MIME user data. | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | -|**vmInitiatedShutdownBehavior** | **String** | The VM behavior when you stop it. If set to `stop`, the VM stops. If set to `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops and is deleted. | [optional] | -|**vmType** | **String** | The type of VM. For more information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). | [optional] | - - - diff --git a/docs/VmApi.md b/docs/VmApi.md deleted file mode 100644 index f7f3a260..00000000 --- a/docs/VmApi.md +++ /dev/null @@ -1,801 +0,0 @@ -# VmApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVms**](VmApi.md#createVms) | **POST** /CreateVms | | -| [**deleteVms**](VmApi.md#deleteVms) | **POST** /DeleteVms | | -| [**readAdminPassword**](VmApi.md#readAdminPassword) | **POST** /ReadAdminPassword | | -| [**readConsoleOutput**](VmApi.md#readConsoleOutput) | **POST** /ReadConsoleOutput | | -| [**readVmTypes**](VmApi.md#readVmTypes) | **POST** /ReadVmTypes | | -| [**readVms**](VmApi.md#readVms) | **POST** /ReadVms | | -| [**readVmsState**](VmApi.md#readVmsState) | **POST** /ReadVmsState | | -| [**rebootVms**](VmApi.md#rebootVms) | **POST** /RebootVms | | -| [**startVms**](VmApi.md#startVms) | **POST** /StartVms | | -| [**stopVms**](VmApi.md#stopVms) | **POST** /StopVms | | -| [**updateVm**](VmApi.md#updateVm) | **POST** /UpdateVm | | - - - -# **createVms** -> CreateVmsResponse createVms(createVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - CreateVmsRequest createVmsRequest = new CreateVmsRequest(); // CreateVmsRequest | - try { - CreateVmsResponse result = apiInstance.createVms(createVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#createVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVmsRequest** | [**CreateVmsRequest**](CreateVmsRequest.md)| | [optional] | - -### Return type - -[**CreateVmsResponse**](CreateVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteVms** -> DeleteVmsResponse deleteVms(deleteVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - DeleteVmsRequest deleteVmsRequest = new DeleteVmsRequest(); // DeleteVmsRequest | - try { - DeleteVmsResponse result = apiInstance.deleteVms(deleteVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#deleteVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVmsRequest** | [**DeleteVmsRequest**](DeleteVmsRequest.md)| | [optional] | - -### Return type - -[**DeleteVmsResponse**](DeleteVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readAdminPassword** -> ReadAdminPasswordResponse readAdminPassword(readAdminPasswordRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - ReadAdminPasswordRequest readAdminPasswordRequest = new ReadAdminPasswordRequest(); // ReadAdminPasswordRequest | - try { - ReadAdminPasswordResponse result = apiInstance.readAdminPassword(readAdminPasswordRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#readAdminPassword"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readAdminPasswordRequest** | [**ReadAdminPasswordRequest**](ReadAdminPasswordRequest.md)| | [optional] | - -### Return type - -[**ReadAdminPasswordResponse**](ReadAdminPasswordResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readConsoleOutput** -> ReadConsoleOutputResponse readConsoleOutput(readConsoleOutputRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - ReadConsoleOutputRequest readConsoleOutputRequest = new ReadConsoleOutputRequest(); // ReadConsoleOutputRequest | - try { - ReadConsoleOutputResponse result = apiInstance.readConsoleOutput(readConsoleOutputRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#readConsoleOutput"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readConsoleOutputRequest** | [**ReadConsoleOutputRequest**](ReadConsoleOutputRequest.md)| | [optional] | - -### Return type - -[**ReadConsoleOutputResponse**](ReadConsoleOutputResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readVmTypes** -> ReadVmTypesResponse readVmTypes(readVmTypesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - VmApi apiInstance = new VmApi(defaultClient); - ReadVmTypesRequest readVmTypesRequest = new ReadVmTypesRequest(); // ReadVmTypesRequest | - try { - ReadVmTypesResponse result = apiInstance.readVmTypes(readVmTypesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#readVmTypes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmTypesRequest** | [**ReadVmTypesRequest**](ReadVmTypesRequest.md)| | [optional] | - -### Return type - -[**ReadVmTypesResponse**](ReadVmTypesResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readVms** -> ReadVmsResponse readVms(readVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - ReadVmsRequest readVmsRequest = new ReadVmsRequest(); // ReadVmsRequest | - try { - ReadVmsResponse result = apiInstance.readVms(readVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#readVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmsRequest** | [**ReadVmsRequest**](ReadVmsRequest.md)| | [optional] | - -### Return type - -[**ReadVmsResponse**](ReadVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readVmsState** -> ReadVmsStateResponse readVmsState(readVmsStateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - ReadVmsStateRequest readVmsStateRequest = new ReadVmsStateRequest(); // ReadVmsStateRequest | - try { - ReadVmsStateResponse result = apiInstance.readVmsState(readVmsStateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#readVmsState"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmsStateRequest** | [**ReadVmsStateRequest**](ReadVmsStateRequest.md)| | [optional] | - -### Return type - -[**ReadVmsStateResponse**](ReadVmsStateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **rebootVms** -> RebootVmsResponse rebootVms(rebootVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - RebootVmsRequest rebootVmsRequest = new RebootVmsRequest(); // RebootVmsRequest | - try { - RebootVmsResponse result = apiInstance.rebootVms(rebootVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#rebootVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rebootVmsRequest** | [**RebootVmsRequest**](RebootVmsRequest.md)| | [optional] | - -### Return type - -[**RebootVmsResponse**](RebootVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **startVms** -> StartVmsResponse startVms(startVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - StartVmsRequest startVmsRequest = new StartVmsRequest(); // StartVmsRequest | - try { - StartVmsResponse result = apiInstance.startVms(startVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#startVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **startVmsRequest** | [**StartVmsRequest**](StartVmsRequest.md)| | [optional] | - -### Return type - -[**StartVmsResponse**](StartVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **stopVms** -> StopVmsResponse stopVms(stopVmsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - StopVmsRequest stopVmsRequest = new StopVmsRequest(); // StopVmsRequest | - try { - StopVmsResponse result = apiInstance.stopVms(stopVmsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#stopVms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **stopVmsRequest** | [**StopVmsRequest**](StopVmsRequest.md)| | [optional] | - -### Return type - -[**StopVmsResponse**](StopVmsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateVm** -> UpdateVmResponse updateVm(updateVmRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmApi apiInstance = new VmApi(defaultClient); - UpdateVmRequest updateVmRequest = new UpdateVmRequest(); // UpdateVmRequest | - try { - UpdateVmResponse result = apiInstance.updateVm(updateVmRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmApi#updateVm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateVmRequest** | [**UpdateVmRequest**](UpdateVmRequest.md)| | [optional] | - -### Return type - -[**UpdateVmResponse**](UpdateVmResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/VmGroup.md b/docs/VmGroup.md deleted file mode 100644 index 2bf6c863..00000000 --- a/docs/VmGroup.md +++ /dev/null @@ -1,48 +0,0 @@ - - -# VmGroup - -Information about the VM group. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the VM group was created. | [optional] | -|**description** | **String** | The description of the VM group. | [optional] | -|**positioningStrategy** | [**PositioningStrategyEnum**](#PositioningStrategyEnum) | The positioning strategy of the VMs on hypervisors. By default, or if set to `no-strategy`, TINA determines the most adequate position for the VMs. If set to `attract`, the VMs are deployed on the same hypervisor, which improves network performance. If set to `repulse`, the VMs are deployed on a different hypervisor, which improves fault tolerance. | [optional] | -|**securityGroupIds** | **List<String>** | One or more IDs of security groups for the VM group. | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The state of the VM group (`pending` \\| `available` \\| `scaling up` \\| `scaling down` \\| `deleting` \\| `deleted`). | [optional] | -|**subnetId** | **String** | The ID of the Subnet for the VM group. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the VM. | [optional] | -|**vmCount** | **Integer** | The number of VMs in the VM group. | [optional] | -|**vmGroupId** | **String** | The ID of the VM group. | [optional] | -|**vmGroupName** | **String** | The name of the VM group. | [optional] | -|**vmIds** | **List<String>** | The IDs of the VMs in the VM group. | [optional] | -|**vmTemplateId** | **String** | The ID of the VM template used by the VM group. | [optional] | - - - -## Enum: PositioningStrategyEnum - -| Name | Value | -|---- | -----| -| ATTRACT | "attract" | -| NO_STRATEGY | "no-strategy" | -| REPULSE | "repulse" | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| AVAILABLE | "available" | -| DELETED | "deleted" | -| DELETING | "deleting" | -| PENDING | "pending" | -| SCALING_DOWN | "scaling down" | -| SCALING_UP | "scaling up" | - - - diff --git a/docs/VmGroupApi.md b/docs/VmGroupApi.md deleted file mode 100644 index c714af88..00000000 --- a/docs/VmGroupApi.md +++ /dev/null @@ -1,446 +0,0 @@ -# VmGroupApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVmGroup**](VmGroupApi.md#createVmGroup) | **POST** /CreateVmGroup | | -| [**deleteVmGroup**](VmGroupApi.md#deleteVmGroup) | **POST** /DeleteVmGroup | | -| [**readVmGroups**](VmGroupApi.md#readVmGroups) | **POST** /ReadVmGroups | | -| [**scaleDownVmGroup**](VmGroupApi.md#scaleDownVmGroup) | **POST** /ScaleDownVmGroup | | -| [**scaleUpVmGroup**](VmGroupApi.md#scaleUpVmGroup) | **POST** /ScaleUpVmGroup | | -| [**updateVmGroup**](VmGroupApi.md#updateVmGroup) | **POST** /UpdateVmGroup | | - - - -# **createVmGroup** -> CreateVmGroupResponse createVmGroup(createVmGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - CreateVmGroupRequest createVmGroupRequest = new CreateVmGroupRequest(); // CreateVmGroupRequest | - try { - CreateVmGroupResponse result = apiInstance.createVmGroup(createVmGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#createVmGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVmGroupRequest** | [**CreateVmGroupRequest**](CreateVmGroupRequest.md)| | [optional] | - -### Return type - -[**CreateVmGroupResponse**](CreateVmGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteVmGroup** -> DeleteVmGroupResponse deleteVmGroup(deleteVmGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - DeleteVmGroupRequest deleteVmGroupRequest = new DeleteVmGroupRequest(); // DeleteVmGroupRequest | - try { - DeleteVmGroupResponse result = apiInstance.deleteVmGroup(deleteVmGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#deleteVmGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVmGroupRequest** | [**DeleteVmGroupRequest**](DeleteVmGroupRequest.md)| | [optional] | - -### Return type - -[**DeleteVmGroupResponse**](DeleteVmGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readVmGroups** -> ReadVmGroupsResponse readVmGroups(readVmGroupsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - ReadVmGroupsRequest readVmGroupsRequest = new ReadVmGroupsRequest(); // ReadVmGroupsRequest | - try { - ReadVmGroupsResponse result = apiInstance.readVmGroups(readVmGroupsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#readVmGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmGroupsRequest** | [**ReadVmGroupsRequest**](ReadVmGroupsRequest.md)| | [optional] | - -### Return type - -[**ReadVmGroupsResponse**](ReadVmGroupsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **scaleDownVmGroup** -> ScaleDownVmGroupResponse scaleDownVmGroup(scaleDownVmGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - ScaleDownVmGroupRequest scaleDownVmGroupRequest = new ScaleDownVmGroupRequest(); // ScaleDownVmGroupRequest | - try { - ScaleDownVmGroupResponse result = apiInstance.scaleDownVmGroup(scaleDownVmGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#scaleDownVmGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **scaleDownVmGroupRequest** | [**ScaleDownVmGroupRequest**](ScaleDownVmGroupRequest.md)| | [optional] | - -### Return type - -[**ScaleDownVmGroupResponse**](ScaleDownVmGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **scaleUpVmGroup** -> ScaleUpVmGroupResponse scaleUpVmGroup(scaleUpVmGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - ScaleUpVmGroupRequest scaleUpVmGroupRequest = new ScaleUpVmGroupRequest(); // ScaleUpVmGroupRequest | - try { - ScaleUpVmGroupResponse result = apiInstance.scaleUpVmGroup(scaleUpVmGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#scaleUpVmGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **scaleUpVmGroupRequest** | [**ScaleUpVmGroupRequest**](ScaleUpVmGroupRequest.md)| | [optional] | - -### Return type - -[**ScaleUpVmGroupResponse**](ScaleUpVmGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateVmGroup** -> UpdateVmGroupResponse updateVmGroup(updateVmGroupRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmGroupApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmGroupApi apiInstance = new VmGroupApi(defaultClient); - UpdateVmGroupRequest updateVmGroupRequest = new UpdateVmGroupRequest(); // UpdateVmGroupRequest | - try { - UpdateVmGroupResponse result = apiInstance.updateVmGroup(updateVmGroupRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmGroupApi#updateVmGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateVmGroupRequest** | [**UpdateVmGroupRequest**](UpdateVmGroupRequest.md)| | [optional] | - -### Return type - -[**UpdateVmGroupResponse**](UpdateVmGroupResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/VmState.md b/docs/VmState.md deleted file mode 100644 index 4bf82fd5..00000000 --- a/docs/VmState.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# VmState - -Information about the state of the VM. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**currentState** | **String** | The current state of the VM (`InService` \\| `OutOfService` \\| `Unknown`). | [optional] | -|**previousState** | **String** | The previous state of the VM (`InService` \\| `OutOfService` \\| `Unknown`). | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | - - - diff --git a/docs/VmStates.md b/docs/VmStates.md deleted file mode 100644 index 4348caba..00000000 --- a/docs/VmStates.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# VmStates - -Information about the states of the VMs. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**maintenanceEvents** | [**List<MaintenanceEvent>**](MaintenanceEvent.md) | One or more scheduled events associated with the VM. | [optional] | -|**subregionName** | **String** | The name of the Subregion of the VM. | [optional] | -|**vmId** | **String** | The ID of the VM. | [optional] | -|**vmState** | **String** | The state of the VM (`pending` \\| `running` \\| `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). | [optional] | - - - diff --git a/docs/VmTemplate.md b/docs/VmTemplate.md deleted file mode 100644 index 2b4e6747..00000000 --- a/docs/VmTemplate.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# VmTemplate - -Information about the VM template. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cpuCores** | **Integer** | The number of vCores. | | -|**cpuGeneration** | **String** | The processor generation. | | -|**cpuPerformance** | [**CpuPerformanceEnum**](#CpuPerformanceEnum) | The performance of the VMs. | [optional] | -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the VM was created. | [optional] | -|**description** | **String** | The description of the VM template. | [optional] | -|**imageId** | **String** | The ID of the OMI. | | -|**keypairName** | **String** | The name of the keypair. | [optional] | -|**ram** | **Integer** | The amount of RAM. | | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the VM template. | [optional] | -|**vmTemplateId** | **String** | The ID of the VM template. | | -|**vmTemplateName** | **String** | The name of the VM template. | | - - - -## Enum: CpuPerformanceEnum - -| Name | Value | -|---- | -----| -| MEDIUM | "medium" | -| HIGH | "high" | -| HIGHEST | "highest" | - - - diff --git a/docs/VmTemplateApi.md b/docs/VmTemplateApi.md deleted file mode 100644 index c2a43a22..00000000 --- a/docs/VmTemplateApi.md +++ /dev/null @@ -1,288 +0,0 @@ -# VmTemplateApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVmTemplate**](VmTemplateApi.md#createVmTemplate) | **POST** /CreateVmTemplate | | -| [**deleteVmTemplate**](VmTemplateApi.md#deleteVmTemplate) | **POST** /DeleteVmTemplate | | -| [**readVmTemplates**](VmTemplateApi.md#readVmTemplates) | **POST** /ReadVmTemplates | | -| [**updateVmTemplate**](VmTemplateApi.md#updateVmTemplate) | **POST** /UpdateVmTemplate | | - - - -# **createVmTemplate** -> CreateVmTemplateResponse createVmTemplate(createVmTemplateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmTemplateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmTemplateApi apiInstance = new VmTemplateApi(defaultClient); - CreateVmTemplateRequest createVmTemplateRequest = new CreateVmTemplateRequest(); // CreateVmTemplateRequest | - try { - CreateVmTemplateResponse result = apiInstance.createVmTemplate(createVmTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmTemplateApi#createVmTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVmTemplateRequest** | [**CreateVmTemplateRequest**](CreateVmTemplateRequest.md)| | [optional] | - -### Return type - -[**CreateVmTemplateResponse**](CreateVmTemplateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteVmTemplate** -> DeleteVmTemplateResponse deleteVmTemplate(deleteVmTemplateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmTemplateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmTemplateApi apiInstance = new VmTemplateApi(defaultClient); - DeleteVmTemplateRequest deleteVmTemplateRequest = new DeleteVmTemplateRequest(); // DeleteVmTemplateRequest | - try { - DeleteVmTemplateResponse result = apiInstance.deleteVmTemplate(deleteVmTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmTemplateApi#deleteVmTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVmTemplateRequest** | [**DeleteVmTemplateRequest**](DeleteVmTemplateRequest.md)| | [optional] | - -### Return type - -[**DeleteVmTemplateResponse**](DeleteVmTemplateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readVmTemplates** -> ReadVmTemplatesResponse readVmTemplates(readVmTemplatesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmTemplateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmTemplateApi apiInstance = new VmTemplateApi(defaultClient); - ReadVmTemplatesRequest readVmTemplatesRequest = new ReadVmTemplatesRequest(); // ReadVmTemplatesRequest | - try { - ReadVmTemplatesResponse result = apiInstance.readVmTemplates(readVmTemplatesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmTemplateApi#readVmTemplates"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVmTemplatesRequest** | [**ReadVmTemplatesRequest**](ReadVmTemplatesRequest.md)| | [optional] | - -### Return type - -[**ReadVmTemplatesResponse**](ReadVmTemplatesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateVmTemplate** -> UpdateVmTemplateResponse updateVmTemplate(updateVmTemplateRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VmTemplateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VmTemplateApi apiInstance = new VmTemplateApi(defaultClient); - UpdateVmTemplateRequest updateVmTemplateRequest = new UpdateVmTemplateRequest(); // UpdateVmTemplateRequest | - try { - UpdateVmTemplateResponse result = apiInstance.updateVmTemplate(updateVmTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VmTemplateApi#updateVmTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateVmTemplateRequest** | [**UpdateVmTemplateRequest**](UpdateVmTemplateRequest.md)| | [optional] | - -### Return type - -[**UpdateVmTemplateResponse**](UpdateVmTemplateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - diff --git a/docs/VmType.md b/docs/VmType.md deleted file mode 100644 index 9e9593a6..00000000 --- a/docs/VmType.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# VmType - -Information about the VM type. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bsuOptimized** | **Boolean** | This parameter is not available. It is present in our API for the sake of historical compatibility with AWS. | [optional] | -|**ephemeralsType** | **String** | The type of ephemeral storage disk. | [optional] | -|**eth** | **Integer** | The number of Ethernet interface available. | [optional] | -|**gpu** | **Integer** | The number of GPU available. | [optional] | -|**maxPrivateIps** | **Integer** | The maximum number of private IPs per network interface card (NIC). | [optional] | -|**memorySize** | **Float** | The amount of memory, in gibibytes. | [optional] | -|**vcoreCount** | **Integer** | The number of vCores. | [optional] | -|**vmTypeName** | **String** | The name of the VM type. | [optional] | -|**volumeCount** | **Integer** | The maximum number of ephemeral storage disks. | [optional] | -|**volumeSize** | **Integer** | The size of one ephemeral storage disk, in gibibytes (GiB). | [optional] | - - - diff --git a/docs/Volume.md b/docs/Volume.md deleted file mode 100644 index 45eed7ae..00000000 --- a/docs/Volume.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Volume - -Information about the volume. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**creationDate** | **OffsetDateTime** | The date and time (UTC) at which the volume was created. | [optional] | -|**iops** | **Integer** | The number of I/O operations per second (IOPS):<br /> - For `io1` volumes, the number of provisioned IOPS<br /> - For `gp2` volumes, the baseline performance of the volume | [optional] | -|**linkedVolumes** | [**List<LinkedVolume>**](LinkedVolume.md) | Information about your volume attachment. | [optional] | -|**size** | **Integer** | The size of the volume, in gibibytes (GiB). | [optional] | -|**snapshotId** | **String** | The snapshot from which the volume was created. | [optional] | -|**state** | **String** | The state of the volume (`creating` \\| `available` \\| `in-use` \\| `updating` \\| `deleting` \\| `error`). | [optional] | -|**subregionName** | **String** | The Subregion in which the volume was created. | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the volume. | [optional] | -|**volumeId** | **String** | The ID of the volume. | [optional] | -|**volumeType** | **String** | The type of the volume (`standard` \\| `gp2` \\| `io1`). | [optional] | - - - diff --git a/docs/VolumeApi.md b/docs/VolumeApi.md deleted file mode 100644 index af538eeb..00000000 --- a/docs/VolumeApi.md +++ /dev/null @@ -1,446 +0,0 @@ -# VolumeApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVolume**](VolumeApi.md#createVolume) | **POST** /CreateVolume | | -| [**deleteVolume**](VolumeApi.md#deleteVolume) | **POST** /DeleteVolume | | -| [**linkVolume**](VolumeApi.md#linkVolume) | **POST** /LinkVolume | | -| [**readVolumes**](VolumeApi.md#readVolumes) | **POST** /ReadVolumes | | -| [**unlinkVolume**](VolumeApi.md#unlinkVolume) | **POST** /UnlinkVolume | | -| [**updateVolume**](VolumeApi.md#updateVolume) | **POST** /UpdateVolume | | - - - -# **createVolume** -> CreateVolumeResponse createVolume(createVolumeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - CreateVolumeRequest createVolumeRequest = new CreateVolumeRequest(); // CreateVolumeRequest | - try { - CreateVolumeResponse result = apiInstance.createVolume(createVolumeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#createVolume"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVolumeRequest** | [**CreateVolumeRequest**](CreateVolumeRequest.md)| | [optional] | - -### Return type - -[**CreateVolumeResponse**](CreateVolumeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **deleteVolume** -> DeleteVolumeResponse deleteVolume(deleteVolumeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - DeleteVolumeRequest deleteVolumeRequest = new DeleteVolumeRequest(); // DeleteVolumeRequest | - try { - DeleteVolumeResponse result = apiInstance.deleteVolume(deleteVolumeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#deleteVolume"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVolumeRequest** | [**DeleteVolumeRequest**](DeleteVolumeRequest.md)| | [optional] | - -### Return type - -[**DeleteVolumeResponse**](DeleteVolumeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **linkVolume** -> LinkVolumeResponse linkVolume(linkVolumeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - LinkVolumeRequest linkVolumeRequest = new LinkVolumeRequest(); // LinkVolumeRequest | - try { - LinkVolumeResponse result = apiInstance.linkVolume(linkVolumeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#linkVolume"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **linkVolumeRequest** | [**LinkVolumeRequest**](LinkVolumeRequest.md)| | [optional] | - -### Return type - -[**LinkVolumeResponse**](LinkVolumeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **readVolumes** -> ReadVolumesResponse readVolumes(readVolumesRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - ReadVolumesRequest readVolumesRequest = new ReadVolumesRequest(); // ReadVolumesRequest | - try { - ReadVolumesResponse result = apiInstance.readVolumes(readVolumesRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#readVolumes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVolumesRequest** | [**ReadVolumesRequest**](ReadVolumesRequest.md)| | [optional] | - -### Return type - -[**ReadVolumesResponse**](ReadVolumesResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **unlinkVolume** -> UnlinkVolumeResponse unlinkVolume(unlinkVolumeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - UnlinkVolumeRequest unlinkVolumeRequest = new UnlinkVolumeRequest(); // UnlinkVolumeRequest | - try { - UnlinkVolumeResponse result = apiInstance.unlinkVolume(unlinkVolumeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#unlinkVolume"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **unlinkVolumeRequest** | [**UnlinkVolumeRequest**](UnlinkVolumeRequest.md)| | [optional] | - -### Return type - -[**UnlinkVolumeResponse**](UnlinkVolumeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - - -# **updateVolume** -> UpdateVolumeResponse updateVolume(updateVolumeRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VolumeApi apiInstance = new VolumeApi(defaultClient); - UpdateVolumeRequest updateVolumeRequest = new UpdateVolumeRequest(); // UpdateVolumeRequest | - try { - UpdateVolumeResponse result = apiInstance.updateVolume(updateVolumeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VolumeApi#updateVolume"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateVolumeRequest** | [**UpdateVolumeRequest**](UpdateVolumeRequest.md)| | [optional] | - -### Return type - -[**UpdateVolumeResponse**](UpdateVolumeResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/VpnConnection.md b/docs/VpnConnection.md deleted file mode 100644 index f79f42b3..00000000 --- a/docs/VpnConnection.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# VpnConnection - -Information about a VPN connection. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientGatewayConfiguration** | **String** | Example configuration for the client gateway. | [optional] | -|**clientGatewayId** | **String** | The ID of the client gateway used on the client end of the connection. | [optional] | -|**connectionType** | **String** | The type of VPN connection (always `ipsec.1`). | [optional] | -|**routes** | [**List<RouteLight>**](RouteLight.md) | Information about one or more static routes associated with the VPN connection, if any. | [optional] | -|**state** | **String** | The state of the VPN connection (`pending` \\| `available` \\| `deleting` \\| `deleted`). | [optional] | -|**staticRoutesOnly** | **Boolean** | If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) and [DeleteVpnConnectionRoute](#deletevpnconnectionroute). | [optional] | -|**tags** | [**List<ResourceTag>**](ResourceTag.md) | One or more tags associated with the VPN connection. | [optional] | -|**vgwTelemetries** | [**List<VgwTelemetry>**](VgwTelemetry.md) | Information about the current state of one or more of the VPN tunnels. | [optional] | -|**virtualGatewayId** | **String** | The ID of the virtual gateway used on the OUTSCALE end of the connection. | [optional] | -|**vpnConnectionId** | **String** | The ID of the VPN connection. | [optional] | -|**vpnOptions** | [**VpnOptions**](VpnOptions.md) | | [optional] | - - - diff --git a/docs/VpnConnectionApi.md b/docs/VpnConnectionApi.md deleted file mode 100644 index 368e7a28..00000000 --- a/docs/VpnConnectionApi.md +++ /dev/null @@ -1,431 +0,0 @@ -# VpnConnectionApi - -All URIs are relative to *https://api.eu-west-2.outscale.com/api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVpnConnection**](VpnConnectionApi.md#createVpnConnection) | **POST** /CreateVpnConnection | | -| [**createVpnConnectionRoute**](VpnConnectionApi.md#createVpnConnectionRoute) | **POST** /CreateVpnConnectionRoute | | -| [**deleteVpnConnection**](VpnConnectionApi.md#deleteVpnConnection) | **POST** /DeleteVpnConnection | | -| [**deleteVpnConnectionRoute**](VpnConnectionApi.md#deleteVpnConnectionRoute) | **POST** /DeleteVpnConnectionRoute | | -| [**readVpnConnections**](VpnConnectionApi.md#readVpnConnections) | **POST** /ReadVpnConnections | | -| [**updateVpnConnection**](VpnConnectionApi.md#updateVpnConnection) | **POST** /UpdateVpnConnection | | - - - -# **createVpnConnection** -> CreateVpnConnectionResponse createVpnConnection(createVpnConnectionRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - CreateVpnConnectionRequest createVpnConnectionRequest = new CreateVpnConnectionRequest(); // CreateVpnConnectionRequest | - try { - CreateVpnConnectionResponse result = apiInstance.createVpnConnection(createVpnConnectionRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#createVpnConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVpnConnectionRequest** | [**CreateVpnConnectionRequest**](CreateVpnConnectionRequest.md)| | [optional] | - -### Return type - -[**CreateVpnConnectionResponse**](CreateVpnConnectionResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **createVpnConnectionRoute** -> CreateVpnConnectionRouteResponse createVpnConnectionRoute(createVpnConnectionRouteRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest = new CreateVpnConnectionRouteRequest(); // CreateVpnConnectionRouteRequest | - try { - CreateVpnConnectionRouteResponse result = apiInstance.createVpnConnectionRoute(createVpnConnectionRouteRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#createVpnConnectionRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createVpnConnectionRouteRequest** | [**CreateVpnConnectionRouteRequest**](CreateVpnConnectionRouteRequest.md)| | [optional] | - -### Return type - -[**CreateVpnConnectionRouteResponse**](CreateVpnConnectionRouteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteVpnConnection** -> DeleteVpnConnectionResponse deleteVpnConnection(deleteVpnConnectionRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - DeleteVpnConnectionRequest deleteVpnConnectionRequest = new DeleteVpnConnectionRequest(); // DeleteVpnConnectionRequest | - try { - DeleteVpnConnectionResponse result = apiInstance.deleteVpnConnection(deleteVpnConnectionRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#deleteVpnConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVpnConnectionRequest** | [**DeleteVpnConnectionRequest**](DeleteVpnConnectionRequest.md)| | [optional] | - -### Return type - -[**DeleteVpnConnectionResponse**](DeleteVpnConnectionResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **deleteVpnConnectionRoute** -> DeleteVpnConnectionRouteResponse deleteVpnConnectionRoute(deleteVpnConnectionRouteRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest = new DeleteVpnConnectionRouteRequest(); // DeleteVpnConnectionRouteRequest | - try { - DeleteVpnConnectionRouteResponse result = apiInstance.deleteVpnConnectionRoute(deleteVpnConnectionRouteRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#deleteVpnConnectionRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deleteVpnConnectionRouteRequest** | [**DeleteVpnConnectionRouteRequest**](DeleteVpnConnectionRouteRequest.md)| | [optional] | - -### Return type - -[**DeleteVpnConnectionRouteResponse**](DeleteVpnConnectionRouteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **readVpnConnections** -> ReadVpnConnectionsResponse readVpnConnections(readVpnConnectionsRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - ReadVpnConnectionsRequest readVpnConnectionsRequest = new ReadVpnConnectionsRequest(); // ReadVpnConnectionsRequest | - try { - ReadVpnConnectionsResponse result = apiInstance.readVpnConnections(readVpnConnectionsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#readVpnConnections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readVpnConnectionsRequest** | [**ReadVpnConnectionsRequest**](ReadVpnConnectionsRequest.md)| | [optional] | - -### Return type - -[**ReadVpnConnectionsResponse**](ReadVpnConnectionsResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | - - -# **updateVpnConnection** -> UpdateVpnConnectionResponse updateVpnConnection(updateVpnConnectionRequest) - - - -### Example -```java -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.auth.*; -import io.github.outscale.osc_sdk_java.client.models.*; -import io.github.outscale.osc_sdk_java.client.api.VpnConnectionApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1"); - // Configure AWS Signature V4 authorization - defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - VpnConnectionApi apiInstance = new VpnConnectionApi(defaultClient); - UpdateVpnConnectionRequest updateVpnConnectionRequest = new UpdateVpnConnectionRequest(); // UpdateVpnConnectionRequest | - try { - UpdateVpnConnectionResponse result = apiInstance.updateVpnConnection(updateVpnConnectionRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VpnConnectionApi#updateVpnConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updateVpnConnectionRequest** | [**UpdateVpnConnectionRequest**](UpdateVpnConnectionRequest.md)| | [optional] | - -### Return type - -[**UpdateVpnConnectionResponse**](UpdateVpnConnectionResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The HTTP 200 response (OK). | - | -| **400** | The HTTP 400 response (Bad Request). | - | -| **401** | The HTTP 401 response (Unauthorized). | - | -| **500** | The HTTP 500 response (Internal Server Error). | - | - diff --git a/docs/VpnOptions.md b/docs/VpnOptions.md deleted file mode 100644 index 1eb71516..00000000 --- a/docs/VpnOptions.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# VpnOptions - -Information about the VPN options. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**phase1Options** | [**Phase1Options**](Phase1Options.md) | | [optional] | -|**phase2Options** | [**Phase2Options**](Phase2Options.md) | | [optional] | -|**tunnelInsideIpRange** | **String** | The range of inside IPs for the tunnel. This must be a /30 CIDR block from the 169.254.254.0/24 range. | [optional] | - - - diff --git a/docs/With.md b/docs/With.md deleted file mode 100644 index 7660a251..00000000 --- a/docs/With.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# With - -The information to display in each returned log. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **Boolean** | By default or if set to true, the account ID is displayed. | [optional] | -|**callDuration** | **Boolean** | By default or if set to true, the duration of the call is displayed. | [optional] | -|**queryAccessKey** | **Boolean** | By default or if set to true, the access key is displayed. | [optional] | -|**queryApiName** | **Boolean** | By default or if set to true, the name of the API is displayed. | [optional] | -|**queryApiVersion** | **Boolean** | By default or if set to true, the version of the API is displayed. | [optional] | -|**queryCallName** | **Boolean** | By default or if set to true, the name of the call is displayed. | [optional] | -|**queryDate** | **Boolean** | By default or if set to true, the date of the call is displayed. | [optional] | -|**queryHeaderRaw** | **Boolean** | By default or if set to true, the raw header of the HTTP request is displayed. | [optional] | -|**queryHeaderSize** | **Boolean** | By default or if set to true, the size of the raw header of the HTTP request is displayed. | [optional] | -|**queryIpAddress** | **Boolean** | By default or if set to true, the IP is displayed. | [optional] | -|**queryPayloadRaw** | **Boolean** | By default or if set to true, the raw payload of the HTTP request is displayed. | [optional] | -|**queryPayloadSize** | **Boolean** | By default or if set to true, the size of the raw payload of the HTTP request is displayed. | [optional] | -|**queryUserAgent** | **Boolean** | By default or if set to true, the user agent of the HTTP request is displayed. | [optional] | -|**requestId** | **Boolean** | By default or if set to true, the request ID is displayed. | [optional] | -|**responseSize** | **Boolean** | By default or if set to true, the size of the response is displayed. | [optional] | -|**responseStatusCode** | **Boolean** | By default or if set to true, the HTTP status code of the response is displayed. | [optional] | - - - diff --git a/examples/config_env/pom.xml b/examples/config_env/pom.xml index c518b7c9..84191f71 100644 --- a/examples/config_env/pom.xml +++ b/examples/config_env/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/examples/config_env/src/main/java/io/github/outscale/example/App.java b/examples/config_env/src/main/java/io/github/outscale/example/App.java index d1fa1ecf..14c44a67 100644 --- a/examples/config_env/src/main/java/io/github/outscale/example/App.java +++ b/examples/config_env/src/main/java/io/github/outscale/example/App.java @@ -1,25 +1,18 @@ package io.github.outscale.example; -import java.io.BufferedWriter; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; - -// Import classes: -import io.github.outscale.osc_sdk_java.client.ApiClient; import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Configuration; import io.github.outscale.osc_sdk_java.client.ConfigurationEnv; import io.github.outscale.osc_sdk_java.client.ConfigurationException; -import io.github.outscale.osc_sdk_java.client.ConfigurationFile; -import io.github.outscale.osc_sdk_java.client.JSON; +import io.github.outscale.osc_sdk_java.client.handler.VmApi; +import io.github.outscale.osc_sdk_java.client.*; import io.github.outscale.osc_sdk_java.client.model.*; -import io.github.outscale.osc_sdk_java.client.api.RegionApi; -import io.github.outscale.osc_sdk_java.client.api.VmApi; +import java.io.BufferedWriter; + +// Import classes: public class App { - public static void main(String[] args) { + public static void main(String[] args) throws ConfigurationException { ConfigurationEnv confEnv = ConfigurationEnv.loadConfigEnv(); if (confEnv == null) { @@ -55,4 +48,4 @@ public static void main(String[] args) { } } -} \ No newline at end of file +} diff --git a/examples/config_file/pom.xml b/examples/config_file/pom.xml index d82108e9..fe37fe4d 100644 --- a/examples/config_file/pom.xml +++ b/examples/config_file/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/examples/config_file/src/main/java/io/github/outscale/example/App.java b/examples/config_file/src/main/java/io/github/outscale/example/App.java index 44c54d76..0ab10f15 100644 --- a/examples/config_file/src/main/java/io/github/outscale/example/App.java +++ b/examples/config_file/src/main/java/io/github/outscale/example/App.java @@ -13,8 +13,8 @@ import io.github.outscale.osc_sdk_java.client.ConfigurationFile; import io.github.outscale.osc_sdk_java.client.JSON; import io.github.outscale.osc_sdk_java.client.model.*; -import io.github.outscale.osc_sdk_java.client.api.RegionApi; -import io.github.outscale.osc_sdk_java.client.api.VmApi; +import io.github.outscale.osc_sdk_java.client.handler.RegionApi; +import io.github.outscale.osc_sdk_java.client.handler.VmApi; public class App { diff --git a/examples/password_auth/pom.xml b/examples/password_auth/pom.xml index f5309830..c38eb2a7 100644 --- a/examples/password_auth/pom.xml +++ b/examples/password_auth/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/examples/password_auth/src/main/java/io/github/outscale/example/App.java b/examples/password_auth/src/main/java/io/github/outscale/example/App.java index 6108c17f..3ec658a0 100644 --- a/examples/password_auth/src/main/java/io/github/outscale/example/App.java +++ b/examples/password_auth/src/main/java/io/github/outscale/example/App.java @@ -2,9 +2,9 @@ // Import classes: import io.github.outscale.osc_sdk_java.client.*; -import io.github.outscale.osc_sdk_java.client.api.AccountApi; -import io.github.outscale.osc_sdk_java.client.api.ApiAccessPolicyApi; -import io.github.outscale.osc_sdk_java.client.api.VmApi; +import io.github.outscale.osc_sdk_java.client.handler.AccountApi; +import io.github.outscale.osc_sdk_java.client.handler.ApiAccessPolicyApi; +import io.github.outscale.osc_sdk_java.client.handler.VmApi; import io.github.outscale.osc_sdk_java.client.model.*; public class App { @@ -32,4 +32,4 @@ public static void main(String[] args) { System.exit(1); } } -} \ No newline at end of file +} diff --git a/examples/region/pom.xml b/examples/region/pom.xml index 3f67c1d8..b824a3c4 100644 --- a/examples/region/pom.xml +++ b/examples/region/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/examples/region/src/main/java/io/github/outscale/example/App.java b/examples/region/src/main/java/io/github/outscale/example/App.java index ef943f51..b2c6c609 100644 --- a/examples/region/src/main/java/io/github/outscale/example/App.java +++ b/examples/region/src/main/java/io/github/outscale/example/App.java @@ -5,7 +5,7 @@ import io.github.outscale.osc_sdk_java.client.ApiException; import io.github.outscale.osc_sdk_java.client.Configuration; import io.github.outscale.osc_sdk_java.client.model.*; -import io.github.outscale.osc_sdk_java.client.api.RegionApi; +import io.github.outscale.osc_sdk_java.client.handler.RegionApi; public class App { public static void main(String[] args) { @@ -25,4 +25,4 @@ public static void main(String[] args) { System.exit(1); } } -} \ No newline at end of file +} diff --git a/examples/vm/pom.xml b/examples/vm/pom.xml index 079c8956..adfa4a11 100644 --- a/examples/vm/pom.xml +++ b/examples/vm/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -28,7 +28,7 @@ io.github.outscale osc-sdk-java - 0.8.0 + 0.8.0 diff --git a/examples/vm/src/main/java/io/github/outscale/example/App.java b/examples/vm/src/main/java/io/github/outscale/example/App.java index 3f7753cc..3538f3b5 100644 --- a/examples/vm/src/main/java/io/github/outscale/example/App.java +++ b/examples/vm/src/main/java/io/github/outscale/example/App.java @@ -2,7 +2,7 @@ // Import classes: import io.github.outscale.osc_sdk_java.client.*; -import io.github.outscale.osc_sdk_java.client.api.VmApi; +import io.github.outscale.osc_sdk_java.client.handler.VmApi; import io.github.outscale.osc_sdk_java.client.model.*; public class App { diff --git a/examples/volumes/pom.xml b/examples/volumes/pom.xml index 8770da2a..00b32080 100644 --- a/examples/volumes/pom.xml +++ b/examples/volumes/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/examples/volumes/src/main/java/io/github/outscale/example/App.java b/examples/volumes/src/main/java/io/github/outscale/example/App.java index 5785ca7f..65cadac1 100644 --- a/examples/volumes/src/main/java/io/github/outscale/example/App.java +++ b/examples/volumes/src/main/java/io/github/outscale/example/App.java @@ -2,7 +2,7 @@ // Import classes: import io.github.outscale.osc_sdk_java.client.*; -import io.github.outscale.osc_sdk_java.client.api.VolumeApi; +import io.github.outscale.osc_sdk_java.client.handler.VolumeApi; import io.github.outscale.osc_sdk_java.client.model.*; public class App { diff --git a/gen.yml b/gen.yml deleted file mode 100644 index c686f11c..00000000 --- a/gen.yml +++ /dev/null @@ -1,7 +0,0 @@ -artifactId: osc-sdk-java -invokerPackage: io.github.outscale.osc-sdk-java.client -apiPackage: io.github.outscale.osc-sdk-java.client.api -modelPackage: io.github.outscale.osc-sdk-java.client.model -withAWSV4Signature: true -hideGenerationTimestamp: true -#library: native \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6b393c98..387664e6 100644 --- a/pom.xml +++ b/pom.xml @@ -1,410 +1,457 @@ - 4.0.0 - io.github.outscale - osc-sdk-java - jar - osc-sdk-java - 0.8.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +4.0.0 +io.github.outscale +osc-sdk-java +jar +osc-sdk-java +0.8.0 +https://github.com/outscale/osc-sdk-java +3DS Outscale SDK + + scm:git:git@github.com:outscale/osc-sdk-java.git + scm:git:git@github.com:outscale/osc-sdk-java.git https://github.com/outscale/osc-sdk-java - 3DS Outscale SDK - - scm:git:git@github.com:outscale/osc-sdk-java.git - scm:git:git@github.com:outscale/osc-sdk-java.git - https://github.com/outscale/osc-sdk-java - + - - - BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause - repo - - + + + BSD-3-Clause + https://opensource.org/licenses/BSD-3-Clause + repo + + - - - 3DS Outscale - opensource@outscale.com - 3DS Outscale - https://outscale.com - - + + + 3DS Outscale + opensource@outscale.com + 3DS Outscale + https://outscale.com + + - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.2.1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - - - - maven-dependency-plugin - 3.5.0 - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - test-jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.2.1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + 3.5.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + - - - - - .gitignore - - - - - - true - 4 - - + + + + + .gitignore + + + + + + true + 4 + + - + - - - 1.8 - - true - + + + 1.8 + + true + - - + + - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - + openapi-generator-maven-plugin + 7.15.0 + + + + generate + + + github.com + outscale + osc-sdk-java + https://raw.githubusercontent.com/outscale/osc-api-deploy/refs/tags/v${outscale-api-version}/outscale.yaml + java + templates + io.github.outscale + osc-sdk-java + + src/gen/java/main + true + true + + io.github.outscale.osc_sdk_java + io.github.outscale.osc_sdk_java.client.handler + io.github.outscale.osc_sdk_java.client.model + io.github.outscale.osc_sdk_java.client + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + - - com.amazonaws - aws-java-sdk-signer - 1.12.400 - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - test - - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - org.mockito - mockito-core - ${mockito-core-version} - test - - - - org.bouncycastle - bcpkix-jdk15on - 1.70 - - - - com.squareup.okhttp3 - okhttp-tls - 4.10.0 - - - - 1.8 - ${java.version} - ${java.version} - 1.8.5 - 1.6.6 - 4.10.0 - 2.10.1 - 3.12.0 - 0.2.4 - 1.3.5 - 5.9.2 - 1.9.2 - 3.12.4 - 2.1.1 - 1.1.1 - UTF-8 - 2.31.0 - + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + javax.annotation + javax.annotation-api + 1.3.2 + + + software.amazon.awssdk + auth + 2.20.157 + + + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + + + dev.failsafe + failsafe + ${failsafe-version} + + + dev.failsafe + failsafe-okhttp + ${failsafe-version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + org.mockito + mockito-core + ${mockito-core-version} + test + + + + org.bouncycastle + bcpkix-jdk15on + 1.70 + + + + com.squareup.okhttp3 + okhttp-tls + 4.10.0 + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + 1.6.6 + 4.12.0 + 2.10.1 + 3.18.0 + 0.2.8 + 2.1.1 + 5.9.2 + 1.10.0 + 3.12.4 + 2.1.1 + 1.1.1 + UTF-8 + 2.43.0 + 3.3.1 + 1.37.1 + diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml deleted file mode 100644 index c485d469..00000000 --- a/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiCallback.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ApiCallback.java deleted file mode 100644 index d92d6ae4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiCallback.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.util.List; -import java.util.Map; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiException.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ApiException.java deleted file mode 100644 index 2eb63d0b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiException.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.util.List; -import java.util.Map; - -/** ApiException class. */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** Constructor for ApiException. */ - public ApiException() {} - - /** - * Constructor for ApiException. - * - * @param throwable a {@link java.lang.Throwable} object - */ - public ApiException(Throwable throwable) { - super(throwable); - } - - /** - * Constructor for ApiException. - * - * @param message the error message - */ - public ApiException(String message) { - super(message); - } - - /** - * Constructor for ApiException. - * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders, - String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Constructor for ApiException. - * - * @param message the error message - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException( - String message, - int code, - Map> responseHeaders, - String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - * Constructor for ApiException. - * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - */ - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - /** - * Constructor for ApiException. - * - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, Map> responseHeaders, String responseBody) { - this( - "Response Code: " + code + " Response Body: " + responseBody, - (Throwable) null, - code, - responseHeaders, - responseBody); - } - - /** - * Constructor for ApiException. - * - * @param code HTTP status code - * @param message a {@link java.lang.String} object - */ - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - /** - * Constructor for ApiException. - * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException( - int code, - String message, - Map> responseHeaders, - String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format( - "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response" - + " headers: %s", - super.getMessage(), - this.getCode(), - this.getResponseBody(), - this.getResponseHeaders()); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ApiResponse.java deleted file mode 100644 index c9bcd3bc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiResponse.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.util.List; -import java.util.Map; - -/** API response returned by API call. */ -public class ApiResponse { - private final int statusCode; - private final Map> headers; - private final T data; - - /** - * Constructor for ApiResponse. - * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - * Constructor for ApiResponse. - * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - * Get the status code. - * - * @return the status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - * Get the headers. - * - * @return a {@link java.util.Map} of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - * Get the data. - * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/Configuration.java b/src/main/java/io/github/outscale/osc_sdk_java/client/Configuration.java deleted file mode 100644 index 5ebbde4a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/Configuration.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Configuration { - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API instances without providing - * an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } - - /** - * Set the default API client, which would be used when creating API instances without providing - * an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java index 4aa1eaae..adaa8950 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java +++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationEnv.java @@ -5,7 +5,7 @@ public class ConfigurationEnv extends ConfigurationInitializer { public ConfigurationEnv() {} - public static ConfigurationEnv loadConfigEnv() { + public static ConfigurationEnv loadConfigEnv() throws ConfigurationException { ConfigurationEnv configurationEnv = new ConfigurationEnv(); configurationEnv.profile = new Profile(); @@ -18,6 +18,37 @@ public static ConfigurationEnv loadConfigEnv() { configurationEnv.profile.setX509ClientKeyB64(System.getenv("OSC_X509_CLIENT_KEY_B64")); configurationEnv.profile.setMethod(System.getenv("OSC_METHOD")); configurationEnv.profile.setProtocol(System.getenv("OSC_PROTOCOL")); + try { + if (System.getenv("OSC_MAX_RETRIES") != null) { + configurationEnv.profile.setMaxRetries(Integer.parseInt(System.getenv("OSC_MAX_RETRIES"))); + } + } catch (NumberFormatException e){ + throw new ConfigurationException("OSC_MAX_RETRIES is not a valid integer"); + } + + try { + if (System.getenv("OSC_RETRY_BACKOFF_FACTOR") != null) { + configurationEnv.profile.setRetryBackoffFactor(Float.parseFloat(System.getenv("OSC_RETRY_BACKOFF_FACTOR"))); + } + } catch (NumberFormatException e){ + throw new ConfigurationException("OSC_RETRY_BACKOFF_FACTOR is not a valid float"); + } + + try { + if (System.getenv("OSC_RETRY_BACKOFF_JITTER") != null) { + configurationEnv.profile.setRetryBackoffJitter(Float.parseFloat(System.getenv("OSC_RETRY_BACKOFF_JITTER"))); + } + } catch (NumberFormatException e){ + throw new ConfigurationException("OSC_RETRY_BACKOFF_Jitter is not a valid float"); + } + + try { + if (System.getenv("OSC_RETRY_BACKOFF_MAX") != null) { + configurationEnv.profile.setRetryBackoffMax(Float.parseFloat(System.getenv("OSC_RETRY_BACKOFF_MAX"))); + } + } catch (NumberFormatException e){ + throw new ConfigurationException("OSC_RETRY_BACKOFF_MAX is not a valid float"); + } Endpoint endpoints = new Endpoint(); endpoints.setApi(System.getenv("OSC_ENDPOINT_API")); diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java index 2f13306e..5f95d08f 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java +++ b/src/main/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializer.java @@ -1,5 +1,9 @@ package io.github.outscale.osc_sdk_java.client; +import dev.failsafe.Failsafe; +import dev.failsafe.Policy; +import dev.failsafe.RateLimiter; +import dev.failsafe.RetryPolicy; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.FileInputStream; @@ -12,10 +16,13 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; +import java.time.Duration; import java.util.ArrayList; import java.util.Base64; import java.util.HashMap; import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; import okhttp3.tls.HandshakeCertificates; import okhttp3.tls.HeldCertificate; import org.bouncycastle.openssl.PEMKeyPair; @@ -206,6 +213,40 @@ protected ApiClient getApiClient(Profile profile) throws ConfigurationException apiClient.setHttpClient(client); } + apiClient.setRetryPolicy(this.getRetryPolicy(profile)); + apiClient.setRateLimiter(this.getLimiter(profile)); + return apiClient; } + + protected RetryPolicy getRetryPolicy(Profile profile) { + int max_retires = profile.getMaxRetry() != null ? profile.getMaxRetry() : 3; + Duration backoff_factor = profile.getRetryBackoffFactor() != null ? + Duration.ofMillis(Math.round(profile.getRetryBackoffFactor() * 1000)) : + Duration.ofSeconds(2); + Duration backoff_max = profile.getRetryBackoffMax() != null ? + Duration.ofMillis(Math.round(profile.getRetryBackoffMax() * 1000)) : + Duration.ofSeconds(15); + Duration backoff_jitter = profile.getRetryBackoffJitter() != null ? + Duration.ofMillis(Math.round(profile.getRetryBackoffJitter() * 500)) : + Duration.ofSeconds(1); + if (backoff_jitter.compareTo(backoff_factor) > 0) { + backoff_jitter = backoff_factor; + } + + return RetryPolicy.builder() + .withMaxRetries(max_retires) + .withBackoff(backoff_factor, backoff_max) + .withJitter(backoff_jitter) + .build(); + } + + protected RateLimiter getLimiter(Profile profile) { + int max_req = profile.getLimiterMaxRequests() != null ? profile.getLimiterMaxRequests() : 5; + Duration window = profile.getLimiterWindow() != null ? + Duration.ofMillis(Math.round(profile.getLimiterWindow() * 1000)) : + Duration.ofSeconds(1); + + return RateLimiter.smoothBuilder(max_req, window).build(); + } } diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/GzipRequestInterceptor.java b/src/main/java/io/github/outscale/osc_sdk_java/client/GzipRequestInterceptor.java deleted file mode 100644 index 4425c8fd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.io.IOException; -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -/** - * Encodes request bodies using gzip. - * - *

Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = - originalRequest - .newBuilder() - .header("Content-Encoding", "gzip") - .method( - originalRequest.method(), - forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/JSON.java b/src/main/java/io/github/outscale/osc_sdk_java/client/JSON.java deleted file mode 100644 index e0a627bd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/JSON.java +++ /dev/null @@ -1,2198 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.gsonfire.GsonFireBuilder; -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Map; -import okio.ByteString; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = - new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder(); - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue( - JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException( - "missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator - * value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator( - Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException( - "cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AccepterNet - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AccessKey - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AccessKeySecretKey - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AccessLog - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Account - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ApiAccessPolicy - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ApiAccessRule - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ApplicationStickyCookiePolicy - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BackendVmHealth - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BlockDeviceMappingCreated - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BlockDeviceMappingImage - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BlockDeviceMappingVmCreation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BlockDeviceMappingVmUpdate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BsuCreated - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BsuToCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.BsuToUpdateVm - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Ca.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Catalog - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CatalogEntry - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Catalogs - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ClientGateway - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ConsumptionEntry - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateAccountRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateAccountResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateCaRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateCaResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateImageRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateImageResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateKeypairRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateKeypairResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNatServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNatServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNicRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateNicResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateProductTypeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateProductTypeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePublicIpRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreatePublicIpResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateRouteRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateRouteResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateRouteTableRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateRouteTableResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSnapshotRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSnapshotResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSubnetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateSubnetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateUserRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateUserResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVolumeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVolumeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DedicatedGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteCaRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteCaResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteImageRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteImageResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteKeypairRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteKeypairResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNicRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteNicResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePublicIpRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeletePublicIpResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteRouteRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteRouteResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSubnetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteSubnetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteUserResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVolumeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVolumeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DhcpOptionsSet - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DirectLink - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DirectLinkInterface - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.DirectLinkInterfaces - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ErrorResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Errors.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersAccessKeys - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersApiAccessRule - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersApiLog - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersCa - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersCatalogs - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersClientGateway - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersDedicatedGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersDhcpOptions - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersDirectLink - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersDirectLinkInterface - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersExportTask - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersFlexibleGpu - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersImage - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersInternetService - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersKeypair - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersListenerRule - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersLoadBalancer - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersNatService - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersNet - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersNetAccessPoint - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersNetPeering - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersNic - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersProductType - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersPublicIp - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersQuota - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersRouteTable - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersSecurityGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersServerCertificate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersService - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersSnapshot - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersSubnet - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersSubregion - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersTag - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersUserGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVirtualGateway - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVm - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVmGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVmTemplate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVmType - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVmsState - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVolume - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FiltersVpnConnection - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FlexibleGpu - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.FlexibleGpuCatalog - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.HealthCheck - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Image.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ImageExportTask - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.InlinePolicy - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.InternetService - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Keypair - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.KeypairCreated - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .LinkLoadBalancerBackendMachinesRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .LinkLoadBalancerBackendMachinesResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkManagedPolicyToUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .LinkManagedPolicyToUserGroupResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkNic - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkNicLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkNicRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkNicResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkNicToUpdate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPublicIp - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPublicIpLightForVm - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPublicIpRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkPublicIpResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkRouteTable - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkRouteTableRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkRouteTableResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkVolumeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkVolumeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkedPolicy - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LinkedVolume - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Listener - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ListenerForCreation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ListenerRule - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ListenerRuleForCreation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LoadBalancer - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LoadBalancerLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LoadBalancerStickyCookiePolicy - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.LoadBalancerTag - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Location - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Log.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.MaintenanceEvent - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NatService - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Net.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NetAccessPoint - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NetPeering - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NetPeeringState - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NetToVirtualGatewayLink - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Nic.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NicForVmCreation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.NicLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.OsuApiKey - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.OsuExportImageExportTask - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.OsuExportSnapshotExportTask - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.OsuExportToCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PermissionsOnResource - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PermissionsOnResourceCreation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Phase1Options - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Phase2Options - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Placement - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Policy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PolicyVersion - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PrivateIp - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PrivateIpLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PrivateIpLightForVm - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ProductType - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PublicIp - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PublicIpLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Quota.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.QuotaTypes - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAccountsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAccountsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiLogsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadApiLogsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCasRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCasResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCatalogRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCatalogResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCatalogsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadCatalogsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadImagesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadImagesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadKeypairsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadKeypairsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesFilters - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLocationsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadLocationsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .ReadManagedPoliciesLinkedToUserGroupRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .ReadManagedPoliciesLinkedToUserGroupResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNatServicesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNatServicesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNetsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNicsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadNicsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPoliciesFilters - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPoliciesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPoliciesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadProductTypesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadProductTypesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadQuotasRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadQuotasResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadRegionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadRegionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSubnetsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSubnetsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSubregionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadSubregionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadTagsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadTagsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUsersRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadUsersResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmTypesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmTypesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsStateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVmsStateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVolumesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVolumesResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RebootVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RebootVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Region.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ResourceLoadBalancerTag - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ResourceTag - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ResponseContext - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Route.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RouteLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RoutePropagatingVirtualGateway - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.RouteTable - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SecurityGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SecurityGroupLight - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SecurityGroupRule - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SecurityGroupsMember - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.ServerCertificate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Service - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Snapshot - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SnapshotExportTask - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SourceNet - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.SourceSecurityGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.StartVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.StartVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.StateComment - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.StopVmsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.StopVmsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Subnet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Subregion - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Tag.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .UnlinkLoadBalancerBackendMachinesRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .UnlinkLoadBalancerBackendMachinesResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .UnlinkManagedPolicyFromUserGroupRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model - .UnlinkManagedPolicyFromUserGroupResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkNicRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkNicResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateAccountRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateAccountResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateCaRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateCaResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateImageRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateImageResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNicRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateNicResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRouteRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRouteResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateSubnetRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateSubnetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateUserRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateUserResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVolumeRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVolumeResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.User.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.UserGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VgwTelemetry - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VirtualGateway - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Vm.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VmGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VmState - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VmStates - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VmTemplate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VmType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.Volume.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VpnConnection - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.VpnOptions - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new io.github.outscale.osc_sdk_java.client.model.With.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see - // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** Gson TypeAdapter for Byte Array type */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** Gson TypeAdapter for JSR310 OffsetDateTime type */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length() - 5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** Gson TypeAdapter for JSR310 LocalDate type */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" - * format will be used (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date( - ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be - * used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/Pair.java b/src/main/java/io/github/outscale/osc_sdk_java/client/Pair.java deleted file mode 100644 index 14e6a173..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/Pair.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Pair { - private String name = ""; - private String value = ""; - - public Pair(String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; - } - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java b/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java index 6a5ed3a0..bd93e6d4 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java +++ b/src/main/java/io/github/outscale/osc_sdk_java/client/Profile.java @@ -11,6 +11,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashSet; +import com.google.gson.JsonElement; public class Profile { public static final String SERIALIZED_NAME_ACCESS_KEY = "access_key"; @@ -63,6 +64,30 @@ public class Profile { @SerializedName(SERIALIZED_NAME_ENDPOINTS) private Endpoint endpoints; + public static final String SERIALIZED_NAME_MAX_RETRIES = "max_retires"; + + @SerializedName(SERIALIZED_NAME_MAX_RETRIES) + private Integer max_retries; + + public static final String SERIALIZED_NAME_RETRY_BACKOFF_FACTOR = "retry_backoff_factor"; + + @SerializedName(SERIALIZED_NAME_RETRY_BACKOFF_FACTOR) + private Float retry_backoff_factor; + + public static final String SERIALIZED_NAME_RETRY_BACKOFF_JITTER = "retry_backoff_jitter"; + + @SerializedName(SERIALIZED_NAME_RETRY_BACKOFF_JITTER) + private Float retry_backoff_jitter; + + public static final String SERIALIZED_NAME_RETRY_BACKOFF_MAX = "retry_backoff_max"; + + @SerializedName(SERIALIZED_NAME_RETRY_BACKOFF_MAX) + private Float retry_backoff_max; + + + private Integer limiter_max_requests; + private Integer limiter_window; + public static HashSet openapiFields; public static HashSet openapiRequiredFields; @@ -110,15 +135,33 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Profile {\n"); sb.append(" accessKey: ").append(accessKey).append("\n"); - sb.append(" secretKey: ").append(secretKey).append("\n"); + + if (secretKey.isEmpty()) { + sb.append(" secretKey: ").append(secretKey).append("\n"); + } else { + sb.append(" secretKey: ***\n"); + } + sb.append(" region: ").append(region).append("\n"); sb.append(" x509ClientCert: ").append(x509ClientCert).append("\n"); sb.append(" x509ClientCertB64: ").append(x509ClientCertB64).append("\n"); sb.append(" x509ClientKey: ").append(x509ClientKey).append("\n"); - sb.append(" x509ClientKeyB64: ").append(x509ClientKeyB64).append("\n"); + + if (x509ClientKeyB64.isEmpty()) { + sb.append(" x509ClientKeyB64: ").append(x509ClientKeyB64).append("\n"); + } else { + sb.append(" x509ClientKeyB64: ***\n"); + } + sb.append(" method: ").append(method).append("\n"); sb.append(" protocol: ").append(protocol).append("\n"); sb.append(" endpoints: ").append(endpoints).append("\n"); + sb.append(" max_retries: ").append(max_retries).append("\n"); + sb.append(" retry_backoff_factor: ").append(retry_backoff_factor).append("\n"); + sb.append(" retry_backoff_jitter: ").append(retry_backoff_jitter).append("\n"); + sb.append(" retry_backoff_max: ").append(retry_backoff_max).append("\n"); + sb.append(" limiter_max_requests: ").append(limiter_max_requests).append("\n"); + sb.append(" limiter_window: ").append(limiter_window).append("\n"); sb.append("}"); return sb.toString(); } @@ -163,6 +206,32 @@ public String getX509ClientKeyB64() { return x509ClientKeyB64; } + public Integer getMaxRetry() { + return max_retries; + } + + public Float getRetryBackoffFactor() { + return retry_backoff_factor; + } + + public Float getRetryBackoffJitter() { + return retry_backoff_jitter; + } + + public Float getRetryBackoffMax() { + return retry_backoff_max; + } + + public Integer getLimiterMaxRequests() { + + return limiter_max_requests; + } + + public Integer getLimiterWindow() { + + return limiter_window; + } + public void setAccessKey(String accessKey) { this.accessKey = accessKey; } @@ -202,4 +271,28 @@ public void setX509ClientKey(String x509ClientKey) { public void setX509ClientKeyB64(String x509ClientKeyB64) { this.x509ClientKeyB64 = x509ClientKeyB64; } + + public void setMaxRetries(Integer max_retries) { + this.max_retries = max_retries; + } + + public void setRetryBackoffFactor(Float retry_backoff_factor) { + this.retry_backoff_factor = retry_backoff_factor; + } + + public void setRetryBackoffJitter(Float retry_backoff_jitter) { + this.retry_backoff_jitter = retry_backoff_jitter; + } + + public void setRetryBackoffMax(Float retry_backoff_max) { + this.retry_backoff_max = retry_backoff_max; + } + + public void setLimiterMaxRequests(Integer limiter_max_requests) { + this.limiter_max_requests = limiter_max_requests; + } + + public void setLimiterWindow(Integer limiter_window) { + this.limiter_window = limiter_window; + } } diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressRequestBody.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressRequestBody.java deleted file mode 100644 index e5743f79..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressRequestBody.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.io.IOException; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress( - bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressResponseBody.java b/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressResponseBody.java deleted file mode 100644 index 04c15b29..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ProgressResponseBody.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.io.IOException; -import okhttp3.MediaType; -import okhttp3.ResponseBody; -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress( - totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/StringUtil.java b/src/main/java/io/github/outscale/osc_sdk_java/client/StringUtil.java deleted file mode 100644 index c268bfba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/StringUtil.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - * - *

Note: This might be replaced by utility method from commons-lang or guava someday if one - * of those libraries is added as dependency. - * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApi.java deleted file mode 100644 index 20073da6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApi.java +++ /dev/null @@ -1,756 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AccessKeyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AccessKeyApi() { - this(Configuration.getDefaultApiClient()); - } - - public AccessKeyApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createAccessKey - * - * @param createAccessKeyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createAccessKeyCall( - CreateAccessKeyRequest createAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createAccessKeyRequest; - - // create path and map variables - String localVarPath = "/CreateAccessKey"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAccessKeyValidateBeforeCall( - CreateAccessKeyRequest createAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - return createAccessKeyCall(createAccessKeyRequest, _callback); - } - - /** - * @param createAccessKeyRequest (optional) - * @return CreateAccessKeyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateAccessKeyResponse createAccessKey(CreateAccessKeyRequest createAccessKeyRequest) - throws ApiException { - ApiResponse localVarResp = - createAccessKeyWithHttpInfo(createAccessKeyRequest); - return localVarResp.getData(); - } - - /** - * @param createAccessKeyRequest (optional) - * @return ApiResponse<CreateAccessKeyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createAccessKeyWithHttpInfo( - CreateAccessKeyRequest createAccessKeyRequest) throws ApiException { - okhttp3.Call localVarCall = createAccessKeyValidateBeforeCall(createAccessKeyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createAccessKeyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createAccessKeyAsync( - CreateAccessKeyRequest createAccessKeyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createAccessKeyValidateBeforeCall(createAccessKeyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteAccessKey - * - * @param deleteAccessKeyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteAccessKeyCall( - DeleteAccessKeyRequest deleteAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteAccessKeyRequest; - - // create path and map variables - String localVarPath = "/DeleteAccessKey"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAccessKeyValidateBeforeCall( - DeleteAccessKeyRequest deleteAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - return deleteAccessKeyCall(deleteAccessKeyRequest, _callback); - } - - /** - * @param deleteAccessKeyRequest (optional) - * @return DeleteAccessKeyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteAccessKeyResponse deleteAccessKey(DeleteAccessKeyRequest deleteAccessKeyRequest) - throws ApiException { - ApiResponse localVarResp = - deleteAccessKeyWithHttpInfo(deleteAccessKeyRequest); - return localVarResp.getData(); - } - - /** - * @param deleteAccessKeyRequest (optional) - * @return ApiResponse<DeleteAccessKeyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteAccessKeyWithHttpInfo( - DeleteAccessKeyRequest deleteAccessKeyRequest) throws ApiException { - okhttp3.Call localVarCall = deleteAccessKeyValidateBeforeCall(deleteAccessKeyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteAccessKeyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteAccessKeyAsync( - DeleteAccessKeyRequest deleteAccessKeyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteAccessKeyValidateBeforeCall(deleteAccessKeyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readAccessKeys - * - * @param readAccessKeysRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readAccessKeysCall( - ReadAccessKeysRequest readAccessKeysRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readAccessKeysRequest; - - // create path and map variables - String localVarPath = "/ReadAccessKeys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readAccessKeysValidateBeforeCall( - ReadAccessKeysRequest readAccessKeysRequest, final ApiCallback _callback) - throws ApiException { - return readAccessKeysCall(readAccessKeysRequest, _callback); - } - - /** - * @param readAccessKeysRequest (optional) - * @return ReadAccessKeysResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadAccessKeysResponse readAccessKeys(ReadAccessKeysRequest readAccessKeysRequest) - throws ApiException { - ApiResponse localVarResp = - readAccessKeysWithHttpInfo(readAccessKeysRequest); - return localVarResp.getData(); - } - - /** - * @param readAccessKeysRequest (optional) - * @return ApiResponse<ReadAccessKeysResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readAccessKeysWithHttpInfo( - ReadAccessKeysRequest readAccessKeysRequest) throws ApiException { - okhttp3.Call localVarCall = readAccessKeysValidateBeforeCall(readAccessKeysRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readAccessKeysRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readAccessKeysAsync( - ReadAccessKeysRequest readAccessKeysRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readAccessKeysValidateBeforeCall(readAccessKeysRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readSecretAccessKey - * - * @param readSecretAccessKeyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSecretAccessKeyCall( - ReadSecretAccessKeyRequest readSecretAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSecretAccessKeyRequest; - - // create path and map variables - String localVarPath = "/ReadSecretAccessKey"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSecretAccessKeyValidateBeforeCall( - ReadSecretAccessKeyRequest readSecretAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - return readSecretAccessKeyCall(readSecretAccessKeyRequest, _callback); - } - - /** - * @param readSecretAccessKeyRequest (optional) - * @return ReadSecretAccessKeyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadSecretAccessKeyResponse readSecretAccessKey( - ReadSecretAccessKeyRequest readSecretAccessKeyRequest) throws ApiException { - ApiResponse localVarResp = - readSecretAccessKeyWithHttpInfo(readSecretAccessKeyRequest); - return localVarResp.getData(); - } - - /** - * @param readSecretAccessKeyRequest (optional) - * @return ApiResponse<ReadSecretAccessKeyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readSecretAccessKeyWithHttpInfo( - ReadSecretAccessKeyRequest readSecretAccessKeyRequest) throws ApiException { - okhttp3.Call localVarCall = - readSecretAccessKeyValidateBeforeCall(readSecretAccessKeyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSecretAccessKeyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSecretAccessKeyAsync( - ReadSecretAccessKeyRequest readSecretAccessKeyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readSecretAccessKeyValidateBeforeCall(readSecretAccessKeyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateAccessKey - * - * @param updateAccessKeyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateAccessKeyCall( - UpdateAccessKeyRequest updateAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateAccessKeyRequest; - - // create path and map variables - String localVarPath = "/UpdateAccessKey"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateAccessKeyValidateBeforeCall( - UpdateAccessKeyRequest updateAccessKeyRequest, final ApiCallback _callback) - throws ApiException { - return updateAccessKeyCall(updateAccessKeyRequest, _callback); - } - - /** - * @param updateAccessKeyRequest (optional) - * @return UpdateAccessKeyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateAccessKeyResponse updateAccessKey(UpdateAccessKeyRequest updateAccessKeyRequest) - throws ApiException { - ApiResponse localVarResp = - updateAccessKeyWithHttpInfo(updateAccessKeyRequest); - return localVarResp.getData(); - } - - /** - * @param updateAccessKeyRequest (optional) - * @return ApiResponse<UpdateAccessKeyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateAccessKeyWithHttpInfo( - UpdateAccessKeyRequest updateAccessKeyRequest) throws ApiException { - okhttp3.Call localVarCall = updateAccessKeyValidateBeforeCall(updateAccessKeyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateAccessKeyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateAccessKeyAsync( - UpdateAccessKeyRequest updateAccessKeyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateAccessKeyValidateBeforeCall(updateAccessKeyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccountApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccountApi.java deleted file mode 100644 index 4d94da6e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/AccountApi.java +++ /dev/null @@ -1,758 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationRequest; -import io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateAccountResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAccountsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAccountsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccountResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public AccountApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for checkAuthentication - * - * @param checkAuthenticationRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call checkAuthenticationCall( - CheckAuthenticationRequest checkAuthenticationRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = checkAuthenticationRequest; - - // create path and map variables - String localVarPath = "/CheckAuthentication"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call checkAuthenticationValidateBeforeCall( - CheckAuthenticationRequest checkAuthenticationRequest, final ApiCallback _callback) - throws ApiException { - return checkAuthenticationCall(checkAuthenticationRequest, _callback); - } - - /** - * @param checkAuthenticationRequest (optional) - * @return CheckAuthenticationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CheckAuthenticationResponse checkAuthentication( - CheckAuthenticationRequest checkAuthenticationRequest) throws ApiException { - ApiResponse localVarResp = - checkAuthenticationWithHttpInfo(checkAuthenticationRequest); - return localVarResp.getData(); - } - - /** - * @param checkAuthenticationRequest (optional) - * @return ApiResponse<CheckAuthenticationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse checkAuthenticationWithHttpInfo( - CheckAuthenticationRequest checkAuthenticationRequest) throws ApiException { - okhttp3.Call localVarCall = - checkAuthenticationValidateBeforeCall(checkAuthenticationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param checkAuthenticationRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call checkAuthenticationAsync( - CheckAuthenticationRequest checkAuthenticationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - checkAuthenticationValidateBeforeCall(checkAuthenticationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createAccount - * - * @param createAccountRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createAccountCall( - CreateAccountRequest createAccountRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createAccountRequest; - - // create path and map variables - String localVarPath = "/CreateAccount"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAccountValidateBeforeCall( - CreateAccountRequest createAccountRequest, final ApiCallback _callback) - throws ApiException { - return createAccountCall(createAccountRequest, _callback); - } - - /** - * @param createAccountRequest (optional) - * @return CreateAccountResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateAccountResponse createAccount(CreateAccountRequest createAccountRequest) - throws ApiException { - ApiResponse localVarResp = - createAccountWithHttpInfo(createAccountRequest); - return localVarResp.getData(); - } - - /** - * @param createAccountRequest (optional) - * @return ApiResponse<CreateAccountResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createAccountWithHttpInfo( - CreateAccountRequest createAccountRequest) throws ApiException { - okhttp3.Call localVarCall = createAccountValidateBeforeCall(createAccountRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createAccountRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createAccountAsync( - CreateAccountRequest createAccountRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createAccountValidateBeforeCall(createAccountRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readAccounts - * - * @param readAccountsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readAccountsCall( - ReadAccountsRequest readAccountsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readAccountsRequest; - - // create path and map variables - String localVarPath = "/ReadAccounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readAccountsValidateBeforeCall( - ReadAccountsRequest readAccountsRequest, final ApiCallback _callback) - throws ApiException { - return readAccountsCall(readAccountsRequest, _callback); - } - - /** - * @param readAccountsRequest (optional) - * @return ReadAccountsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadAccountsResponse readAccounts(ReadAccountsRequest readAccountsRequest) - throws ApiException { - ApiResponse localVarResp = - readAccountsWithHttpInfo(readAccountsRequest); - return localVarResp.getData(); - } - - /** - * @param readAccountsRequest (optional) - * @return ApiResponse<ReadAccountsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readAccountsWithHttpInfo( - ReadAccountsRequest readAccountsRequest) throws ApiException { - okhttp3.Call localVarCall = readAccountsValidateBeforeCall(readAccountsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readAccountsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readAccountsAsync( - ReadAccountsRequest readAccountsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readAccountsValidateBeforeCall(readAccountsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readConsumptionAccount - * - * @param readConsumptionAccountRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readConsumptionAccountCall( - ReadConsumptionAccountRequest readConsumptionAccountRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readConsumptionAccountRequest; - - // create path and map variables - String localVarPath = "/ReadConsumptionAccount"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readConsumptionAccountValidateBeforeCall( - ReadConsumptionAccountRequest readConsumptionAccountRequest, - final ApiCallback _callback) - throws ApiException { - return readConsumptionAccountCall(readConsumptionAccountRequest, _callback); - } - - /** - * @param readConsumptionAccountRequest (optional) - * @return ReadConsumptionAccountResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadConsumptionAccountResponse readConsumptionAccount( - ReadConsumptionAccountRequest readConsumptionAccountRequest) throws ApiException { - ApiResponse localVarResp = - readConsumptionAccountWithHttpInfo(readConsumptionAccountRequest); - return localVarResp.getData(); - } - - /** - * @param readConsumptionAccountRequest (optional) - * @return ApiResponse<ReadConsumptionAccountResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readConsumptionAccountWithHttpInfo( - ReadConsumptionAccountRequest readConsumptionAccountRequest) throws ApiException { - okhttp3.Call localVarCall = - readConsumptionAccountValidateBeforeCall(readConsumptionAccountRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readConsumptionAccountRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readConsumptionAccountAsync( - ReadConsumptionAccountRequest readConsumptionAccountRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readConsumptionAccountValidateBeforeCall(readConsumptionAccountRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateAccount - * - * @param updateAccountRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateAccountCall( - UpdateAccountRequest updateAccountRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateAccountRequest; - - // create path and map variables - String localVarPath = "/UpdateAccount"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateAccountValidateBeforeCall( - UpdateAccountRequest updateAccountRequest, final ApiCallback _callback) - throws ApiException { - return updateAccountCall(updateAccountRequest, _callback); - } - - /** - * @param updateAccountRequest (optional) - * @return UpdateAccountResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateAccountResponse updateAccount(UpdateAccountRequest updateAccountRequest) - throws ApiException { - ApiResponse localVarResp = - updateAccountWithHttpInfo(updateAccountRequest); - return localVarResp.getData(); - } - - /** - * @param updateAccountRequest (optional) - * @return ApiResponse<UpdateAccountResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateAccountWithHttpInfo( - UpdateAccountRequest updateAccountRequest) throws ApiException { - okhttp3.Call localVarCall = updateAccountValidateBeforeCall(updateAccountRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateAccountRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateAccountAsync( - UpdateAccountRequest updateAccountRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateAccountValidateBeforeCall(updateAccountRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApi.java deleted file mode 100644 index 30a2ebc9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApi.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApiAccessPolicyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ApiAccessPolicyApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApiAccessPolicyApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readApiAccessPolicy - * - * @param readApiAccessPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readApiAccessPolicyCall( - ReadApiAccessPolicyRequest readApiAccessPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readApiAccessPolicyRequest; - - // create path and map variables - String localVarPath = "/ReadApiAccessPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readApiAccessPolicyValidateBeforeCall( - ReadApiAccessPolicyRequest readApiAccessPolicyRequest, final ApiCallback _callback) - throws ApiException { - return readApiAccessPolicyCall(readApiAccessPolicyRequest, _callback); - } - - /** - * @param readApiAccessPolicyRequest (optional) - * @return ReadApiAccessPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadApiAccessPolicyResponse readApiAccessPolicy( - ReadApiAccessPolicyRequest readApiAccessPolicyRequest) throws ApiException { - ApiResponse localVarResp = - readApiAccessPolicyWithHttpInfo(readApiAccessPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param readApiAccessPolicyRequest (optional) - * @return ApiResponse<ReadApiAccessPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readApiAccessPolicyWithHttpInfo( - ReadApiAccessPolicyRequest readApiAccessPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - readApiAccessPolicyValidateBeforeCall(readApiAccessPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readApiAccessPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readApiAccessPolicyAsync( - ReadApiAccessPolicyRequest readApiAccessPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readApiAccessPolicyValidateBeforeCall(readApiAccessPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateApiAccessPolicy - * - * @param updateApiAccessPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateApiAccessPolicyCall( - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateApiAccessPolicyRequest; - - // create path and map variables - String localVarPath = "/UpdateApiAccessPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateApiAccessPolicyValidateBeforeCall( - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest, final ApiCallback _callback) - throws ApiException { - return updateApiAccessPolicyCall(updateApiAccessPolicyRequest, _callback); - } - - /** - * @param updateApiAccessPolicyRequest (optional) - * @return UpdateApiAccessPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateApiAccessPolicyResponse updateApiAccessPolicy( - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest) throws ApiException { - ApiResponse localVarResp = - updateApiAccessPolicyWithHttpInfo(updateApiAccessPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param updateApiAccessPolicyRequest (optional) - * @return ApiResponse<UpdateApiAccessPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateApiAccessPolicyWithHttpInfo( - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - updateApiAccessPolicyValidateBeforeCall(updateApiAccessPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateApiAccessPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateApiAccessPolicyAsync( - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateApiAccessPolicyValidateBeforeCall(updateApiAccessPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApi.java deleted file mode 100644 index c03fa40e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApi.java +++ /dev/null @@ -1,621 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApiAccessRuleApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ApiAccessRuleApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApiAccessRuleApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createApiAccessRule - * - * @param createApiAccessRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createApiAccessRuleCall( - CreateApiAccessRuleRequest createApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createApiAccessRuleRequest; - - // create path and map variables - String localVarPath = "/CreateApiAccessRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createApiAccessRuleValidateBeforeCall( - CreateApiAccessRuleRequest createApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - return createApiAccessRuleCall(createApiAccessRuleRequest, _callback); - } - - /** - * @param createApiAccessRuleRequest (optional) - * @return CreateApiAccessRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateApiAccessRuleResponse createApiAccessRule( - CreateApiAccessRuleRequest createApiAccessRuleRequest) throws ApiException { - ApiResponse localVarResp = - createApiAccessRuleWithHttpInfo(createApiAccessRuleRequest); - return localVarResp.getData(); - } - - /** - * @param createApiAccessRuleRequest (optional) - * @return ApiResponse<CreateApiAccessRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createApiAccessRuleWithHttpInfo( - CreateApiAccessRuleRequest createApiAccessRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - createApiAccessRuleValidateBeforeCall(createApiAccessRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createApiAccessRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createApiAccessRuleAsync( - CreateApiAccessRuleRequest createApiAccessRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createApiAccessRuleValidateBeforeCall(createApiAccessRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteApiAccessRule - * - * @param deleteApiAccessRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteApiAccessRuleCall( - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteApiAccessRuleRequest; - - // create path and map variables - String localVarPath = "/DeleteApiAccessRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteApiAccessRuleValidateBeforeCall( - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - return deleteApiAccessRuleCall(deleteApiAccessRuleRequest, _callback); - } - - /** - * @param deleteApiAccessRuleRequest (optional) - * @return DeleteApiAccessRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteApiAccessRuleResponse deleteApiAccessRule( - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest) throws ApiException { - ApiResponse localVarResp = - deleteApiAccessRuleWithHttpInfo(deleteApiAccessRuleRequest); - return localVarResp.getData(); - } - - /** - * @param deleteApiAccessRuleRequest (optional) - * @return ApiResponse<DeleteApiAccessRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteApiAccessRuleWithHttpInfo( - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteApiAccessRuleValidateBeforeCall(deleteApiAccessRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteApiAccessRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteApiAccessRuleAsync( - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteApiAccessRuleValidateBeforeCall(deleteApiAccessRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readApiAccessRules - * - * @param readApiAccessRulesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readApiAccessRulesCall( - ReadApiAccessRulesRequest readApiAccessRulesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readApiAccessRulesRequest; - - // create path and map variables - String localVarPath = "/ReadApiAccessRules"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readApiAccessRulesValidateBeforeCall( - ReadApiAccessRulesRequest readApiAccessRulesRequest, final ApiCallback _callback) - throws ApiException { - return readApiAccessRulesCall(readApiAccessRulesRequest, _callback); - } - - /** - * @param readApiAccessRulesRequest (optional) - * @return ReadApiAccessRulesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadApiAccessRulesResponse readApiAccessRules( - ReadApiAccessRulesRequest readApiAccessRulesRequest) throws ApiException { - ApiResponse localVarResp = - readApiAccessRulesWithHttpInfo(readApiAccessRulesRequest); - return localVarResp.getData(); - } - - /** - * @param readApiAccessRulesRequest (optional) - * @return ApiResponse<ReadApiAccessRulesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readApiAccessRulesWithHttpInfo( - ReadApiAccessRulesRequest readApiAccessRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - readApiAccessRulesValidateBeforeCall(readApiAccessRulesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readApiAccessRulesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readApiAccessRulesAsync( - ReadApiAccessRulesRequest readApiAccessRulesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readApiAccessRulesValidateBeforeCall(readApiAccessRulesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateApiAccessRule - * - * @param updateApiAccessRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateApiAccessRuleCall( - UpdateApiAccessRuleRequest updateApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateApiAccessRuleRequest; - - // create path and map variables - String localVarPath = "/UpdateApiAccessRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateApiAccessRuleValidateBeforeCall( - UpdateApiAccessRuleRequest updateApiAccessRuleRequest, final ApiCallback _callback) - throws ApiException { - return updateApiAccessRuleCall(updateApiAccessRuleRequest, _callback); - } - - /** - * @param updateApiAccessRuleRequest (optional) - * @return UpdateApiAccessRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateApiAccessRuleResponse updateApiAccessRule( - UpdateApiAccessRuleRequest updateApiAccessRuleRequest) throws ApiException { - ApiResponse localVarResp = - updateApiAccessRuleWithHttpInfo(updateApiAccessRuleRequest); - return localVarResp.getData(); - } - - /** - * @param updateApiAccessRuleRequest (optional) - * @return ApiResponse<UpdateApiAccessRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateApiAccessRuleWithHttpInfo( - UpdateApiAccessRuleRequest updateApiAccessRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - updateApiAccessRuleValidateBeforeCall(updateApiAccessRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateApiAccessRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateApiAccessRuleAsync( - UpdateApiAccessRuleRequest updateApiAccessRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateApiAccessRuleValidateBeforeCall(updateApiAccessRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApi.java deleted file mode 100644 index e9df31b0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApi.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadApiLogsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiLogsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApiLogApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ApiLogApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApiLogApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readApiLogs - * - * @param readApiLogsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readApiLogsCall( - ReadApiLogsRequest readApiLogsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readApiLogsRequest; - - // create path and map variables - String localVarPath = "/ReadApiLogs"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readApiLogsValidateBeforeCall( - ReadApiLogsRequest readApiLogsRequest, final ApiCallback _callback) - throws ApiException { - return readApiLogsCall(readApiLogsRequest, _callback); - } - - /** - * @param readApiLogsRequest (optional) - * @return ReadApiLogsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadApiLogsResponse readApiLogs(ReadApiLogsRequest readApiLogsRequest) - throws ApiException { - ApiResponse localVarResp = readApiLogsWithHttpInfo(readApiLogsRequest); - return localVarResp.getData(); - } - - /** - * @param readApiLogsRequest (optional) - * @return ApiResponse<ReadApiLogsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readApiLogsWithHttpInfo( - ReadApiLogsRequest readApiLogsRequest) throws ApiException { - okhttp3.Call localVarCall = readApiLogsValidateBeforeCall(readApiLogsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readApiLogsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readApiLogsAsync( - ReadApiLogsRequest readApiLogsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readApiLogsValidateBeforeCall(readApiLogsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/CaApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/CaApi.java deleted file mode 100644 index 303adc67..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/CaApi.java +++ /dev/null @@ -1,593 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateCaRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateCaResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteCaRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteCaResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadCasRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCasResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateCaRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateCaResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CaApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CaApi() { - this(Configuration.getDefaultApiClient()); - } - - public CaApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createCa - * - * @param createCaRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createCaCall(CreateCaRequest createCaRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createCaRequest; - - // create path and map variables - String localVarPath = "/CreateCa"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createCaValidateBeforeCall( - CreateCaRequest createCaRequest, final ApiCallback _callback) throws ApiException { - return createCaCall(createCaRequest, _callback); - } - - /** - * @param createCaRequest (optional) - * @return CreateCaResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateCaResponse createCa(CreateCaRequest createCaRequest) throws ApiException { - ApiResponse localVarResp = createCaWithHttpInfo(createCaRequest); - return localVarResp.getData(); - } - - /** - * @param createCaRequest (optional) - * @return ApiResponse<CreateCaResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createCaWithHttpInfo(CreateCaRequest createCaRequest) - throws ApiException { - okhttp3.Call localVarCall = createCaValidateBeforeCall(createCaRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createCaRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createCaAsync( - CreateCaRequest createCaRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createCaValidateBeforeCall(createCaRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteCa - * - * @param deleteCaRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteCaCall(DeleteCaRequest deleteCaRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteCaRequest; - - // create path and map variables - String localVarPath = "/DeleteCa"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCaValidateBeforeCall( - DeleteCaRequest deleteCaRequest, final ApiCallback _callback) throws ApiException { - return deleteCaCall(deleteCaRequest, _callback); - } - - /** - * @param deleteCaRequest (optional) - * @return DeleteCaResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteCaResponse deleteCa(DeleteCaRequest deleteCaRequest) throws ApiException { - ApiResponse localVarResp = deleteCaWithHttpInfo(deleteCaRequest); - return localVarResp.getData(); - } - - /** - * @param deleteCaRequest (optional) - * @return ApiResponse<DeleteCaResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteCaWithHttpInfo(DeleteCaRequest deleteCaRequest) - throws ApiException { - okhttp3.Call localVarCall = deleteCaValidateBeforeCall(deleteCaRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteCaRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteCaAsync( - DeleteCaRequest deleteCaRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteCaValidateBeforeCall(deleteCaRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readCas - * - * @param readCasRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCasCall(ReadCasRequest readCasRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readCasRequest; - - // create path and map variables - String localVarPath = "/ReadCas"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readCasValidateBeforeCall( - ReadCasRequest readCasRequest, final ApiCallback _callback) throws ApiException { - return readCasCall(readCasRequest, _callback); - } - - /** - * @param readCasRequest (optional) - * @return ReadCasResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadCasResponse readCas(ReadCasRequest readCasRequest) throws ApiException { - ApiResponse localVarResp = readCasWithHttpInfo(readCasRequest); - return localVarResp.getData(); - } - - /** - * @param readCasRequest (optional) - * @return ApiResponse<ReadCasResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readCasWithHttpInfo(ReadCasRequest readCasRequest) - throws ApiException { - okhttp3.Call localVarCall = readCasValidateBeforeCall(readCasRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readCasRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCasAsync( - ReadCasRequest readCasRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readCasValidateBeforeCall(readCasRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateCa - * - * @param updateCaRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateCaCall(UpdateCaRequest updateCaRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateCaRequest; - - // create path and map variables - String localVarPath = "/UpdateCa"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuthSec", "BasicAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateCaValidateBeforeCall( - UpdateCaRequest updateCaRequest, final ApiCallback _callback) throws ApiException { - return updateCaCall(updateCaRequest, _callback); - } - - /** - * @param updateCaRequest (optional) - * @return UpdateCaResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateCaResponse updateCa(UpdateCaRequest updateCaRequest) throws ApiException { - ApiResponse localVarResp = updateCaWithHttpInfo(updateCaRequest); - return localVarResp.getData(); - } - - /** - * @param updateCaRequest (optional) - * @return ApiResponse<UpdateCaResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateCaWithHttpInfo(UpdateCaRequest updateCaRequest) - throws ApiException { - okhttp3.Call localVarCall = updateCaValidateBeforeCall(updateCaRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateCaRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateCaAsync( - UpdateCaRequest updateCaRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateCaValidateBeforeCall(updateCaRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/CatalogApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/CatalogApi.java deleted file mode 100644 index 839ac4ce..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/CatalogApi.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CatalogApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CatalogApi() { - this(Configuration.getDefaultApiClient()); - } - - public CatalogApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readCatalog - * - * @param readCatalogRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCatalogCall( - ReadCatalogRequest readCatalogRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readCatalogRequest; - - // create path and map variables - String localVarPath = "/ReadCatalog"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readCatalogValidateBeforeCall( - ReadCatalogRequest readCatalogRequest, final ApiCallback _callback) - throws ApiException { - return readCatalogCall(readCatalogRequest, _callback); - } - - /** - * @param readCatalogRequest (optional) - * @return ReadCatalogResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadCatalogResponse readCatalog(ReadCatalogRequest readCatalogRequest) - throws ApiException { - ApiResponse localVarResp = readCatalogWithHttpInfo(readCatalogRequest); - return localVarResp.getData(); - } - - /** - * @param readCatalogRequest (optional) - * @return ApiResponse<ReadCatalogResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readCatalogWithHttpInfo( - ReadCatalogRequest readCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = readCatalogValidateBeforeCall(readCatalogRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readCatalogRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCatalogAsync( - ReadCatalogRequest readCatalogRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readCatalogValidateBeforeCall(readCatalogRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readCatalogs - * - * @param readCatalogsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCatalogsCall( - ReadCatalogsRequest readCatalogsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readCatalogsRequest; - - // create path and map variables - String localVarPath = "/ReadCatalogs"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readCatalogsValidateBeforeCall( - ReadCatalogsRequest readCatalogsRequest, final ApiCallback _callback) - throws ApiException { - return readCatalogsCall(readCatalogsRequest, _callback); - } - - /** - * @param readCatalogsRequest (optional) - * @return ReadCatalogsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadCatalogsResponse readCatalogs(ReadCatalogsRequest readCatalogsRequest) - throws ApiException { - ApiResponse localVarResp = - readCatalogsWithHttpInfo(readCatalogsRequest); - return localVarResp.getData(); - } - - /** - * @param readCatalogsRequest (optional) - * @return ApiResponse<ReadCatalogsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readCatalogsWithHttpInfo( - ReadCatalogsRequest readCatalogsRequest) throws ApiException { - okhttp3.Call localVarCall = readCatalogsValidateBeforeCall(readCatalogsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readCatalogsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readCatalogsAsync( - ReadCatalogsRequest readCatalogsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readCatalogsValidateBeforeCall(readCatalogsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApi.java deleted file mode 100644 index ec5f390e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApi.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ClientGatewayApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ClientGatewayApi() { - this(Configuration.getDefaultApiClient()); - } - - public ClientGatewayApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createClientGateway - * - * @param createClientGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createClientGatewayCall( - CreateClientGatewayRequest createClientGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createClientGatewayRequest; - - // create path and map variables - String localVarPath = "/CreateClientGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createClientGatewayValidateBeforeCall( - CreateClientGatewayRequest createClientGatewayRequest, final ApiCallback _callback) - throws ApiException { - return createClientGatewayCall(createClientGatewayRequest, _callback); - } - - /** - * @param createClientGatewayRequest (optional) - * @return CreateClientGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateClientGatewayResponse createClientGateway( - CreateClientGatewayRequest createClientGatewayRequest) throws ApiException { - ApiResponse localVarResp = - createClientGatewayWithHttpInfo(createClientGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param createClientGatewayRequest (optional) - * @return ApiResponse<CreateClientGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createClientGatewayWithHttpInfo( - CreateClientGatewayRequest createClientGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - createClientGatewayValidateBeforeCall(createClientGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createClientGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createClientGatewayAsync( - CreateClientGatewayRequest createClientGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createClientGatewayValidateBeforeCall(createClientGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteClientGateway - * - * @param deleteClientGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteClientGatewayCall( - DeleteClientGatewayRequest deleteClientGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteClientGatewayRequest; - - // create path and map variables - String localVarPath = "/DeleteClientGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteClientGatewayValidateBeforeCall( - DeleteClientGatewayRequest deleteClientGatewayRequest, final ApiCallback _callback) - throws ApiException { - return deleteClientGatewayCall(deleteClientGatewayRequest, _callback); - } - - /** - * @param deleteClientGatewayRequest (optional) - * @return DeleteClientGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteClientGatewayResponse deleteClientGateway( - DeleteClientGatewayRequest deleteClientGatewayRequest) throws ApiException { - ApiResponse localVarResp = - deleteClientGatewayWithHttpInfo(deleteClientGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param deleteClientGatewayRequest (optional) - * @return ApiResponse<DeleteClientGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteClientGatewayWithHttpInfo( - DeleteClientGatewayRequest deleteClientGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteClientGatewayValidateBeforeCall(deleteClientGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteClientGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteClientGatewayAsync( - DeleteClientGatewayRequest deleteClientGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteClientGatewayValidateBeforeCall(deleteClientGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readClientGateways - * - * @param readClientGatewaysRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readClientGatewaysCall( - ReadClientGatewaysRequest readClientGatewaysRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readClientGatewaysRequest; - - // create path and map variables - String localVarPath = "/ReadClientGateways"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readClientGatewaysValidateBeforeCall( - ReadClientGatewaysRequest readClientGatewaysRequest, final ApiCallback _callback) - throws ApiException { - return readClientGatewaysCall(readClientGatewaysRequest, _callback); - } - - /** - * @param readClientGatewaysRequest (optional) - * @return ReadClientGatewaysResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadClientGatewaysResponse readClientGateways( - ReadClientGatewaysRequest readClientGatewaysRequest) throws ApiException { - ApiResponse localVarResp = - readClientGatewaysWithHttpInfo(readClientGatewaysRequest); - return localVarResp.getData(); - } - - /** - * @param readClientGatewaysRequest (optional) - * @return ApiResponse<ReadClientGatewaysResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readClientGatewaysWithHttpInfo( - ReadClientGatewaysRequest readClientGatewaysRequest) throws ApiException { - okhttp3.Call localVarCall = - readClientGatewaysValidateBeforeCall(readClientGatewaysRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readClientGatewaysRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readClientGatewaysAsync( - ReadClientGatewaysRequest readClientGatewaysRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readClientGatewaysValidateBeforeCall(readClientGatewaysRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApi.java deleted file mode 100644 index a9c12cac..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApi.java +++ /dev/null @@ -1,669 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DedicatedGroupApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DedicatedGroupApi() { - this(Configuration.getDefaultApiClient()); - } - - public DedicatedGroupApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createDedicatedGroup - * - * @param createDedicatedGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createDedicatedGroupCall( - CreateDedicatedGroupRequest createDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createDedicatedGroupRequest; - - // create path and map variables - String localVarPath = "/CreateDedicatedGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDedicatedGroupValidateBeforeCall( - CreateDedicatedGroupRequest createDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - return createDedicatedGroupCall(createDedicatedGroupRequest, _callback); - } - - /** - * @param createDedicatedGroupRequest (optional) - * @return CreateDedicatedGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateDedicatedGroupResponse createDedicatedGroup( - CreateDedicatedGroupRequest createDedicatedGroupRequest) throws ApiException { - ApiResponse localVarResp = - createDedicatedGroupWithHttpInfo(createDedicatedGroupRequest); - return localVarResp.getData(); - } - - /** - * @param createDedicatedGroupRequest (optional) - * @return ApiResponse<CreateDedicatedGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createDedicatedGroupWithHttpInfo( - CreateDedicatedGroupRequest createDedicatedGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - createDedicatedGroupValidateBeforeCall(createDedicatedGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createDedicatedGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createDedicatedGroupAsync( - CreateDedicatedGroupRequest createDedicatedGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createDedicatedGroupValidateBeforeCall(createDedicatedGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDedicatedGroup - * - * @param deleteDedicatedGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteDedicatedGroupCall( - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteDedicatedGroupRequest; - - // create path and map variables - String localVarPath = "/DeleteDedicatedGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDedicatedGroupValidateBeforeCall( - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - return deleteDedicatedGroupCall(deleteDedicatedGroupRequest, _callback); - } - - /** - * @param deleteDedicatedGroupRequest (optional) - * @return DeleteDedicatedGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteDedicatedGroupResponse deleteDedicatedGroup( - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest) throws ApiException { - ApiResponse localVarResp = - deleteDedicatedGroupWithHttpInfo(deleteDedicatedGroupRequest); - return localVarResp.getData(); - } - - /** - * @param deleteDedicatedGroupRequest (optional) - * @return ApiResponse<DeleteDedicatedGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteDedicatedGroupWithHttpInfo( - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteDedicatedGroupValidateBeforeCall(deleteDedicatedGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteDedicatedGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteDedicatedGroupAsync( - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteDedicatedGroupValidateBeforeCall(deleteDedicatedGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readDedicatedGroups - * - * @param readDedicatedGroupsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readDedicatedGroupsCall( - ReadDedicatedGroupsRequest readDedicatedGroupsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readDedicatedGroupsRequest; - - // create path and map variables - String localVarPath = "/ReadDedicatedGroups"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readDedicatedGroupsValidateBeforeCall( - ReadDedicatedGroupsRequest readDedicatedGroupsRequest, final ApiCallback _callback) - throws ApiException { - return readDedicatedGroupsCall(readDedicatedGroupsRequest, _callback); - } - - /** - * @param readDedicatedGroupsRequest (optional) - * @return ReadDedicatedGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadDedicatedGroupsResponse readDedicatedGroups( - ReadDedicatedGroupsRequest readDedicatedGroupsRequest) throws ApiException { - ApiResponse localVarResp = - readDedicatedGroupsWithHttpInfo(readDedicatedGroupsRequest); - return localVarResp.getData(); - } - - /** - * @param readDedicatedGroupsRequest (optional) - * @return ApiResponse<ReadDedicatedGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readDedicatedGroupsWithHttpInfo( - ReadDedicatedGroupsRequest readDedicatedGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - readDedicatedGroupsValidateBeforeCall(readDedicatedGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readDedicatedGroupsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readDedicatedGroupsAsync( - ReadDedicatedGroupsRequest readDedicatedGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readDedicatedGroupsValidateBeforeCall(readDedicatedGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateDedicatedGroup - * - * @param updateDedicatedGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateDedicatedGroupCall( - UpdateDedicatedGroupRequest updateDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateDedicatedGroupRequest; - - // create path and map variables - String localVarPath = "/UpdateDedicatedGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateDedicatedGroupValidateBeforeCall( - UpdateDedicatedGroupRequest updateDedicatedGroupRequest, final ApiCallback _callback) - throws ApiException { - return updateDedicatedGroupCall(updateDedicatedGroupRequest, _callback); - } - - /** - * @param updateDedicatedGroupRequest (optional) - * @return UpdateDedicatedGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateDedicatedGroupResponse updateDedicatedGroup( - UpdateDedicatedGroupRequest updateDedicatedGroupRequest) throws ApiException { - ApiResponse localVarResp = - updateDedicatedGroupWithHttpInfo(updateDedicatedGroupRequest); - return localVarResp.getData(); - } - - /** - * @param updateDedicatedGroupRequest (optional) - * @return ApiResponse<UpdateDedicatedGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateDedicatedGroupWithHttpInfo( - UpdateDedicatedGroupRequest updateDedicatedGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - updateDedicatedGroupValidateBeforeCall(updateDedicatedGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateDedicatedGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateDedicatedGroupAsync( - UpdateDedicatedGroupRequest updateDedicatedGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateDedicatedGroupValidateBeforeCall(updateDedicatedGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApi.java deleted file mode 100644 index 19c8e355..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApi.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DhcpOptionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DhcpOptionApi() { - this(Configuration.getDefaultApiClient()); - } - - public DhcpOptionApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createDhcpOptions - * - * @param createDhcpOptionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDhcpOptionsCall( - CreateDhcpOptionsRequest createDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createDhcpOptionsRequest; - - // create path and map variables - String localVarPath = "/CreateDhcpOptions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDhcpOptionsValidateBeforeCall( - CreateDhcpOptionsRequest createDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - return createDhcpOptionsCall(createDhcpOptionsRequest, _callback); - } - - /** - * @param createDhcpOptionsRequest (optional) - * @return CreateDhcpOptionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateDhcpOptionsResponse createDhcpOptions( - CreateDhcpOptionsRequest createDhcpOptionsRequest) throws ApiException { - ApiResponse localVarResp = - createDhcpOptionsWithHttpInfo(createDhcpOptionsRequest); - return localVarResp.getData(); - } - - /** - * @param createDhcpOptionsRequest (optional) - * @return ApiResponse<CreateDhcpOptionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createDhcpOptionsWithHttpInfo( - CreateDhcpOptionsRequest createDhcpOptionsRequest) throws ApiException { - okhttp3.Call localVarCall = - createDhcpOptionsValidateBeforeCall(createDhcpOptionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createDhcpOptionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDhcpOptionsAsync( - CreateDhcpOptionsRequest createDhcpOptionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createDhcpOptionsValidateBeforeCall(createDhcpOptionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDhcpOptions - * - * @param deleteDhcpOptionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDhcpOptionsCall( - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteDhcpOptionsRequest; - - // create path and map variables - String localVarPath = "/DeleteDhcpOptions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDhcpOptionsValidateBeforeCall( - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - return deleteDhcpOptionsCall(deleteDhcpOptionsRequest, _callback); - } - - /** - * @param deleteDhcpOptionsRequest (optional) - * @return DeleteDhcpOptionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteDhcpOptionsResponse deleteDhcpOptions( - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest) throws ApiException { - ApiResponse localVarResp = - deleteDhcpOptionsWithHttpInfo(deleteDhcpOptionsRequest); - return localVarResp.getData(); - } - - /** - * @param deleteDhcpOptionsRequest (optional) - * @return ApiResponse<DeleteDhcpOptionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteDhcpOptionsWithHttpInfo( - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteDhcpOptionsValidateBeforeCall(deleteDhcpOptionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteDhcpOptionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDhcpOptionsAsync( - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteDhcpOptionsValidateBeforeCall(deleteDhcpOptionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readDhcpOptions - * - * @param readDhcpOptionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDhcpOptionsCall( - ReadDhcpOptionsRequest readDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readDhcpOptionsRequest; - - // create path and map variables - String localVarPath = "/ReadDhcpOptions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readDhcpOptionsValidateBeforeCall( - ReadDhcpOptionsRequest readDhcpOptionsRequest, final ApiCallback _callback) - throws ApiException { - return readDhcpOptionsCall(readDhcpOptionsRequest, _callback); - } - - /** - * @param readDhcpOptionsRequest (optional) - * @return ReadDhcpOptionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadDhcpOptionsResponse readDhcpOptions(ReadDhcpOptionsRequest readDhcpOptionsRequest) - throws ApiException { - ApiResponse localVarResp = - readDhcpOptionsWithHttpInfo(readDhcpOptionsRequest); - return localVarResp.getData(); - } - - /** - * @param readDhcpOptionsRequest (optional) - * @return ApiResponse<ReadDhcpOptionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readDhcpOptionsWithHttpInfo( - ReadDhcpOptionsRequest readDhcpOptionsRequest) throws ApiException { - okhttp3.Call localVarCall = readDhcpOptionsValidateBeforeCall(readDhcpOptionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readDhcpOptionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDhcpOptionsAsync( - ReadDhcpOptionsRequest readDhcpOptionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readDhcpOptionsValidateBeforeCall(readDhcpOptionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApi.java deleted file mode 100644 index b1f9192b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApi.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DirectLinkApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DirectLinkApi() { - this(Configuration.getDefaultApiClient()); - } - - public DirectLinkApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createDirectLink - * - * @param createDirectLinkRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDirectLinkCall( - CreateDirectLinkRequest createDirectLinkRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createDirectLinkRequest; - - // create path and map variables - String localVarPath = "/CreateDirectLink"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDirectLinkValidateBeforeCall( - CreateDirectLinkRequest createDirectLinkRequest, final ApiCallback _callback) - throws ApiException { - return createDirectLinkCall(createDirectLinkRequest, _callback); - } - - /** - * @param createDirectLinkRequest (optional) - * @return CreateDirectLinkResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateDirectLinkResponse createDirectLink( - CreateDirectLinkRequest createDirectLinkRequest) throws ApiException { - ApiResponse localVarResp = - createDirectLinkWithHttpInfo(createDirectLinkRequest); - return localVarResp.getData(); - } - - /** - * @param createDirectLinkRequest (optional) - * @return ApiResponse<CreateDirectLinkResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createDirectLinkWithHttpInfo( - CreateDirectLinkRequest createDirectLinkRequest) throws ApiException { - okhttp3.Call localVarCall = - createDirectLinkValidateBeforeCall(createDirectLinkRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createDirectLinkRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDirectLinkAsync( - CreateDirectLinkRequest createDirectLinkRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createDirectLinkValidateBeforeCall(createDirectLinkRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDirectLink - * - * @param deleteDirectLinkRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDirectLinkCall( - DeleteDirectLinkRequest deleteDirectLinkRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteDirectLinkRequest; - - // create path and map variables - String localVarPath = "/DeleteDirectLink"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDirectLinkValidateBeforeCall( - DeleteDirectLinkRequest deleteDirectLinkRequest, final ApiCallback _callback) - throws ApiException { - return deleteDirectLinkCall(deleteDirectLinkRequest, _callback); - } - - /** - * @param deleteDirectLinkRequest (optional) - * @return DeleteDirectLinkResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteDirectLinkResponse deleteDirectLink( - DeleteDirectLinkRequest deleteDirectLinkRequest) throws ApiException { - ApiResponse localVarResp = - deleteDirectLinkWithHttpInfo(deleteDirectLinkRequest); - return localVarResp.getData(); - } - - /** - * @param deleteDirectLinkRequest (optional) - * @return ApiResponse<DeleteDirectLinkResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteDirectLinkWithHttpInfo( - DeleteDirectLinkRequest deleteDirectLinkRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteDirectLinkValidateBeforeCall(deleteDirectLinkRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteDirectLinkRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDirectLinkAsync( - DeleteDirectLinkRequest deleteDirectLinkRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteDirectLinkValidateBeforeCall(deleteDirectLinkRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readDirectLinks - * - * @param readDirectLinksRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDirectLinksCall( - ReadDirectLinksRequest readDirectLinksRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readDirectLinksRequest; - - // create path and map variables - String localVarPath = "/ReadDirectLinks"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readDirectLinksValidateBeforeCall( - ReadDirectLinksRequest readDirectLinksRequest, final ApiCallback _callback) - throws ApiException { - return readDirectLinksCall(readDirectLinksRequest, _callback); - } - - /** - * @param readDirectLinksRequest (optional) - * @return ReadDirectLinksResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadDirectLinksResponse readDirectLinks(ReadDirectLinksRequest readDirectLinksRequest) - throws ApiException { - ApiResponse localVarResp = - readDirectLinksWithHttpInfo(readDirectLinksRequest); - return localVarResp.getData(); - } - - /** - * @param readDirectLinksRequest (optional) - * @return ApiResponse<ReadDirectLinksResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readDirectLinksWithHttpInfo( - ReadDirectLinksRequest readDirectLinksRequest) throws ApiException { - okhttp3.Call localVarCall = readDirectLinksValidateBeforeCall(readDirectLinksRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readDirectLinksRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDirectLinksAsync( - ReadDirectLinksRequest readDirectLinksRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readDirectLinksValidateBeforeCall(readDirectLinksRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApi.java deleted file mode 100644 index 9f745000..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApi.java +++ /dev/null @@ -1,633 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DirectLinkInterfaceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DirectLinkInterfaceApi() { - this(Configuration.getDefaultApiClient()); - } - - public DirectLinkInterfaceApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createDirectLinkInterface - * - * @param createDirectLinkInterfaceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDirectLinkInterfaceCall( - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createDirectLinkInterfaceRequest; - - // create path and map variables - String localVarPath = "/CreateDirectLinkInterface"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDirectLinkInterfaceValidateBeforeCall( - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - return createDirectLinkInterfaceCall(createDirectLinkInterfaceRequest, _callback); - } - - /** - * @param createDirectLinkInterfaceRequest (optional) - * @return CreateDirectLinkInterfaceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateDirectLinkInterfaceResponse createDirectLinkInterface( - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest) throws ApiException { - ApiResponse localVarResp = - createDirectLinkInterfaceWithHttpInfo(createDirectLinkInterfaceRequest); - return localVarResp.getData(); - } - - /** - * @param createDirectLinkInterfaceRequest (optional) - * @return ApiResponse<CreateDirectLinkInterfaceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createDirectLinkInterfaceWithHttpInfo( - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest) throws ApiException { - okhttp3.Call localVarCall = - createDirectLinkInterfaceValidateBeforeCall(createDirectLinkInterfaceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createDirectLinkInterfaceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createDirectLinkInterfaceAsync( - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createDirectLinkInterfaceValidateBeforeCall( - createDirectLinkInterfaceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDirectLinkInterface - * - * @param deleteDirectLinkInterfaceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDirectLinkInterfaceCall( - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteDirectLinkInterfaceRequest; - - // create path and map variables - String localVarPath = "/DeleteDirectLinkInterface"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDirectLinkInterfaceValidateBeforeCall( - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - return deleteDirectLinkInterfaceCall(deleteDirectLinkInterfaceRequest, _callback); - } - - /** - * @param deleteDirectLinkInterfaceRequest (optional) - * @return DeleteDirectLinkInterfaceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteDirectLinkInterfaceResponse deleteDirectLinkInterface( - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest) throws ApiException { - ApiResponse localVarResp = - deleteDirectLinkInterfaceWithHttpInfo(deleteDirectLinkInterfaceRequest); - return localVarResp.getData(); - } - - /** - * @param deleteDirectLinkInterfaceRequest (optional) - * @return ApiResponse<DeleteDirectLinkInterfaceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteDirectLinkInterfaceWithHttpInfo( - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteDirectLinkInterfaceValidateBeforeCall(deleteDirectLinkInterfaceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteDirectLinkInterfaceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteDirectLinkInterfaceAsync( - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteDirectLinkInterfaceValidateBeforeCall( - deleteDirectLinkInterfaceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readDirectLinkInterfaces - * - * @param readDirectLinkInterfacesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDirectLinkInterfacesCall( - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readDirectLinkInterfacesRequest; - - // create path and map variables - String localVarPath = "/ReadDirectLinkInterfaces"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readDirectLinkInterfacesValidateBeforeCall( - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest, - final ApiCallback _callback) - throws ApiException { - return readDirectLinkInterfacesCall(readDirectLinkInterfacesRequest, _callback); - } - - /** - * @param readDirectLinkInterfacesRequest (optional) - * @return ReadDirectLinkInterfacesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadDirectLinkInterfacesResponse readDirectLinkInterfaces( - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest) throws ApiException { - ApiResponse localVarResp = - readDirectLinkInterfacesWithHttpInfo(readDirectLinkInterfacesRequest); - return localVarResp.getData(); - } - - /** - * @param readDirectLinkInterfacesRequest (optional) - * @return ApiResponse<ReadDirectLinkInterfacesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readDirectLinkInterfacesWithHttpInfo( - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest) throws ApiException { - okhttp3.Call localVarCall = - readDirectLinkInterfacesValidateBeforeCall(readDirectLinkInterfacesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readDirectLinkInterfacesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readDirectLinkInterfacesAsync( - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readDirectLinkInterfacesValidateBeforeCall( - readDirectLinkInterfacesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateDirectLinkInterface - * - * @param updateDirectLinkInterfaceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateDirectLinkInterfaceCall( - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateDirectLinkInterfaceRequest; - - // create path and map variables - String localVarPath = "/UpdateDirectLinkInterface"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateDirectLinkInterfaceValidateBeforeCall( - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - return updateDirectLinkInterfaceCall(updateDirectLinkInterfaceRequest, _callback); - } - - /** - * @param updateDirectLinkInterfaceRequest (optional) - * @return UpdateDirectLinkInterfaceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateDirectLinkInterfaceResponse updateDirectLinkInterface( - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest) throws ApiException { - ApiResponse localVarResp = - updateDirectLinkInterfaceWithHttpInfo(updateDirectLinkInterfaceRequest); - return localVarResp.getData(); - } - - /** - * @param updateDirectLinkInterfaceRequest (optional) - * @return ApiResponse<UpdateDirectLinkInterfaceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateDirectLinkInterfaceWithHttpInfo( - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest) throws ApiException { - okhttp3.Call localVarCall = - updateDirectLinkInterfaceValidateBeforeCall(updateDirectLinkInterfaceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateDirectLinkInterfaceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateDirectLinkInterfaceAsync( - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateDirectLinkInterfaceValidateBeforeCall( - updateDirectLinkInterfaceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApi.java deleted file mode 100644 index 62260e52..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApi.java +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FlexibleGpuApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FlexibleGpuApi() { - this(Configuration.getDefaultApiClient()); - } - - public FlexibleGpuApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createFlexibleGpu - * - * @param createFlexibleGpuRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createFlexibleGpuCall( - CreateFlexibleGpuRequest createFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createFlexibleGpuRequest; - - // create path and map variables - String localVarPath = "/CreateFlexibleGpu"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createFlexibleGpuValidateBeforeCall( - CreateFlexibleGpuRequest createFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - return createFlexibleGpuCall(createFlexibleGpuRequest, _callback); - } - - /** - * @param createFlexibleGpuRequest (optional) - * @return CreateFlexibleGpuResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateFlexibleGpuResponse createFlexibleGpu( - CreateFlexibleGpuRequest createFlexibleGpuRequest) throws ApiException { - ApiResponse localVarResp = - createFlexibleGpuWithHttpInfo(createFlexibleGpuRequest); - return localVarResp.getData(); - } - - /** - * @param createFlexibleGpuRequest (optional) - * @return ApiResponse<CreateFlexibleGpuResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createFlexibleGpuWithHttpInfo( - CreateFlexibleGpuRequest createFlexibleGpuRequest) throws ApiException { - okhttp3.Call localVarCall = - createFlexibleGpuValidateBeforeCall(createFlexibleGpuRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createFlexibleGpuRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createFlexibleGpuAsync( - CreateFlexibleGpuRequest createFlexibleGpuRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createFlexibleGpuValidateBeforeCall(createFlexibleGpuRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteFlexibleGpu - * - * @param deleteFlexibleGpuRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteFlexibleGpuCall( - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteFlexibleGpuRequest; - - // create path and map variables - String localVarPath = "/DeleteFlexibleGpu"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteFlexibleGpuValidateBeforeCall( - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - return deleteFlexibleGpuCall(deleteFlexibleGpuRequest, _callback); - } - - /** - * @param deleteFlexibleGpuRequest (optional) - * @return DeleteFlexibleGpuResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteFlexibleGpuResponse deleteFlexibleGpu( - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest) throws ApiException { - ApiResponse localVarResp = - deleteFlexibleGpuWithHttpInfo(deleteFlexibleGpuRequest); - return localVarResp.getData(); - } - - /** - * @param deleteFlexibleGpuRequest (optional) - * @return ApiResponse<DeleteFlexibleGpuResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteFlexibleGpuWithHttpInfo( - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteFlexibleGpuValidateBeforeCall(deleteFlexibleGpuRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteFlexibleGpuRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteFlexibleGpuAsync( - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteFlexibleGpuValidateBeforeCall(deleteFlexibleGpuRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkFlexibleGpu - * - * @param linkFlexibleGpuRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkFlexibleGpuCall( - LinkFlexibleGpuRequest linkFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkFlexibleGpuRequest; - - // create path and map variables - String localVarPath = "/LinkFlexibleGpu"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkFlexibleGpuValidateBeforeCall( - LinkFlexibleGpuRequest linkFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - return linkFlexibleGpuCall(linkFlexibleGpuRequest, _callback); - } - - /** - * @param linkFlexibleGpuRequest (optional) - * @return LinkFlexibleGpuResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public LinkFlexibleGpuResponse linkFlexibleGpu(LinkFlexibleGpuRequest linkFlexibleGpuRequest) - throws ApiException { - ApiResponse localVarResp = - linkFlexibleGpuWithHttpInfo(linkFlexibleGpuRequest); - return localVarResp.getData(); - } - - /** - * @param linkFlexibleGpuRequest (optional) - * @return ApiResponse<LinkFlexibleGpuResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse linkFlexibleGpuWithHttpInfo( - LinkFlexibleGpuRequest linkFlexibleGpuRequest) throws ApiException { - okhttp3.Call localVarCall = linkFlexibleGpuValidateBeforeCall(linkFlexibleGpuRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkFlexibleGpuRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkFlexibleGpuAsync( - LinkFlexibleGpuRequest linkFlexibleGpuRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkFlexibleGpuValidateBeforeCall(linkFlexibleGpuRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readFlexibleGpuCatalog - * - * @param readFlexibleGpuCatalogRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readFlexibleGpuCatalogCall( - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readFlexibleGpuCatalogRequest; - - // create path and map variables - String localVarPath = "/ReadFlexibleGpuCatalog"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readFlexibleGpuCatalogValidateBeforeCall( - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest, - final ApiCallback _callback) - throws ApiException { - return readFlexibleGpuCatalogCall(readFlexibleGpuCatalogRequest, _callback); - } - - /** - * @param readFlexibleGpuCatalogRequest (optional) - * @return ReadFlexibleGpuCatalogResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadFlexibleGpuCatalogResponse readFlexibleGpuCatalog( - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest) throws ApiException { - ApiResponse localVarResp = - readFlexibleGpuCatalogWithHttpInfo(readFlexibleGpuCatalogRequest); - return localVarResp.getData(); - } - - /** - * @param readFlexibleGpuCatalogRequest (optional) - * @return ApiResponse<ReadFlexibleGpuCatalogResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readFlexibleGpuCatalogWithHttpInfo( - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = - readFlexibleGpuCatalogValidateBeforeCall(readFlexibleGpuCatalogRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readFlexibleGpuCatalogRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readFlexibleGpuCatalogAsync( - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readFlexibleGpuCatalogValidateBeforeCall(readFlexibleGpuCatalogRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readFlexibleGpus - * - * @param readFlexibleGpusRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readFlexibleGpusCall( - ReadFlexibleGpusRequest readFlexibleGpusRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readFlexibleGpusRequest; - - // create path and map variables - String localVarPath = "/ReadFlexibleGpus"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readFlexibleGpusValidateBeforeCall( - ReadFlexibleGpusRequest readFlexibleGpusRequest, final ApiCallback _callback) - throws ApiException { - return readFlexibleGpusCall(readFlexibleGpusRequest, _callback); - } - - /** - * @param readFlexibleGpusRequest (optional) - * @return ReadFlexibleGpusResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadFlexibleGpusResponse readFlexibleGpus( - ReadFlexibleGpusRequest readFlexibleGpusRequest) throws ApiException { - ApiResponse localVarResp = - readFlexibleGpusWithHttpInfo(readFlexibleGpusRequest); - return localVarResp.getData(); - } - - /** - * @param readFlexibleGpusRequest (optional) - * @return ApiResponse<ReadFlexibleGpusResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readFlexibleGpusWithHttpInfo( - ReadFlexibleGpusRequest readFlexibleGpusRequest) throws ApiException { - okhttp3.Call localVarCall = - readFlexibleGpusValidateBeforeCall(readFlexibleGpusRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readFlexibleGpusRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readFlexibleGpusAsync( - ReadFlexibleGpusRequest readFlexibleGpusRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readFlexibleGpusValidateBeforeCall(readFlexibleGpusRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkFlexibleGpu - * - * @param unlinkFlexibleGpuRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkFlexibleGpuCall( - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkFlexibleGpuRequest; - - // create path and map variables - String localVarPath = "/UnlinkFlexibleGpu"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkFlexibleGpuValidateBeforeCall( - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - return unlinkFlexibleGpuCall(unlinkFlexibleGpuRequest, _callback); - } - - /** - * @param unlinkFlexibleGpuRequest (optional) - * @return UnlinkFlexibleGpuResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UnlinkFlexibleGpuResponse unlinkFlexibleGpu( - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest) throws ApiException { - ApiResponse localVarResp = - unlinkFlexibleGpuWithHttpInfo(unlinkFlexibleGpuRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkFlexibleGpuRequest (optional) - * @return ApiResponse<UnlinkFlexibleGpuResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse unlinkFlexibleGpuWithHttpInfo( - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest) throws ApiException { - okhttp3.Call localVarCall = - unlinkFlexibleGpuValidateBeforeCall(unlinkFlexibleGpuRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkFlexibleGpuRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkFlexibleGpuAsync( - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkFlexibleGpuValidateBeforeCall(unlinkFlexibleGpuRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateFlexibleGpu - * - * @param updateFlexibleGpuRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateFlexibleGpuCall( - UpdateFlexibleGpuRequest updateFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateFlexibleGpuRequest; - - // create path and map variables - String localVarPath = "/UpdateFlexibleGpu"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateFlexibleGpuValidateBeforeCall( - UpdateFlexibleGpuRequest updateFlexibleGpuRequest, final ApiCallback _callback) - throws ApiException { - return updateFlexibleGpuCall(updateFlexibleGpuRequest, _callback); - } - - /** - * @param updateFlexibleGpuRequest (optional) - * @return UpdateFlexibleGpuResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateFlexibleGpuResponse updateFlexibleGpu( - UpdateFlexibleGpuRequest updateFlexibleGpuRequest) throws ApiException { - ApiResponse localVarResp = - updateFlexibleGpuWithHttpInfo(updateFlexibleGpuRequest); - return localVarResp.getData(); - } - - /** - * @param updateFlexibleGpuRequest (optional) - * @return ApiResponse<UpdateFlexibleGpuResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateFlexibleGpuWithHttpInfo( - UpdateFlexibleGpuRequest updateFlexibleGpuRequest) throws ApiException { - okhttp3.Call localVarCall = - updateFlexibleGpuValidateBeforeCall(updateFlexibleGpuRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateFlexibleGpuRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateFlexibleGpuAsync( - UpdateFlexibleGpuRequest updateFlexibleGpuRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateFlexibleGpuValidateBeforeCall(updateFlexibleGpuRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ImageApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ImageApi.java deleted file mode 100644 index e2a2d0be..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ImageApi.java +++ /dev/null @@ -1,928 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateImageRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateImageResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteImageRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteImageResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadImagesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadImagesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateImageRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateImageResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ImageApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ImageApi() { - this(Configuration.getDefaultApiClient()); - } - - public ImageApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createImage - * - * @param createImageRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createImageCall( - CreateImageRequest createImageRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createImageRequest; - - // create path and map variables - String localVarPath = "/CreateImage"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createImageValidateBeforeCall( - CreateImageRequest createImageRequest, final ApiCallback _callback) - throws ApiException { - return createImageCall(createImageRequest, _callback); - } - - /** - * @param createImageRequest (optional) - * @return CreateImageResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateImageResponse createImage(CreateImageRequest createImageRequest) - throws ApiException { - ApiResponse localVarResp = createImageWithHttpInfo(createImageRequest); - return localVarResp.getData(); - } - - /** - * @param createImageRequest (optional) - * @return ApiResponse<CreateImageResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createImageWithHttpInfo( - CreateImageRequest createImageRequest) throws ApiException { - okhttp3.Call localVarCall = createImageValidateBeforeCall(createImageRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createImageRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createImageAsync( - CreateImageRequest createImageRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createImageValidateBeforeCall(createImageRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createImageExportTask - * - * @param createImageExportTaskRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createImageExportTaskCall( - CreateImageExportTaskRequest createImageExportTaskRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createImageExportTaskRequest; - - // create path and map variables - String localVarPath = "/CreateImageExportTask"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createImageExportTaskValidateBeforeCall( - CreateImageExportTaskRequest createImageExportTaskRequest, final ApiCallback _callback) - throws ApiException { - return createImageExportTaskCall(createImageExportTaskRequest, _callback); - } - - /** - * @param createImageExportTaskRequest (optional) - * @return CreateImageExportTaskResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateImageExportTaskResponse createImageExportTask( - CreateImageExportTaskRequest createImageExportTaskRequest) throws ApiException { - ApiResponse localVarResp = - createImageExportTaskWithHttpInfo(createImageExportTaskRequest); - return localVarResp.getData(); - } - - /** - * @param createImageExportTaskRequest (optional) - * @return ApiResponse<CreateImageExportTaskResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createImageExportTaskWithHttpInfo( - CreateImageExportTaskRequest createImageExportTaskRequest) throws ApiException { - okhttp3.Call localVarCall = - createImageExportTaskValidateBeforeCall(createImageExportTaskRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createImageExportTaskRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createImageExportTaskAsync( - CreateImageExportTaskRequest createImageExportTaskRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createImageExportTaskValidateBeforeCall(createImageExportTaskRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteImage - * - * @param deleteImageRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteImageCall( - DeleteImageRequest deleteImageRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteImageRequest; - - // create path and map variables - String localVarPath = "/DeleteImage"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteImageValidateBeforeCall( - DeleteImageRequest deleteImageRequest, final ApiCallback _callback) - throws ApiException { - return deleteImageCall(deleteImageRequest, _callback); - } - - /** - * @param deleteImageRequest (optional) - * @return DeleteImageResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteImageResponse deleteImage(DeleteImageRequest deleteImageRequest) - throws ApiException { - ApiResponse localVarResp = deleteImageWithHttpInfo(deleteImageRequest); - return localVarResp.getData(); - } - - /** - * @param deleteImageRequest (optional) - * @return ApiResponse<DeleteImageResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteImageWithHttpInfo( - DeleteImageRequest deleteImageRequest) throws ApiException { - okhttp3.Call localVarCall = deleteImageValidateBeforeCall(deleteImageRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteImageRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteImageAsync( - DeleteImageRequest deleteImageRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteImageValidateBeforeCall(deleteImageRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readImageExportTasks - * - * @param readImageExportTasksRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readImageExportTasksCall( - ReadImageExportTasksRequest readImageExportTasksRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readImageExportTasksRequest; - - // create path and map variables - String localVarPath = "/ReadImageExportTasks"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readImageExportTasksValidateBeforeCall( - ReadImageExportTasksRequest readImageExportTasksRequest, final ApiCallback _callback) - throws ApiException { - return readImageExportTasksCall(readImageExportTasksRequest, _callback); - } - - /** - * @param readImageExportTasksRequest (optional) - * @return ReadImageExportTasksResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadImageExportTasksResponse readImageExportTasks( - ReadImageExportTasksRequest readImageExportTasksRequest) throws ApiException { - ApiResponse localVarResp = - readImageExportTasksWithHttpInfo(readImageExportTasksRequest); - return localVarResp.getData(); - } - - /** - * @param readImageExportTasksRequest (optional) - * @return ApiResponse<ReadImageExportTasksResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readImageExportTasksWithHttpInfo( - ReadImageExportTasksRequest readImageExportTasksRequest) throws ApiException { - okhttp3.Call localVarCall = - readImageExportTasksValidateBeforeCall(readImageExportTasksRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readImageExportTasksRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readImageExportTasksAsync( - ReadImageExportTasksRequest readImageExportTasksRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readImageExportTasksValidateBeforeCall(readImageExportTasksRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readImages - * - * @param readImagesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readImagesCall( - ReadImagesRequest readImagesRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readImagesRequest; - - // create path and map variables - String localVarPath = "/ReadImages"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readImagesValidateBeforeCall( - ReadImagesRequest readImagesRequest, final ApiCallback _callback) throws ApiException { - return readImagesCall(readImagesRequest, _callback); - } - - /** - * @param readImagesRequest (optional) - * @return ReadImagesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadImagesResponse readImages(ReadImagesRequest readImagesRequest) throws ApiException { - ApiResponse localVarResp = readImagesWithHttpInfo(readImagesRequest); - return localVarResp.getData(); - } - - /** - * @param readImagesRequest (optional) - * @return ApiResponse<ReadImagesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readImagesWithHttpInfo( - ReadImagesRequest readImagesRequest) throws ApiException { - okhttp3.Call localVarCall = readImagesValidateBeforeCall(readImagesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readImagesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readImagesAsync( - ReadImagesRequest readImagesRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readImagesValidateBeforeCall(readImagesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateImage - * - * @param updateImageRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateImageCall( - UpdateImageRequest updateImageRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateImageRequest; - - // create path and map variables - String localVarPath = "/UpdateImage"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateImageValidateBeforeCall( - UpdateImageRequest updateImageRequest, final ApiCallback _callback) - throws ApiException { - return updateImageCall(updateImageRequest, _callback); - } - - /** - * @param updateImageRequest (optional) - * @return UpdateImageResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateImageResponse updateImage(UpdateImageRequest updateImageRequest) - throws ApiException { - ApiResponse localVarResp = updateImageWithHttpInfo(updateImageRequest); - return localVarResp.getData(); - } - - /** - * @param updateImageRequest (optional) - * @return ApiResponse<UpdateImageResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateImageWithHttpInfo( - UpdateImageRequest updateImageRequest) throws ApiException { - okhttp3.Call localVarCall = updateImageValidateBeforeCall(updateImageRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateImageRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateImageAsync( - UpdateImageRequest updateImageRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateImageValidateBeforeCall(updateImageRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApi.java deleted file mode 100644 index ed40fc7b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApi.java +++ /dev/null @@ -1,820 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class InternetServiceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InternetServiceApi() { - this(Configuration.getDefaultApiClient()); - } - - public InternetServiceApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createInternetService - * - * @param createInternetServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createInternetServiceCall( - CreateInternetServiceRequest createInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createInternetServiceRequest; - - // create path and map variables - String localVarPath = "/CreateInternetService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createInternetServiceValidateBeforeCall( - CreateInternetServiceRequest createInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - return createInternetServiceCall(createInternetServiceRequest, _callback); - } - - /** - * @param createInternetServiceRequest (optional) - * @return CreateInternetServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateInternetServiceResponse createInternetService( - CreateInternetServiceRequest createInternetServiceRequest) throws ApiException { - ApiResponse localVarResp = - createInternetServiceWithHttpInfo(createInternetServiceRequest); - return localVarResp.getData(); - } - - /** - * @param createInternetServiceRequest (optional) - * @return ApiResponse<CreateInternetServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createInternetServiceWithHttpInfo( - CreateInternetServiceRequest createInternetServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - createInternetServiceValidateBeforeCall(createInternetServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createInternetServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createInternetServiceAsync( - CreateInternetServiceRequest createInternetServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createInternetServiceValidateBeforeCall(createInternetServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteInternetService - * - * @param deleteInternetServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteInternetServiceCall( - DeleteInternetServiceRequest deleteInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteInternetServiceRequest; - - // create path and map variables - String localVarPath = "/DeleteInternetService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteInternetServiceValidateBeforeCall( - DeleteInternetServiceRequest deleteInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - return deleteInternetServiceCall(deleteInternetServiceRequest, _callback); - } - - /** - * @param deleteInternetServiceRequest (optional) - * @return DeleteInternetServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteInternetServiceResponse deleteInternetService( - DeleteInternetServiceRequest deleteInternetServiceRequest) throws ApiException { - ApiResponse localVarResp = - deleteInternetServiceWithHttpInfo(deleteInternetServiceRequest); - return localVarResp.getData(); - } - - /** - * @param deleteInternetServiceRequest (optional) - * @return ApiResponse<DeleteInternetServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteInternetServiceWithHttpInfo( - DeleteInternetServiceRequest deleteInternetServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteInternetServiceValidateBeforeCall(deleteInternetServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteInternetServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteInternetServiceAsync( - DeleteInternetServiceRequest deleteInternetServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteInternetServiceValidateBeforeCall(deleteInternetServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkInternetService - * - * @param linkInternetServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkInternetServiceCall( - LinkInternetServiceRequest linkInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkInternetServiceRequest; - - // create path and map variables - String localVarPath = "/LinkInternetService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkInternetServiceValidateBeforeCall( - LinkInternetServiceRequest linkInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - return linkInternetServiceCall(linkInternetServiceRequest, _callback); - } - - /** - * @param linkInternetServiceRequest (optional) - * @return LinkInternetServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkInternetServiceResponse linkInternetService( - LinkInternetServiceRequest linkInternetServiceRequest) throws ApiException { - ApiResponse localVarResp = - linkInternetServiceWithHttpInfo(linkInternetServiceRequest); - return localVarResp.getData(); - } - - /** - * @param linkInternetServiceRequest (optional) - * @return ApiResponse<LinkInternetServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkInternetServiceWithHttpInfo( - LinkInternetServiceRequest linkInternetServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - linkInternetServiceValidateBeforeCall(linkInternetServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkInternetServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkInternetServiceAsync( - LinkInternetServiceRequest linkInternetServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkInternetServiceValidateBeforeCall(linkInternetServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readInternetServices - * - * @param readInternetServicesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readInternetServicesCall( - ReadInternetServicesRequest readInternetServicesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readInternetServicesRequest; - - // create path and map variables - String localVarPath = "/ReadInternetServices"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readInternetServicesValidateBeforeCall( - ReadInternetServicesRequest readInternetServicesRequest, final ApiCallback _callback) - throws ApiException { - return readInternetServicesCall(readInternetServicesRequest, _callback); - } - - /** - * @param readInternetServicesRequest (optional) - * @return ReadInternetServicesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadInternetServicesResponse readInternetServices( - ReadInternetServicesRequest readInternetServicesRequest) throws ApiException { - ApiResponse localVarResp = - readInternetServicesWithHttpInfo(readInternetServicesRequest); - return localVarResp.getData(); - } - - /** - * @param readInternetServicesRequest (optional) - * @return ApiResponse<ReadInternetServicesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readInternetServicesWithHttpInfo( - ReadInternetServicesRequest readInternetServicesRequest) throws ApiException { - okhttp3.Call localVarCall = - readInternetServicesValidateBeforeCall(readInternetServicesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readInternetServicesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readInternetServicesAsync( - ReadInternetServicesRequest readInternetServicesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readInternetServicesValidateBeforeCall(readInternetServicesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkInternetService - * - * @param unlinkInternetServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkInternetServiceCall( - UnlinkInternetServiceRequest unlinkInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkInternetServiceRequest; - - // create path and map variables - String localVarPath = "/UnlinkInternetService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkInternetServiceValidateBeforeCall( - UnlinkInternetServiceRequest unlinkInternetServiceRequest, final ApiCallback _callback) - throws ApiException { - return unlinkInternetServiceCall(unlinkInternetServiceRequest, _callback); - } - - /** - * @param unlinkInternetServiceRequest (optional) - * @return UnlinkInternetServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkInternetServiceResponse unlinkInternetService( - UnlinkInternetServiceRequest unlinkInternetServiceRequest) throws ApiException { - ApiResponse localVarResp = - unlinkInternetServiceWithHttpInfo(unlinkInternetServiceRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkInternetServiceRequest (optional) - * @return ApiResponse<UnlinkInternetServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkInternetServiceWithHttpInfo( - UnlinkInternetServiceRequest unlinkInternetServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - unlinkInternetServiceValidateBeforeCall(unlinkInternetServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkInternetServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkInternetServiceAsync( - UnlinkInternetServiceRequest unlinkInternetServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkInternetServiceValidateBeforeCall(unlinkInternetServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/KeypairApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/KeypairApi.java deleted file mode 100644 index 7bccff12..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/KeypairApi.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateKeypairRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateKeypairResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteKeypairRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteKeypairResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadKeypairsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadKeypairsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class KeypairApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public KeypairApi() { - this(Configuration.getDefaultApiClient()); - } - - public KeypairApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createKeypair - * - * @param createKeypairRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createKeypairCall( - CreateKeypairRequest createKeypairRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createKeypairRequest; - - // create path and map variables - String localVarPath = "/CreateKeypair"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createKeypairValidateBeforeCall( - CreateKeypairRequest createKeypairRequest, final ApiCallback _callback) - throws ApiException { - return createKeypairCall(createKeypairRequest, _callback); - } - - /** - * @param createKeypairRequest (optional) - * @return CreateKeypairResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateKeypairResponse createKeypair(CreateKeypairRequest createKeypairRequest) - throws ApiException { - ApiResponse localVarResp = - createKeypairWithHttpInfo(createKeypairRequest); - return localVarResp.getData(); - } - - /** - * @param createKeypairRequest (optional) - * @return ApiResponse<CreateKeypairResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createKeypairWithHttpInfo( - CreateKeypairRequest createKeypairRequest) throws ApiException { - okhttp3.Call localVarCall = createKeypairValidateBeforeCall(createKeypairRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createKeypairRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createKeypairAsync( - CreateKeypairRequest createKeypairRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createKeypairValidateBeforeCall(createKeypairRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteKeypair - * - * @param deleteKeypairRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteKeypairCall( - DeleteKeypairRequest deleteKeypairRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteKeypairRequest; - - // create path and map variables - String localVarPath = "/DeleteKeypair"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteKeypairValidateBeforeCall( - DeleteKeypairRequest deleteKeypairRequest, final ApiCallback _callback) - throws ApiException { - return deleteKeypairCall(deleteKeypairRequest, _callback); - } - - /** - * @param deleteKeypairRequest (optional) - * @return DeleteKeypairResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteKeypairResponse deleteKeypair(DeleteKeypairRequest deleteKeypairRequest) - throws ApiException { - ApiResponse localVarResp = - deleteKeypairWithHttpInfo(deleteKeypairRequest); - return localVarResp.getData(); - } - - /** - * @param deleteKeypairRequest (optional) - * @return ApiResponse<DeleteKeypairResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteKeypairWithHttpInfo( - DeleteKeypairRequest deleteKeypairRequest) throws ApiException { - okhttp3.Call localVarCall = deleteKeypairValidateBeforeCall(deleteKeypairRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteKeypairRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteKeypairAsync( - DeleteKeypairRequest deleteKeypairRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteKeypairValidateBeforeCall(deleteKeypairRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readKeypairs - * - * @param readKeypairsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readKeypairsCall( - ReadKeypairsRequest readKeypairsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readKeypairsRequest; - - // create path and map variables - String localVarPath = "/ReadKeypairs"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readKeypairsValidateBeforeCall( - ReadKeypairsRequest readKeypairsRequest, final ApiCallback _callback) - throws ApiException { - return readKeypairsCall(readKeypairsRequest, _callback); - } - - /** - * @param readKeypairsRequest (optional) - * @return ReadKeypairsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadKeypairsResponse readKeypairs(ReadKeypairsRequest readKeypairsRequest) - throws ApiException { - ApiResponse localVarResp = - readKeypairsWithHttpInfo(readKeypairsRequest); - return localVarResp.getData(); - } - - /** - * @param readKeypairsRequest (optional) - * @return ApiResponse<ReadKeypairsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readKeypairsWithHttpInfo( - ReadKeypairsRequest readKeypairsRequest) throws ApiException { - okhttp3.Call localVarCall = readKeypairsValidateBeforeCall(readKeypairsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readKeypairsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readKeypairsAsync( - ReadKeypairsRequest readKeypairsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readKeypairsValidateBeforeCall(readKeypairsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ListenerApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ListenerApi.java deleted file mode 100644 index 31600fb0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ListenerApi.java +++ /dev/null @@ -1,911 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ListenerApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ListenerApi() { - this(Configuration.getDefaultApiClient()); - } - - public ListenerApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createListenerRule - * - * @param createListenerRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createListenerRuleCall( - CreateListenerRuleRequest createListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createListenerRuleRequest; - - // create path and map variables - String localVarPath = "/CreateListenerRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createListenerRuleValidateBeforeCall( - CreateListenerRuleRequest createListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - return createListenerRuleCall(createListenerRuleRequest, _callback); - } - - /** - * @param createListenerRuleRequest (optional) - * @return CreateListenerRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateListenerRuleResponse createListenerRule( - CreateListenerRuleRequest createListenerRuleRequest) throws ApiException { - ApiResponse localVarResp = - createListenerRuleWithHttpInfo(createListenerRuleRequest); - return localVarResp.getData(); - } - - /** - * @param createListenerRuleRequest (optional) - * @return ApiResponse<CreateListenerRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createListenerRuleWithHttpInfo( - CreateListenerRuleRequest createListenerRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - createListenerRuleValidateBeforeCall(createListenerRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createListenerRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createListenerRuleAsync( - CreateListenerRuleRequest createListenerRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createListenerRuleValidateBeforeCall(createListenerRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createLoadBalancerListeners - * - * @param createLoadBalancerListenersRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerListenersCall( - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createLoadBalancerListenersRequest; - - // create path and map variables - String localVarPath = "/CreateLoadBalancerListeners"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createLoadBalancerListenersValidateBeforeCall( - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - return createLoadBalancerListenersCall(createLoadBalancerListenersRequest, _callback); - } - - /** - * @param createLoadBalancerListenersRequest (optional) - * @return CreateLoadBalancerListenersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateLoadBalancerListenersResponse createLoadBalancerListeners( - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest) - throws ApiException { - ApiResponse localVarResp = - createLoadBalancerListenersWithHttpInfo(createLoadBalancerListenersRequest); - return localVarResp.getData(); - } - - /** - * @param createLoadBalancerListenersRequest (optional) - * @return ApiResponse<CreateLoadBalancerListenersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createLoadBalancerListenersWithHttpInfo( - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest) - throws ApiException { - okhttp3.Call localVarCall = - createLoadBalancerListenersValidateBeforeCall( - createLoadBalancerListenersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createLoadBalancerListenersRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerListenersAsync( - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createLoadBalancerListenersValidateBeforeCall( - createLoadBalancerListenersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteListenerRule - * - * @param deleteListenerRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteListenerRuleCall( - DeleteListenerRuleRequest deleteListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteListenerRuleRequest; - - // create path and map variables - String localVarPath = "/DeleteListenerRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteListenerRuleValidateBeforeCall( - DeleteListenerRuleRequest deleteListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - return deleteListenerRuleCall(deleteListenerRuleRequest, _callback); - } - - /** - * @param deleteListenerRuleRequest (optional) - * @return DeleteListenerRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteListenerRuleResponse deleteListenerRule( - DeleteListenerRuleRequest deleteListenerRuleRequest) throws ApiException { - ApiResponse localVarResp = - deleteListenerRuleWithHttpInfo(deleteListenerRuleRequest); - return localVarResp.getData(); - } - - /** - * @param deleteListenerRuleRequest (optional) - * @return ApiResponse<DeleteListenerRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteListenerRuleWithHttpInfo( - DeleteListenerRuleRequest deleteListenerRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteListenerRuleValidateBeforeCall(deleteListenerRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteListenerRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteListenerRuleAsync( - DeleteListenerRuleRequest deleteListenerRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteListenerRuleValidateBeforeCall(deleteListenerRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteLoadBalancerListeners - * - * @param deleteLoadBalancerListenersRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerListenersCall( - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteLoadBalancerListenersRequest; - - // create path and map variables - String localVarPath = "/DeleteLoadBalancerListeners"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteLoadBalancerListenersValidateBeforeCall( - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - return deleteLoadBalancerListenersCall(deleteLoadBalancerListenersRequest, _callback); - } - - /** - * @param deleteLoadBalancerListenersRequest (optional) - * @return DeleteLoadBalancerListenersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteLoadBalancerListenersResponse deleteLoadBalancerListeners( - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest) - throws ApiException { - ApiResponse localVarResp = - deleteLoadBalancerListenersWithHttpInfo(deleteLoadBalancerListenersRequest); - return localVarResp.getData(); - } - - /** - * @param deleteLoadBalancerListenersRequest (optional) - * @return ApiResponse<DeleteLoadBalancerListenersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteLoadBalancerListenersWithHttpInfo( - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteLoadBalancerListenersValidateBeforeCall( - deleteLoadBalancerListenersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteLoadBalancerListenersRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerListenersAsync( - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteLoadBalancerListenersValidateBeforeCall( - deleteLoadBalancerListenersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readListenerRules - * - * @param readListenerRulesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readListenerRulesCall( - ReadListenerRulesRequest readListenerRulesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readListenerRulesRequest; - - // create path and map variables - String localVarPath = "/ReadListenerRules"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readListenerRulesValidateBeforeCall( - ReadListenerRulesRequest readListenerRulesRequest, final ApiCallback _callback) - throws ApiException { - return readListenerRulesCall(readListenerRulesRequest, _callback); - } - - /** - * @param readListenerRulesRequest (optional) - * @return ReadListenerRulesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadListenerRulesResponse readListenerRules( - ReadListenerRulesRequest readListenerRulesRequest) throws ApiException { - ApiResponse localVarResp = - readListenerRulesWithHttpInfo(readListenerRulesRequest); - return localVarResp.getData(); - } - - /** - * @param readListenerRulesRequest (optional) - * @return ApiResponse<ReadListenerRulesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readListenerRulesWithHttpInfo( - ReadListenerRulesRequest readListenerRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - readListenerRulesValidateBeforeCall(readListenerRulesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readListenerRulesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readListenerRulesAsync( - ReadListenerRulesRequest readListenerRulesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readListenerRulesValidateBeforeCall(readListenerRulesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateListenerRule - * - * @param updateListenerRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateListenerRuleCall( - UpdateListenerRuleRequest updateListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateListenerRuleRequest; - - // create path and map variables - String localVarPath = "/UpdateListenerRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateListenerRuleValidateBeforeCall( - UpdateListenerRuleRequest updateListenerRuleRequest, final ApiCallback _callback) - throws ApiException { - return updateListenerRuleCall(updateListenerRuleRequest, _callback); - } - - /** - * @param updateListenerRuleRequest (optional) - * @return UpdateListenerRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateListenerRuleResponse updateListenerRule( - UpdateListenerRuleRequest updateListenerRuleRequest) throws ApiException { - ApiResponse localVarResp = - updateListenerRuleWithHttpInfo(updateListenerRuleRequest); - return localVarResp.getData(); - } - - /** - * @param updateListenerRuleRequest (optional) - * @return ApiResponse<UpdateListenerRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateListenerRuleWithHttpInfo( - UpdateListenerRuleRequest updateListenerRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - updateListenerRuleValidateBeforeCall(updateListenerRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateListenerRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateListenerRuleAsync( - UpdateListenerRuleRequest updateListenerRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateListenerRuleValidateBeforeCall(updateListenerRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApi.java deleted file mode 100644 index bbbafdb5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApi.java +++ /dev/null @@ -1,1767 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkLoadBalancerBackendMachinesRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkLoadBalancerBackendMachinesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthResponse; -import io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkLoadBalancerBackendMachinesRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkLoadBalancerBackendMachinesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class LoadBalancerApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public LoadBalancerApi() { - this(Configuration.getDefaultApiClient()); - } - - public LoadBalancerApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createLoadBalancer - * - * @param createLoadBalancerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerCall( - CreateLoadBalancerRequest createLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createLoadBalancerRequest; - - // create path and map variables - String localVarPath = "/CreateLoadBalancer"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createLoadBalancerValidateBeforeCall( - CreateLoadBalancerRequest createLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - return createLoadBalancerCall(createLoadBalancerRequest, _callback); - } - - /** - * @param createLoadBalancerRequest (optional) - * @return CreateLoadBalancerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateLoadBalancerResponse createLoadBalancer( - CreateLoadBalancerRequest createLoadBalancerRequest) throws ApiException { - ApiResponse localVarResp = - createLoadBalancerWithHttpInfo(createLoadBalancerRequest); - return localVarResp.getData(); - } - - /** - * @param createLoadBalancerRequest (optional) - * @return ApiResponse<CreateLoadBalancerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createLoadBalancerWithHttpInfo( - CreateLoadBalancerRequest createLoadBalancerRequest) throws ApiException { - okhttp3.Call localVarCall = - createLoadBalancerValidateBeforeCall(createLoadBalancerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createLoadBalancerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerAsync( - CreateLoadBalancerRequest createLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createLoadBalancerValidateBeforeCall(createLoadBalancerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createLoadBalancerTags - * - * @param createLoadBalancerTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerTagsCall( - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createLoadBalancerTagsRequest; - - // create path and map variables - String localVarPath = "/CreateLoadBalancerTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createLoadBalancerTagsValidateBeforeCall( - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - return createLoadBalancerTagsCall(createLoadBalancerTagsRequest, _callback); - } - - /** - * @param createLoadBalancerTagsRequest (optional) - * @return CreateLoadBalancerTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateLoadBalancerTagsResponse createLoadBalancerTags( - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest) throws ApiException { - ApiResponse localVarResp = - createLoadBalancerTagsWithHttpInfo(createLoadBalancerTagsRequest); - return localVarResp.getData(); - } - - /** - * @param createLoadBalancerTagsRequest (optional) - * @return ApiResponse<CreateLoadBalancerTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createLoadBalancerTagsWithHttpInfo( - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest) throws ApiException { - okhttp3.Call localVarCall = - createLoadBalancerTagsValidateBeforeCall(createLoadBalancerTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createLoadBalancerTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerTagsAsync( - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createLoadBalancerTagsValidateBeforeCall(createLoadBalancerTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteLoadBalancer - * - * @param deleteLoadBalancerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerCall( - DeleteLoadBalancerRequest deleteLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteLoadBalancerRequest; - - // create path and map variables - String localVarPath = "/DeleteLoadBalancer"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteLoadBalancerValidateBeforeCall( - DeleteLoadBalancerRequest deleteLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - return deleteLoadBalancerCall(deleteLoadBalancerRequest, _callback); - } - - /** - * @param deleteLoadBalancerRequest (optional) - * @return DeleteLoadBalancerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteLoadBalancerResponse deleteLoadBalancer( - DeleteLoadBalancerRequest deleteLoadBalancerRequest) throws ApiException { - ApiResponse localVarResp = - deleteLoadBalancerWithHttpInfo(deleteLoadBalancerRequest); - return localVarResp.getData(); - } - - /** - * @param deleteLoadBalancerRequest (optional) - * @return ApiResponse<DeleteLoadBalancerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteLoadBalancerWithHttpInfo( - DeleteLoadBalancerRequest deleteLoadBalancerRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteLoadBalancerValidateBeforeCall(deleteLoadBalancerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteLoadBalancerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerAsync( - DeleteLoadBalancerRequest deleteLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteLoadBalancerValidateBeforeCall(deleteLoadBalancerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteLoadBalancerTags - * - * @param deleteLoadBalancerTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerTagsCall( - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteLoadBalancerTagsRequest; - - // create path and map variables - String localVarPath = "/DeleteLoadBalancerTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteLoadBalancerTagsValidateBeforeCall( - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - return deleteLoadBalancerTagsCall(deleteLoadBalancerTagsRequest, _callback); - } - - /** - * @param deleteLoadBalancerTagsRequest (optional) - * @return DeleteLoadBalancerTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteLoadBalancerTagsResponse deleteLoadBalancerTags( - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest) throws ApiException { - ApiResponse localVarResp = - deleteLoadBalancerTagsWithHttpInfo(deleteLoadBalancerTagsRequest); - return localVarResp.getData(); - } - - /** - * @param deleteLoadBalancerTagsRequest (optional) - * @return ApiResponse<DeleteLoadBalancerTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteLoadBalancerTagsWithHttpInfo( - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteLoadBalancerTagsValidateBeforeCall(deleteLoadBalancerTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteLoadBalancerTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerTagsAsync( - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteLoadBalancerTagsValidateBeforeCall(deleteLoadBalancerTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deregisterVmsInLoadBalancer - * - * @param deregisterVmsInLoadBalancerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deregisterVmsInLoadBalancerCall( - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deregisterVmsInLoadBalancerRequest; - - // create path and map variables - String localVarPath = "/DeregisterVmsInLoadBalancer"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deregisterVmsInLoadBalancerValidateBeforeCall( - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - return deregisterVmsInLoadBalancerCall(deregisterVmsInLoadBalancerRequest, _callback); - } - - /** - * @param deregisterVmsInLoadBalancerRequest (optional) - * @return DeregisterVmsInLoadBalancerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeregisterVmsInLoadBalancerResponse deregisterVmsInLoadBalancer( - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest) - throws ApiException { - ApiResponse localVarResp = - deregisterVmsInLoadBalancerWithHttpInfo(deregisterVmsInLoadBalancerRequest); - return localVarResp.getData(); - } - - /** - * @param deregisterVmsInLoadBalancerRequest (optional) - * @return ApiResponse<DeregisterVmsInLoadBalancerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deregisterVmsInLoadBalancerWithHttpInfo( - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest) - throws ApiException { - okhttp3.Call localVarCall = - deregisterVmsInLoadBalancerValidateBeforeCall( - deregisterVmsInLoadBalancerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deregisterVmsInLoadBalancerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deregisterVmsInLoadBalancerAsync( - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deregisterVmsInLoadBalancerValidateBeforeCall( - deregisterVmsInLoadBalancerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkLoadBalancerBackendMachines - * - * @param linkLoadBalancerBackendMachinesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkLoadBalancerBackendMachinesCall( - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkLoadBalancerBackendMachinesRequest; - - // create path and map variables - String localVarPath = "/LinkLoadBalancerBackendMachines"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkLoadBalancerBackendMachinesValidateBeforeCall( - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - return linkLoadBalancerBackendMachinesCall( - linkLoadBalancerBackendMachinesRequest, _callback); - } - - /** - * @param linkLoadBalancerBackendMachinesRequest (optional) - * @return LinkLoadBalancerBackendMachinesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public LinkLoadBalancerBackendMachinesResponse linkLoadBalancerBackendMachines( - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest) - throws ApiException { - ApiResponse localVarResp = - linkLoadBalancerBackendMachinesWithHttpInfo(linkLoadBalancerBackendMachinesRequest); - return localVarResp.getData(); - } - - /** - * @param linkLoadBalancerBackendMachinesRequest (optional) - * @return ApiResponse<LinkLoadBalancerBackendMachinesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse - linkLoadBalancerBackendMachinesWithHttpInfo( - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest) - throws ApiException { - okhttp3.Call localVarCall = - linkLoadBalancerBackendMachinesValidateBeforeCall( - linkLoadBalancerBackendMachinesRequest, null); - Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkLoadBalancerBackendMachinesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkLoadBalancerBackendMachinesAsync( - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkLoadBalancerBackendMachinesValidateBeforeCall( - linkLoadBalancerBackendMachinesRequest, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readLoadBalancerTags - * - * @param readLoadBalancerTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLoadBalancerTagsCall( - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readLoadBalancerTagsRequest; - - // create path and map variables - String localVarPath = "/ReadLoadBalancerTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readLoadBalancerTagsValidateBeforeCall( - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest, final ApiCallback _callback) - throws ApiException { - return readLoadBalancerTagsCall(readLoadBalancerTagsRequest, _callback); - } - - /** - * @param readLoadBalancerTagsRequest (optional) - * @return ReadLoadBalancerTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadLoadBalancerTagsResponse readLoadBalancerTags( - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest) throws ApiException { - ApiResponse localVarResp = - readLoadBalancerTagsWithHttpInfo(readLoadBalancerTagsRequest); - return localVarResp.getData(); - } - - /** - * @param readLoadBalancerTagsRequest (optional) - * @return ApiResponse<ReadLoadBalancerTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readLoadBalancerTagsWithHttpInfo( - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest) throws ApiException { - okhttp3.Call localVarCall = - readLoadBalancerTagsValidateBeforeCall(readLoadBalancerTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readLoadBalancerTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLoadBalancerTagsAsync( - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readLoadBalancerTagsValidateBeforeCall(readLoadBalancerTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readLoadBalancers - * - * @param readLoadBalancersRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLoadBalancersCall( - ReadLoadBalancersRequest readLoadBalancersRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readLoadBalancersRequest; - - // create path and map variables - String localVarPath = "/ReadLoadBalancers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readLoadBalancersValidateBeforeCall( - ReadLoadBalancersRequest readLoadBalancersRequest, final ApiCallback _callback) - throws ApiException { - return readLoadBalancersCall(readLoadBalancersRequest, _callback); - } - - /** - * @param readLoadBalancersRequest (optional) - * @return ReadLoadBalancersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadLoadBalancersResponse readLoadBalancers( - ReadLoadBalancersRequest readLoadBalancersRequest) throws ApiException { - ApiResponse localVarResp = - readLoadBalancersWithHttpInfo(readLoadBalancersRequest); - return localVarResp.getData(); - } - - /** - * @param readLoadBalancersRequest (optional) - * @return ApiResponse<ReadLoadBalancersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readLoadBalancersWithHttpInfo( - ReadLoadBalancersRequest readLoadBalancersRequest) throws ApiException { - okhttp3.Call localVarCall = - readLoadBalancersValidateBeforeCall(readLoadBalancersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readLoadBalancersRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLoadBalancersAsync( - ReadLoadBalancersRequest readLoadBalancersRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readLoadBalancersValidateBeforeCall(readLoadBalancersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVmsHealth - * - * @param readVmsHealthRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmsHealthCall( - ReadVmsHealthRequest readVmsHealthRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmsHealthRequest; - - // create path and map variables - String localVarPath = "/ReadVmsHealth"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmsHealthValidateBeforeCall( - ReadVmsHealthRequest readVmsHealthRequest, final ApiCallback _callback) - throws ApiException { - return readVmsHealthCall(readVmsHealthRequest, _callback); - } - - /** - * @param readVmsHealthRequest (optional) - * @return ReadVmsHealthResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadVmsHealthResponse readVmsHealth(ReadVmsHealthRequest readVmsHealthRequest) - throws ApiException { - ApiResponse localVarResp = - readVmsHealthWithHttpInfo(readVmsHealthRequest); - return localVarResp.getData(); - } - - /** - * @param readVmsHealthRequest (optional) - * @return ApiResponse<ReadVmsHealthResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readVmsHealthWithHttpInfo( - ReadVmsHealthRequest readVmsHealthRequest) throws ApiException { - okhttp3.Call localVarCall = readVmsHealthValidateBeforeCall(readVmsHealthRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmsHealthRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmsHealthAsync( - ReadVmsHealthRequest readVmsHealthRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readVmsHealthValidateBeforeCall(readVmsHealthRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for registerVmsInLoadBalancer - * - * @param registerVmsInLoadBalancerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call registerVmsInLoadBalancerCall( - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = registerVmsInLoadBalancerRequest; - - // create path and map variables - String localVarPath = "/RegisterVmsInLoadBalancer"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call registerVmsInLoadBalancerValidateBeforeCall( - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - return registerVmsInLoadBalancerCall(registerVmsInLoadBalancerRequest, _callback); - } - - /** - * @param registerVmsInLoadBalancerRequest (optional) - * @return RegisterVmsInLoadBalancerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public RegisterVmsInLoadBalancerResponse registerVmsInLoadBalancer( - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest) throws ApiException { - ApiResponse localVarResp = - registerVmsInLoadBalancerWithHttpInfo(registerVmsInLoadBalancerRequest); - return localVarResp.getData(); - } - - /** - * @param registerVmsInLoadBalancerRequest (optional) - * @return ApiResponse<RegisterVmsInLoadBalancerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse registerVmsInLoadBalancerWithHttpInfo( - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest) throws ApiException { - okhttp3.Call localVarCall = - registerVmsInLoadBalancerValidateBeforeCall(registerVmsInLoadBalancerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param registerVmsInLoadBalancerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call registerVmsInLoadBalancerAsync( - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - registerVmsInLoadBalancerValidateBeforeCall( - registerVmsInLoadBalancerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkLoadBalancerBackendMachines - * - * @param unlinkLoadBalancerBackendMachinesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkLoadBalancerBackendMachinesCall( - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkLoadBalancerBackendMachinesRequest; - - // create path and map variables - String localVarPath = "/UnlinkLoadBalancerBackendMachines"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkLoadBalancerBackendMachinesValidateBeforeCall( - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - return unlinkLoadBalancerBackendMachinesCall( - unlinkLoadBalancerBackendMachinesRequest, _callback); - } - - /** - * @param unlinkLoadBalancerBackendMachinesRequest (optional) - * @return UnlinkLoadBalancerBackendMachinesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UnlinkLoadBalancerBackendMachinesResponse unlinkLoadBalancerBackendMachines( - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest) - throws ApiException { - ApiResponse localVarResp = - unlinkLoadBalancerBackendMachinesWithHttpInfo( - unlinkLoadBalancerBackendMachinesRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkLoadBalancerBackendMachinesRequest (optional) - * @return ApiResponse<UnlinkLoadBalancerBackendMachinesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse - unlinkLoadBalancerBackendMachinesWithHttpInfo( - UnlinkLoadBalancerBackendMachinesRequest - unlinkLoadBalancerBackendMachinesRequest) - throws ApiException { - okhttp3.Call localVarCall = - unlinkLoadBalancerBackendMachinesValidateBeforeCall( - unlinkLoadBalancerBackendMachinesRequest, null); - Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkLoadBalancerBackendMachinesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkLoadBalancerBackendMachinesAsync( - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkLoadBalancerBackendMachinesValidateBeforeCall( - unlinkLoadBalancerBackendMachinesRequest, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateLoadBalancer - * - * @param updateLoadBalancerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateLoadBalancerCall( - UpdateLoadBalancerRequest updateLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateLoadBalancerRequest; - - // create path and map variables - String localVarPath = "/UpdateLoadBalancer"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateLoadBalancerValidateBeforeCall( - UpdateLoadBalancerRequest updateLoadBalancerRequest, final ApiCallback _callback) - throws ApiException { - return updateLoadBalancerCall(updateLoadBalancerRequest, _callback); - } - - /** - * @param updateLoadBalancerRequest (optional) - * @return UpdateLoadBalancerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateLoadBalancerResponse updateLoadBalancer( - UpdateLoadBalancerRequest updateLoadBalancerRequest) throws ApiException { - ApiResponse localVarResp = - updateLoadBalancerWithHttpInfo(updateLoadBalancerRequest); - return localVarResp.getData(); - } - - /** - * @param updateLoadBalancerRequest (optional) - * @return ApiResponse<UpdateLoadBalancerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateLoadBalancerWithHttpInfo( - UpdateLoadBalancerRequest updateLoadBalancerRequest) throws ApiException { - okhttp3.Call localVarCall = - updateLoadBalancerValidateBeforeCall(updateLoadBalancerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateLoadBalancerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateLoadBalancerAsync( - UpdateLoadBalancerRequest updateLoadBalancerRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateLoadBalancerValidateBeforeCall(updateLoadBalancerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApi.java deleted file mode 100644 index 18f2932c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApi.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class LoadBalancerPolicyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public LoadBalancerPolicyApi() { - this(Configuration.getDefaultApiClient()); - } - - public LoadBalancerPolicyApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createLoadBalancerPolicy - * - * @param createLoadBalancerPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerPolicyCall( - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createLoadBalancerPolicyRequest; - - // create path and map variables - String localVarPath = "/CreateLoadBalancerPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createLoadBalancerPolicyValidateBeforeCall( - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - return createLoadBalancerPolicyCall(createLoadBalancerPolicyRequest, _callback); - } - - /** - * @param createLoadBalancerPolicyRequest (optional) - * @return CreateLoadBalancerPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateLoadBalancerPolicyResponse createLoadBalancerPolicy( - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest) throws ApiException { - ApiResponse localVarResp = - createLoadBalancerPolicyWithHttpInfo(createLoadBalancerPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param createLoadBalancerPolicyRequest (optional) - * @return ApiResponse<CreateLoadBalancerPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createLoadBalancerPolicyWithHttpInfo( - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - createLoadBalancerPolicyValidateBeforeCall(createLoadBalancerPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createLoadBalancerPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createLoadBalancerPolicyAsync( - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createLoadBalancerPolicyValidateBeforeCall( - createLoadBalancerPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteLoadBalancerPolicy - * - * @param deleteLoadBalancerPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerPolicyCall( - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteLoadBalancerPolicyRequest; - - // create path and map variables - String localVarPath = "/DeleteLoadBalancerPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteLoadBalancerPolicyValidateBeforeCall( - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - return deleteLoadBalancerPolicyCall(deleteLoadBalancerPolicyRequest, _callback); - } - - /** - * @param deleteLoadBalancerPolicyRequest (optional) - * @return DeleteLoadBalancerPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteLoadBalancerPolicyResponse deleteLoadBalancerPolicy( - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest) throws ApiException { - ApiResponse localVarResp = - deleteLoadBalancerPolicyWithHttpInfo(deleteLoadBalancerPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param deleteLoadBalancerPolicyRequest (optional) - * @return ApiResponse<DeleteLoadBalancerPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteLoadBalancerPolicyWithHttpInfo( - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteLoadBalancerPolicyValidateBeforeCall(deleteLoadBalancerPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteLoadBalancerPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteLoadBalancerPolicyAsync( - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteLoadBalancerPolicyValidateBeforeCall( - deleteLoadBalancerPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LocationApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/LocationApi.java deleted file mode 100644 index de87bae7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/LocationApi.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadLocationsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLocationsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class LocationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public LocationApi() { - this(Configuration.getDefaultApiClient()); - } - - public LocationApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readLocations - * - * @param readLocationsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLocationsCall( - ReadLocationsRequest readLocationsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readLocationsRequest; - - // create path and map variables - String localVarPath = "/ReadLocations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readLocationsValidateBeforeCall( - ReadLocationsRequest readLocationsRequest, final ApiCallback _callback) - throws ApiException { - return readLocationsCall(readLocationsRequest, _callback); - } - - /** - * @param readLocationsRequest (optional) - * @return ReadLocationsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadLocationsResponse readLocations(ReadLocationsRequest readLocationsRequest) - throws ApiException { - ApiResponse localVarResp = - readLocationsWithHttpInfo(readLocationsRequest); - return localVarResp.getData(); - } - - /** - * @param readLocationsRequest (optional) - * @return ApiResponse<ReadLocationsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readLocationsWithHttpInfo( - ReadLocationsRequest readLocationsRequest) throws ApiException { - okhttp3.Call localVarCall = readLocationsValidateBeforeCall(readLocationsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readLocationsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLocationsAsync( - ReadLocationsRequest readLocationsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readLocationsValidateBeforeCall(readLocationsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApi.java deleted file mode 100644 index f6c6befa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApi.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateNatServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNatServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNatServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNatServicesResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NatServiceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NatServiceApi() { - this(Configuration.getDefaultApiClient()); - } - - public NatServiceApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createNatService - * - * @param createNatServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNatServiceCall( - CreateNatServiceRequest createNatServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createNatServiceRequest; - - // create path and map variables - String localVarPath = "/CreateNatService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createNatServiceValidateBeforeCall( - CreateNatServiceRequest createNatServiceRequest, final ApiCallback _callback) - throws ApiException { - return createNatServiceCall(createNatServiceRequest, _callback); - } - - /** - * @param createNatServiceRequest (optional) - * @return CreateNatServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateNatServiceResponse createNatService( - CreateNatServiceRequest createNatServiceRequest) throws ApiException { - ApiResponse localVarResp = - createNatServiceWithHttpInfo(createNatServiceRequest); - return localVarResp.getData(); - } - - /** - * @param createNatServiceRequest (optional) - * @return ApiResponse<CreateNatServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createNatServiceWithHttpInfo( - CreateNatServiceRequest createNatServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - createNatServiceValidateBeforeCall(createNatServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createNatServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNatServiceAsync( - CreateNatServiceRequest createNatServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createNatServiceValidateBeforeCall(createNatServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNatService - * - * @param deleteNatServiceRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNatServiceCall( - DeleteNatServiceRequest deleteNatServiceRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteNatServiceRequest; - - // create path and map variables - String localVarPath = "/DeleteNatService"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNatServiceValidateBeforeCall( - DeleteNatServiceRequest deleteNatServiceRequest, final ApiCallback _callback) - throws ApiException { - return deleteNatServiceCall(deleteNatServiceRequest, _callback); - } - - /** - * @param deleteNatServiceRequest (optional) - * @return DeleteNatServiceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteNatServiceResponse deleteNatService( - DeleteNatServiceRequest deleteNatServiceRequest) throws ApiException { - ApiResponse localVarResp = - deleteNatServiceWithHttpInfo(deleteNatServiceRequest); - return localVarResp.getData(); - } - - /** - * @param deleteNatServiceRequest (optional) - * @return ApiResponse<DeleteNatServiceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteNatServiceWithHttpInfo( - DeleteNatServiceRequest deleteNatServiceRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteNatServiceValidateBeforeCall(deleteNatServiceRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteNatServiceRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNatServiceAsync( - DeleteNatServiceRequest deleteNatServiceRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteNatServiceValidateBeforeCall(deleteNatServiceRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNatServices - * - * @param readNatServicesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNatServicesCall( - ReadNatServicesRequest readNatServicesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNatServicesRequest; - - // create path and map variables - String localVarPath = "/ReadNatServices"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNatServicesValidateBeforeCall( - ReadNatServicesRequest readNatServicesRequest, final ApiCallback _callback) - throws ApiException { - return readNatServicesCall(readNatServicesRequest, _callback); - } - - /** - * @param readNatServicesRequest (optional) - * @return ReadNatServicesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadNatServicesResponse readNatServices(ReadNatServicesRequest readNatServicesRequest) - throws ApiException { - ApiResponse localVarResp = - readNatServicesWithHttpInfo(readNatServicesRequest); - return localVarResp.getData(); - } - - /** - * @param readNatServicesRequest (optional) - * @return ApiResponse<ReadNatServicesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readNatServicesWithHttpInfo( - ReadNatServicesRequest readNatServicesRequest) throws ApiException { - okhttp3.Call localVarCall = readNatServicesValidateBeforeCall(readNatServicesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNatServicesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNatServicesAsync( - ReadNatServicesRequest readNatServicesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readNatServicesValidateBeforeCall(readNatServicesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApi.java deleted file mode 100644 index ae25ee57..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApi.java +++ /dev/null @@ -1,766 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NetAccessPointApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NetAccessPointApi() { - this(Configuration.getDefaultApiClient()); - } - - public NetAccessPointApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createNetAccessPoint - * - * @param createNetAccessPointRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createNetAccessPointCall( - CreateNetAccessPointRequest createNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createNetAccessPointRequest; - - // create path and map variables - String localVarPath = "/CreateNetAccessPoint"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createNetAccessPointValidateBeforeCall( - CreateNetAccessPointRequest createNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - return createNetAccessPointCall(createNetAccessPointRequest, _callback); - } - - /** - * @param createNetAccessPointRequest (optional) - * @return CreateNetAccessPointResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateNetAccessPointResponse createNetAccessPoint( - CreateNetAccessPointRequest createNetAccessPointRequest) throws ApiException { - ApiResponse localVarResp = - createNetAccessPointWithHttpInfo(createNetAccessPointRequest); - return localVarResp.getData(); - } - - /** - * @param createNetAccessPointRequest (optional) - * @return ApiResponse<CreateNetAccessPointResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createNetAccessPointWithHttpInfo( - CreateNetAccessPointRequest createNetAccessPointRequest) throws ApiException { - okhttp3.Call localVarCall = - createNetAccessPointValidateBeforeCall(createNetAccessPointRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createNetAccessPointRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createNetAccessPointAsync( - CreateNetAccessPointRequest createNetAccessPointRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createNetAccessPointValidateBeforeCall(createNetAccessPointRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNetAccessPoint - * - * @param deleteNetAccessPointRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteNetAccessPointCall( - DeleteNetAccessPointRequest deleteNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteNetAccessPointRequest; - - // create path and map variables - String localVarPath = "/DeleteNetAccessPoint"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNetAccessPointValidateBeforeCall( - DeleteNetAccessPointRequest deleteNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - return deleteNetAccessPointCall(deleteNetAccessPointRequest, _callback); - } - - /** - * @param deleteNetAccessPointRequest (optional) - * @return DeleteNetAccessPointResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteNetAccessPointResponse deleteNetAccessPoint( - DeleteNetAccessPointRequest deleteNetAccessPointRequest) throws ApiException { - ApiResponse localVarResp = - deleteNetAccessPointWithHttpInfo(deleteNetAccessPointRequest); - return localVarResp.getData(); - } - - /** - * @param deleteNetAccessPointRequest (optional) - * @return ApiResponse<DeleteNetAccessPointResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteNetAccessPointWithHttpInfo( - DeleteNetAccessPointRequest deleteNetAccessPointRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteNetAccessPointValidateBeforeCall(deleteNetAccessPointRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteNetAccessPointRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteNetAccessPointAsync( - DeleteNetAccessPointRequest deleteNetAccessPointRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteNetAccessPointValidateBeforeCall(deleteNetAccessPointRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNetAccessPointServices - * - * @param readNetAccessPointServicesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readNetAccessPointServicesCall( - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNetAccessPointServicesRequest; - - // create path and map variables - String localVarPath = "/ReadNetAccessPointServices"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNetAccessPointServicesValidateBeforeCall( - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest, - final ApiCallback _callback) - throws ApiException { - return readNetAccessPointServicesCall(readNetAccessPointServicesRequest, _callback); - } - - /** - * @param readNetAccessPointServicesRequest (optional) - * @return ReadNetAccessPointServicesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadNetAccessPointServicesResponse readNetAccessPointServices( - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest) - throws ApiException { - ApiResponse localVarResp = - readNetAccessPointServicesWithHttpInfo(readNetAccessPointServicesRequest); - return localVarResp.getData(); - } - - /** - * @param readNetAccessPointServicesRequest (optional) - * @return ApiResponse<ReadNetAccessPointServicesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readNetAccessPointServicesWithHttpInfo( - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest) - throws ApiException { - okhttp3.Call localVarCall = - readNetAccessPointServicesValidateBeforeCall( - readNetAccessPointServicesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNetAccessPointServicesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readNetAccessPointServicesAsync( - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readNetAccessPointServicesValidateBeforeCall( - readNetAccessPointServicesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNetAccessPoints - * - * @param readNetAccessPointsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readNetAccessPointsCall( - ReadNetAccessPointsRequest readNetAccessPointsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNetAccessPointsRequest; - - // create path and map variables - String localVarPath = "/ReadNetAccessPoints"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNetAccessPointsValidateBeforeCall( - ReadNetAccessPointsRequest readNetAccessPointsRequest, final ApiCallback _callback) - throws ApiException { - return readNetAccessPointsCall(readNetAccessPointsRequest, _callback); - } - - /** - * @param readNetAccessPointsRequest (optional) - * @return ReadNetAccessPointsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadNetAccessPointsResponse readNetAccessPoints( - ReadNetAccessPointsRequest readNetAccessPointsRequest) throws ApiException { - ApiResponse localVarResp = - readNetAccessPointsWithHttpInfo(readNetAccessPointsRequest); - return localVarResp.getData(); - } - - /** - * @param readNetAccessPointsRequest (optional) - * @return ApiResponse<ReadNetAccessPointsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readNetAccessPointsWithHttpInfo( - ReadNetAccessPointsRequest readNetAccessPointsRequest) throws ApiException { - okhttp3.Call localVarCall = - readNetAccessPointsValidateBeforeCall(readNetAccessPointsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNetAccessPointsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readNetAccessPointsAsync( - ReadNetAccessPointsRequest readNetAccessPointsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readNetAccessPointsValidateBeforeCall(readNetAccessPointsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateNetAccessPoint - * - * @param updateNetAccessPointRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateNetAccessPointCall( - UpdateNetAccessPointRequest updateNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateNetAccessPointRequest; - - // create path and map variables - String localVarPath = "/UpdateNetAccessPoint"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateNetAccessPointValidateBeforeCall( - UpdateNetAccessPointRequest updateNetAccessPointRequest, final ApiCallback _callback) - throws ApiException { - return updateNetAccessPointCall(updateNetAccessPointRequest, _callback); - } - - /** - * @param updateNetAccessPointRequest (optional) - * @return UpdateNetAccessPointResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateNetAccessPointResponse updateNetAccessPoint( - UpdateNetAccessPointRequest updateNetAccessPointRequest) throws ApiException { - ApiResponse localVarResp = - updateNetAccessPointWithHttpInfo(updateNetAccessPointRequest); - return localVarResp.getData(); - } - - /** - * @param updateNetAccessPointRequest (optional) - * @return ApiResponse<UpdateNetAccessPointResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateNetAccessPointWithHttpInfo( - UpdateNetAccessPointRequest updateNetAccessPointRequest) throws ApiException { - okhttp3.Call localVarCall = - updateNetAccessPointValidateBeforeCall(updateNetAccessPointRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateNetAccessPointRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateNetAccessPointAsync( - UpdateNetAccessPointRequest updateNetAccessPointRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateNetAccessPointValidateBeforeCall(updateNetAccessPointRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetApi.java deleted file mode 100644 index 671665bd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetApi.java +++ /dev/null @@ -1,645 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateNetRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NetApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NetApi() { - this(Configuration.getDefaultApiClient()); - } - - public NetApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createNet - * - * @param createNetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNetCall( - CreateNetRequest createNetRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createNetRequest; - - // create path and map variables - String localVarPath = "/CreateNet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createNetValidateBeforeCall( - CreateNetRequest createNetRequest, final ApiCallback _callback) throws ApiException { - return createNetCall(createNetRequest, _callback); - } - - /** - * @param createNetRequest (optional) - * @return CreateNetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateNetResponse createNet(CreateNetRequest createNetRequest) throws ApiException { - ApiResponse localVarResp = createNetWithHttpInfo(createNetRequest); - return localVarResp.getData(); - } - - /** - * @param createNetRequest (optional) - * @return ApiResponse<CreateNetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createNetWithHttpInfo(CreateNetRequest createNetRequest) - throws ApiException { - okhttp3.Call localVarCall = createNetValidateBeforeCall(createNetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createNetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNetAsync( - CreateNetRequest createNetRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createNetValidateBeforeCall(createNetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNet - * - * @param deleteNetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNetCall( - DeleteNetRequest deleteNetRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteNetRequest; - - // create path and map variables - String localVarPath = "/DeleteNet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNetValidateBeforeCall( - DeleteNetRequest deleteNetRequest, final ApiCallback _callback) throws ApiException { - return deleteNetCall(deleteNetRequest, _callback); - } - - /** - * @param deleteNetRequest (optional) - * @return DeleteNetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteNetResponse deleteNet(DeleteNetRequest deleteNetRequest) throws ApiException { - ApiResponse localVarResp = deleteNetWithHttpInfo(deleteNetRequest); - return localVarResp.getData(); - } - - /** - * @param deleteNetRequest (optional) - * @return ApiResponse<DeleteNetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteNetWithHttpInfo(DeleteNetRequest deleteNetRequest) - throws ApiException { - okhttp3.Call localVarCall = deleteNetValidateBeforeCall(deleteNetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteNetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNetAsync( - DeleteNetRequest deleteNetRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteNetValidateBeforeCall(deleteNetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNets - * - * @param readNetsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNetsCall(ReadNetsRequest readNetsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNetsRequest; - - // create path and map variables - String localVarPath = "/ReadNets"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNetsValidateBeforeCall( - ReadNetsRequest readNetsRequest, final ApiCallback _callback) throws ApiException { - return readNetsCall(readNetsRequest, _callback); - } - - /** - * @param readNetsRequest (optional) - * @return ReadNetsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadNetsResponse readNets(ReadNetsRequest readNetsRequest) throws ApiException { - ApiResponse localVarResp = readNetsWithHttpInfo(readNetsRequest); - return localVarResp.getData(); - } - - /** - * @param readNetsRequest (optional) - * @return ApiResponse<ReadNetsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readNetsWithHttpInfo(ReadNetsRequest readNetsRequest) - throws ApiException { - okhttp3.Call localVarCall = readNetsValidateBeforeCall(readNetsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNetsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNetsAsync( - ReadNetsRequest readNetsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readNetsValidateBeforeCall(readNetsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateNet - * - * @param updateNetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateNetCall( - UpdateNetRequest updateNetRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateNetRequest; - - // create path and map variables - String localVarPath = "/UpdateNet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateNetValidateBeforeCall( - UpdateNetRequest updateNetRequest, final ApiCallback _callback) throws ApiException { - return updateNetCall(updateNetRequest, _callback); - } - - /** - * @param updateNetRequest (optional) - * @return UpdateNetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateNetResponse updateNet(UpdateNetRequest updateNetRequest) throws ApiException { - ApiResponse localVarResp = updateNetWithHttpInfo(updateNetRequest); - return localVarResp.getData(); - } - - /** - * @param updateNetRequest (optional) - * @return ApiResponse<UpdateNetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateNetWithHttpInfo(UpdateNetRequest updateNetRequest) - throws ApiException { - okhttp3.Call localVarCall = updateNetValidateBeforeCall(updateNetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateNetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateNetAsync( - UpdateNetRequest updateNetRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateNetValidateBeforeCall(updateNetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApi.java deleted file mode 100644 index c8b1d92d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApi.java +++ /dev/null @@ -1,831 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsResponse; -import io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NetPeeringApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NetPeeringApi() { - this(Configuration.getDefaultApiClient()); - } - - public NetPeeringApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for acceptNetPeering - * - * @param acceptNetPeeringRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call acceptNetPeeringCall( - AcceptNetPeeringRequest acceptNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = acceptNetPeeringRequest; - - // create path and map variables - String localVarPath = "/AcceptNetPeering"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptNetPeeringValidateBeforeCall( - AcceptNetPeeringRequest acceptNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - return acceptNetPeeringCall(acceptNetPeeringRequest, _callback); - } - - /** - * @param acceptNetPeeringRequest (optional) - * @return AcceptNetPeeringResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public AcceptNetPeeringResponse acceptNetPeering( - AcceptNetPeeringRequest acceptNetPeeringRequest) throws ApiException { - ApiResponse localVarResp = - acceptNetPeeringWithHttpInfo(acceptNetPeeringRequest); - return localVarResp.getData(); - } - - /** - * @param acceptNetPeeringRequest (optional) - * @return ApiResponse<AcceptNetPeeringResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse acceptNetPeeringWithHttpInfo( - AcceptNetPeeringRequest acceptNetPeeringRequest) throws ApiException { - okhttp3.Call localVarCall = - acceptNetPeeringValidateBeforeCall(acceptNetPeeringRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param acceptNetPeeringRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call acceptNetPeeringAsync( - AcceptNetPeeringRequest acceptNetPeeringRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - acceptNetPeeringValidateBeforeCall(acceptNetPeeringRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createNetPeering - * - * @param createNetPeeringRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNetPeeringCall( - CreateNetPeeringRequest createNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createNetPeeringRequest; - - // create path and map variables - String localVarPath = "/CreateNetPeering"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createNetPeeringValidateBeforeCall( - CreateNetPeeringRequest createNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - return createNetPeeringCall(createNetPeeringRequest, _callback); - } - - /** - * @param createNetPeeringRequest (optional) - * @return CreateNetPeeringResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateNetPeeringResponse createNetPeering( - CreateNetPeeringRequest createNetPeeringRequest) throws ApiException { - ApiResponse localVarResp = - createNetPeeringWithHttpInfo(createNetPeeringRequest); - return localVarResp.getData(); - } - - /** - * @param createNetPeeringRequest (optional) - * @return ApiResponse<CreateNetPeeringResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createNetPeeringWithHttpInfo( - CreateNetPeeringRequest createNetPeeringRequest) throws ApiException { - okhttp3.Call localVarCall = - createNetPeeringValidateBeforeCall(createNetPeeringRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createNetPeeringRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNetPeeringAsync( - CreateNetPeeringRequest createNetPeeringRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createNetPeeringValidateBeforeCall(createNetPeeringRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNetPeering - * - * @param deleteNetPeeringRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNetPeeringCall( - DeleteNetPeeringRequest deleteNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteNetPeeringRequest; - - // create path and map variables - String localVarPath = "/DeleteNetPeering"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNetPeeringValidateBeforeCall( - DeleteNetPeeringRequest deleteNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - return deleteNetPeeringCall(deleteNetPeeringRequest, _callback); - } - - /** - * @param deleteNetPeeringRequest (optional) - * @return DeleteNetPeeringResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteNetPeeringResponse deleteNetPeering( - DeleteNetPeeringRequest deleteNetPeeringRequest) throws ApiException { - ApiResponse localVarResp = - deleteNetPeeringWithHttpInfo(deleteNetPeeringRequest); - return localVarResp.getData(); - } - - /** - * @param deleteNetPeeringRequest (optional) - * @return ApiResponse<DeleteNetPeeringResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteNetPeeringWithHttpInfo( - DeleteNetPeeringRequest deleteNetPeeringRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteNetPeeringValidateBeforeCall(deleteNetPeeringRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteNetPeeringRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNetPeeringAsync( - DeleteNetPeeringRequest deleteNetPeeringRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteNetPeeringValidateBeforeCall(deleteNetPeeringRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNetPeerings - * - * @param readNetPeeringsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNetPeeringsCall( - ReadNetPeeringsRequest readNetPeeringsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNetPeeringsRequest; - - // create path and map variables - String localVarPath = "/ReadNetPeerings"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNetPeeringsValidateBeforeCall( - ReadNetPeeringsRequest readNetPeeringsRequest, final ApiCallback _callback) - throws ApiException { - return readNetPeeringsCall(readNetPeeringsRequest, _callback); - } - - /** - * @param readNetPeeringsRequest (optional) - * @return ReadNetPeeringsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadNetPeeringsResponse readNetPeerings(ReadNetPeeringsRequest readNetPeeringsRequest) - throws ApiException { - ApiResponse localVarResp = - readNetPeeringsWithHttpInfo(readNetPeeringsRequest); - return localVarResp.getData(); - } - - /** - * @param readNetPeeringsRequest (optional) - * @return ApiResponse<ReadNetPeeringsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readNetPeeringsWithHttpInfo( - ReadNetPeeringsRequest readNetPeeringsRequest) throws ApiException { - okhttp3.Call localVarCall = readNetPeeringsValidateBeforeCall(readNetPeeringsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNetPeeringsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNetPeeringsAsync( - ReadNetPeeringsRequest readNetPeeringsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readNetPeeringsValidateBeforeCall(readNetPeeringsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for rejectNetPeering - * - * @param rejectNetPeeringRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call rejectNetPeeringCall( - RejectNetPeeringRequest rejectNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = rejectNetPeeringRequest; - - // create path and map variables - String localVarPath = "/RejectNetPeering"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rejectNetPeeringValidateBeforeCall( - RejectNetPeeringRequest rejectNetPeeringRequest, final ApiCallback _callback) - throws ApiException { - return rejectNetPeeringCall(rejectNetPeeringRequest, _callback); - } - - /** - * @param rejectNetPeeringRequest (optional) - * @return RejectNetPeeringResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public RejectNetPeeringResponse rejectNetPeering( - RejectNetPeeringRequest rejectNetPeeringRequest) throws ApiException { - ApiResponse localVarResp = - rejectNetPeeringWithHttpInfo(rejectNetPeeringRequest); - return localVarResp.getData(); - } - - /** - * @param rejectNetPeeringRequest (optional) - * @return ApiResponse<RejectNetPeeringResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse rejectNetPeeringWithHttpInfo( - RejectNetPeeringRequest rejectNetPeeringRequest) throws ApiException { - okhttp3.Call localVarCall = - rejectNetPeeringValidateBeforeCall(rejectNetPeeringRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param rejectNetPeeringRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call rejectNetPeeringAsync( - RejectNetPeeringRequest rejectNetPeeringRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - rejectNetPeeringValidateBeforeCall(rejectNetPeeringRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NicApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/NicApi.java deleted file mode 100644 index d4ea319f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/NicApi.java +++ /dev/null @@ -1,1230 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateNicRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNicResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNicRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNicResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkNicRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkNicResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNicsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNicsResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkNicRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkNicResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNicRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNicResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NicApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NicApi() { - this(Configuration.getDefaultApiClient()); - } - - public NicApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createNic - * - * @param createNicRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNicCall( - CreateNicRequest createNicRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createNicRequest; - - // create path and map variables - String localVarPath = "/CreateNic"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createNicValidateBeforeCall( - CreateNicRequest createNicRequest, final ApiCallback _callback) throws ApiException { - return createNicCall(createNicRequest, _callback); - } - - /** - * @param createNicRequest (optional) - * @return CreateNicResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateNicResponse createNic(CreateNicRequest createNicRequest) throws ApiException { - ApiResponse localVarResp = createNicWithHttpInfo(createNicRequest); - return localVarResp.getData(); - } - - /** - * @param createNicRequest (optional) - * @return ApiResponse<CreateNicResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createNicWithHttpInfo(CreateNicRequest createNicRequest) - throws ApiException { - okhttp3.Call localVarCall = createNicValidateBeforeCall(createNicRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createNicRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createNicAsync( - CreateNicRequest createNicRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createNicValidateBeforeCall(createNicRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNic - * - * @param deleteNicRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNicCall( - DeleteNicRequest deleteNicRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteNicRequest; - - // create path and map variables - String localVarPath = "/DeleteNic"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNicValidateBeforeCall( - DeleteNicRequest deleteNicRequest, final ApiCallback _callback) throws ApiException { - return deleteNicCall(deleteNicRequest, _callback); - } - - /** - * @param deleteNicRequest (optional) - * @return DeleteNicResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteNicResponse deleteNic(DeleteNicRequest deleteNicRequest) throws ApiException { - ApiResponse localVarResp = deleteNicWithHttpInfo(deleteNicRequest); - return localVarResp.getData(); - } - - /** - * @param deleteNicRequest (optional) - * @return ApiResponse<DeleteNicResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteNicWithHttpInfo(DeleteNicRequest deleteNicRequest) - throws ApiException { - okhttp3.Call localVarCall = deleteNicValidateBeforeCall(deleteNicRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteNicRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteNicAsync( - DeleteNicRequest deleteNicRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteNicValidateBeforeCall(deleteNicRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkNic - * - * @param linkNicRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkNicCall(LinkNicRequest linkNicRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkNicRequest; - - // create path and map variables - String localVarPath = "/LinkNic"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkNicValidateBeforeCall( - LinkNicRequest linkNicRequest, final ApiCallback _callback) throws ApiException { - return linkNicCall(linkNicRequest, _callback); - } - - /** - * @param linkNicRequest (optional) - * @return LinkNicResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkNicResponse linkNic(LinkNicRequest linkNicRequest) throws ApiException { - ApiResponse localVarResp = linkNicWithHttpInfo(linkNicRequest); - return localVarResp.getData(); - } - - /** - * @param linkNicRequest (optional) - * @return ApiResponse<LinkNicResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkNicWithHttpInfo(LinkNicRequest linkNicRequest) - throws ApiException { - okhttp3.Call localVarCall = linkNicValidateBeforeCall(linkNicRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkNicRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkNicAsync( - LinkNicRequest linkNicRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = linkNicValidateBeforeCall(linkNicRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkPrivateIps - * - * @param linkPrivateIpsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkPrivateIpsCall( - LinkPrivateIpsRequest linkPrivateIpsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkPrivateIpsRequest; - - // create path and map variables - String localVarPath = "/LinkPrivateIps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkPrivateIpsValidateBeforeCall( - LinkPrivateIpsRequest linkPrivateIpsRequest, final ApiCallback _callback) - throws ApiException { - return linkPrivateIpsCall(linkPrivateIpsRequest, _callback); - } - - /** - * @param linkPrivateIpsRequest (optional) - * @return LinkPrivateIpsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkPrivateIpsResponse linkPrivateIps(LinkPrivateIpsRequest linkPrivateIpsRequest) - throws ApiException { - ApiResponse localVarResp = - linkPrivateIpsWithHttpInfo(linkPrivateIpsRequest); - return localVarResp.getData(); - } - - /** - * @param linkPrivateIpsRequest (optional) - * @return ApiResponse<LinkPrivateIpsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkPrivateIpsWithHttpInfo( - LinkPrivateIpsRequest linkPrivateIpsRequest) throws ApiException { - okhttp3.Call localVarCall = linkPrivateIpsValidateBeforeCall(linkPrivateIpsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkPrivateIpsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkPrivateIpsAsync( - LinkPrivateIpsRequest linkPrivateIpsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkPrivateIpsValidateBeforeCall(linkPrivateIpsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readNics - * - * @param readNicsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNicsCall(ReadNicsRequest readNicsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readNicsRequest; - - // create path and map variables - String localVarPath = "/ReadNics"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNicsValidateBeforeCall( - ReadNicsRequest readNicsRequest, final ApiCallback _callback) throws ApiException { - return readNicsCall(readNicsRequest, _callback); - } - - /** - * @param readNicsRequest (optional) - * @return ReadNicsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadNicsResponse readNics(ReadNicsRequest readNicsRequest) throws ApiException { - ApiResponse localVarResp = readNicsWithHttpInfo(readNicsRequest); - return localVarResp.getData(); - } - - /** - * @param readNicsRequest (optional) - * @return ApiResponse<ReadNicsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readNicsWithHttpInfo(ReadNicsRequest readNicsRequest) - throws ApiException { - okhttp3.Call localVarCall = readNicsValidateBeforeCall(readNicsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readNicsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readNicsAsync( - ReadNicsRequest readNicsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readNicsValidateBeforeCall(readNicsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkNic - * - * @param unlinkNicRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkNicCall( - UnlinkNicRequest unlinkNicRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkNicRequest; - - // create path and map variables - String localVarPath = "/UnlinkNic"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkNicValidateBeforeCall( - UnlinkNicRequest unlinkNicRequest, final ApiCallback _callback) throws ApiException { - return unlinkNicCall(unlinkNicRequest, _callback); - } - - /** - * @param unlinkNicRequest (optional) - * @return UnlinkNicResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkNicResponse unlinkNic(UnlinkNicRequest unlinkNicRequest) throws ApiException { - ApiResponse localVarResp = unlinkNicWithHttpInfo(unlinkNicRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkNicRequest (optional) - * @return ApiResponse<UnlinkNicResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkNicWithHttpInfo(UnlinkNicRequest unlinkNicRequest) - throws ApiException { - okhttp3.Call localVarCall = unlinkNicValidateBeforeCall(unlinkNicRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkNicRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkNicAsync( - UnlinkNicRequest unlinkNicRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = unlinkNicValidateBeforeCall(unlinkNicRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkPrivateIps - * - * @param unlinkPrivateIpsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkPrivateIpsCall( - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkPrivateIpsRequest; - - // create path and map variables - String localVarPath = "/UnlinkPrivateIps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkPrivateIpsValidateBeforeCall( - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest, final ApiCallback _callback) - throws ApiException { - return unlinkPrivateIpsCall(unlinkPrivateIpsRequest, _callback); - } - - /** - * @param unlinkPrivateIpsRequest (optional) - * @return UnlinkPrivateIpsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkPrivateIpsResponse unlinkPrivateIps( - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest) throws ApiException { - ApiResponse localVarResp = - unlinkPrivateIpsWithHttpInfo(unlinkPrivateIpsRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkPrivateIpsRequest (optional) - * @return ApiResponse<UnlinkPrivateIpsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkPrivateIpsWithHttpInfo( - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest) throws ApiException { - okhttp3.Call localVarCall = - unlinkPrivateIpsValidateBeforeCall(unlinkPrivateIpsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkPrivateIpsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkPrivateIpsAsync( - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkPrivateIpsValidateBeforeCall(unlinkPrivateIpsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateNic - * - * @param updateNicRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateNicCall( - UpdateNicRequest updateNicRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateNicRequest; - - // create path and map variables - String localVarPath = "/UpdateNic"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateNicValidateBeforeCall( - UpdateNicRequest updateNicRequest, final ApiCallback _callback) throws ApiException { - return updateNicCall(updateNicRequest, _callback); - } - - /** - * @param updateNicRequest (optional) - * @return UpdateNicResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateNicResponse updateNic(UpdateNicRequest updateNicRequest) throws ApiException { - ApiResponse localVarResp = updateNicWithHttpInfo(updateNicRequest); - return localVarResp.getData(); - } - - /** - * @param updateNicRequest (optional) - * @return ApiResponse<UpdateNicResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateNicWithHttpInfo(UpdateNicRequest updateNicRequest) - throws ApiException { - okhttp3.Call localVarCall = updateNicValidateBeforeCall(updateNicRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateNicRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateNicAsync( - UpdateNicRequest updateNicRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateNicValidateBeforeCall(updateNicRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PolicyApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/PolicyApi.java deleted file mode 100644 index 03e6ac54..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PolicyApi.java +++ /dev/null @@ -1,2719 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkManagedPolicyToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkManagedPolicyToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadManagedPoliciesLinkedToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadManagedPoliciesLinkedToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkManagedPolicyFromUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkManagedPolicyFromUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PolicyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PolicyApi() { - this(Configuration.getDefaultApiClient()); - } - - public PolicyApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createPolicy - * - * @param createPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createPolicyCall( - CreatePolicyRequest createPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createPolicyRequest; - - // create path and map variables - String localVarPath = "/CreatePolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPolicyValidateBeforeCall( - CreatePolicyRequest createPolicyRequest, final ApiCallback _callback) - throws ApiException { - return createPolicyCall(createPolicyRequest, _callback); - } - - /** - * @param createPolicyRequest (optional) - * @return CreatePolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreatePolicyResponse createPolicy(CreatePolicyRequest createPolicyRequest) - throws ApiException { - ApiResponse localVarResp = - createPolicyWithHttpInfo(createPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param createPolicyRequest (optional) - * @return ApiResponse<CreatePolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createPolicyWithHttpInfo( - CreatePolicyRequest createPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = createPolicyValidateBeforeCall(createPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createPolicyAsync( - CreatePolicyRequest createPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createPolicyValidateBeforeCall(createPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createPolicyVersion - * - * @param createPolicyVersionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createPolicyVersionCall( - CreatePolicyVersionRequest createPolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createPolicyVersionRequest; - - // create path and map variables - String localVarPath = "/CreatePolicyVersion"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPolicyVersionValidateBeforeCall( - CreatePolicyVersionRequest createPolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - return createPolicyVersionCall(createPolicyVersionRequest, _callback); - } - - /** - * @param createPolicyVersionRequest (optional) - * @return CreatePolicyVersionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreatePolicyVersionResponse createPolicyVersion( - CreatePolicyVersionRequest createPolicyVersionRequest) throws ApiException { - ApiResponse localVarResp = - createPolicyVersionWithHttpInfo(createPolicyVersionRequest); - return localVarResp.getData(); - } - - /** - * @param createPolicyVersionRequest (optional) - * @return ApiResponse<CreatePolicyVersionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createPolicyVersionWithHttpInfo( - CreatePolicyVersionRequest createPolicyVersionRequest) throws ApiException { - okhttp3.Call localVarCall = - createPolicyVersionValidateBeforeCall(createPolicyVersionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createPolicyVersionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createPolicyVersionAsync( - CreatePolicyVersionRequest createPolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createPolicyVersionValidateBeforeCall(createPolicyVersionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deletePolicy - * - * @param deletePolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deletePolicyCall( - DeletePolicyRequest deletePolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deletePolicyRequest; - - // create path and map variables - String localVarPath = "/DeletePolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePolicyValidateBeforeCall( - DeletePolicyRequest deletePolicyRequest, final ApiCallback _callback) - throws ApiException { - return deletePolicyCall(deletePolicyRequest, _callback); - } - - /** - * @param deletePolicyRequest (optional) - * @return DeletePolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeletePolicyResponse deletePolicy(DeletePolicyRequest deletePolicyRequest) - throws ApiException { - ApiResponse localVarResp = - deletePolicyWithHttpInfo(deletePolicyRequest); - return localVarResp.getData(); - } - - /** - * @param deletePolicyRequest (optional) - * @return ApiResponse<DeletePolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deletePolicyWithHttpInfo( - DeletePolicyRequest deletePolicyRequest) throws ApiException { - okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(deletePolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deletePolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deletePolicyAsync( - DeletePolicyRequest deletePolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(deletePolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deletePolicyVersion - * - * @param deletePolicyVersionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deletePolicyVersionCall( - DeletePolicyVersionRequest deletePolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deletePolicyVersionRequest; - - // create path and map variables - String localVarPath = "/DeletePolicyVersion"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePolicyVersionValidateBeforeCall( - DeletePolicyVersionRequest deletePolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - return deletePolicyVersionCall(deletePolicyVersionRequest, _callback); - } - - /** - * @param deletePolicyVersionRequest (optional) - * @return DeletePolicyVersionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeletePolicyVersionResponse deletePolicyVersion( - DeletePolicyVersionRequest deletePolicyVersionRequest) throws ApiException { - ApiResponse localVarResp = - deletePolicyVersionWithHttpInfo(deletePolicyVersionRequest); - return localVarResp.getData(); - } - - /** - * @param deletePolicyVersionRequest (optional) - * @return ApiResponse<DeletePolicyVersionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deletePolicyVersionWithHttpInfo( - DeletePolicyVersionRequest deletePolicyVersionRequest) throws ApiException { - okhttp3.Call localVarCall = - deletePolicyVersionValidateBeforeCall(deletePolicyVersionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deletePolicyVersionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deletePolicyVersionAsync( - DeletePolicyVersionRequest deletePolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deletePolicyVersionValidateBeforeCall(deletePolicyVersionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteUserGroupPolicy - * - * @param deleteUserGroupPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserGroupPolicyCall( - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteUserGroupPolicyRequest; - - // create path and map variables - String localVarPath = "/DeleteUserGroupPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserGroupPolicyValidateBeforeCall( - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - return deleteUserGroupPolicyCall(deleteUserGroupPolicyRequest, _callback); - } - - /** - * @param deleteUserGroupPolicyRequest (optional) - * @return DeleteUserGroupPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteUserGroupPolicyResponse deleteUserGroupPolicy( - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest) throws ApiException { - ApiResponse localVarResp = - deleteUserGroupPolicyWithHttpInfo(deleteUserGroupPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param deleteUserGroupPolicyRequest (optional) - * @return ApiResponse<DeleteUserGroupPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteUserGroupPolicyWithHttpInfo( - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteUserGroupPolicyValidateBeforeCall(deleteUserGroupPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteUserGroupPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserGroupPolicyAsync( - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteUserGroupPolicyValidateBeforeCall(deleteUserGroupPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkManagedPolicyToUserGroup - * - * @param linkManagedPolicyToUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkManagedPolicyToUserGroupCall( - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkManagedPolicyToUserGroupRequest; - - // create path and map variables - String localVarPath = "/LinkManagedPolicyToUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkManagedPolicyToUserGroupValidateBeforeCall( - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - return linkManagedPolicyToUserGroupCall(linkManagedPolicyToUserGroupRequest, _callback); - } - - /** - * @param linkManagedPolicyToUserGroupRequest (optional) - * @return LinkManagedPolicyToUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public LinkManagedPolicyToUserGroupResponse linkManagedPolicyToUserGroup( - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - linkManagedPolicyToUserGroupWithHttpInfo(linkManagedPolicyToUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param linkManagedPolicyToUserGroupRequest (optional) - * @return ApiResponse<LinkManagedPolicyToUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse - linkManagedPolicyToUserGroupWithHttpInfo( - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest) - throws ApiException { - okhttp3.Call localVarCall = - linkManagedPolicyToUserGroupValidateBeforeCall( - linkManagedPolicyToUserGroupRequest, null); - Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkManagedPolicyToUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkManagedPolicyToUserGroupAsync( - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkManagedPolicyToUserGroupValidateBeforeCall( - linkManagedPolicyToUserGroupRequest, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkPolicy - * - * @param linkPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkPolicyCall( - LinkPolicyRequest linkPolicyRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkPolicyRequest; - - // create path and map variables - String localVarPath = "/LinkPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkPolicyValidateBeforeCall( - LinkPolicyRequest linkPolicyRequest, final ApiCallback _callback) throws ApiException { - return linkPolicyCall(linkPolicyRequest, _callback); - } - - /** - * @param linkPolicyRequest (optional) - * @return LinkPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public LinkPolicyResponse linkPolicy(LinkPolicyRequest linkPolicyRequest) throws ApiException { - ApiResponse localVarResp = linkPolicyWithHttpInfo(linkPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param linkPolicyRequest (optional) - * @return ApiResponse<LinkPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse linkPolicyWithHttpInfo( - LinkPolicyRequest linkPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = linkPolicyValidateBeforeCall(linkPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkPolicyAsync( - LinkPolicyRequest linkPolicyRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = linkPolicyValidateBeforeCall(linkPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for putUserGroupPolicy - * - * @param putUserGroupPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call putUserGroupPolicyCall( - PutUserGroupPolicyRequest putUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = putUserGroupPolicyRequest; - - // create path and map variables - String localVarPath = "/PutUserGroupPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call putUserGroupPolicyValidateBeforeCall( - PutUserGroupPolicyRequest putUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - return putUserGroupPolicyCall(putUserGroupPolicyRequest, _callback); - } - - /** - * @param putUserGroupPolicyRequest (optional) - * @return PutUserGroupPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public PutUserGroupPolicyResponse putUserGroupPolicy( - PutUserGroupPolicyRequest putUserGroupPolicyRequest) throws ApiException { - ApiResponse localVarResp = - putUserGroupPolicyWithHttpInfo(putUserGroupPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param putUserGroupPolicyRequest (optional) - * @return ApiResponse<PutUserGroupPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse putUserGroupPolicyWithHttpInfo( - PutUserGroupPolicyRequest putUserGroupPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - putUserGroupPolicyValidateBeforeCall(putUserGroupPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param putUserGroupPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call putUserGroupPolicyAsync( - PutUserGroupPolicyRequest putUserGroupPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - putUserGroupPolicyValidateBeforeCall(putUserGroupPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readLinkedPolicies - * - * @param readLinkedPoliciesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLinkedPoliciesCall( - ReadLinkedPoliciesRequest readLinkedPoliciesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readLinkedPoliciesRequest; - - // create path and map variables - String localVarPath = "/ReadLinkedPolicies"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readLinkedPoliciesValidateBeforeCall( - ReadLinkedPoliciesRequest readLinkedPoliciesRequest, final ApiCallback _callback) - throws ApiException { - return readLinkedPoliciesCall(readLinkedPoliciesRequest, _callback); - } - - /** - * @param readLinkedPoliciesRequest (optional) - * @return ReadLinkedPoliciesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadLinkedPoliciesResponse readLinkedPolicies( - ReadLinkedPoliciesRequest readLinkedPoliciesRequest) throws ApiException { - ApiResponse localVarResp = - readLinkedPoliciesWithHttpInfo(readLinkedPoliciesRequest); - return localVarResp.getData(); - } - - /** - * @param readLinkedPoliciesRequest (optional) - * @return ApiResponse<ReadLinkedPoliciesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readLinkedPoliciesWithHttpInfo( - ReadLinkedPoliciesRequest readLinkedPoliciesRequest) throws ApiException { - okhttp3.Call localVarCall = - readLinkedPoliciesValidateBeforeCall(readLinkedPoliciesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readLinkedPoliciesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readLinkedPoliciesAsync( - ReadLinkedPoliciesRequest readLinkedPoliciesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readLinkedPoliciesValidateBeforeCall(readLinkedPoliciesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readManagedPoliciesLinkedToUserGroup - * - * @param readManagedPoliciesLinkedToUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readManagedPoliciesLinkedToUserGroupCall( - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readManagedPoliciesLinkedToUserGroupRequest; - - // create path and map variables - String localVarPath = "/ReadManagedPoliciesLinkedToUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readManagedPoliciesLinkedToUserGroupValidateBeforeCall( - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - return readManagedPoliciesLinkedToUserGroupCall( - readManagedPoliciesLinkedToUserGroupRequest, _callback); - } - - /** - * @param readManagedPoliciesLinkedToUserGroupRequest (optional) - * @return ReadManagedPoliciesLinkedToUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadManagedPoliciesLinkedToUserGroupResponse readManagedPoliciesLinkedToUserGroup( - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - readManagedPoliciesLinkedToUserGroupWithHttpInfo( - readManagedPoliciesLinkedToUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param readManagedPoliciesLinkedToUserGroupRequest (optional) - * @return ApiResponse<ReadManagedPoliciesLinkedToUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse - readManagedPoliciesLinkedToUserGroupWithHttpInfo( - ReadManagedPoliciesLinkedToUserGroupRequest - readManagedPoliciesLinkedToUserGroupRequest) - throws ApiException { - okhttp3.Call localVarCall = - readManagedPoliciesLinkedToUserGroupValidateBeforeCall( - readManagedPoliciesLinkedToUserGroupRequest, null); - Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readManagedPoliciesLinkedToUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readManagedPoliciesLinkedToUserGroupAsync( - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readManagedPoliciesLinkedToUserGroupValidateBeforeCall( - readManagedPoliciesLinkedToUserGroupRequest, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPolicies - * - * @param readPoliciesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPoliciesCall( - ReadPoliciesRequest readPoliciesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPoliciesRequest; - - // create path and map variables - String localVarPath = "/ReadPolicies"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPoliciesValidateBeforeCall( - ReadPoliciesRequest readPoliciesRequest, final ApiCallback _callback) - throws ApiException { - return readPoliciesCall(readPoliciesRequest, _callback); - } - - /** - * @param readPoliciesRequest (optional) - * @return ReadPoliciesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPoliciesResponse readPolicies(ReadPoliciesRequest readPoliciesRequest) - throws ApiException { - ApiResponse localVarResp = - readPoliciesWithHttpInfo(readPoliciesRequest); - return localVarResp.getData(); - } - - /** - * @param readPoliciesRequest (optional) - * @return ApiResponse<ReadPoliciesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPoliciesWithHttpInfo( - ReadPoliciesRequest readPoliciesRequest) throws ApiException { - okhttp3.Call localVarCall = readPoliciesValidateBeforeCall(readPoliciesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPoliciesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPoliciesAsync( - ReadPoliciesRequest readPoliciesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readPoliciesValidateBeforeCall(readPoliciesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPolicy - * - * @param readPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyCall( - ReadPolicyRequest readPolicyRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPolicyRequest; - - // create path and map variables - String localVarPath = "/ReadPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPolicyValidateBeforeCall( - ReadPolicyRequest readPolicyRequest, final ApiCallback _callback) throws ApiException { - return readPolicyCall(readPolicyRequest, _callback); - } - - /** - * @param readPolicyRequest (optional) - * @return ReadPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPolicyResponse readPolicy(ReadPolicyRequest readPolicyRequest) throws ApiException { - ApiResponse localVarResp = readPolicyWithHttpInfo(readPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param readPolicyRequest (optional) - * @return ApiResponse<ReadPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPolicyWithHttpInfo( - ReadPolicyRequest readPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = readPolicyValidateBeforeCall(readPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyAsync( - ReadPolicyRequest readPolicyRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readPolicyValidateBeforeCall(readPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPolicyVersion - * - * @param readPolicyVersionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyVersionCall( - ReadPolicyVersionRequest readPolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPolicyVersionRequest; - - // create path and map variables - String localVarPath = "/ReadPolicyVersion"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPolicyVersionValidateBeforeCall( - ReadPolicyVersionRequest readPolicyVersionRequest, final ApiCallback _callback) - throws ApiException { - return readPolicyVersionCall(readPolicyVersionRequest, _callback); - } - - /** - * @param readPolicyVersionRequest (optional) - * @return ReadPolicyVersionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPolicyVersionResponse readPolicyVersion( - ReadPolicyVersionRequest readPolicyVersionRequest) throws ApiException { - ApiResponse localVarResp = - readPolicyVersionWithHttpInfo(readPolicyVersionRequest); - return localVarResp.getData(); - } - - /** - * @param readPolicyVersionRequest (optional) - * @return ApiResponse<ReadPolicyVersionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPolicyVersionWithHttpInfo( - ReadPolicyVersionRequest readPolicyVersionRequest) throws ApiException { - okhttp3.Call localVarCall = - readPolicyVersionValidateBeforeCall(readPolicyVersionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPolicyVersionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyVersionAsync( - ReadPolicyVersionRequest readPolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readPolicyVersionValidateBeforeCall(readPolicyVersionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPolicyVersions - * - * @param readPolicyVersionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyVersionsCall( - ReadPolicyVersionsRequest readPolicyVersionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPolicyVersionsRequest; - - // create path and map variables - String localVarPath = "/ReadPolicyVersions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPolicyVersionsValidateBeforeCall( - ReadPolicyVersionsRequest readPolicyVersionsRequest, final ApiCallback _callback) - throws ApiException { - return readPolicyVersionsCall(readPolicyVersionsRequest, _callback); - } - - /** - * @param readPolicyVersionsRequest (optional) - * @return ReadPolicyVersionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPolicyVersionsResponse readPolicyVersions( - ReadPolicyVersionsRequest readPolicyVersionsRequest) throws ApiException { - ApiResponse localVarResp = - readPolicyVersionsWithHttpInfo(readPolicyVersionsRequest); - return localVarResp.getData(); - } - - /** - * @param readPolicyVersionsRequest (optional) - * @return ApiResponse<ReadPolicyVersionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPolicyVersionsWithHttpInfo( - ReadPolicyVersionsRequest readPolicyVersionsRequest) throws ApiException { - okhttp3.Call localVarCall = - readPolicyVersionsValidateBeforeCall(readPolicyVersionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPolicyVersionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPolicyVersionsAsync( - ReadPolicyVersionsRequest readPolicyVersionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readPolicyVersionsValidateBeforeCall(readPolicyVersionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUserGroupPolicies - * - * @param readUserGroupPoliciesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupPoliciesCall( - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUserGroupPoliciesRequest; - - // create path and map variables - String localVarPath = "/ReadUserGroupPolicies"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUserGroupPoliciesValidateBeforeCall( - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest, final ApiCallback _callback) - throws ApiException { - return readUserGroupPoliciesCall(readUserGroupPoliciesRequest, _callback); - } - - /** - * @param readUserGroupPoliciesRequest (optional) - * @return ReadUserGroupPoliciesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUserGroupPoliciesResponse readUserGroupPolicies( - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest) throws ApiException { - ApiResponse localVarResp = - readUserGroupPoliciesWithHttpInfo(readUserGroupPoliciesRequest); - return localVarResp.getData(); - } - - /** - * @param readUserGroupPoliciesRequest (optional) - * @return ApiResponse<ReadUserGroupPoliciesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUserGroupPoliciesWithHttpInfo( - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest) throws ApiException { - okhttp3.Call localVarCall = - readUserGroupPoliciesValidateBeforeCall(readUserGroupPoliciesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUserGroupPoliciesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupPoliciesAsync( - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readUserGroupPoliciesValidateBeforeCall(readUserGroupPoliciesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUserGroupPolicy - * - * @param readUserGroupPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupPolicyCall( - ReadUserGroupPolicyRequest readUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUserGroupPolicyRequest; - - // create path and map variables - String localVarPath = "/ReadUserGroupPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUserGroupPolicyValidateBeforeCall( - ReadUserGroupPolicyRequest readUserGroupPolicyRequest, final ApiCallback _callback) - throws ApiException { - return readUserGroupPolicyCall(readUserGroupPolicyRequest, _callback); - } - - /** - * @param readUserGroupPolicyRequest (optional) - * @return ReadUserGroupPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUserGroupPolicyResponse readUserGroupPolicy( - ReadUserGroupPolicyRequest readUserGroupPolicyRequest) throws ApiException { - ApiResponse localVarResp = - readUserGroupPolicyWithHttpInfo(readUserGroupPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param readUserGroupPolicyRequest (optional) - * @return ApiResponse<ReadUserGroupPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUserGroupPolicyWithHttpInfo( - ReadUserGroupPolicyRequest readUserGroupPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = - readUserGroupPolicyValidateBeforeCall(readUserGroupPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUserGroupPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupPolicyAsync( - ReadUserGroupPolicyRequest readUserGroupPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readUserGroupPolicyValidateBeforeCall(readUserGroupPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for setDefaultPolicyVersion - * - * @param setDefaultPolicyVersionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call setDefaultPolicyVersionCall( - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = setDefaultPolicyVersionRequest; - - // create path and map variables - String localVarPath = "/SetDefaultPolicyVersion"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call setDefaultPolicyVersionValidateBeforeCall( - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - return setDefaultPolicyVersionCall(setDefaultPolicyVersionRequest, _callback); - } - - /** - * @param setDefaultPolicyVersionRequest (optional) - * @return SetDefaultPolicyVersionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public SetDefaultPolicyVersionResponse setDefaultPolicyVersion( - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest) throws ApiException { - ApiResponse localVarResp = - setDefaultPolicyVersionWithHttpInfo(setDefaultPolicyVersionRequest); - return localVarResp.getData(); - } - - /** - * @param setDefaultPolicyVersionRequest (optional) - * @return ApiResponse<SetDefaultPolicyVersionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse setDefaultPolicyVersionWithHttpInfo( - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest) throws ApiException { - okhttp3.Call localVarCall = - setDefaultPolicyVersionValidateBeforeCall(setDefaultPolicyVersionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param setDefaultPolicyVersionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call setDefaultPolicyVersionAsync( - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - setDefaultPolicyVersionValidateBeforeCall( - setDefaultPolicyVersionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkManagedPolicyFromUserGroup - * - * @param unlinkManagedPolicyFromUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkManagedPolicyFromUserGroupCall( - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkManagedPolicyFromUserGroupRequest; - - // create path and map variables - String localVarPath = "/UnlinkManagedPolicyFromUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkManagedPolicyFromUserGroupValidateBeforeCall( - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - return unlinkManagedPolicyFromUserGroupCall( - unlinkManagedPolicyFromUserGroupRequest, _callback); - } - - /** - * @param unlinkManagedPolicyFromUserGroupRequest (optional) - * @return UnlinkManagedPolicyFromUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UnlinkManagedPolicyFromUserGroupResponse unlinkManagedPolicyFromUserGroup( - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - unlinkManagedPolicyFromUserGroupWithHttpInfo( - unlinkManagedPolicyFromUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkManagedPolicyFromUserGroupRequest (optional) - * @return ApiResponse<UnlinkManagedPolicyFromUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse - unlinkManagedPolicyFromUserGroupWithHttpInfo( - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest) - throws ApiException { - okhttp3.Call localVarCall = - unlinkManagedPolicyFromUserGroupValidateBeforeCall( - unlinkManagedPolicyFromUserGroupRequest, null); - Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkManagedPolicyFromUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkManagedPolicyFromUserGroupAsync( - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkManagedPolicyFromUserGroupValidateBeforeCall( - unlinkManagedPolicyFromUserGroupRequest, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkPolicy - * - * @param unlinkPolicyRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkPolicyCall( - UnlinkPolicyRequest unlinkPolicyRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkPolicyRequest; - - // create path and map variables - String localVarPath = "/UnlinkPolicy"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkPolicyValidateBeforeCall( - UnlinkPolicyRequest unlinkPolicyRequest, final ApiCallback _callback) - throws ApiException { - return unlinkPolicyCall(unlinkPolicyRequest, _callback); - } - - /** - * @param unlinkPolicyRequest (optional) - * @return UnlinkPolicyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UnlinkPolicyResponse unlinkPolicy(UnlinkPolicyRequest unlinkPolicyRequest) - throws ApiException { - ApiResponse localVarResp = - unlinkPolicyWithHttpInfo(unlinkPolicyRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkPolicyRequest (optional) - * @return ApiResponse<UnlinkPolicyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse unlinkPolicyWithHttpInfo( - UnlinkPolicyRequest unlinkPolicyRequest) throws ApiException { - okhttp3.Call localVarCall = unlinkPolicyValidateBeforeCall(unlinkPolicyRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkPolicyRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkPolicyAsync( - UnlinkPolicyRequest unlinkPolicyRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = unlinkPolicyValidateBeforeCall(unlinkPolicyRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApi.java deleted file mode 100644 index 2f8628c8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApi.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateProductTypeRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateProductTypeResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadProductTypesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadProductTypesResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ProductTypeApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ProductTypeApi() { - this(Configuration.getDefaultApiClient()); - } - - public ProductTypeApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createProductType - * - * @param createProductTypeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createProductTypeCall( - CreateProductTypeRequest createProductTypeRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createProductTypeRequest; - - // create path and map variables - String localVarPath = "/CreateProductType"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProductTypeValidateBeforeCall( - CreateProductTypeRequest createProductTypeRequest, final ApiCallback _callback) - throws ApiException { - return createProductTypeCall(createProductTypeRequest, _callback); - } - - /** - * @param createProductTypeRequest (optional) - * @return CreateProductTypeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateProductTypeResponse createProductType( - CreateProductTypeRequest createProductTypeRequest) throws ApiException { - ApiResponse localVarResp = - createProductTypeWithHttpInfo(createProductTypeRequest); - return localVarResp.getData(); - } - - /** - * @param createProductTypeRequest (optional) - * @return ApiResponse<CreateProductTypeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createProductTypeWithHttpInfo( - CreateProductTypeRequest createProductTypeRequest) throws ApiException { - okhttp3.Call localVarCall = - createProductTypeValidateBeforeCall(createProductTypeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createProductTypeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createProductTypeAsync( - CreateProductTypeRequest createProductTypeRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createProductTypeValidateBeforeCall(createProductTypeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readProductTypes - * - * @param readProductTypesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readProductTypesCall( - ReadProductTypesRequest readProductTypesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readProductTypesRequest; - - // create path and map variables - String localVarPath = "/ReadProductTypes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readProductTypesValidateBeforeCall( - ReadProductTypesRequest readProductTypesRequest, final ApiCallback _callback) - throws ApiException { - return readProductTypesCall(readProductTypesRequest, _callback); - } - - /** - * @param readProductTypesRequest (optional) - * @return ReadProductTypesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadProductTypesResponse readProductTypes( - ReadProductTypesRequest readProductTypesRequest) throws ApiException { - ApiResponse localVarResp = - readProductTypesWithHttpInfo(readProductTypesRequest); - return localVarResp.getData(); - } - - /** - * @param readProductTypesRequest (optional) - * @return ApiResponse<ReadProductTypesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readProductTypesWithHttpInfo( - ReadProductTypesRequest readProductTypesRequest) throws ApiException { - okhttp3.Call localVarCall = - readProductTypesValidateBeforeCall(readProductTypesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readProductTypesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readProductTypesAsync( - ReadProductTypesRequest readProductTypesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readProductTypesValidateBeforeCall(readProductTypesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApi.java deleted file mode 100644 index b2132b2e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApi.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PublicCatalogApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PublicCatalogApi() { - this(Configuration.getDefaultApiClient()); - } - - public PublicCatalogApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readPublicCatalog - * - * @param readPublicCatalogRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPublicCatalogCall( - ReadPublicCatalogRequest readPublicCatalogRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPublicCatalogRequest; - - // create path and map variables - String localVarPath = "/ReadPublicCatalog"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPublicCatalogValidateBeforeCall( - ReadPublicCatalogRequest readPublicCatalogRequest, final ApiCallback _callback) - throws ApiException { - return readPublicCatalogCall(readPublicCatalogRequest, _callback); - } - - /** - * @param readPublicCatalogRequest (optional) - * @return ReadPublicCatalogResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPublicCatalogResponse readPublicCatalog( - ReadPublicCatalogRequest readPublicCatalogRequest) throws ApiException { - ApiResponse localVarResp = - readPublicCatalogWithHttpInfo(readPublicCatalogRequest); - return localVarResp.getData(); - } - - /** - * @param readPublicCatalogRequest (optional) - * @return ApiResponse<ReadPublicCatalogResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPublicCatalogWithHttpInfo( - ReadPublicCatalogRequest readPublicCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = - readPublicCatalogValidateBeforeCall(readPublicCatalogRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPublicCatalogRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPublicCatalogAsync( - ReadPublicCatalogRequest readPublicCatalogRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readPublicCatalogValidateBeforeCall(readPublicCatalogRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApi.java deleted file mode 100644 index 131d9ef7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApi.java +++ /dev/null @@ -1,953 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreatePublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PublicIpApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PublicIpApi() { - this(Configuration.getDefaultApiClient()); - } - - public PublicIpApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createPublicIp - * - * @param createPublicIpRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createPublicIpCall( - CreatePublicIpRequest createPublicIpRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createPublicIpRequest; - - // create path and map variables - String localVarPath = "/CreatePublicIp"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPublicIpValidateBeforeCall( - CreatePublicIpRequest createPublicIpRequest, final ApiCallback _callback) - throws ApiException { - return createPublicIpCall(createPublicIpRequest, _callback); - } - - /** - * @param createPublicIpRequest (optional) - * @return CreatePublicIpResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreatePublicIpResponse createPublicIp(CreatePublicIpRequest createPublicIpRequest) - throws ApiException { - ApiResponse localVarResp = - createPublicIpWithHttpInfo(createPublicIpRequest); - return localVarResp.getData(); - } - - /** - * @param createPublicIpRequest (optional) - * @return ApiResponse<CreatePublicIpResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createPublicIpWithHttpInfo( - CreatePublicIpRequest createPublicIpRequest) throws ApiException { - okhttp3.Call localVarCall = createPublicIpValidateBeforeCall(createPublicIpRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createPublicIpRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createPublicIpAsync( - CreatePublicIpRequest createPublicIpRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createPublicIpValidateBeforeCall(createPublicIpRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deletePublicIp - * - * @param deletePublicIpRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deletePublicIpCall( - DeletePublicIpRequest deletePublicIpRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deletePublicIpRequest; - - // create path and map variables - String localVarPath = "/DeletePublicIp"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePublicIpValidateBeforeCall( - DeletePublicIpRequest deletePublicIpRequest, final ApiCallback _callback) - throws ApiException { - return deletePublicIpCall(deletePublicIpRequest, _callback); - } - - /** - * @param deletePublicIpRequest (optional) - * @return DeletePublicIpResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeletePublicIpResponse deletePublicIp(DeletePublicIpRequest deletePublicIpRequest) - throws ApiException { - ApiResponse localVarResp = - deletePublicIpWithHttpInfo(deletePublicIpRequest); - return localVarResp.getData(); - } - - /** - * @param deletePublicIpRequest (optional) - * @return ApiResponse<DeletePublicIpResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deletePublicIpWithHttpInfo( - DeletePublicIpRequest deletePublicIpRequest) throws ApiException { - okhttp3.Call localVarCall = deletePublicIpValidateBeforeCall(deletePublicIpRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deletePublicIpRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deletePublicIpAsync( - DeletePublicIpRequest deletePublicIpRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deletePublicIpValidateBeforeCall(deletePublicIpRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkPublicIp - * - * @param linkPublicIpRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkPublicIpCall( - LinkPublicIpRequest linkPublicIpRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkPublicIpRequest; - - // create path and map variables - String localVarPath = "/LinkPublicIp"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkPublicIpValidateBeforeCall( - LinkPublicIpRequest linkPublicIpRequest, final ApiCallback _callback) - throws ApiException { - return linkPublicIpCall(linkPublicIpRequest, _callback); - } - - /** - * @param linkPublicIpRequest (optional) - * @return LinkPublicIpResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkPublicIpResponse linkPublicIp(LinkPublicIpRequest linkPublicIpRequest) - throws ApiException { - ApiResponse localVarResp = - linkPublicIpWithHttpInfo(linkPublicIpRequest); - return localVarResp.getData(); - } - - /** - * @param linkPublicIpRequest (optional) - * @return ApiResponse<LinkPublicIpResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkPublicIpWithHttpInfo( - LinkPublicIpRequest linkPublicIpRequest) throws ApiException { - okhttp3.Call localVarCall = linkPublicIpValidateBeforeCall(linkPublicIpRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkPublicIpRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkPublicIpAsync( - LinkPublicIpRequest linkPublicIpRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = linkPublicIpValidateBeforeCall(linkPublicIpRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPublicIpRanges - * - * @param readPublicIpRangesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPublicIpRangesCall( - ReadPublicIpRangesRequest readPublicIpRangesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPublicIpRangesRequest; - - // create path and map variables - String localVarPath = "/ReadPublicIpRanges"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPublicIpRangesValidateBeforeCall( - ReadPublicIpRangesRequest readPublicIpRangesRequest, final ApiCallback _callback) - throws ApiException { - return readPublicIpRangesCall(readPublicIpRangesRequest, _callback); - } - - /** - * @param readPublicIpRangesRequest (optional) - * @return ReadPublicIpRangesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadPublicIpRangesResponse readPublicIpRanges( - ReadPublicIpRangesRequest readPublicIpRangesRequest) throws ApiException { - ApiResponse localVarResp = - readPublicIpRangesWithHttpInfo(readPublicIpRangesRequest); - return localVarResp.getData(); - } - - /** - * @param readPublicIpRangesRequest (optional) - * @return ApiResponse<ReadPublicIpRangesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readPublicIpRangesWithHttpInfo( - ReadPublicIpRangesRequest readPublicIpRangesRequest) throws ApiException { - okhttp3.Call localVarCall = - readPublicIpRangesValidateBeforeCall(readPublicIpRangesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPublicIpRangesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readPublicIpRangesAsync( - ReadPublicIpRangesRequest readPublicIpRangesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readPublicIpRangesValidateBeforeCall(readPublicIpRangesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readPublicIps - * - * @param readPublicIpsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readPublicIpsCall( - ReadPublicIpsRequest readPublicIpsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readPublicIpsRequest; - - // create path and map variables - String localVarPath = "/ReadPublicIps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readPublicIpsValidateBeforeCall( - ReadPublicIpsRequest readPublicIpsRequest, final ApiCallback _callback) - throws ApiException { - return readPublicIpsCall(readPublicIpsRequest, _callback); - } - - /** - * @param readPublicIpsRequest (optional) - * @return ReadPublicIpsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadPublicIpsResponse readPublicIps(ReadPublicIpsRequest readPublicIpsRequest) - throws ApiException { - ApiResponse localVarResp = - readPublicIpsWithHttpInfo(readPublicIpsRequest); - return localVarResp.getData(); - } - - /** - * @param readPublicIpsRequest (optional) - * @return ApiResponse<ReadPublicIpsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readPublicIpsWithHttpInfo( - ReadPublicIpsRequest readPublicIpsRequest) throws ApiException { - okhttp3.Call localVarCall = readPublicIpsValidateBeforeCall(readPublicIpsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readPublicIpsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readPublicIpsAsync( - ReadPublicIpsRequest readPublicIpsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readPublicIpsValidateBeforeCall(readPublicIpsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkPublicIp - * - * @param unlinkPublicIpRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkPublicIpCall( - UnlinkPublicIpRequest unlinkPublicIpRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkPublicIpRequest; - - // create path and map variables - String localVarPath = "/UnlinkPublicIp"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkPublicIpValidateBeforeCall( - UnlinkPublicIpRequest unlinkPublicIpRequest, final ApiCallback _callback) - throws ApiException { - return unlinkPublicIpCall(unlinkPublicIpRequest, _callback); - } - - /** - * @param unlinkPublicIpRequest (optional) - * @return UnlinkPublicIpResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkPublicIpResponse unlinkPublicIp(UnlinkPublicIpRequest unlinkPublicIpRequest) - throws ApiException { - ApiResponse localVarResp = - unlinkPublicIpWithHttpInfo(unlinkPublicIpRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkPublicIpRequest (optional) - * @return ApiResponse<UnlinkPublicIpResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkPublicIpWithHttpInfo( - UnlinkPublicIpRequest unlinkPublicIpRequest) throws ApiException { - okhttp3.Call localVarCall = unlinkPublicIpValidateBeforeCall(unlinkPublicIpRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkPublicIpRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkPublicIpAsync( - UnlinkPublicIpRequest unlinkPublicIpRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkPublicIpValidateBeforeCall(unlinkPublicIpRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/QuotaApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/QuotaApi.java deleted file mode 100644 index 0b22d6d5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/QuotaApi.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadQuotasRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadQuotasResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class QuotaApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public QuotaApi() { - this(Configuration.getDefaultApiClient()); - } - - public QuotaApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readQuotas - * - * @param readQuotasRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readQuotasCall( - ReadQuotasRequest readQuotasRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readQuotasRequest; - - // create path and map variables - String localVarPath = "/ReadQuotas"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readQuotasValidateBeforeCall( - ReadQuotasRequest readQuotasRequest, final ApiCallback _callback) throws ApiException { - return readQuotasCall(readQuotasRequest, _callback); - } - - /** - * @param readQuotasRequest (optional) - * @return ReadQuotasResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadQuotasResponse readQuotas(ReadQuotasRequest readQuotasRequest) throws ApiException { - ApiResponse localVarResp = readQuotasWithHttpInfo(readQuotasRequest); - return localVarResp.getData(); - } - - /** - * @param readQuotasRequest (optional) - * @return ApiResponse<ReadQuotasResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readQuotasWithHttpInfo( - ReadQuotasRequest readQuotasRequest) throws ApiException { - okhttp3.Call localVarCall = readQuotasValidateBeforeCall(readQuotasRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readQuotasRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readQuotasAsync( - ReadQuotasRequest readQuotasRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readQuotasValidateBeforeCall(readQuotasRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RegionApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/RegionApi.java deleted file mode 100644 index 33edc251..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RegionApi.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadRegionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadRegionsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RegionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public RegionApi() { - this(Configuration.getDefaultApiClient()); - } - - public RegionApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readRegions - * - * @param readRegionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readRegionsCall( - ReadRegionsRequest readRegionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readRegionsRequest; - - // create path and map variables - String localVarPath = "/ReadRegions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readRegionsValidateBeforeCall( - ReadRegionsRequest readRegionsRequest, final ApiCallback _callback) - throws ApiException { - return readRegionsCall(readRegionsRequest, _callback); - } - - /** - * @param readRegionsRequest (optional) - * @return ReadRegionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadRegionsResponse readRegions(ReadRegionsRequest readRegionsRequest) - throws ApiException { - ApiResponse localVarResp = readRegionsWithHttpInfo(readRegionsRequest); - return localVarResp.getData(); - } - - /** - * @param readRegionsRequest (optional) - * @return ApiResponse<ReadRegionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readRegionsWithHttpInfo( - ReadRegionsRequest readRegionsRequest) throws ApiException { - okhttp3.Call localVarCall = readRegionsValidateBeforeCall(readRegionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readRegionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readRegionsAsync( - ReadRegionsRequest readRegionsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readRegionsValidateBeforeCall(readRegionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteApi.java deleted file mode 100644 index 9f6a3a78..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteApi.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RouteApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public RouteApi() { - this(Configuration.getDefaultApiClient()); - } - - public RouteApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createRoute - * - * @param createRouteRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createRouteCall( - CreateRouteRequest createRouteRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createRouteRequest; - - // create path and map variables - String localVarPath = "/CreateRoute"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createRouteValidateBeforeCall( - CreateRouteRequest createRouteRequest, final ApiCallback _callback) - throws ApiException { - return createRouteCall(createRouteRequest, _callback); - } - - /** - * @param createRouteRequest (optional) - * @return CreateRouteResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateRouteResponse createRoute(CreateRouteRequest createRouteRequest) - throws ApiException { - ApiResponse localVarResp = createRouteWithHttpInfo(createRouteRequest); - return localVarResp.getData(); - } - - /** - * @param createRouteRequest (optional) - * @return ApiResponse<CreateRouteResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createRouteWithHttpInfo( - CreateRouteRequest createRouteRequest) throws ApiException { - okhttp3.Call localVarCall = createRouteValidateBeforeCall(createRouteRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createRouteRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createRouteAsync( - CreateRouteRequest createRouteRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createRouteValidateBeforeCall(createRouteRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteRoute - * - * @param deleteRouteRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteRouteCall( - DeleteRouteRequest deleteRouteRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteRouteRequest; - - // create path and map variables - String localVarPath = "/DeleteRoute"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRouteValidateBeforeCall( - DeleteRouteRequest deleteRouteRequest, final ApiCallback _callback) - throws ApiException { - return deleteRouteCall(deleteRouteRequest, _callback); - } - - /** - * @param deleteRouteRequest (optional) - * @return DeleteRouteResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteRouteResponse deleteRoute(DeleteRouteRequest deleteRouteRequest) - throws ApiException { - ApiResponse localVarResp = deleteRouteWithHttpInfo(deleteRouteRequest); - return localVarResp.getData(); - } - - /** - * @param deleteRouteRequest (optional) - * @return ApiResponse<DeleteRouteResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteRouteWithHttpInfo( - DeleteRouteRequest deleteRouteRequest) throws ApiException { - okhttp3.Call localVarCall = deleteRouteValidateBeforeCall(deleteRouteRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteRouteRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteRouteAsync( - DeleteRouteRequest deleteRouteRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteRouteValidateBeforeCall(deleteRouteRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateRoute - * - * @param updateRouteRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateRouteCall( - UpdateRouteRequest updateRouteRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateRouteRequest; - - // create path and map variables - String localVarPath = "/UpdateRoute"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateRouteValidateBeforeCall( - UpdateRouteRequest updateRouteRequest, final ApiCallback _callback) - throws ApiException { - return updateRouteCall(updateRouteRequest, _callback); - } - - /** - * @param updateRouteRequest (optional) - * @return UpdateRouteResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateRouteResponse updateRoute(UpdateRouteRequest updateRouteRequest) - throws ApiException { - ApiResponse localVarResp = updateRouteWithHttpInfo(updateRouteRequest); - return localVarResp.getData(); - } - - /** - * @param updateRouteRequest (optional) - * @return ApiResponse<UpdateRouteResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateRouteWithHttpInfo( - UpdateRouteRequest updateRouteRequest) throws ApiException { - okhttp3.Call localVarCall = updateRouteValidateBeforeCall(updateRouteRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateRouteRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateRouteAsync( - UpdateRouteRequest updateRouteRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateRouteValidateBeforeCall(updateRouteRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApi.java deleted file mode 100644 index 1e11f2f0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApi.java +++ /dev/null @@ -1,969 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RouteTableApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public RouteTableApi() { - this(Configuration.getDefaultApiClient()); - } - - public RouteTableApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createRouteTable - * - * @param createRouteTableRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createRouteTableCall( - CreateRouteTableRequest createRouteTableRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createRouteTableRequest; - - // create path and map variables - String localVarPath = "/CreateRouteTable"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createRouteTableValidateBeforeCall( - CreateRouteTableRequest createRouteTableRequest, final ApiCallback _callback) - throws ApiException { - return createRouteTableCall(createRouteTableRequest, _callback); - } - - /** - * @param createRouteTableRequest (optional) - * @return CreateRouteTableResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateRouteTableResponse createRouteTable( - CreateRouteTableRequest createRouteTableRequest) throws ApiException { - ApiResponse localVarResp = - createRouteTableWithHttpInfo(createRouteTableRequest); - return localVarResp.getData(); - } - - /** - * @param createRouteTableRequest (optional) - * @return ApiResponse<CreateRouteTableResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createRouteTableWithHttpInfo( - CreateRouteTableRequest createRouteTableRequest) throws ApiException { - okhttp3.Call localVarCall = - createRouteTableValidateBeforeCall(createRouteTableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createRouteTableRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createRouteTableAsync( - CreateRouteTableRequest createRouteTableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createRouteTableValidateBeforeCall(createRouteTableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteRouteTable - * - * @param deleteRouteTableRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteRouteTableCall( - DeleteRouteTableRequest deleteRouteTableRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteRouteTableRequest; - - // create path and map variables - String localVarPath = "/DeleteRouteTable"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRouteTableValidateBeforeCall( - DeleteRouteTableRequest deleteRouteTableRequest, final ApiCallback _callback) - throws ApiException { - return deleteRouteTableCall(deleteRouteTableRequest, _callback); - } - - /** - * @param deleteRouteTableRequest (optional) - * @return DeleteRouteTableResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteRouteTableResponse deleteRouteTable( - DeleteRouteTableRequest deleteRouteTableRequest) throws ApiException { - ApiResponse localVarResp = - deleteRouteTableWithHttpInfo(deleteRouteTableRequest); - return localVarResp.getData(); - } - - /** - * @param deleteRouteTableRequest (optional) - * @return ApiResponse<DeleteRouteTableResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteRouteTableWithHttpInfo( - DeleteRouteTableRequest deleteRouteTableRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteRouteTableValidateBeforeCall(deleteRouteTableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteRouteTableRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteRouteTableAsync( - DeleteRouteTableRequest deleteRouteTableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteRouteTableValidateBeforeCall(deleteRouteTableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkRouteTable - * - * @param linkRouteTableRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkRouteTableCall( - LinkRouteTableRequest linkRouteTableRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkRouteTableRequest; - - // create path and map variables - String localVarPath = "/LinkRouteTable"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkRouteTableValidateBeforeCall( - LinkRouteTableRequest linkRouteTableRequest, final ApiCallback _callback) - throws ApiException { - return linkRouteTableCall(linkRouteTableRequest, _callback); - } - - /** - * @param linkRouteTableRequest (optional) - * @return LinkRouteTableResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkRouteTableResponse linkRouteTable(LinkRouteTableRequest linkRouteTableRequest) - throws ApiException { - ApiResponse localVarResp = - linkRouteTableWithHttpInfo(linkRouteTableRequest); - return localVarResp.getData(); - } - - /** - * @param linkRouteTableRequest (optional) - * @return ApiResponse<LinkRouteTableResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkRouteTableWithHttpInfo( - LinkRouteTableRequest linkRouteTableRequest) throws ApiException { - okhttp3.Call localVarCall = linkRouteTableValidateBeforeCall(linkRouteTableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkRouteTableRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkRouteTableAsync( - LinkRouteTableRequest linkRouteTableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkRouteTableValidateBeforeCall(linkRouteTableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readRouteTables - * - * @param readRouteTablesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readRouteTablesCall( - ReadRouteTablesRequest readRouteTablesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readRouteTablesRequest; - - // create path and map variables - String localVarPath = "/ReadRouteTables"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readRouteTablesValidateBeforeCall( - ReadRouteTablesRequest readRouteTablesRequest, final ApiCallback _callback) - throws ApiException { - return readRouteTablesCall(readRouteTablesRequest, _callback); - } - - /** - * @param readRouteTablesRequest (optional) - * @return ReadRouteTablesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadRouteTablesResponse readRouteTables(ReadRouteTablesRequest readRouteTablesRequest) - throws ApiException { - ApiResponse localVarResp = - readRouteTablesWithHttpInfo(readRouteTablesRequest); - return localVarResp.getData(); - } - - /** - * @param readRouteTablesRequest (optional) - * @return ApiResponse<ReadRouteTablesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readRouteTablesWithHttpInfo( - ReadRouteTablesRequest readRouteTablesRequest) throws ApiException { - okhttp3.Call localVarCall = readRouteTablesValidateBeforeCall(readRouteTablesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readRouteTablesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readRouteTablesAsync( - ReadRouteTablesRequest readRouteTablesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readRouteTablesValidateBeforeCall(readRouteTablesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkRouteTable - * - * @param unlinkRouteTableRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkRouteTableCall( - UnlinkRouteTableRequest unlinkRouteTableRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkRouteTableRequest; - - // create path and map variables - String localVarPath = "/UnlinkRouteTable"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkRouteTableValidateBeforeCall( - UnlinkRouteTableRequest unlinkRouteTableRequest, final ApiCallback _callback) - throws ApiException { - return unlinkRouteTableCall(unlinkRouteTableRequest, _callback); - } - - /** - * @param unlinkRouteTableRequest (optional) - * @return UnlinkRouteTableResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkRouteTableResponse unlinkRouteTable( - UnlinkRouteTableRequest unlinkRouteTableRequest) throws ApiException { - ApiResponse localVarResp = - unlinkRouteTableWithHttpInfo(unlinkRouteTableRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkRouteTableRequest (optional) - * @return ApiResponse<UnlinkRouteTableResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkRouteTableWithHttpInfo( - UnlinkRouteTableRequest unlinkRouteTableRequest) throws ApiException { - okhttp3.Call localVarCall = - unlinkRouteTableValidateBeforeCall(unlinkRouteTableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkRouteTableRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkRouteTableAsync( - UnlinkRouteTableRequest unlinkRouteTableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkRouteTableValidateBeforeCall(unlinkRouteTableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateRouteTableLink - * - * @param updateRouteTableLinkRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateRouteTableLinkCall( - UpdateRouteTableLinkRequest updateRouteTableLinkRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateRouteTableLinkRequest; - - // create path and map variables - String localVarPath = "/UpdateRouteTableLink"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateRouteTableLinkValidateBeforeCall( - UpdateRouteTableLinkRequest updateRouteTableLinkRequest, final ApiCallback _callback) - throws ApiException { - return updateRouteTableLinkCall(updateRouteTableLinkRequest, _callback); - } - - /** - * @param updateRouteTableLinkRequest (optional) - * @return UpdateRouteTableLinkResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateRouteTableLinkResponse updateRouteTableLink( - UpdateRouteTableLinkRequest updateRouteTableLinkRequest) throws ApiException { - ApiResponse localVarResp = - updateRouteTableLinkWithHttpInfo(updateRouteTableLinkRequest); - return localVarResp.getData(); - } - - /** - * @param updateRouteTableLinkRequest (optional) - * @return ApiResponse<UpdateRouteTableLinkResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateRouteTableLinkWithHttpInfo( - UpdateRouteTableLinkRequest updateRouteTableLinkRequest) throws ApiException { - okhttp3.Call localVarCall = - updateRouteTableLinkValidateBeforeCall(updateRouteTableLinkRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateRouteTableLinkRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateRouteTableLinkAsync( - UpdateRouteTableLinkRequest updateRouteTableLinkRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateRouteTableLinkValidateBeforeCall(updateRouteTableLinkRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApi.java deleted file mode 100644 index 15f49926..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApi.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SecurityGroupApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SecurityGroupApi() { - this(Configuration.getDefaultApiClient()); - } - - public SecurityGroupApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSecurityGroup - * - * @param createSecurityGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSecurityGroupCall( - CreateSecurityGroupRequest createSecurityGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSecurityGroupRequest; - - // create path and map variables - String localVarPath = "/CreateSecurityGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSecurityGroupValidateBeforeCall( - CreateSecurityGroupRequest createSecurityGroupRequest, final ApiCallback _callback) - throws ApiException { - return createSecurityGroupCall(createSecurityGroupRequest, _callback); - } - - /** - * @param createSecurityGroupRequest (optional) - * @return CreateSecurityGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateSecurityGroupResponse createSecurityGroup( - CreateSecurityGroupRequest createSecurityGroupRequest) throws ApiException { - ApiResponse localVarResp = - createSecurityGroupWithHttpInfo(createSecurityGroupRequest); - return localVarResp.getData(); - } - - /** - * @param createSecurityGroupRequest (optional) - * @return ApiResponse<CreateSecurityGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createSecurityGroupWithHttpInfo( - CreateSecurityGroupRequest createSecurityGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - createSecurityGroupValidateBeforeCall(createSecurityGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createSecurityGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSecurityGroupAsync( - CreateSecurityGroupRequest createSecurityGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createSecurityGroupValidateBeforeCall(createSecurityGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSecurityGroup - * - * @param deleteSecurityGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSecurityGroupCall( - DeleteSecurityGroupRequest deleteSecurityGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteSecurityGroupRequest; - - // create path and map variables - String localVarPath = "/DeleteSecurityGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSecurityGroupValidateBeforeCall( - DeleteSecurityGroupRequest deleteSecurityGroupRequest, final ApiCallback _callback) - throws ApiException { - return deleteSecurityGroupCall(deleteSecurityGroupRequest, _callback); - } - - /** - * @param deleteSecurityGroupRequest (optional) - * @return DeleteSecurityGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteSecurityGroupResponse deleteSecurityGroup( - DeleteSecurityGroupRequest deleteSecurityGroupRequest) throws ApiException { - ApiResponse localVarResp = - deleteSecurityGroupWithHttpInfo(deleteSecurityGroupRequest); - return localVarResp.getData(); - } - - /** - * @param deleteSecurityGroupRequest (optional) - * @return ApiResponse<DeleteSecurityGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteSecurityGroupWithHttpInfo( - DeleteSecurityGroupRequest deleteSecurityGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteSecurityGroupValidateBeforeCall(deleteSecurityGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteSecurityGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSecurityGroupAsync( - DeleteSecurityGroupRequest deleteSecurityGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteSecurityGroupValidateBeforeCall(deleteSecurityGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readSecurityGroups - * - * @param readSecurityGroupsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSecurityGroupsCall( - ReadSecurityGroupsRequest readSecurityGroupsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSecurityGroupsRequest; - - // create path and map variables - String localVarPath = "/ReadSecurityGroups"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSecurityGroupsValidateBeforeCall( - ReadSecurityGroupsRequest readSecurityGroupsRequest, final ApiCallback _callback) - throws ApiException { - return readSecurityGroupsCall(readSecurityGroupsRequest, _callback); - } - - /** - * @param readSecurityGroupsRequest (optional) - * @return ReadSecurityGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadSecurityGroupsResponse readSecurityGroups( - ReadSecurityGroupsRequest readSecurityGroupsRequest) throws ApiException { - ApiResponse localVarResp = - readSecurityGroupsWithHttpInfo(readSecurityGroupsRequest); - return localVarResp.getData(); - } - - /** - * @param readSecurityGroupsRequest (optional) - * @return ApiResponse<ReadSecurityGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readSecurityGroupsWithHttpInfo( - ReadSecurityGroupsRequest readSecurityGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - readSecurityGroupsValidateBeforeCall(readSecurityGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSecurityGroupsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSecurityGroupsAsync( - ReadSecurityGroupsRequest readSecurityGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readSecurityGroupsValidateBeforeCall(readSecurityGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApi.java deleted file mode 100644 index 83f79b7a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApi.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SecurityGroupRuleApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SecurityGroupRuleApi() { - this(Configuration.getDefaultApiClient()); - } - - public SecurityGroupRuleApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSecurityGroupRule - * - * @param createSecurityGroupRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSecurityGroupRuleCall( - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSecurityGroupRuleRequest; - - // create path and map variables - String localVarPath = "/CreateSecurityGroupRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSecurityGroupRuleValidateBeforeCall( - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - return createSecurityGroupRuleCall(createSecurityGroupRuleRequest, _callback); - } - - /** - * @param createSecurityGroupRuleRequest (optional) - * @return CreateSecurityGroupRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateSecurityGroupRuleResponse createSecurityGroupRule( - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest) throws ApiException { - ApiResponse localVarResp = - createSecurityGroupRuleWithHttpInfo(createSecurityGroupRuleRequest); - return localVarResp.getData(); - } - - /** - * @param createSecurityGroupRuleRequest (optional) - * @return ApiResponse<CreateSecurityGroupRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createSecurityGroupRuleWithHttpInfo( - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - createSecurityGroupRuleValidateBeforeCall(createSecurityGroupRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createSecurityGroupRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSecurityGroupRuleAsync( - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createSecurityGroupRuleValidateBeforeCall( - createSecurityGroupRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSecurityGroupRule - * - * @param deleteSecurityGroupRuleRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSecurityGroupRuleCall( - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteSecurityGroupRuleRequest; - - // create path and map variables - String localVarPath = "/DeleteSecurityGroupRule"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSecurityGroupRuleValidateBeforeCall( - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - return deleteSecurityGroupRuleCall(deleteSecurityGroupRuleRequest, _callback); - } - - /** - * @param deleteSecurityGroupRuleRequest (optional) - * @return DeleteSecurityGroupRuleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteSecurityGroupRuleResponse deleteSecurityGroupRule( - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest) throws ApiException { - ApiResponse localVarResp = - deleteSecurityGroupRuleWithHttpInfo(deleteSecurityGroupRuleRequest); - return localVarResp.getData(); - } - - /** - * @param deleteSecurityGroupRuleRequest (optional) - * @return ApiResponse<DeleteSecurityGroupRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteSecurityGroupRuleWithHttpInfo( - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteSecurityGroupRuleValidateBeforeCall(deleteSecurityGroupRuleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteSecurityGroupRuleRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSecurityGroupRuleAsync( - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteSecurityGroupRuleValidateBeforeCall( - deleteSecurityGroupRuleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApi.java deleted file mode 100644 index f4e45f21..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApi.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ServerCertificateApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ServerCertificateApi() { - this(Configuration.getDefaultApiClient()); - } - - public ServerCertificateApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createServerCertificate - * - * @param createServerCertificateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createServerCertificateCall( - CreateServerCertificateRequest createServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createServerCertificateRequest; - - // create path and map variables - String localVarPath = "/CreateServerCertificate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createServerCertificateValidateBeforeCall( - CreateServerCertificateRequest createServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - return createServerCertificateCall(createServerCertificateRequest, _callback); - } - - /** - * @param createServerCertificateRequest (optional) - * @return CreateServerCertificateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateServerCertificateResponse createServerCertificate( - CreateServerCertificateRequest createServerCertificateRequest) throws ApiException { - ApiResponse localVarResp = - createServerCertificateWithHttpInfo(createServerCertificateRequest); - return localVarResp.getData(); - } - - /** - * @param createServerCertificateRequest (optional) - * @return ApiResponse<CreateServerCertificateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createServerCertificateWithHttpInfo( - CreateServerCertificateRequest createServerCertificateRequest) throws ApiException { - okhttp3.Call localVarCall = - createServerCertificateValidateBeforeCall(createServerCertificateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createServerCertificateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createServerCertificateAsync( - CreateServerCertificateRequest createServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createServerCertificateValidateBeforeCall( - createServerCertificateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteServerCertificate - * - * @param deleteServerCertificateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteServerCertificateCall( - DeleteServerCertificateRequest deleteServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteServerCertificateRequest; - - // create path and map variables - String localVarPath = "/DeleteServerCertificate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteServerCertificateValidateBeforeCall( - DeleteServerCertificateRequest deleteServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - return deleteServerCertificateCall(deleteServerCertificateRequest, _callback); - } - - /** - * @param deleteServerCertificateRequest (optional) - * @return DeleteServerCertificateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteServerCertificateResponse deleteServerCertificate( - DeleteServerCertificateRequest deleteServerCertificateRequest) throws ApiException { - ApiResponse localVarResp = - deleteServerCertificateWithHttpInfo(deleteServerCertificateRequest); - return localVarResp.getData(); - } - - /** - * @param deleteServerCertificateRequest (optional) - * @return ApiResponse<DeleteServerCertificateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteServerCertificateWithHttpInfo( - DeleteServerCertificateRequest deleteServerCertificateRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteServerCertificateValidateBeforeCall(deleteServerCertificateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteServerCertificateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteServerCertificateAsync( - DeleteServerCertificateRequest deleteServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteServerCertificateValidateBeforeCall( - deleteServerCertificateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readServerCertificates - * - * @param readServerCertificatesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readServerCertificatesCall( - ReadServerCertificatesRequest readServerCertificatesRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readServerCertificatesRequest; - - // create path and map variables - String localVarPath = "/ReadServerCertificates"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readServerCertificatesValidateBeforeCall( - ReadServerCertificatesRequest readServerCertificatesRequest, - final ApiCallback _callback) - throws ApiException { - return readServerCertificatesCall(readServerCertificatesRequest, _callback); - } - - /** - * @param readServerCertificatesRequest (optional) - * @return ReadServerCertificatesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadServerCertificatesResponse readServerCertificates( - ReadServerCertificatesRequest readServerCertificatesRequest) throws ApiException { - ApiResponse localVarResp = - readServerCertificatesWithHttpInfo(readServerCertificatesRequest); - return localVarResp.getData(); - } - - /** - * @param readServerCertificatesRequest (optional) - * @return ApiResponse<ReadServerCertificatesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readServerCertificatesWithHttpInfo( - ReadServerCertificatesRequest readServerCertificatesRequest) throws ApiException { - okhttp3.Call localVarCall = - readServerCertificatesValidateBeforeCall(readServerCertificatesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readServerCertificatesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readServerCertificatesAsync( - ReadServerCertificatesRequest readServerCertificatesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readServerCertificatesValidateBeforeCall(readServerCertificatesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateServerCertificate - * - * @param updateServerCertificateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateServerCertificateCall( - UpdateServerCertificateRequest updateServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateServerCertificateRequest; - - // create path and map variables - String localVarPath = "/UpdateServerCertificate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateServerCertificateValidateBeforeCall( - UpdateServerCertificateRequest updateServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - return updateServerCertificateCall(updateServerCertificateRequest, _callback); - } - - /** - * @param updateServerCertificateRequest (optional) - * @return UpdateServerCertificateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateServerCertificateResponse updateServerCertificate( - UpdateServerCertificateRequest updateServerCertificateRequest) throws ApiException { - ApiResponse localVarResp = - updateServerCertificateWithHttpInfo(updateServerCertificateRequest); - return localVarResp.getData(); - } - - /** - * @param updateServerCertificateRequest (optional) - * @return ApiResponse<UpdateServerCertificateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateServerCertificateWithHttpInfo( - UpdateServerCertificateRequest updateServerCertificateRequest) throws ApiException { - okhttp3.Call localVarCall = - updateServerCertificateValidateBeforeCall(updateServerCertificateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateServerCertificateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateServerCertificateAsync( - UpdateServerCertificateRequest updateServerCertificateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateServerCertificateValidateBeforeCall( - updateServerCertificateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApi.java deleted file mode 100644 index acb5efc3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApi.java +++ /dev/null @@ -1,949 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SnapshotApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SnapshotApi() { - this(Configuration.getDefaultApiClient()); - } - - public SnapshotApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSnapshot - * - * @param createSnapshotRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSnapshotCall( - CreateSnapshotRequest createSnapshotRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSnapshotRequest; - - // create path and map variables - String localVarPath = "/CreateSnapshot"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSnapshotValidateBeforeCall( - CreateSnapshotRequest createSnapshotRequest, final ApiCallback _callback) - throws ApiException { - return createSnapshotCall(createSnapshotRequest, _callback); - } - - /** - * @param createSnapshotRequest (optional) - * @return CreateSnapshotResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateSnapshotResponse createSnapshot(CreateSnapshotRequest createSnapshotRequest) - throws ApiException { - ApiResponse localVarResp = - createSnapshotWithHttpInfo(createSnapshotRequest); - return localVarResp.getData(); - } - - /** - * @param createSnapshotRequest (optional) - * @return ApiResponse<CreateSnapshotResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createSnapshotWithHttpInfo( - CreateSnapshotRequest createSnapshotRequest) throws ApiException { - okhttp3.Call localVarCall = createSnapshotValidateBeforeCall(createSnapshotRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createSnapshotRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSnapshotAsync( - CreateSnapshotRequest createSnapshotRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createSnapshotValidateBeforeCall(createSnapshotRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createSnapshotExportTask - * - * @param createSnapshotExportTaskRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createSnapshotExportTaskCall( - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSnapshotExportTaskRequest; - - // create path and map variables - String localVarPath = "/CreateSnapshotExportTask"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSnapshotExportTaskValidateBeforeCall( - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest, - final ApiCallback _callback) - throws ApiException { - return createSnapshotExportTaskCall(createSnapshotExportTaskRequest, _callback); - } - - /** - * @param createSnapshotExportTaskRequest (optional) - * @return CreateSnapshotExportTaskResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateSnapshotExportTaskResponse createSnapshotExportTask( - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest) throws ApiException { - ApiResponse localVarResp = - createSnapshotExportTaskWithHttpInfo(createSnapshotExportTaskRequest); - return localVarResp.getData(); - } - - /** - * @param createSnapshotExportTaskRequest (optional) - * @return ApiResponse<CreateSnapshotExportTaskResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createSnapshotExportTaskWithHttpInfo( - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest) throws ApiException { - okhttp3.Call localVarCall = - createSnapshotExportTaskValidateBeforeCall(createSnapshotExportTaskRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createSnapshotExportTaskRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createSnapshotExportTaskAsync( - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createSnapshotExportTaskValidateBeforeCall( - createSnapshotExportTaskRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSnapshot - * - * @param deleteSnapshotRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSnapshotCall( - DeleteSnapshotRequest deleteSnapshotRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteSnapshotRequest; - - // create path and map variables - String localVarPath = "/DeleteSnapshot"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSnapshotValidateBeforeCall( - DeleteSnapshotRequest deleteSnapshotRequest, final ApiCallback _callback) - throws ApiException { - return deleteSnapshotCall(deleteSnapshotRequest, _callback); - } - - /** - * @param deleteSnapshotRequest (optional) - * @return DeleteSnapshotResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteSnapshotResponse deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest) - throws ApiException { - ApiResponse localVarResp = - deleteSnapshotWithHttpInfo(deleteSnapshotRequest); - return localVarResp.getData(); - } - - /** - * @param deleteSnapshotRequest (optional) - * @return ApiResponse<DeleteSnapshotResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteSnapshotWithHttpInfo( - DeleteSnapshotRequest deleteSnapshotRequest) throws ApiException { - okhttp3.Call localVarCall = deleteSnapshotValidateBeforeCall(deleteSnapshotRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteSnapshotRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSnapshotAsync( - DeleteSnapshotRequest deleteSnapshotRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteSnapshotValidateBeforeCall(deleteSnapshotRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readSnapshotExportTasks - * - * @param readSnapshotExportTasksRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSnapshotExportTasksCall( - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSnapshotExportTasksRequest; - - // create path and map variables - String localVarPath = "/ReadSnapshotExportTasks"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSnapshotExportTasksValidateBeforeCall( - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest, - final ApiCallback _callback) - throws ApiException { - return readSnapshotExportTasksCall(readSnapshotExportTasksRequest, _callback); - } - - /** - * @param readSnapshotExportTasksRequest (optional) - * @return ReadSnapshotExportTasksResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadSnapshotExportTasksResponse readSnapshotExportTasks( - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest) throws ApiException { - ApiResponse localVarResp = - readSnapshotExportTasksWithHttpInfo(readSnapshotExportTasksRequest); - return localVarResp.getData(); - } - - /** - * @param readSnapshotExportTasksRequest (optional) - * @return ApiResponse<ReadSnapshotExportTasksResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readSnapshotExportTasksWithHttpInfo( - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest) throws ApiException { - okhttp3.Call localVarCall = - readSnapshotExportTasksValidateBeforeCall(readSnapshotExportTasksRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSnapshotExportTasksRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSnapshotExportTasksAsync( - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readSnapshotExportTasksValidateBeforeCall( - readSnapshotExportTasksRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readSnapshots - * - * @param readSnapshotsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSnapshotsCall( - ReadSnapshotsRequest readSnapshotsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSnapshotsRequest; - - // create path and map variables - String localVarPath = "/ReadSnapshots"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSnapshotsValidateBeforeCall( - ReadSnapshotsRequest readSnapshotsRequest, final ApiCallback _callback) - throws ApiException { - return readSnapshotsCall(readSnapshotsRequest, _callback); - } - - /** - * @param readSnapshotsRequest (optional) - * @return ReadSnapshotsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadSnapshotsResponse readSnapshots(ReadSnapshotsRequest readSnapshotsRequest) - throws ApiException { - ApiResponse localVarResp = - readSnapshotsWithHttpInfo(readSnapshotsRequest); - return localVarResp.getData(); - } - - /** - * @param readSnapshotsRequest (optional) - * @return ApiResponse<ReadSnapshotsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readSnapshotsWithHttpInfo( - ReadSnapshotsRequest readSnapshotsRequest) throws ApiException { - okhttp3.Call localVarCall = readSnapshotsValidateBeforeCall(readSnapshotsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSnapshotsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSnapshotsAsync( - ReadSnapshotsRequest readSnapshotsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readSnapshotsValidateBeforeCall(readSnapshotsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateSnapshot - * - * @param updateSnapshotRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateSnapshotCall( - UpdateSnapshotRequest updateSnapshotRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateSnapshotRequest; - - // create path and map variables - String localVarPath = "/UpdateSnapshot"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateSnapshotValidateBeforeCall( - UpdateSnapshotRequest updateSnapshotRequest, final ApiCallback _callback) - throws ApiException { - return updateSnapshotCall(updateSnapshotRequest, _callback); - } - - /** - * @param updateSnapshotRequest (optional) - * @return UpdateSnapshotResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateSnapshotResponse updateSnapshot(UpdateSnapshotRequest updateSnapshotRequest) - throws ApiException { - ApiResponse localVarResp = - updateSnapshotWithHttpInfo(updateSnapshotRequest); - return localVarResp.getData(); - } - - /** - * @param updateSnapshotRequest (optional) - * @return ApiResponse<UpdateSnapshotResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateSnapshotWithHttpInfo( - UpdateSnapshotRequest updateSnapshotRequest) throws ApiException { - okhttp3.Call localVarCall = updateSnapshotValidateBeforeCall(updateSnapshotRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateSnapshotRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateSnapshotAsync( - UpdateSnapshotRequest updateSnapshotRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateSnapshotValidateBeforeCall(updateSnapshotRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubnetApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubnetApi.java deleted file mode 100644 index 452ee24d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubnetApi.java +++ /dev/null @@ -1,663 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSubnetResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSubnetResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSubnetsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSubnetsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateSubnetResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SubnetApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SubnetApi() { - this(Configuration.getDefaultApiClient()); - } - - public SubnetApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSubnet - * - * @param createSubnetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSubnetCall( - CreateSubnetRequest createSubnetRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSubnetRequest; - - // create path and map variables - String localVarPath = "/CreateSubnet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSubnetValidateBeforeCall( - CreateSubnetRequest createSubnetRequest, final ApiCallback _callback) - throws ApiException { - return createSubnetCall(createSubnetRequest, _callback); - } - - /** - * @param createSubnetRequest (optional) - * @return CreateSubnetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateSubnetResponse createSubnet(CreateSubnetRequest createSubnetRequest) - throws ApiException { - ApiResponse localVarResp = - createSubnetWithHttpInfo(createSubnetRequest); - return localVarResp.getData(); - } - - /** - * @param createSubnetRequest (optional) - * @return ApiResponse<CreateSubnetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createSubnetWithHttpInfo( - CreateSubnetRequest createSubnetRequest) throws ApiException { - okhttp3.Call localVarCall = createSubnetValidateBeforeCall(createSubnetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createSubnetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
409 The HTTP 409 response (Conflict). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createSubnetAsync( - CreateSubnetRequest createSubnetRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createSubnetValidateBeforeCall(createSubnetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSubnet - * - * @param deleteSubnetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSubnetCall( - DeleteSubnetRequest deleteSubnetRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteSubnetRequest; - - // create path and map variables - String localVarPath = "/DeleteSubnet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSubnetValidateBeforeCall( - DeleteSubnetRequest deleteSubnetRequest, final ApiCallback _callback) - throws ApiException { - return deleteSubnetCall(deleteSubnetRequest, _callback); - } - - /** - * @param deleteSubnetRequest (optional) - * @return DeleteSubnetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteSubnetResponse deleteSubnet(DeleteSubnetRequest deleteSubnetRequest) - throws ApiException { - ApiResponse localVarResp = - deleteSubnetWithHttpInfo(deleteSubnetRequest); - return localVarResp.getData(); - } - - /** - * @param deleteSubnetRequest (optional) - * @return ApiResponse<DeleteSubnetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteSubnetWithHttpInfo( - DeleteSubnetRequest deleteSubnetRequest) throws ApiException { - okhttp3.Call localVarCall = deleteSubnetValidateBeforeCall(deleteSubnetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteSubnetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteSubnetAsync( - DeleteSubnetRequest deleteSubnetRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteSubnetValidateBeforeCall(deleteSubnetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readSubnets - * - * @param readSubnetsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSubnetsCall( - ReadSubnetsRequest readSubnetsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSubnetsRequest; - - // create path and map variables - String localVarPath = "/ReadSubnets"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSubnetsValidateBeforeCall( - ReadSubnetsRequest readSubnetsRequest, final ApiCallback _callback) - throws ApiException { - return readSubnetsCall(readSubnetsRequest, _callback); - } - - /** - * @param readSubnetsRequest (optional) - * @return ReadSubnetsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadSubnetsResponse readSubnets(ReadSubnetsRequest readSubnetsRequest) - throws ApiException { - ApiResponse localVarResp = readSubnetsWithHttpInfo(readSubnetsRequest); - return localVarResp.getData(); - } - - /** - * @param readSubnetsRequest (optional) - * @return ApiResponse<ReadSubnetsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readSubnetsWithHttpInfo( - ReadSubnetsRequest readSubnetsRequest) throws ApiException { - okhttp3.Call localVarCall = readSubnetsValidateBeforeCall(readSubnetsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSubnetsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readSubnetsAsync( - ReadSubnetsRequest readSubnetsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readSubnetsValidateBeforeCall(readSubnetsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateSubnet - * - * @param updateSubnetRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateSubnetCall( - UpdateSubnetRequest updateSubnetRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateSubnetRequest; - - // create path and map variables - String localVarPath = "/UpdateSubnet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateSubnetValidateBeforeCall( - UpdateSubnetRequest updateSubnetRequest, final ApiCallback _callback) - throws ApiException { - return updateSubnetCall(updateSubnetRequest, _callback); - } - - /** - * @param updateSubnetRequest (optional) - * @return UpdateSubnetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateSubnetResponse updateSubnet(UpdateSubnetRequest updateSubnetRequest) - throws ApiException { - ApiResponse localVarResp = - updateSubnetWithHttpInfo(updateSubnetRequest); - return localVarResp.getData(); - } - - /** - * @param updateSubnetRequest (optional) - * @return ApiResponse<UpdateSubnetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateSubnetWithHttpInfo( - UpdateSubnetRequest updateSubnetRequest) throws ApiException { - okhttp3.Call localVarCall = updateSubnetValidateBeforeCall(updateSubnetRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateSubnetRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateSubnetAsync( - UpdateSubnetRequest updateSubnetRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateSubnetValidateBeforeCall(updateSubnetRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubregionApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubregionApi.java deleted file mode 100644 index ba0d3a5d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/SubregionApi.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.ReadSubregionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSubregionsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SubregionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SubregionApi() { - this(Configuration.getDefaultApiClient()); - } - - public SubregionApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for readSubregions - * - * @param readSubregionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSubregionsCall( - ReadSubregionsRequest readSubregionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readSubregionsRequest; - - // create path and map variables - String localVarPath = "/ReadSubregions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readSubregionsValidateBeforeCall( - ReadSubregionsRequest readSubregionsRequest, final ApiCallback _callback) - throws ApiException { - return readSubregionsCall(readSubregionsRequest, _callback); - } - - /** - * @param readSubregionsRequest (optional) - * @return ReadSubregionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadSubregionsResponse readSubregions(ReadSubregionsRequest readSubregionsRequest) - throws ApiException { - ApiResponse localVarResp = - readSubregionsWithHttpInfo(readSubregionsRequest); - return localVarResp.getData(); - } - - /** - * @param readSubregionsRequest (optional) - * @return ApiResponse<ReadSubregionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readSubregionsWithHttpInfo( - ReadSubregionsRequest readSubregionsRequest) throws ApiException { - okhttp3.Call localVarCall = readSubregionsValidateBeforeCall(readSubregionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readSubregionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readSubregionsAsync( - ReadSubregionsRequest readSubregionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readSubregionsValidateBeforeCall(readSubregionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/TagApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/TagApi.java deleted file mode 100644 index f2439f01..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/TagApi.java +++ /dev/null @@ -1,497 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadTagsResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TagApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TagApi() { - this(Configuration.getDefaultApiClient()); - } - - public TagApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createTags - * - * @param createTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createTagsCall( - CreateTagsRequest createTagsRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createTagsRequest; - - // create path and map variables - String localVarPath = "/CreateTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createTagsValidateBeforeCall( - CreateTagsRequest createTagsRequest, final ApiCallback _callback) throws ApiException { - return createTagsCall(createTagsRequest, _callback); - } - - /** - * @param createTagsRequest (optional) - * @return CreateTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateTagsResponse createTags(CreateTagsRequest createTagsRequest) throws ApiException { - ApiResponse localVarResp = createTagsWithHttpInfo(createTagsRequest); - return localVarResp.getData(); - } - - /** - * @param createTagsRequest (optional) - * @return ApiResponse<CreateTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createTagsWithHttpInfo( - CreateTagsRequest createTagsRequest) throws ApiException { - okhttp3.Call localVarCall = createTagsValidateBeforeCall(createTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createTagsAsync( - CreateTagsRequest createTagsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createTagsValidateBeforeCall(createTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteTags - * - * @param deleteTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteTagsCall( - DeleteTagsRequest deleteTagsRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteTagsRequest; - - // create path and map variables - String localVarPath = "/DeleteTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTagsValidateBeforeCall( - DeleteTagsRequest deleteTagsRequest, final ApiCallback _callback) throws ApiException { - return deleteTagsCall(deleteTagsRequest, _callback); - } - - /** - * @param deleteTagsRequest (optional) - * @return DeleteTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteTagsResponse deleteTags(DeleteTagsRequest deleteTagsRequest) throws ApiException { - ApiResponse localVarResp = deleteTagsWithHttpInfo(deleteTagsRequest); - return localVarResp.getData(); - } - - /** - * @param deleteTagsRequest (optional) - * @return ApiResponse<DeleteTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteTagsWithHttpInfo( - DeleteTagsRequest deleteTagsRequest) throws ApiException { - okhttp3.Call localVarCall = deleteTagsValidateBeforeCall(deleteTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteTagsAsync( - DeleteTagsRequest deleteTagsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteTagsValidateBeforeCall(deleteTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readTags - * - * @param readTagsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readTagsCall(ReadTagsRequest readTagsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readTagsRequest; - - // create path and map variables - String localVarPath = "/ReadTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readTagsValidateBeforeCall( - ReadTagsRequest readTagsRequest, final ApiCallback _callback) throws ApiException { - return readTagsCall(readTagsRequest, _callback); - } - - /** - * @param readTagsRequest (optional) - * @return ReadTagsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadTagsResponse readTags(ReadTagsRequest readTagsRequest) throws ApiException { - ApiResponse localVarResp = readTagsWithHttpInfo(readTagsRequest); - return localVarResp.getData(); - } - - /** - * @param readTagsRequest (optional) - * @return ApiResponse<ReadTagsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readTagsWithHttpInfo(ReadTagsRequest readTagsRequest) - throws ApiException { - okhttp3.Call localVarCall = readTagsValidateBeforeCall(readTagsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readTagsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readTagsAsync( - ReadTagsRequest readTagsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readTagsValidateBeforeCall(readTagsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/TaskApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/TaskApi.java deleted file mode 100644 index b03be0b3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/TaskApi.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TaskApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TaskApi() { - this(Configuration.getDefaultApiClient()); - } - - public TaskApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deleteExportTask - * - * @param deleteExportTaskRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteExportTaskCall( - DeleteExportTaskRequest deleteExportTaskRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteExportTaskRequest; - - // create path and map variables - String localVarPath = "/DeleteExportTask"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteExportTaskValidateBeforeCall( - DeleteExportTaskRequest deleteExportTaskRequest, final ApiCallback _callback) - throws ApiException { - return deleteExportTaskCall(deleteExportTaskRequest, _callback); - } - - /** - * @param deleteExportTaskRequest (optional) - * @return DeleteExportTaskResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteExportTaskResponse deleteExportTask( - DeleteExportTaskRequest deleteExportTaskRequest) throws ApiException { - ApiResponse localVarResp = - deleteExportTaskWithHttpInfo(deleteExportTaskRequest); - return localVarResp.getData(); - } - - /** - * @param deleteExportTaskRequest (optional) - * @return ApiResponse<DeleteExportTaskResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteExportTaskWithHttpInfo( - DeleteExportTaskRequest deleteExportTaskRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteExportTaskValidateBeforeCall(deleteExportTaskRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteExportTaskRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteExportTaskAsync( - DeleteExportTaskRequest deleteExportTaskRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteExportTaskValidateBeforeCall(deleteExportTaskRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserApi.java deleted file mode 100644 index 8a3b3b04..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserApi.java +++ /dev/null @@ -1,593 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateUserRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateUserResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUsersRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUsersResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createUser - * - * @param createUserRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createUserCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createUserRequest; - - // create path and map variables - String localVarPath = "/CreateUser"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUserValidateBeforeCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { - return createUserCall(createUserRequest, _callback); - } - - /** - * @param createUserRequest (optional) - * @return CreateUserResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateUserResponse createUser(CreateUserRequest createUserRequest) throws ApiException { - ApiResponse localVarResp = createUserWithHttpInfo(createUserRequest); - return localVarResp.getData(); - } - - /** - * @param createUserRequest (optional) - * @return ApiResponse<CreateUserResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createUserWithHttpInfo( - CreateUserRequest createUserRequest) throws ApiException { - okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createUserRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createUserAsync( - CreateUserRequest createUserRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteUser - * - * @param deleteUserRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserCall( - DeleteUserRequest deleteUserRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteUserRequest; - - // create path and map variables - String localVarPath = "/DeleteUser"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall( - DeleteUserRequest deleteUserRequest, final ApiCallback _callback) throws ApiException { - return deleteUserCall(deleteUserRequest, _callback); - } - - /** - * @param deleteUserRequest (optional) - * @return DeleteUserResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteUserResponse deleteUser(DeleteUserRequest deleteUserRequest) throws ApiException { - ApiResponse localVarResp = deleteUserWithHttpInfo(deleteUserRequest); - return localVarResp.getData(); - } - - /** - * @param deleteUserRequest (optional) - * @return ApiResponse<DeleteUserResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteUserWithHttpInfo( - DeleteUserRequest deleteUserRequest) throws ApiException { - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(deleteUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteUserRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserAsync( - DeleteUserRequest deleteUserRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(deleteUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUsers - * - * @param readUsersRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUsersCall( - ReadUsersRequest readUsersRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUsersRequest; - - // create path and map variables - String localVarPath = "/ReadUsers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUsersValidateBeforeCall( - ReadUsersRequest readUsersRequest, final ApiCallback _callback) throws ApiException { - return readUsersCall(readUsersRequest, _callback); - } - - /** - * @param readUsersRequest (optional) - * @return ReadUsersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUsersResponse readUsers(ReadUsersRequest readUsersRequest) throws ApiException { - ApiResponse localVarResp = readUsersWithHttpInfo(readUsersRequest); - return localVarResp.getData(); - } - - /** - * @param readUsersRequest (optional) - * @return ApiResponse<ReadUsersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUsersWithHttpInfo(ReadUsersRequest readUsersRequest) - throws ApiException { - okhttp3.Call localVarCall = readUsersValidateBeforeCall(readUsersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUsersRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUsersAsync( - ReadUsersRequest readUsersRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readUsersValidateBeforeCall(readUsersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateUser - * - * @param updateUserRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateUserCall( - UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateUserRequest; - - // create path and map variables - String localVarPath = "/UpdateUser"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserValidateBeforeCall( - UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { - return updateUserCall(updateUserRequest, _callback); - } - - /** - * @param updateUserRequest (optional) - * @return UpdateUserResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateUserResponse updateUser(UpdateUserRequest updateUserRequest) throws ApiException { - ApiResponse localVarResp = updateUserWithHttpInfo(updateUserRequest); - return localVarResp.getData(); - } - - /** - * @param updateUserRequest (optional) - * @return ApiResponse<UpdateUserResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateUserWithHttpInfo( - UpdateUserRequest updateUserRequest) throws ApiException { - okhttp3.Call localVarCall = updateUserValidateBeforeCall(updateUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateUserRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateUserAsync( - UpdateUserRequest updateUserRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateUserValidateBeforeCall(updateUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApi.java deleted file mode 100644 index 050d49a4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApi.java +++ /dev/null @@ -1,1175 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserGroupApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserGroupApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserGroupApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for addUserToUserGroup - * - * @param addUserToUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call addUserToUserGroupCall( - AddUserToUserGroupRequest addUserToUserGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = addUserToUserGroupRequest; - - // create path and map variables - String localVarPath = "/AddUserToUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addUserToUserGroupValidateBeforeCall( - AddUserToUserGroupRequest addUserToUserGroupRequest, final ApiCallback _callback) - throws ApiException { - return addUserToUserGroupCall(addUserToUserGroupRequest, _callback); - } - - /** - * @param addUserToUserGroupRequest (optional) - * @return AddUserToUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public AddUserToUserGroupResponse addUserToUserGroup( - AddUserToUserGroupRequest addUserToUserGroupRequest) throws ApiException { - ApiResponse localVarResp = - addUserToUserGroupWithHttpInfo(addUserToUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param addUserToUserGroupRequest (optional) - * @return ApiResponse<AddUserToUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse addUserToUserGroupWithHttpInfo( - AddUserToUserGroupRequest addUserToUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - addUserToUserGroupValidateBeforeCall(addUserToUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param addUserToUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call addUserToUserGroupAsync( - AddUserToUserGroupRequest addUserToUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - addUserToUserGroupValidateBeforeCall(addUserToUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createUserGroup - * - * @param createUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createUserGroupCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createUserGroupRequest; - - // create path and map variables - String localVarPath = "/CreateUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUserGroupValidateBeforeCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { - return createUserGroupCall(createUserGroupRequest, _callback); - } - - /** - * @param createUserGroupRequest (optional) - * @return CreateUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateUserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - createUserGroupWithHttpInfo(createUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param createUserGroupRequest (optional) - * @return ApiResponse<CreateUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createUserGroupWithHttpInfo( - CreateUserGroupRequest createUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createUserGroupAsync( - CreateUserGroupRequest createUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteUserGroup - * - * @param deleteUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserGroupCall( - DeleteUserGroupRequest deleteUserGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteUserGroupRequest; - - // create path and map variables - String localVarPath = "/DeleteUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserGroupValidateBeforeCall( - DeleteUserGroupRequest deleteUserGroupRequest, final ApiCallback _callback) - throws ApiException { - return deleteUserGroupCall(deleteUserGroupRequest, _callback); - } - - /** - * @param deleteUserGroupRequest (optional) - * @return DeleteUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteUserGroupResponse deleteUserGroup(DeleteUserGroupRequest deleteUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - deleteUserGroupWithHttpInfo(deleteUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param deleteUserGroupRequest (optional) - * @return ApiResponse<DeleteUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteUserGroupWithHttpInfo( - DeleteUserGroupRequest deleteUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(deleteUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteUserGroupAsync( - DeleteUserGroupRequest deleteUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteUserGroupValidateBeforeCall(deleteUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUserGroup - * - * @param readUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupCall( - ReadUserGroupRequest readUserGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUserGroupRequest; - - // create path and map variables - String localVarPath = "/ReadUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUserGroupValidateBeforeCall( - ReadUserGroupRequest readUserGroupRequest, final ApiCallback _callback) - throws ApiException { - return readUserGroupCall(readUserGroupRequest, _callback); - } - - /** - * @param readUserGroupRequest (optional) - * @return ReadUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUserGroupResponse readUserGroup(ReadUserGroupRequest readUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - readUserGroupWithHttpInfo(readUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param readUserGroupRequest (optional) - * @return ApiResponse<ReadUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUserGroupWithHttpInfo( - ReadUserGroupRequest readUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = readUserGroupValidateBeforeCall(readUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupAsync( - ReadUserGroupRequest readUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readUserGroupValidateBeforeCall(readUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUserGroups - * - * @param readUserGroupsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupsCall( - ReadUserGroupsRequest readUserGroupsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUserGroupsRequest; - - // create path and map variables - String localVarPath = "/ReadUserGroups"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUserGroupsValidateBeforeCall( - ReadUserGroupsRequest readUserGroupsRequest, final ApiCallback _callback) - throws ApiException { - return readUserGroupsCall(readUserGroupsRequest, _callback); - } - - /** - * @param readUserGroupsRequest (optional) - * @return ReadUserGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUserGroupsResponse readUserGroups(ReadUserGroupsRequest readUserGroupsRequest) - throws ApiException { - ApiResponse localVarResp = - readUserGroupsWithHttpInfo(readUserGroupsRequest); - return localVarResp.getData(); - } - - /** - * @param readUserGroupsRequest (optional) - * @return ApiResponse<ReadUserGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUserGroupsWithHttpInfo( - ReadUserGroupsRequest readUserGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = readUserGroupsValidateBeforeCall(readUserGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUserGroupsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupsAsync( - ReadUserGroupsRequest readUserGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readUserGroupsValidateBeforeCall(readUserGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readUserGroupsPerUser - * - * @param readUserGroupsPerUserRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupsPerUserCall( - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readUserGroupsPerUserRequest; - - // create path and map variables - String localVarPath = "/ReadUserGroupsPerUser"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readUserGroupsPerUserValidateBeforeCall( - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest, final ApiCallback _callback) - throws ApiException { - return readUserGroupsPerUserCall(readUserGroupsPerUserRequest, _callback); - } - - /** - * @param readUserGroupsPerUserRequest (optional) - * @return ReadUserGroupsPerUserResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadUserGroupsPerUserResponse readUserGroupsPerUser( - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest) throws ApiException { - ApiResponse localVarResp = - readUserGroupsPerUserWithHttpInfo(readUserGroupsPerUserRequest); - return localVarResp.getData(); - } - - /** - * @param readUserGroupsPerUserRequest (optional) - * @return ApiResponse<ReadUserGroupsPerUserResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readUserGroupsPerUserWithHttpInfo( - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest) throws ApiException { - okhttp3.Call localVarCall = - readUserGroupsPerUserValidateBeforeCall(readUserGroupsPerUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readUserGroupsPerUserRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readUserGroupsPerUserAsync( - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readUserGroupsPerUserValidateBeforeCall(readUserGroupsPerUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for removeUserFromUserGroup - * - * @param removeUserFromUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call removeUserFromUserGroupCall( - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = removeUserFromUserGroupRequest; - - // create path and map variables - String localVarPath = "/RemoveUserFromUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeUserFromUserGroupValidateBeforeCall( - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - return removeUserFromUserGroupCall(removeUserFromUserGroupRequest, _callback); - } - - /** - * @param removeUserFromUserGroupRequest (optional) - * @return RemoveUserFromUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public RemoveUserFromUserGroupResponse removeUserFromUserGroup( - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest) throws ApiException { - ApiResponse localVarResp = - removeUserFromUserGroupWithHttpInfo(removeUserFromUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param removeUserFromUserGroupRequest (optional) - * @return ApiResponse<RemoveUserFromUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse removeUserFromUserGroupWithHttpInfo( - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - removeUserFromUserGroupValidateBeforeCall(removeUserFromUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param removeUserFromUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call removeUserFromUserGroupAsync( - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - removeUserFromUserGroupValidateBeforeCall( - removeUserFromUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateUserGroup - * - * @param updateUserGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateUserGroupCall( - UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateUserGroupRequest; - - // create path and map variables - String localVarPath = "/UpdateUserGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserGroupValidateBeforeCall( - UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) - throws ApiException { - return updateUserGroupCall(updateUserGroupRequest, _callback); - } - - /** - * @param updateUserGroupRequest (optional) - * @return UpdateUserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateUserGroupResponse updateUserGroup(UpdateUserGroupRequest updateUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - updateUserGroupWithHttpInfo(updateUserGroupRequest); - return localVarResp.getData(); - } - - /** - * @param updateUserGroupRequest (optional) - * @return ApiResponse<UpdateUserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateUserGroupWithHttpInfo( - UpdateUserGroupRequest updateUserGroupRequest) throws ApiException { - okhttp3.Call localVarCall = updateUserGroupValidateBeforeCall(updateUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateUserGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateUserGroupAsync( - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateUserGroupValidateBeforeCall(updateUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApi.java deleted file mode 100644 index a6d93112..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApi.java +++ /dev/null @@ -1,901 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VirtualGatewayApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VirtualGatewayApi() { - this(Configuration.getDefaultApiClient()); - } - - public VirtualGatewayApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVirtualGateway - * - * @param createVirtualGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVirtualGatewayCall( - CreateVirtualGatewayRequest createVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVirtualGatewayRequest; - - // create path and map variables - String localVarPath = "/CreateVirtualGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVirtualGatewayValidateBeforeCall( - CreateVirtualGatewayRequest createVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - return createVirtualGatewayCall(createVirtualGatewayRequest, _callback); - } - - /** - * @param createVirtualGatewayRequest (optional) - * @return CreateVirtualGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateVirtualGatewayResponse createVirtualGateway( - CreateVirtualGatewayRequest createVirtualGatewayRequest) throws ApiException { - ApiResponse localVarResp = - createVirtualGatewayWithHttpInfo(createVirtualGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param createVirtualGatewayRequest (optional) - * @return ApiResponse<CreateVirtualGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createVirtualGatewayWithHttpInfo( - CreateVirtualGatewayRequest createVirtualGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - createVirtualGatewayValidateBeforeCall(createVirtualGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVirtualGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVirtualGatewayAsync( - CreateVirtualGatewayRequest createVirtualGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVirtualGatewayValidateBeforeCall(createVirtualGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVirtualGateway - * - * @param deleteVirtualGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVirtualGatewayCall( - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVirtualGatewayRequest; - - // create path and map variables - String localVarPath = "/DeleteVirtualGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVirtualGatewayValidateBeforeCall( - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - return deleteVirtualGatewayCall(deleteVirtualGatewayRequest, _callback); - } - - /** - * @param deleteVirtualGatewayRequest (optional) - * @return DeleteVirtualGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteVirtualGatewayResponse deleteVirtualGateway( - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest) throws ApiException { - ApiResponse localVarResp = - deleteVirtualGatewayWithHttpInfo(deleteVirtualGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVirtualGatewayRequest (optional) - * @return ApiResponse<DeleteVirtualGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteVirtualGatewayWithHttpInfo( - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteVirtualGatewayValidateBeforeCall(deleteVirtualGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVirtualGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVirtualGatewayAsync( - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteVirtualGatewayValidateBeforeCall(deleteVirtualGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkVirtualGateway - * - * @param linkVirtualGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkVirtualGatewayCall( - LinkVirtualGatewayRequest linkVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkVirtualGatewayRequest; - - // create path and map variables - String localVarPath = "/LinkVirtualGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkVirtualGatewayValidateBeforeCall( - LinkVirtualGatewayRequest linkVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - return linkVirtualGatewayCall(linkVirtualGatewayRequest, _callback); - } - - /** - * @param linkVirtualGatewayRequest (optional) - * @return LinkVirtualGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public LinkVirtualGatewayResponse linkVirtualGateway( - LinkVirtualGatewayRequest linkVirtualGatewayRequest) throws ApiException { - ApiResponse localVarResp = - linkVirtualGatewayWithHttpInfo(linkVirtualGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param linkVirtualGatewayRequest (optional) - * @return ApiResponse<LinkVirtualGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse linkVirtualGatewayWithHttpInfo( - LinkVirtualGatewayRequest linkVirtualGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - linkVirtualGatewayValidateBeforeCall(linkVirtualGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkVirtualGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call linkVirtualGatewayAsync( - LinkVirtualGatewayRequest linkVirtualGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - linkVirtualGatewayValidateBeforeCall(linkVirtualGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVirtualGateways - * - * @param readVirtualGatewaysRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVirtualGatewaysCall( - ReadVirtualGatewaysRequest readVirtualGatewaysRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVirtualGatewaysRequest; - - // create path and map variables - String localVarPath = "/ReadVirtualGateways"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVirtualGatewaysValidateBeforeCall( - ReadVirtualGatewaysRequest readVirtualGatewaysRequest, final ApiCallback _callback) - throws ApiException { - return readVirtualGatewaysCall(readVirtualGatewaysRequest, _callback); - } - - /** - * @param readVirtualGatewaysRequest (optional) - * @return ReadVirtualGatewaysResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadVirtualGatewaysResponse readVirtualGateways( - ReadVirtualGatewaysRequest readVirtualGatewaysRequest) throws ApiException { - ApiResponse localVarResp = - readVirtualGatewaysWithHttpInfo(readVirtualGatewaysRequest); - return localVarResp.getData(); - } - - /** - * @param readVirtualGatewaysRequest (optional) - * @return ApiResponse<ReadVirtualGatewaysResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readVirtualGatewaysWithHttpInfo( - ReadVirtualGatewaysRequest readVirtualGatewaysRequest) throws ApiException { - okhttp3.Call localVarCall = - readVirtualGatewaysValidateBeforeCall(readVirtualGatewaysRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVirtualGatewaysRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVirtualGatewaysAsync( - ReadVirtualGatewaysRequest readVirtualGatewaysRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readVirtualGatewaysValidateBeforeCall(readVirtualGatewaysRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkVirtualGateway - * - * @param unlinkVirtualGatewayRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkVirtualGatewayCall( - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkVirtualGatewayRequest; - - // create path and map variables - String localVarPath = "/UnlinkVirtualGateway"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkVirtualGatewayValidateBeforeCall( - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest, final ApiCallback _callback) - throws ApiException { - return unlinkVirtualGatewayCall(unlinkVirtualGatewayRequest, _callback); - } - - /** - * @param unlinkVirtualGatewayRequest (optional) - * @return UnlinkVirtualGatewayResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UnlinkVirtualGatewayResponse unlinkVirtualGateway( - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest) throws ApiException { - ApiResponse localVarResp = - unlinkVirtualGatewayWithHttpInfo(unlinkVirtualGatewayRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkVirtualGatewayRequest (optional) - * @return ApiResponse<UnlinkVirtualGatewayResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse unlinkVirtualGatewayWithHttpInfo( - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest) throws ApiException { - okhttp3.Call localVarCall = - unlinkVirtualGatewayValidateBeforeCall(unlinkVirtualGatewayRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkVirtualGatewayRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call unlinkVirtualGatewayAsync( - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unlinkVirtualGatewayValidateBeforeCall(unlinkVirtualGatewayRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateRoutePropagation - * - * @param updateRoutePropagationRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateRoutePropagationCall( - UpdateRoutePropagationRequest updateRoutePropagationRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateRoutePropagationRequest; - - // create path and map variables - String localVarPath = "/UpdateRoutePropagation"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateRoutePropagationValidateBeforeCall( - UpdateRoutePropagationRequest updateRoutePropagationRequest, - final ApiCallback _callback) - throws ApiException { - return updateRoutePropagationCall(updateRoutePropagationRequest, _callback); - } - - /** - * @param updateRoutePropagationRequest (optional) - * @return UpdateRoutePropagationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateRoutePropagationResponse updateRoutePropagation( - UpdateRoutePropagationRequest updateRoutePropagationRequest) throws ApiException { - ApiResponse localVarResp = - updateRoutePropagationWithHttpInfo(updateRoutePropagationRequest); - return localVarResp.getData(); - } - - /** - * @param updateRoutePropagationRequest (optional) - * @return ApiResponse<UpdateRoutePropagationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateRoutePropagationWithHttpInfo( - UpdateRoutePropagationRequest updateRoutePropagationRequest) throws ApiException { - okhttp3.Call localVarCall = - updateRoutePropagationValidateBeforeCall(updateRoutePropagationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateRoutePropagationRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateRoutePropagationAsync( - UpdateRoutePropagationRequest updateRoutePropagationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateRoutePropagationValidateBeforeCall(updateRoutePropagationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmApi.java deleted file mode 100644 index 9276aeb0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmApi.java +++ /dev/null @@ -1,1659 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTypesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTypesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsStateRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsStateResponse; -import io.github.outscale.osc_sdk_java.client.model.RebootVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.RebootVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.StartVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.StartVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.StopVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.StopVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VmApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VmApi() { - this(Configuration.getDefaultApiClient()); - } - - public VmApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVms - * - * @param createVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVmsCall( - CreateVmsRequest createVmsRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVmsRequest; - - // create path and map variables - String localVarPath = "/CreateVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVmsValidateBeforeCall( - CreateVmsRequest createVmsRequest, final ApiCallback _callback) throws ApiException { - return createVmsCall(createVmsRequest, _callback); - } - - /** - * @param createVmsRequest (optional) - * @return CreateVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateVmsResponse createVms(CreateVmsRequest createVmsRequest) throws ApiException { - ApiResponse localVarResp = createVmsWithHttpInfo(createVmsRequest); - return localVarResp.getData(); - } - - /** - * @param createVmsRequest (optional) - * @return ApiResponse<CreateVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createVmsWithHttpInfo(CreateVmsRequest createVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = createVmsValidateBeforeCall(createVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVmsAsync( - CreateVmsRequest createVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createVmsValidateBeforeCall(createVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVms - * - * @param deleteVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVmsCall( - DeleteVmsRequest deleteVmsRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVmsRequest; - - // create path and map variables - String localVarPath = "/DeleteVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVmsValidateBeforeCall( - DeleteVmsRequest deleteVmsRequest, final ApiCallback _callback) throws ApiException { - return deleteVmsCall(deleteVmsRequest, _callback); - } - - /** - * @param deleteVmsRequest (optional) - * @return DeleteVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteVmsResponse deleteVms(DeleteVmsRequest deleteVmsRequest) throws ApiException { - ApiResponse localVarResp = deleteVmsWithHttpInfo(deleteVmsRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVmsRequest (optional) - * @return ApiResponse<DeleteVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteVmsWithHttpInfo(DeleteVmsRequest deleteVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = deleteVmsValidateBeforeCall(deleteVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVmsAsync( - DeleteVmsRequest deleteVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteVmsValidateBeforeCall(deleteVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readAdminPassword - * - * @param readAdminPasswordRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readAdminPasswordCall( - ReadAdminPasswordRequest readAdminPasswordRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readAdminPasswordRequest; - - // create path and map variables - String localVarPath = "/ReadAdminPassword"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readAdminPasswordValidateBeforeCall( - ReadAdminPasswordRequest readAdminPasswordRequest, final ApiCallback _callback) - throws ApiException { - return readAdminPasswordCall(readAdminPasswordRequest, _callback); - } - - /** - * @param readAdminPasswordRequest (optional) - * @return ReadAdminPasswordResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadAdminPasswordResponse readAdminPassword( - ReadAdminPasswordRequest readAdminPasswordRequest) throws ApiException { - ApiResponse localVarResp = - readAdminPasswordWithHttpInfo(readAdminPasswordRequest); - return localVarResp.getData(); - } - - /** - * @param readAdminPasswordRequest (optional) - * @return ApiResponse<ReadAdminPasswordResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readAdminPasswordWithHttpInfo( - ReadAdminPasswordRequest readAdminPasswordRequest) throws ApiException { - okhttp3.Call localVarCall = - readAdminPasswordValidateBeforeCall(readAdminPasswordRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readAdminPasswordRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readAdminPasswordAsync( - ReadAdminPasswordRequest readAdminPasswordRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readAdminPasswordValidateBeforeCall(readAdminPasswordRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readConsoleOutput - * - * @param readConsoleOutputRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readConsoleOutputCall( - ReadConsoleOutputRequest readConsoleOutputRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readConsoleOutputRequest; - - // create path and map variables - String localVarPath = "/ReadConsoleOutput"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readConsoleOutputValidateBeforeCall( - ReadConsoleOutputRequest readConsoleOutputRequest, final ApiCallback _callback) - throws ApiException { - return readConsoleOutputCall(readConsoleOutputRequest, _callback); - } - - /** - * @param readConsoleOutputRequest (optional) - * @return ReadConsoleOutputResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadConsoleOutputResponse readConsoleOutput( - ReadConsoleOutputRequest readConsoleOutputRequest) throws ApiException { - ApiResponse localVarResp = - readConsoleOutputWithHttpInfo(readConsoleOutputRequest); - return localVarResp.getData(); - } - - /** - * @param readConsoleOutputRequest (optional) - * @return ApiResponse<ReadConsoleOutputResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readConsoleOutputWithHttpInfo( - ReadConsoleOutputRequest readConsoleOutputRequest) throws ApiException { - okhttp3.Call localVarCall = - readConsoleOutputValidateBeforeCall(readConsoleOutputRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readConsoleOutputRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readConsoleOutputAsync( - ReadConsoleOutputRequest readConsoleOutputRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readConsoleOutputValidateBeforeCall(readConsoleOutputRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVmTypes - * - * @param readVmTypesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmTypesCall( - ReadVmTypesRequest readVmTypesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmTypesRequest; - - // create path and map variables - String localVarPath = "/ReadVmTypes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmTypesValidateBeforeCall( - ReadVmTypesRequest readVmTypesRequest, final ApiCallback _callback) - throws ApiException { - return readVmTypesCall(readVmTypesRequest, _callback); - } - - /** - * @param readVmTypesRequest (optional) - * @return ReadVmTypesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadVmTypesResponse readVmTypes(ReadVmTypesRequest readVmTypesRequest) - throws ApiException { - ApiResponse localVarResp = readVmTypesWithHttpInfo(readVmTypesRequest); - return localVarResp.getData(); - } - - /** - * @param readVmTypesRequest (optional) - * @return ApiResponse<ReadVmTypesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readVmTypesWithHttpInfo( - ReadVmTypesRequest readVmTypesRequest) throws ApiException { - okhttp3.Call localVarCall = readVmTypesValidateBeforeCall(readVmTypesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmTypesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmTypesAsync( - ReadVmTypesRequest readVmTypesRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readVmTypesValidateBeforeCall(readVmTypesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVms - * - * @param readVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmsCall(ReadVmsRequest readVmsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmsRequest; - - // create path and map variables - String localVarPath = "/ReadVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmsValidateBeforeCall( - ReadVmsRequest readVmsRequest, final ApiCallback _callback) throws ApiException { - return readVmsCall(readVmsRequest, _callback); - } - - /** - * @param readVmsRequest (optional) - * @return ReadVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadVmsResponse readVms(ReadVmsRequest readVmsRequest) throws ApiException { - ApiResponse localVarResp = readVmsWithHttpInfo(readVmsRequest); - return localVarResp.getData(); - } - - /** - * @param readVmsRequest (optional) - * @return ApiResponse<ReadVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readVmsWithHttpInfo(ReadVmsRequest readVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = readVmsValidateBeforeCall(readVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmsAsync( - ReadVmsRequest readVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readVmsValidateBeforeCall(readVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVmsState - * - * @param readVmsStateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmsStateCall( - ReadVmsStateRequest readVmsStateRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmsStateRequest; - - // create path and map variables - String localVarPath = "/ReadVmsState"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmsStateValidateBeforeCall( - ReadVmsStateRequest readVmsStateRequest, final ApiCallback _callback) - throws ApiException { - return readVmsStateCall(readVmsStateRequest, _callback); - } - - /** - * @param readVmsStateRequest (optional) - * @return ReadVmsStateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadVmsStateResponse readVmsState(ReadVmsStateRequest readVmsStateRequest) - throws ApiException { - ApiResponse localVarResp = - readVmsStateWithHttpInfo(readVmsStateRequest); - return localVarResp.getData(); - } - - /** - * @param readVmsStateRequest (optional) - * @return ApiResponse<ReadVmsStateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readVmsStateWithHttpInfo( - ReadVmsStateRequest readVmsStateRequest) throws ApiException { - okhttp3.Call localVarCall = readVmsStateValidateBeforeCall(readVmsStateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmsStateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmsStateAsync( - ReadVmsStateRequest readVmsStateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readVmsStateValidateBeforeCall(readVmsStateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for rebootVms - * - * @param rebootVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call rebootVmsCall( - RebootVmsRequest rebootVmsRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = rebootVmsRequest; - - // create path and map variables - String localVarPath = "/RebootVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rebootVmsValidateBeforeCall( - RebootVmsRequest rebootVmsRequest, final ApiCallback _callback) throws ApiException { - return rebootVmsCall(rebootVmsRequest, _callback); - } - - /** - * @param rebootVmsRequest (optional) - * @return RebootVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public RebootVmsResponse rebootVms(RebootVmsRequest rebootVmsRequest) throws ApiException { - ApiResponse localVarResp = rebootVmsWithHttpInfo(rebootVmsRequest); - return localVarResp.getData(); - } - - /** - * @param rebootVmsRequest (optional) - * @return ApiResponse<RebootVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse rebootVmsWithHttpInfo(RebootVmsRequest rebootVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = rebootVmsValidateBeforeCall(rebootVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param rebootVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call rebootVmsAsync( - RebootVmsRequest rebootVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = rebootVmsValidateBeforeCall(rebootVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for startVms - * - * @param startVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call startVmsCall(StartVmsRequest startVmsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = startVmsRequest; - - // create path and map variables - String localVarPath = "/StartVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call startVmsValidateBeforeCall( - StartVmsRequest startVmsRequest, final ApiCallback _callback) throws ApiException { - return startVmsCall(startVmsRequest, _callback); - } - - /** - * @param startVmsRequest (optional) - * @return StartVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public StartVmsResponse startVms(StartVmsRequest startVmsRequest) throws ApiException { - ApiResponse localVarResp = startVmsWithHttpInfo(startVmsRequest); - return localVarResp.getData(); - } - - /** - * @param startVmsRequest (optional) - * @return ApiResponse<StartVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse startVmsWithHttpInfo(StartVmsRequest startVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = startVmsValidateBeforeCall(startVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param startVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call startVmsAsync( - StartVmsRequest startVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = startVmsValidateBeforeCall(startVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for stopVms - * - * @param stopVmsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call stopVmsCall(StopVmsRequest stopVmsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = stopVmsRequest; - - // create path and map variables - String localVarPath = "/StopVms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call stopVmsValidateBeforeCall( - StopVmsRequest stopVmsRequest, final ApiCallback _callback) throws ApiException { - return stopVmsCall(stopVmsRequest, _callback); - } - - /** - * @param stopVmsRequest (optional) - * @return StopVmsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public StopVmsResponse stopVms(StopVmsRequest stopVmsRequest) throws ApiException { - ApiResponse localVarResp = stopVmsWithHttpInfo(stopVmsRequest); - return localVarResp.getData(); - } - - /** - * @param stopVmsRequest (optional) - * @return ApiResponse<StopVmsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse stopVmsWithHttpInfo(StopVmsRequest stopVmsRequest) - throws ApiException { - okhttp3.Call localVarCall = stopVmsValidateBeforeCall(stopVmsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param stopVmsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call stopVmsAsync( - StopVmsRequest stopVmsRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = stopVmsValidateBeforeCall(stopVmsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVm - * - * @param updateVmRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVmCall(UpdateVmRequest updateVmRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateVmRequest; - - // create path and map variables - String localVarPath = "/UpdateVm"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVmValidateBeforeCall( - UpdateVmRequest updateVmRequest, final ApiCallback _callback) throws ApiException { - return updateVmCall(updateVmRequest, _callback); - } - - /** - * @param updateVmRequest (optional) - * @return UpdateVmResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateVmResponse updateVm(UpdateVmRequest updateVmRequest) throws ApiException { - ApiResponse localVarResp = updateVmWithHttpInfo(updateVmRequest); - return localVarResp.getData(); - } - - /** - * @param updateVmRequest (optional) - * @return ApiResponse<UpdateVmResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateVmWithHttpInfo(UpdateVmRequest updateVmRequest) - throws ApiException { - okhttp3.Call localVarCall = updateVmValidateBeforeCall(updateVmRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateVmRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVmAsync( - UpdateVmRequest updateVmRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateVmValidateBeforeCall(updateVmRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApi.java deleted file mode 100644 index ed4f5c9d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApi.java +++ /dev/null @@ -1,965 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VmGroupApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VmGroupApi() { - this(Configuration.getDefaultApiClient()); - } - - public VmGroupApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVmGroup - * - * @param createVmGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVmGroupCall( - CreateVmGroupRequest createVmGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVmGroupRequest; - - // create path and map variables - String localVarPath = "/CreateVmGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVmGroupValidateBeforeCall( - CreateVmGroupRequest createVmGroupRequest, final ApiCallback _callback) - throws ApiException { - return createVmGroupCall(createVmGroupRequest, _callback); - } - - /** - * @param createVmGroupRequest (optional) - * @return CreateVmGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateVmGroupResponse createVmGroup(CreateVmGroupRequest createVmGroupRequest) - throws ApiException { - ApiResponse localVarResp = - createVmGroupWithHttpInfo(createVmGroupRequest); - return localVarResp.getData(); - } - - /** - * @param createVmGroupRequest (optional) - * @return ApiResponse<CreateVmGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createVmGroupWithHttpInfo( - CreateVmGroupRequest createVmGroupRequest) throws ApiException { - okhttp3.Call localVarCall = createVmGroupValidateBeforeCall(createVmGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVmGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVmGroupAsync( - CreateVmGroupRequest createVmGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVmGroupValidateBeforeCall(createVmGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVmGroup - * - * @param deleteVmGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVmGroupCall( - DeleteVmGroupRequest deleteVmGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVmGroupRequest; - - // create path and map variables - String localVarPath = "/DeleteVmGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVmGroupValidateBeforeCall( - DeleteVmGroupRequest deleteVmGroupRequest, final ApiCallback _callback) - throws ApiException { - return deleteVmGroupCall(deleteVmGroupRequest, _callback); - } - - /** - * @param deleteVmGroupRequest (optional) - * @return DeleteVmGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteVmGroupResponse deleteVmGroup(DeleteVmGroupRequest deleteVmGroupRequest) - throws ApiException { - ApiResponse localVarResp = - deleteVmGroupWithHttpInfo(deleteVmGroupRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVmGroupRequest (optional) - * @return ApiResponse<DeleteVmGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteVmGroupWithHttpInfo( - DeleteVmGroupRequest deleteVmGroupRequest) throws ApiException { - okhttp3.Call localVarCall = deleteVmGroupValidateBeforeCall(deleteVmGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVmGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVmGroupAsync( - DeleteVmGroupRequest deleteVmGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteVmGroupValidateBeforeCall(deleteVmGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVmGroups - * - * @param readVmGroupsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmGroupsCall( - ReadVmGroupsRequest readVmGroupsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmGroupsRequest; - - // create path and map variables - String localVarPath = "/ReadVmGroups"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmGroupsValidateBeforeCall( - ReadVmGroupsRequest readVmGroupsRequest, final ApiCallback _callback) - throws ApiException { - return readVmGroupsCall(readVmGroupsRequest, _callback); - } - - /** - * @param readVmGroupsRequest (optional) - * @return ReadVmGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadVmGroupsResponse readVmGroups(ReadVmGroupsRequest readVmGroupsRequest) - throws ApiException { - ApiResponse localVarResp = - readVmGroupsWithHttpInfo(readVmGroupsRequest); - return localVarResp.getData(); - } - - /** - * @param readVmGroupsRequest (optional) - * @return ApiResponse<ReadVmGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readVmGroupsWithHttpInfo( - ReadVmGroupsRequest readVmGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = readVmGroupsValidateBeforeCall(readVmGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmGroupsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVmGroupsAsync( - ReadVmGroupsRequest readVmGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readVmGroupsValidateBeforeCall(readVmGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for scaleDownVmGroup - * - * @param scaleDownVmGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call scaleDownVmGroupCall( - ScaleDownVmGroupRequest scaleDownVmGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = scaleDownVmGroupRequest; - - // create path and map variables - String localVarPath = "/ScaleDownVmGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call scaleDownVmGroupValidateBeforeCall( - ScaleDownVmGroupRequest scaleDownVmGroupRequest, final ApiCallback _callback) - throws ApiException { - return scaleDownVmGroupCall(scaleDownVmGroupRequest, _callback); - } - - /** - * @param scaleDownVmGroupRequest (optional) - * @return ScaleDownVmGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ScaleDownVmGroupResponse scaleDownVmGroup( - ScaleDownVmGroupRequest scaleDownVmGroupRequest) throws ApiException { - ApiResponse localVarResp = - scaleDownVmGroupWithHttpInfo(scaleDownVmGroupRequest); - return localVarResp.getData(); - } - - /** - * @param scaleDownVmGroupRequest (optional) - * @return ApiResponse<ScaleDownVmGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse scaleDownVmGroupWithHttpInfo( - ScaleDownVmGroupRequest scaleDownVmGroupRequest) throws ApiException { - okhttp3.Call localVarCall = - scaleDownVmGroupValidateBeforeCall(scaleDownVmGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param scaleDownVmGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call scaleDownVmGroupAsync( - ScaleDownVmGroupRequest scaleDownVmGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - scaleDownVmGroupValidateBeforeCall(scaleDownVmGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for scaleUpVmGroup - * - * @param scaleUpVmGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call scaleUpVmGroupCall( - ScaleUpVmGroupRequest scaleUpVmGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = scaleUpVmGroupRequest; - - // create path and map variables - String localVarPath = "/ScaleUpVmGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call scaleUpVmGroupValidateBeforeCall( - ScaleUpVmGroupRequest scaleUpVmGroupRequest, final ApiCallback _callback) - throws ApiException { - return scaleUpVmGroupCall(scaleUpVmGroupRequest, _callback); - } - - /** - * @param scaleUpVmGroupRequest (optional) - * @return ScaleUpVmGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ScaleUpVmGroupResponse scaleUpVmGroup(ScaleUpVmGroupRequest scaleUpVmGroupRequest) - throws ApiException { - ApiResponse localVarResp = - scaleUpVmGroupWithHttpInfo(scaleUpVmGroupRequest); - return localVarResp.getData(); - } - - /** - * @param scaleUpVmGroupRequest (optional) - * @return ApiResponse<ScaleUpVmGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse scaleUpVmGroupWithHttpInfo( - ScaleUpVmGroupRequest scaleUpVmGroupRequest) throws ApiException { - okhttp3.Call localVarCall = scaleUpVmGroupValidateBeforeCall(scaleUpVmGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param scaleUpVmGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call scaleUpVmGroupAsync( - ScaleUpVmGroupRequest scaleUpVmGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - scaleUpVmGroupValidateBeforeCall(scaleUpVmGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVmGroup - * - * @param updateVmGroupRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVmGroupCall( - UpdateVmGroupRequest updateVmGroupRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateVmGroupRequest; - - // create path and map variables - String localVarPath = "/UpdateVmGroup"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVmGroupValidateBeforeCall( - UpdateVmGroupRequest updateVmGroupRequest, final ApiCallback _callback) - throws ApiException { - return updateVmGroupCall(updateVmGroupRequest, _callback); - } - - /** - * @param updateVmGroupRequest (optional) - * @return UpdateVmGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateVmGroupResponse updateVmGroup(UpdateVmGroupRequest updateVmGroupRequest) - throws ApiException { - ApiResponse localVarResp = - updateVmGroupWithHttpInfo(updateVmGroupRequest); - return localVarResp.getData(); - } - - /** - * @param updateVmGroupRequest (optional) - * @return ApiResponse<UpdateVmGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateVmGroupWithHttpInfo( - UpdateVmGroupRequest updateVmGroupRequest) throws ApiException { - okhttp3.Call localVarCall = updateVmGroupValidateBeforeCall(updateVmGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateVmGroupRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVmGroupAsync( - UpdateVmGroupRequest updateVmGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVmGroupValidateBeforeCall(updateVmGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApi.java deleted file mode 100644 index 45d6025e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApi.java +++ /dev/null @@ -1,620 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VmTemplateApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VmTemplateApi() { - this(Configuration.getDefaultApiClient()); - } - - public VmTemplateApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVmTemplate - * - * @param createVmTemplateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVmTemplateCall( - CreateVmTemplateRequest createVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVmTemplateRequest; - - // create path and map variables - String localVarPath = "/CreateVmTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVmTemplateValidateBeforeCall( - CreateVmTemplateRequest createVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - return createVmTemplateCall(createVmTemplateRequest, _callback); - } - - /** - * @param createVmTemplateRequest (optional) - * @return CreateVmTemplateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateVmTemplateResponse createVmTemplate( - CreateVmTemplateRequest createVmTemplateRequest) throws ApiException { - ApiResponse localVarResp = - createVmTemplateWithHttpInfo(createVmTemplateRequest); - return localVarResp.getData(); - } - - /** - * @param createVmTemplateRequest (optional) - * @return ApiResponse<CreateVmTemplateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createVmTemplateWithHttpInfo( - CreateVmTemplateRequest createVmTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = - createVmTemplateValidateBeforeCall(createVmTemplateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVmTemplateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVmTemplateAsync( - CreateVmTemplateRequest createVmTemplateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVmTemplateValidateBeforeCall(createVmTemplateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVmTemplate - * - * @param deleteVmTemplateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVmTemplateCall( - DeleteVmTemplateRequest deleteVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVmTemplateRequest; - - // create path and map variables - String localVarPath = "/DeleteVmTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVmTemplateValidateBeforeCall( - DeleteVmTemplateRequest deleteVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - return deleteVmTemplateCall(deleteVmTemplateRequest, _callback); - } - - /** - * @param deleteVmTemplateRequest (optional) - * @return DeleteVmTemplateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteVmTemplateResponse deleteVmTemplate( - DeleteVmTemplateRequest deleteVmTemplateRequest) throws ApiException { - ApiResponse localVarResp = - deleteVmTemplateWithHttpInfo(deleteVmTemplateRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVmTemplateRequest (optional) - * @return ApiResponse<DeleteVmTemplateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteVmTemplateWithHttpInfo( - DeleteVmTemplateRequest deleteVmTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteVmTemplateValidateBeforeCall(deleteVmTemplateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVmTemplateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVmTemplateAsync( - DeleteVmTemplateRequest deleteVmTemplateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteVmTemplateValidateBeforeCall(deleteVmTemplateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVmTemplates - * - * @param readVmTemplatesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmTemplatesCall( - ReadVmTemplatesRequest readVmTemplatesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVmTemplatesRequest; - - // create path and map variables - String localVarPath = "/ReadVmTemplates"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVmTemplatesValidateBeforeCall( - ReadVmTemplatesRequest readVmTemplatesRequest, final ApiCallback _callback) - throws ApiException { - return readVmTemplatesCall(readVmTemplatesRequest, _callback); - } - - /** - * @param readVmTemplatesRequest (optional) - * @return ReadVmTemplatesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadVmTemplatesResponse readVmTemplates(ReadVmTemplatesRequest readVmTemplatesRequest) - throws ApiException { - ApiResponse localVarResp = - readVmTemplatesWithHttpInfo(readVmTemplatesRequest); - return localVarResp.getData(); - } - - /** - * @param readVmTemplatesRequest (optional) - * @return ApiResponse<ReadVmTemplatesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readVmTemplatesWithHttpInfo( - ReadVmTemplatesRequest readVmTemplatesRequest) throws ApiException { - okhttp3.Call localVarCall = readVmTemplatesValidateBeforeCall(readVmTemplatesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVmTemplatesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVmTemplatesAsync( - ReadVmTemplatesRequest readVmTemplatesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readVmTemplatesValidateBeforeCall(readVmTemplatesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVmTemplate - * - * @param updateVmTemplateRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateVmTemplateCall( - UpdateVmTemplateRequest updateVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateVmTemplateRequest; - - // create path and map variables - String localVarPath = "/UpdateVmTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVmTemplateValidateBeforeCall( - UpdateVmTemplateRequest updateVmTemplateRequest, final ApiCallback _callback) - throws ApiException { - return updateVmTemplateCall(updateVmTemplateRequest, _callback); - } - - /** - * @param updateVmTemplateRequest (optional) - * @return UpdateVmTemplateResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public UpdateVmTemplateResponse updateVmTemplate( - UpdateVmTemplateRequest updateVmTemplateRequest) throws ApiException { - ApiResponse localVarResp = - updateVmTemplateWithHttpInfo(updateVmTemplateRequest); - return localVarResp.getData(); - } - - /** - * @param updateVmTemplateRequest (optional) - * @return ApiResponse<UpdateVmTemplateResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse updateVmTemplateWithHttpInfo( - UpdateVmTemplateRequest updateVmTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVmTemplateValidateBeforeCall(updateVmTemplateRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateVmTemplateRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call updateVmTemplateAsync( - UpdateVmTemplateRequest updateVmTemplateRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVmTemplateValidateBeforeCall(updateVmTemplateRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VolumeApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VolumeApi.java deleted file mode 100644 index 253dec9b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VolumeApi.java +++ /dev/null @@ -1,952 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVolumesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVolumesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVolumeResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VolumeApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VolumeApi() { - this(Configuration.getDefaultApiClient()); - } - - public VolumeApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVolume - * - * @param createVolumeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVolumeCall( - CreateVolumeRequest createVolumeRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVolumeRequest; - - // create path and map variables - String localVarPath = "/CreateVolume"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVolumeValidateBeforeCall( - CreateVolumeRequest createVolumeRequest, final ApiCallback _callback) - throws ApiException { - return createVolumeCall(createVolumeRequest, _callback); - } - - /** - * @param createVolumeRequest (optional) - * @return CreateVolumeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public CreateVolumeResponse createVolume(CreateVolumeRequest createVolumeRequest) - throws ApiException { - ApiResponse localVarResp = - createVolumeWithHttpInfo(createVolumeRequest); - return localVarResp.getData(); - } - - /** - * @param createVolumeRequest (optional) - * @return ApiResponse<CreateVolumeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse createVolumeWithHttpInfo( - CreateVolumeRequest createVolumeRequest) throws ApiException { - okhttp3.Call localVarCall = createVolumeValidateBeforeCall(createVolumeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVolumeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call createVolumeAsync( - CreateVolumeRequest createVolumeRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = createVolumeValidateBeforeCall(createVolumeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVolume - * - * @param deleteVolumeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVolumeCall( - DeleteVolumeRequest deleteVolumeRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVolumeRequest; - - // create path and map variables - String localVarPath = "/DeleteVolume"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVolumeValidateBeforeCall( - DeleteVolumeRequest deleteVolumeRequest, final ApiCallback _callback) - throws ApiException { - return deleteVolumeCall(deleteVolumeRequest, _callback); - } - - /** - * @param deleteVolumeRequest (optional) - * @return DeleteVolumeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public DeleteVolumeResponse deleteVolume(DeleteVolumeRequest deleteVolumeRequest) - throws ApiException { - ApiResponse localVarResp = - deleteVolumeWithHttpInfo(deleteVolumeRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVolumeRequest (optional) - * @return ApiResponse<DeleteVolumeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse deleteVolumeWithHttpInfo( - DeleteVolumeRequest deleteVolumeRequest) throws ApiException { - okhttp3.Call localVarCall = deleteVolumeValidateBeforeCall(deleteVolumeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVolumeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call deleteVolumeAsync( - DeleteVolumeRequest deleteVolumeRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = deleteVolumeValidateBeforeCall(deleteVolumeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for linkVolume - * - * @param linkVolumeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkVolumeCall( - LinkVolumeRequest linkVolumeRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = linkVolumeRequest; - - // create path and map variables - String localVarPath = "/LinkVolume"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call linkVolumeValidateBeforeCall( - LinkVolumeRequest linkVolumeRequest, final ApiCallback _callback) throws ApiException { - return linkVolumeCall(linkVolumeRequest, _callback); - } - - /** - * @param linkVolumeRequest (optional) - * @return LinkVolumeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public LinkVolumeResponse linkVolume(LinkVolumeRequest linkVolumeRequest) throws ApiException { - ApiResponse localVarResp = linkVolumeWithHttpInfo(linkVolumeRequest); - return localVarResp.getData(); - } - - /** - * @param linkVolumeRequest (optional) - * @return ApiResponse<LinkVolumeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse linkVolumeWithHttpInfo( - LinkVolumeRequest linkVolumeRequest) throws ApiException { - okhttp3.Call localVarCall = linkVolumeValidateBeforeCall(linkVolumeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param linkVolumeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call linkVolumeAsync( - LinkVolumeRequest linkVolumeRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = linkVolumeValidateBeforeCall(linkVolumeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVolumes - * - * @param readVolumesRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVolumesCall( - ReadVolumesRequest readVolumesRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVolumesRequest; - - // create path and map variables - String localVarPath = "/ReadVolumes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVolumesValidateBeforeCall( - ReadVolumesRequest readVolumesRequest, final ApiCallback _callback) - throws ApiException { - return readVolumesCall(readVolumesRequest, _callback); - } - - /** - * @param readVolumesRequest (optional) - * @return ReadVolumesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ReadVolumesResponse readVolumes(ReadVolumesRequest readVolumesRequest) - throws ApiException { - ApiResponse localVarResp = readVolumesWithHttpInfo(readVolumesRequest); - return localVarResp.getData(); - } - - /** - * @param readVolumesRequest (optional) - * @return ApiResponse<ReadVolumesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse readVolumesWithHttpInfo( - ReadVolumesRequest readVolumesRequest) throws ApiException { - okhttp3.Call localVarCall = readVolumesValidateBeforeCall(readVolumesRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVolumesRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call readVolumesAsync( - ReadVolumesRequest readVolumesRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = readVolumesValidateBeforeCall(readVolumesRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlinkVolume - * - * @param unlinkVolumeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkVolumeCall( - UnlinkVolumeRequest unlinkVolumeRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = unlinkVolumeRequest; - - // create path and map variables - String localVarPath = "/UnlinkVolume"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlinkVolumeValidateBeforeCall( - UnlinkVolumeRequest unlinkVolumeRequest, final ApiCallback _callback) - throws ApiException { - return unlinkVolumeCall(unlinkVolumeRequest, _callback); - } - - /** - * @param unlinkVolumeRequest (optional) - * @return UnlinkVolumeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UnlinkVolumeResponse unlinkVolume(UnlinkVolumeRequest unlinkVolumeRequest) - throws ApiException { - ApiResponse localVarResp = - unlinkVolumeWithHttpInfo(unlinkVolumeRequest); - return localVarResp.getData(); - } - - /** - * @param unlinkVolumeRequest (optional) - * @return ApiResponse<UnlinkVolumeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse unlinkVolumeWithHttpInfo( - UnlinkVolumeRequest unlinkVolumeRequest) throws ApiException { - okhttp3.Call localVarCall = unlinkVolumeValidateBeforeCall(unlinkVolumeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param unlinkVolumeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call unlinkVolumeAsync( - UnlinkVolumeRequest unlinkVolumeRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = unlinkVolumeValidateBeforeCall(unlinkVolumeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVolume - * - * @param updateVolumeRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVolumeCall( - UpdateVolumeRequest updateVolumeRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateVolumeRequest; - - // create path and map variables - String localVarPath = "/UpdateVolume"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVolumeValidateBeforeCall( - UpdateVolumeRequest updateVolumeRequest, final ApiCallback _callback) - throws ApiException { - return updateVolumeCall(updateVolumeRequest, _callback); - } - - /** - * @param updateVolumeRequest (optional) - * @return UpdateVolumeResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateVolumeResponse updateVolume(UpdateVolumeRequest updateVolumeRequest) - throws ApiException { - ApiResponse localVarResp = - updateVolumeWithHttpInfo(updateVolumeRequest); - return localVarResp.getData(); - } - - /** - * @param updateVolumeRequest (optional) - * @return ApiResponse<UpdateVolumeResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateVolumeWithHttpInfo( - UpdateVolumeRequest updateVolumeRequest) throws ApiException { - okhttp3.Call localVarCall = updateVolumeValidateBeforeCall(updateVolumeRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateVolumeRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVolumeAsync( - UpdateVolumeRequest updateVolumeRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = updateVolumeValidateBeforeCall(updateVolumeRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApi.java b/src/main/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApi.java deleted file mode 100644 index f2f90856..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApi.java +++ /dev/null @@ -1,917 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import com.google.gson.reflect.TypeToken; -import io.github.outscale.osc_sdk_java.client.ApiCallback; -import io.github.outscale.osc_sdk_java.client.ApiClient; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.ApiResponse; -import io.github.outscale.osc_sdk_java.client.Configuration; -import io.github.outscale.osc_sdk_java.client.Pair; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionResponse; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VpnConnectionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VpnConnectionApi() { - this(Configuration.getDefaultApiClient()); - } - - public VpnConnectionApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVpnConnection - * - * @param createVpnConnectionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVpnConnectionCall( - CreateVpnConnectionRequest createVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVpnConnectionRequest; - - // create path and map variables - String localVarPath = "/CreateVpnConnection"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVpnConnectionValidateBeforeCall( - CreateVpnConnectionRequest createVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - return createVpnConnectionCall(createVpnConnectionRequest, _callback); - } - - /** - * @param createVpnConnectionRequest (optional) - * @return CreateVpnConnectionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateVpnConnectionResponse createVpnConnection( - CreateVpnConnectionRequest createVpnConnectionRequest) throws ApiException { - ApiResponse localVarResp = - createVpnConnectionWithHttpInfo(createVpnConnectionRequest); - return localVarResp.getData(); - } - - /** - * @param createVpnConnectionRequest (optional) - * @return ApiResponse<CreateVpnConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createVpnConnectionWithHttpInfo( - CreateVpnConnectionRequest createVpnConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - createVpnConnectionValidateBeforeCall(createVpnConnectionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVpnConnectionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVpnConnectionAsync( - CreateVpnConnectionRequest createVpnConnectionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVpnConnectionValidateBeforeCall(createVpnConnectionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createVpnConnectionRoute - * - * @param createVpnConnectionRouteRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVpnConnectionRouteCall( - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createVpnConnectionRouteRequest; - - // create path and map variables - String localVarPath = "/CreateVpnConnectionRoute"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVpnConnectionRouteValidateBeforeCall( - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - return createVpnConnectionRouteCall(createVpnConnectionRouteRequest, _callback); - } - - /** - * @param createVpnConnectionRouteRequest (optional) - * @return CreateVpnConnectionRouteResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public CreateVpnConnectionRouteResponse createVpnConnectionRoute( - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest) throws ApiException { - ApiResponse localVarResp = - createVpnConnectionRouteWithHttpInfo(createVpnConnectionRouteRequest); - return localVarResp.getData(); - } - - /** - * @param createVpnConnectionRouteRequest (optional) - * @return ApiResponse<CreateVpnConnectionRouteResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse createVpnConnectionRouteWithHttpInfo( - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest) throws ApiException { - okhttp3.Call localVarCall = - createVpnConnectionRouteValidateBeforeCall(createVpnConnectionRouteRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param createVpnConnectionRouteRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call createVpnConnectionRouteAsync( - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVpnConnectionRouteValidateBeforeCall( - createVpnConnectionRouteRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVpnConnection - * - * @param deleteVpnConnectionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVpnConnectionCall( - DeleteVpnConnectionRequest deleteVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVpnConnectionRequest; - - // create path and map variables - String localVarPath = "/DeleteVpnConnection"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVpnConnectionValidateBeforeCall( - DeleteVpnConnectionRequest deleteVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - return deleteVpnConnectionCall(deleteVpnConnectionRequest, _callback); - } - - /** - * @param deleteVpnConnectionRequest (optional) - * @return DeleteVpnConnectionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteVpnConnectionResponse deleteVpnConnection( - DeleteVpnConnectionRequest deleteVpnConnectionRequest) throws ApiException { - ApiResponse localVarResp = - deleteVpnConnectionWithHttpInfo(deleteVpnConnectionRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVpnConnectionRequest (optional) - * @return ApiResponse<DeleteVpnConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteVpnConnectionWithHttpInfo( - DeleteVpnConnectionRequest deleteVpnConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteVpnConnectionValidateBeforeCall(deleteVpnConnectionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVpnConnectionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVpnConnectionAsync( - DeleteVpnConnectionRequest deleteVpnConnectionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteVpnConnectionValidateBeforeCall(deleteVpnConnectionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVpnConnectionRoute - * - * @param deleteVpnConnectionRouteRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVpnConnectionRouteCall( - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deleteVpnConnectionRouteRequest; - - // create path and map variables - String localVarPath = "/DeleteVpnConnectionRoute"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVpnConnectionRouteValidateBeforeCall( - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - return deleteVpnConnectionRouteCall(deleteVpnConnectionRouteRequest, _callback); - } - - /** - * @param deleteVpnConnectionRouteRequest (optional) - * @return DeleteVpnConnectionRouteResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public DeleteVpnConnectionRouteResponse deleteVpnConnectionRoute( - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest) throws ApiException { - ApiResponse localVarResp = - deleteVpnConnectionRouteWithHttpInfo(deleteVpnConnectionRouteRequest); - return localVarResp.getData(); - } - - /** - * @param deleteVpnConnectionRouteRequest (optional) - * @return ApiResponse<DeleteVpnConnectionRouteResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse deleteVpnConnectionRouteWithHttpInfo( - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteVpnConnectionRouteValidateBeforeCall(deleteVpnConnectionRouteRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param deleteVpnConnectionRouteRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call deleteVpnConnectionRouteAsync( - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteVpnConnectionRouteValidateBeforeCall( - deleteVpnConnectionRouteRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readVpnConnections - * - * @param readVpnConnectionsRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVpnConnectionsCall( - ReadVpnConnectionsRequest readVpnConnectionsRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readVpnConnectionsRequest; - - // create path and map variables - String localVarPath = "/ReadVpnConnections"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readVpnConnectionsValidateBeforeCall( - ReadVpnConnectionsRequest readVpnConnectionsRequest, final ApiCallback _callback) - throws ApiException { - return readVpnConnectionsCall(readVpnConnectionsRequest, _callback); - } - - /** - * @param readVpnConnectionsRequest (optional) - * @return ReadVpnConnectionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ReadVpnConnectionsResponse readVpnConnections( - ReadVpnConnectionsRequest readVpnConnectionsRequest) throws ApiException { - ApiResponse localVarResp = - readVpnConnectionsWithHttpInfo(readVpnConnectionsRequest); - return localVarResp.getData(); - } - - /** - * @param readVpnConnectionsRequest (optional) - * @return ApiResponse<ReadVpnConnectionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public ApiResponse readVpnConnectionsWithHttpInfo( - ReadVpnConnectionsRequest readVpnConnectionsRequest) throws ApiException { - okhttp3.Call localVarCall = - readVpnConnectionsValidateBeforeCall(readVpnConnectionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param readVpnConnectionsRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
- */ - public okhttp3.Call readVpnConnectionsAsync( - ReadVpnConnectionsRequest readVpnConnectionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - readVpnConnectionsValidateBeforeCall(readVpnConnectionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVpnConnection - * - * @param updateVpnConnectionRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVpnConnectionCall( - UpdateVpnConnectionRequest updateVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateVpnConnectionRequest; - - // create path and map variables - String localVarPath = "/UpdateVpnConnection"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"AWS4Auth", "ApiKeyAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVpnConnectionValidateBeforeCall( - UpdateVpnConnectionRequest updateVpnConnectionRequest, final ApiCallback _callback) - throws ApiException { - return updateVpnConnectionCall(updateVpnConnectionRequest, _callback); - } - - /** - * @param updateVpnConnectionRequest (optional) - * @return UpdateVpnConnectionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public UpdateVpnConnectionResponse updateVpnConnection( - UpdateVpnConnectionRequest updateVpnConnectionRequest) throws ApiException { - ApiResponse localVarResp = - updateVpnConnectionWithHttpInfo(updateVpnConnectionRequest); - return localVarResp.getData(); - } - - /** - * @param updateVpnConnectionRequest (optional) - * @return ApiResponse<UpdateVpnConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public ApiResponse updateVpnConnectionWithHttpInfo( - UpdateVpnConnectionRequest updateVpnConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVpnConnectionValidateBeforeCall(updateVpnConnectionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * - * @param updateVpnConnectionRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - *
Status Code Description Response Headers
200 The HTTP 200 response (OK). -
400 The HTTP 400 response (Bad Request). -
401 The HTTP 401 response (Unauthorized). -
500 The HTTP 500 response (Internal Server Error). -
- */ - public okhttp3.Call updateVpnConnectionAsync( - UpdateVpnConnectionRequest updateVpnConnectionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVpnConnectionValidateBeforeCall(updateVpnConnectionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/AWS4Auth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/AWS4Auth.java deleted file mode 100644 index 1f192bb5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/AWS4Auth.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.auth; - -import com.amazonaws.DefaultRequest; -import com.amazonaws.auth.AWS4Signer; -import com.amazonaws.auth.AWSCredentials; -import com.amazonaws.auth.AnonymousAWSCredentials; -import com.amazonaws.auth.BasicAWSCredentials; -import com.amazonaws.http.HttpMethodName; -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Pair; -import java.io.ByteArrayInputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AWS4Auth implements Authentication { - - private AWSCredentials credentials; - private String region; - private String service; - - public AWS4Auth() { - this.credentials = new AnonymousAWSCredentials(); - } - - public void setCredentials(String accessKey, String secretKey) { - this.credentials = new BasicAWSCredentials(accessKey, secretKey); - } - - public void setRegion(String region) { - this.region = region; - } - - public void setService(String service) { - this.service = service; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - - DefaultRequest signableRequest = new DefaultRequest<>(this.service); - - signableRequest.setContent(new ByteArrayInputStream(payload.getBytes())); - - signableRequest.setHttpMethod(HttpMethodName.valueOf(method)); - URI targetUri = null; - try { - targetUri = new URI(uri.getScheme(), "", uri.getHost(), uri.getPort(), "", "", ""); - } catch (URISyntaxException e) { - return; - } - signableRequest.setEndpoint(targetUri); - signableRequest.setResourcePath(uri.getPath()); - - AWS4Signer signer = new AWS4Signer(false); - signer.setServiceName(this.service); - signer.setRegionName(this.region); - signer.sign(signableRequest, credentials); - - headerParams.putAll(signableRequest.getHeaders()); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/ApiKeyAuth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/ApiKeyAuth.java deleted file mode 100644 index 8a81beba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.auth; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/Authentication.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/Authentication.java deleted file mode 100644 index c64ed03f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/Authentication.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.auth; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException; -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java deleted file mode 100644 index 8b24bb5c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.auth; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; -import okhttp3.Credentials; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - private DateTimeFormatter timeFormatter = - DateTimeFormat.forPattern("yyyyMMdd'T'HHmmss'Z'").withZoneUTC(); - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put( - "Authorization", - Credentials.basic( - username == null ? "" : username, password == null ? "" : password)); - - headerParams.put("X-Osc-Date", timeFormatter.print(System.currentTimeMillis())); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBearerAuth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBearerAuth.java deleted file mode 100644 index 09c9ce85..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.auth; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put( - "Authorization", - (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AbstractOpenApiSchema.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AbstractOpenApiSchema.java deleted file mode 100644 index 7905008a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import java.util.Map; -import java.util.Objects; -import javax.ws.rs.core.GenericType; - -// import com.fasterxml.jackson.annotation.JsonValue; - -/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - // @JsonValue - public Object getActualInstance() { - return instance; - } - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) { - this.instance = instance; - } - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf - * schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) - && Objects.equals(this.isNullable, a.isNullable) - && Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequest.java deleted file mode 100644 index 8a1dd291..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** AcceptNetPeeringRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AcceptNetPeeringRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public AcceptNetPeeringRequest() {} - - public AcceptNetPeeringRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public AcceptNetPeeringRequest netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of the Net peering you want to accept. - * - * @return netPeeringId - */ - @javax.annotation.Nonnull - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AcceptNetPeeringRequest acceptNetPeeringRequest = (AcceptNetPeeringRequest) o; - return Objects.equals(this.dryRun, acceptNetPeeringRequest.dryRun) - && Objects.equals(this.netPeeringId, acceptNetPeeringRequest.netPeeringId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netPeeringId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AcceptNetPeeringRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetPeeringId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetPeeringId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AcceptNetPeeringRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AcceptNetPeeringRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AcceptNetPeeringRequest is not found" - + " in the empty JSON string", - AcceptNetPeeringRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AcceptNetPeeringRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AcceptNetPeeringRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AcceptNetPeeringRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AcceptNetPeeringRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AcceptNetPeeringRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AcceptNetPeeringRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AcceptNetPeeringRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AcceptNetPeeringRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AcceptNetPeeringRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AcceptNetPeeringRequest - * @throws IOException if the JSON string is invalid with respect to AcceptNetPeeringRequest - */ - public static AcceptNetPeeringRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AcceptNetPeeringRequest.class); - } - - /** - * Convert an instance of AcceptNetPeeringRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponse.java deleted file mode 100644 index 61ade6a9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** AcceptNetPeeringResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AcceptNetPeeringResponse { - public static final String SERIALIZED_NAME_NET_PEERING = "NetPeering"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING) - private NetPeering netPeering; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public AcceptNetPeeringResponse() {} - - public AcceptNetPeeringResponse netPeering(NetPeering netPeering) { - - this.netPeering = netPeering; - return this; - } - - /** - * Get netPeering - * - * @return netPeering - */ - @javax.annotation.Nullable - public NetPeering getNetPeering() { - return netPeering; - } - - public void setNetPeering(NetPeering netPeering) { - this.netPeering = netPeering; - } - - public AcceptNetPeeringResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AcceptNetPeeringResponse acceptNetPeeringResponse = (AcceptNetPeeringResponse) o; - return Objects.equals(this.netPeering, acceptNetPeeringResponse.netPeering) - && Objects.equals(this.responseContext, acceptNetPeeringResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netPeering, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AcceptNetPeeringResponse {\n"); - sb.append(" netPeering: ").append(toIndentedString(netPeering)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetPeering"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AcceptNetPeeringResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AcceptNetPeeringResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AcceptNetPeeringResponse is not found" - + " in the empty JSON string", - AcceptNetPeeringResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AcceptNetPeeringResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AcceptNetPeeringResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NetPeering` - if (jsonObj.get("NetPeering") != null && !jsonObj.get("NetPeering").isJsonNull()) { - NetPeering.validateJsonObject(jsonObj.getAsJsonObject("NetPeering")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AcceptNetPeeringResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AcceptNetPeeringResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AcceptNetPeeringResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AcceptNetPeeringResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AcceptNetPeeringResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AcceptNetPeeringResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of AcceptNetPeeringResponse - * @throws IOException if the JSON string is invalid with respect to AcceptNetPeeringResponse - */ - public static AcceptNetPeeringResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AcceptNetPeeringResponse.class); - } - - /** - * Convert an instance of AcceptNetPeeringResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccepterNet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccepterNet.java deleted file mode 100644 index f44862b5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccepterNet.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the accepter Net. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccepterNet { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public AccepterNet() {} - - public AccepterNet accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the accepter Net. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public AccepterNet ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the accepter Net, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public AccepterNet netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the accepter Net. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccepterNet accepterNet = (AccepterNet) o; - return Objects.equals(this.accountId, accepterNet.accountId) - && Objects.equals(this.ipRange, accepterNet.ipRange) - && Objects.equals(this.netId, accepterNet.netId); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, ipRange, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccepterNet {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("IpRange"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccepterNet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccepterNet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccepterNet is not found in the empty" - + " JSON string", - AccepterNet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AccepterNet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccepterNet` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccepterNet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccepterNet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccepterNet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccepterNet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccepterNet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccepterNet given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccepterNet - * @throws IOException if the JSON string is invalid with respect to AccepterNet - */ - public static AccepterNet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccepterNet.class); - } - - /** - * Convert an instance of AccepterNet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKey.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKey.java deleted file mode 100644 index e74d996c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKey.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the access key. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccessKey { - public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "AccessKeyId"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) - private String accessKeyId; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private OffsetDateTime expirationDate; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public AccessKey() {} - - public AccessKey accessKeyId(String accessKeyId) { - - this.accessKeyId = accessKeyId; - return this; - } - - /** - * The ID of the access key. - * - * @return accessKeyId - */ - @javax.annotation.Nullable - public String getAccessKeyId() { - return accessKeyId; - } - - public void setAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - } - - public AccessKey creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public AccessKey expirationDate(OffsetDateTime expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key expires. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - } - - public AccessKey lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key was last modified. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public AccessKey state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the access key (`ACTIVE` if the key is valid for API calls, or - * `INACTIVE` if not). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccessKey accessKey = (AccessKey) o; - return Objects.equals(this.accessKeyId, accessKey.accessKeyId) - && Objects.equals(this.creationDate, accessKey.creationDate) - && Objects.equals(this.expirationDate, accessKey.expirationDate) - && Objects.equals(this.lastModificationDate, accessKey.lastModificationDate) - && Objects.equals(this.state, accessKey.state); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeyId, creationDate, expirationDate, lastModificationDate, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccessKey {\n"); - sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyId"); - openapiFields.add("CreationDate"); - openapiFields.add("ExpirationDate"); - openapiFields.add("LastModificationDate"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccessKey - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccessKey.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccessKey is not found in the empty" - + " JSON string", - AccessKey.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AccessKey.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccessKey` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccessKeyId") != null && !jsonObj.get("AccessKeyId").isJsonNull()) - && !jsonObj.get("AccessKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeyId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccessKey.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccessKey' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccessKey.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccessKey value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccessKey read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccessKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccessKey - * @throws IOException if the JSON string is invalid with respect to AccessKey - */ - public static AccessKey fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccessKey.class); - } - - /** - * Convert an instance of AccessKey to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKey.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKey.java deleted file mode 100644 index 0e1d9579..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKey.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the access key. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccessKeySecretKey { - public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "AccessKeyId"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) - private String accessKeyId; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private OffsetDateTime expirationDate; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_SECRET_KEY = "SecretKey"; - - @SerializedName(SERIALIZED_NAME_SECRET_KEY) - private String secretKey; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public AccessKeySecretKey() {} - - public AccessKeySecretKey accessKeyId(String accessKeyId) { - - this.accessKeyId = accessKeyId; - return this; - } - - /** - * The ID of the access key. - * - * @return accessKeyId - */ - @javax.annotation.Nullable - public String getAccessKeyId() { - return accessKeyId; - } - - public void setAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - } - - public AccessKeySecretKey creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public AccessKeySecretKey expirationDate(OffsetDateTime expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key expires. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - } - - public AccessKeySecretKey lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) at which the access key was last modified. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public AccessKeySecretKey secretKey(String secretKey) { - - this.secretKey = secretKey; - return this; - } - - /** - * The secret key that enables you to send requests. - * - * @return secretKey - */ - @javax.annotation.Nullable - public String getSecretKey() { - return secretKey; - } - - public void setSecretKey(String secretKey) { - this.secretKey = secretKey; - } - - public AccessKeySecretKey state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the access key (`ACTIVE` if the key is valid for API calls, or - * `INACTIVE` if not). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccessKeySecretKey accessKeySecretKey = (AccessKeySecretKey) o; - return Objects.equals(this.accessKeyId, accessKeySecretKey.accessKeyId) - && Objects.equals(this.creationDate, accessKeySecretKey.creationDate) - && Objects.equals(this.expirationDate, accessKeySecretKey.expirationDate) - && Objects.equals( - this.lastModificationDate, accessKeySecretKey.lastModificationDate) - && Objects.equals(this.secretKey, accessKeySecretKey.secretKey) - && Objects.equals(this.state, accessKeySecretKey.state); - } - - @Override - public int hashCode() { - return Objects.hash( - accessKeyId, creationDate, expirationDate, lastModificationDate, secretKey, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccessKeySecretKey {\n"); - sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyId"); - openapiFields.add("CreationDate"); - openapiFields.add("ExpirationDate"); - openapiFields.add("LastModificationDate"); - openapiFields.add("SecretKey"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccessKeySecretKey - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccessKeySecretKey.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccessKeySecretKey is not found in" - + " the empty JSON string", - AccessKeySecretKey.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AccessKeySecretKey.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccessKeySecretKey` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccessKeyId") != null && !jsonObj.get("AccessKeyId").isJsonNull()) - && !jsonObj.get("AccessKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeyId").toString())); - } - if ((jsonObj.get("SecretKey") != null && !jsonObj.get("SecretKey").isJsonNull()) - && !jsonObj.get("SecretKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecretKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SecretKey").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccessKeySecretKey.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccessKeySecretKey' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccessKeySecretKey.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccessKeySecretKey value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccessKeySecretKey read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccessKeySecretKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccessKeySecretKey - * @throws IOException if the JSON string is invalid with respect to AccessKeySecretKey - */ - public static AccessKeySecretKey fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccessKeySecretKey.class); - } - - /** - * Convert an instance of AccessKeySecretKey to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessLog.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessLog.java deleted file mode 100644 index 59bfaca1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AccessLog.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about access logs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccessLog { - public static final String SERIALIZED_NAME_IS_ENABLED = "IsEnabled"; - - @SerializedName(SERIALIZED_NAME_IS_ENABLED) - private Boolean isEnabled; - - public static final String SERIALIZED_NAME_OSU_BUCKET_NAME = "OsuBucketName"; - - @SerializedName(SERIALIZED_NAME_OSU_BUCKET_NAME) - private String osuBucketName; - - public static final String SERIALIZED_NAME_OSU_BUCKET_PREFIX = "OsuBucketPrefix"; - - @SerializedName(SERIALIZED_NAME_OSU_BUCKET_PREFIX) - private String osuBucketPrefix; - - public static final String SERIALIZED_NAME_PUBLICATION_INTERVAL = "PublicationInterval"; - - @SerializedName(SERIALIZED_NAME_PUBLICATION_INTERVAL) - private Integer publicationInterval; - - public AccessLog() {} - - public AccessLog isEnabled(Boolean isEnabled) { - - this.isEnabled = isEnabled; - return this; - } - - /** - * If true, access logs are enabled for your load balancer. If false, they are not. If you set - * this to true in your request, the `OsuBucketName` parameter is required. - * - * @return isEnabled - */ - @javax.annotation.Nullable - public Boolean getIsEnabled() { - return isEnabled; - } - - public void setIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - } - - public AccessLog osuBucketName(String osuBucketName) { - - this.osuBucketName = osuBucketName; - return this; - } - - /** - * The name of the OOS bucket for the access logs. - * - * @return osuBucketName - */ - @javax.annotation.Nullable - public String getOsuBucketName() { - return osuBucketName; - } - - public void setOsuBucketName(String osuBucketName) { - this.osuBucketName = osuBucketName; - } - - public AccessLog osuBucketPrefix(String osuBucketPrefix) { - - this.osuBucketPrefix = osuBucketPrefix; - return this; - } - - /** - * The path to the folder of the access logs in your OOS bucket (by default, the - * `root` level of your bucket). - * - * @return osuBucketPrefix - */ - @javax.annotation.Nullable - public String getOsuBucketPrefix() { - return osuBucketPrefix; - } - - public void setOsuBucketPrefix(String osuBucketPrefix) { - this.osuBucketPrefix = osuBucketPrefix; - } - - public AccessLog publicationInterval(Integer publicationInterval) { - - this.publicationInterval = publicationInterval; - return this; - } - - /** - * The time interval for the publication of access logs in the OOS bucket, in minutes. This - * value can be either `5` or `60` (by default, `60`). - * - * @return publicationInterval - */ - @javax.annotation.Nullable - public Integer getPublicationInterval() { - return publicationInterval; - } - - public void setPublicationInterval(Integer publicationInterval) { - this.publicationInterval = publicationInterval; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccessLog accessLog = (AccessLog) o; - return Objects.equals(this.isEnabled, accessLog.isEnabled) - && Objects.equals(this.osuBucketName, accessLog.osuBucketName) - && Objects.equals(this.osuBucketPrefix, accessLog.osuBucketPrefix) - && Objects.equals(this.publicationInterval, accessLog.publicationInterval); - } - - @Override - public int hashCode() { - return Objects.hash(isEnabled, osuBucketName, osuBucketPrefix, publicationInterval); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccessLog {\n"); - sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); - sb.append(" osuBucketName: ").append(toIndentedString(osuBucketName)).append("\n"); - sb.append(" osuBucketPrefix: ").append(toIndentedString(osuBucketPrefix)).append("\n"); - sb.append(" publicationInterval: ") - .append(toIndentedString(publicationInterval)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("IsEnabled"); - openapiFields.add("OsuBucketName"); - openapiFields.add("OsuBucketPrefix"); - openapiFields.add("PublicationInterval"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccessLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccessLog.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccessLog is not found in the empty" - + " JSON string", - AccessLog.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AccessLog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccessLog` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("OsuBucketName") != null && !jsonObj.get("OsuBucketName").isJsonNull()) - && !jsonObj.get("OsuBucketName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuBucketName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuBucketName").toString())); - } - if ((jsonObj.get("OsuBucketPrefix") != null && !jsonObj.get("OsuBucketPrefix").isJsonNull()) - && !jsonObj.get("OsuBucketPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuBucketPrefix` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OsuBucketPrefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccessLog.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccessLog' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccessLog.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccessLog value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccessLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccessLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccessLog - * @throws IOException if the JSON string is invalid with respect to AccessLog - */ - public static AccessLog fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccessLog.class); - } - - /** - * Convert an instance of AccessLog to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Account.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Account.java deleted file mode 100644 index d9c49592..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Account.java +++ /dev/null @@ -1,729 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the account. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Account { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_ADDITIONAL_EMAILS = "AdditionalEmails"; - - @SerializedName(SERIALIZED_NAME_ADDITIONAL_EMAILS) - private List additionalEmails = null; - - public static final String SERIALIZED_NAME_CITY = "City"; - - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "CompanyName"; - - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTRY = "Country"; - - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "CustomerId"; - - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_EMAIL = "Email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_FIRST_NAME = "FirstName"; - - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_JOB_TITLE = "JobTitle"; - - @SerializedName(SERIALIZED_NAME_JOB_TITLE) - private String jobTitle; - - public static final String SERIALIZED_NAME_LAST_NAME = "LastName"; - - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_MOBILE_NUMBER = "MobileNumber"; - - @SerializedName(SERIALIZED_NAME_MOBILE_NUMBER) - private String mobileNumber; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "PhoneNumber"; - - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_STATE_PROVINCE = "StateProvince"; - - @SerializedName(SERIALIZED_NAME_STATE_PROVINCE) - private String stateProvince; - - public static final String SERIALIZED_NAME_VAT_NUMBER = "VatNumber"; - - @SerializedName(SERIALIZED_NAME_VAT_NUMBER) - private String vatNumber; - - public static final String SERIALIZED_NAME_ZIP_CODE = "ZipCode"; - - @SerializedName(SERIALIZED_NAME_ZIP_CODE) - private String zipCode; - - public Account() {} - - public Account accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The ID of the account. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Account additionalEmails(List additionalEmails) { - - this.additionalEmails = additionalEmails; - return this; - } - - public Account addAdditionalEmailsItem(String additionalEmailsItem) { - if (this.additionalEmails == null) { - this.additionalEmails = new ArrayList<>(); - } - this.additionalEmails.add(additionalEmailsItem); - return this; - } - - /** - * One or more additional email addresses for the account. These addresses are used for - * notifications only. - * - * @return additionalEmails - */ - @javax.annotation.Nullable - public List getAdditionalEmails() { - return additionalEmails; - } - - public void setAdditionalEmails(List additionalEmails) { - this.additionalEmails = additionalEmails; - } - - public Account city(String city) { - - this.city = city; - return this; - } - - /** - * The city of the account owner. - * - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public Account companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * The name of the company for the account. - * - * @return companyName - */ - @javax.annotation.Nullable - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - public Account country(String country) { - - this.country = country; - return this; - } - - /** - * The country of the account owner. - * - * @return country - */ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public Account customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * The ID of the customer. - * - * @return customerId - */ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public Account email(String email) { - - this.email = email; - return this; - } - - /** - * The main email address for the account. This address is used for your credentials and for - * notifications. - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public Account firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * The first name of the account owner. - * - * @return firstName - */ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public Account jobTitle(String jobTitle) { - - this.jobTitle = jobTitle; - return this; - } - - /** - * The job title of the account owner. - * - * @return jobTitle - */ - @javax.annotation.Nullable - public String getJobTitle() { - return jobTitle; - } - - public void setJobTitle(String jobTitle) { - this.jobTitle = jobTitle; - } - - public Account lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * The last name of the account owner. - * - * @return lastName - */ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public Account mobileNumber(String mobileNumber) { - - this.mobileNumber = mobileNumber; - return this; - } - - /** - * The mobile phone number of the account owner. - * - * @return mobileNumber - */ - @javax.annotation.Nullable - public String getMobileNumber() { - return mobileNumber; - } - - public void setMobileNumber(String mobileNumber) { - this.mobileNumber = mobileNumber; - } - - public Account phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * The landline phone number of the account owner. - * - * @return phoneNumber - */ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - public Account stateProvince(String stateProvince) { - - this.stateProvince = stateProvince; - return this; - } - - /** - * The state/province of the account. - * - * @return stateProvince - */ - @javax.annotation.Nullable - public String getStateProvince() { - return stateProvince; - } - - public void setStateProvince(String stateProvince) { - this.stateProvince = stateProvince; - } - - public Account vatNumber(String vatNumber) { - - this.vatNumber = vatNumber; - return this; - } - - /** - * The value added tax (VAT) number for the account. - * - * @return vatNumber - */ - @javax.annotation.Nullable - public String getVatNumber() { - return vatNumber; - } - - public void setVatNumber(String vatNumber) { - this.vatNumber = vatNumber; - } - - public Account zipCode(String zipCode) { - - this.zipCode = zipCode; - return this; - } - - /** - * The ZIP code of the city. - * - * @return zipCode - */ - @javax.annotation.Nullable - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Account account = (Account) o; - return Objects.equals(this.accountId, account.accountId) - && Objects.equals(this.additionalEmails, account.additionalEmails) - && Objects.equals(this.city, account.city) - && Objects.equals(this.companyName, account.companyName) - && Objects.equals(this.country, account.country) - && Objects.equals(this.customerId, account.customerId) - && Objects.equals(this.email, account.email) - && Objects.equals(this.firstName, account.firstName) - && Objects.equals(this.jobTitle, account.jobTitle) - && Objects.equals(this.lastName, account.lastName) - && Objects.equals(this.mobileNumber, account.mobileNumber) - && Objects.equals(this.phoneNumber, account.phoneNumber) - && Objects.equals(this.stateProvince, account.stateProvince) - && Objects.equals(this.vatNumber, account.vatNumber) - && Objects.equals(this.zipCode, account.zipCode); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - additionalEmails, - city, - companyName, - country, - customerId, - email, - firstName, - jobTitle, - lastName, - mobileNumber, - phoneNumber, - stateProvince, - vatNumber, - zipCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Account {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" additionalEmails: ").append(toIndentedString(additionalEmails)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" mobileNumber: ").append(toIndentedString(mobileNumber)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" stateProvince: ").append(toIndentedString(stateProvince)).append("\n"); - sb.append(" vatNumber: ").append(toIndentedString(vatNumber)).append("\n"); - sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("AdditionalEmails"); - openapiFields.add("City"); - openapiFields.add("CompanyName"); - openapiFields.add("Country"); - openapiFields.add("CustomerId"); - openapiFields.add("Email"); - openapiFields.add("FirstName"); - openapiFields.add("JobTitle"); - openapiFields.add("LastName"); - openapiFields.add("MobileNumber"); - openapiFields.add("PhoneNumber"); - openapiFields.add("StateProvince"); - openapiFields.add("VatNumber"); - openapiFields.add("ZipCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Account - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Account.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Account is not found in the empty" - + " JSON string", - Account.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Account.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Account`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("AdditionalEmails") != null - && !jsonObj.get("AdditionalEmails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AdditionalEmails` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AdditionalEmails").toString())); - } - if ((jsonObj.get("City") != null && !jsonObj.get("City").isJsonNull()) - && !jsonObj.get("City").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `City` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("City").toString())); - } - if ((jsonObj.get("CompanyName") != null && !jsonObj.get("CompanyName").isJsonNull()) - && !jsonObj.get("CompanyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CompanyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CompanyName").toString())); - } - if ((jsonObj.get("Country") != null && !jsonObj.get("Country").isJsonNull()) - && !jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Country` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Country").toString())); - } - if ((jsonObj.get("CustomerId") != null && !jsonObj.get("CustomerId").isJsonNull()) - && !jsonObj.get("CustomerId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CustomerId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CustomerId").toString())); - } - if ((jsonObj.get("Email") != null && !jsonObj.get("Email").isJsonNull()) - && !jsonObj.get("Email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Email").toString())); - } - if ((jsonObj.get("FirstName") != null && !jsonObj.get("FirstName").isJsonNull()) - && !jsonObj.get("FirstName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FirstName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FirstName").toString())); - } - if ((jsonObj.get("JobTitle") != null && !jsonObj.get("JobTitle").isJsonNull()) - && !jsonObj.get("JobTitle").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `JobTitle` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("JobTitle").toString())); - } - if ((jsonObj.get("LastName") != null && !jsonObj.get("LastName").isJsonNull()) - && !jsonObj.get("LastName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LastName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LastName").toString())); - } - if ((jsonObj.get("MobileNumber") != null && !jsonObj.get("MobileNumber").isJsonNull()) - && !jsonObj.get("MobileNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MobileNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("MobileNumber").toString())); - } - if ((jsonObj.get("PhoneNumber") != null && !jsonObj.get("PhoneNumber").isJsonNull()) - && !jsonObj.get("PhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PhoneNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PhoneNumber").toString())); - } - if ((jsonObj.get("StateProvince") != null && !jsonObj.get("StateProvince").isJsonNull()) - && !jsonObj.get("StateProvince").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateProvince` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateProvince").toString())); - } - if ((jsonObj.get("VatNumber") != null && !jsonObj.get("VatNumber").isJsonNull()) - && !jsonObj.get("VatNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VatNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VatNumber").toString())); - } - if ((jsonObj.get("ZipCode") != null && !jsonObj.get("ZipCode").isJsonNull()) - && !jsonObj.get("ZipCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ZipCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ZipCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Account.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Account' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Account.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Account value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Account read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Account given an JSON string - * - * @param jsonString JSON string - * @return An instance of Account - * @throws IOException if the JSON string is invalid with respect to Account - */ - public static Account fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Account.class); - } - - /** - * Convert an instance of Account to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequest.java deleted file mode 100644 index 4658f335..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequest.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** AddUserToUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AddUserToUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public static final String SERIALIZED_NAME_USER_PATH = "UserPath"; - - @SerializedName(SERIALIZED_NAME_USER_PATH) - private String userPath; - - public AddUserToUserGroupRequest() {} - - public AddUserToUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public AddUserToUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to add a user to. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public AddUserToUserGroupRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - public AddUserToUserGroupRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user you want to add to the group. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public AddUserToUserGroupRequest userPath(String userPath) { - - this.userPath = userPath; - return this; - } - - /** - * The path to the user. If not specified, it is set to a slash (`/`). - * - * @return userPath - */ - @javax.annotation.Nullable - public String getUserPath() { - return userPath; - } - - public void setUserPath(String userPath) { - this.userPath = userPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddUserToUserGroupRequest addUserToUserGroupRequest = (AddUserToUserGroupRequest) o; - return Objects.equals(this.dryRun, addUserToUserGroupRequest.dryRun) - && Objects.equals(this.userGroupName, addUserToUserGroupRequest.userGroupName) - && Objects.equals(this.userGroupPath, addUserToUserGroupRequest.userGroupPath) - && Objects.equals(this.userName, addUserToUserGroupRequest.userName) - && Objects.equals(this.userPath, addUserToUserGroupRequest.userPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, userGroupName, userGroupPath, userName, userPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddUserToUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append(" userPath: ").append(toIndentedString(userPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - openapiFields.add("UserName"); - openapiFields.add("UserPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AddUserToUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AddUserToUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AddUserToUserGroupRequest is not" - + " found in the empty JSON string", - AddUserToUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AddUserToUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AddUserToUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AddUserToUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - if ((jsonObj.get("UserPath") != null && !jsonObj.get("UserPath").isJsonNull()) - && !jsonObj.get("UserPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AddUserToUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AddUserToUserGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AddUserToUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AddUserToUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AddUserToUserGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AddUserToUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AddUserToUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to AddUserToUserGroupRequest - */ - public static AddUserToUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AddUserToUserGroupRequest.class); - } - - /** - * Convert an instance of AddUserToUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponse.java deleted file mode 100644 index 9ab7d11e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** AddUserToUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AddUserToUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public AddUserToUserGroupResponse() {} - - public AddUserToUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddUserToUserGroupResponse addUserToUserGroupResponse = (AddUserToUserGroupResponse) o; - return Objects.equals(this.responseContext, addUserToUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddUserToUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AddUserToUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AddUserToUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AddUserToUserGroupResponse is not" - + " found in the empty JSON string", - AddUserToUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AddUserToUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AddUserToUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AddUserToUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AddUserToUserGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AddUserToUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AddUserToUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AddUserToUserGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AddUserToUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of AddUserToUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to AddUserToUserGroupResponse - */ - public static AddUserToUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AddUserToUserGroupResponse.class); - } - - /** - * Convert an instance of AddUserToUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicy.java deleted file mode 100644 index 4c79ee82..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicy.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the API access policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiAccessPolicy { - public static final String SERIALIZED_NAME_MAX_ACCESS_KEY_EXPIRATION_SECONDS = - "MaxAccessKeyExpirationSeconds"; - - @SerializedName(SERIALIZED_NAME_MAX_ACCESS_KEY_EXPIRATION_SECONDS) - private Long maxAccessKeyExpirationSeconds; - - public static final String SERIALIZED_NAME_REQUIRE_TRUSTED_ENV = "RequireTrustedEnv"; - - @SerializedName(SERIALIZED_NAME_REQUIRE_TRUSTED_ENV) - private Boolean requireTrustedEnv; - - public ApiAccessPolicy() {} - - public ApiAccessPolicy maxAccessKeyExpirationSeconds(Long maxAccessKeyExpirationSeconds) { - - this.maxAccessKeyExpirationSeconds = maxAccessKeyExpirationSeconds; - return this; - } - - /** - * The maximum possible lifetime for your access keys, in seconds. If `0`, your access - * keys can have unlimited lifetimes. - * - * @return maxAccessKeyExpirationSeconds - */ - @javax.annotation.Nullable - public Long getMaxAccessKeyExpirationSeconds() { - return maxAccessKeyExpirationSeconds; - } - - public void setMaxAccessKeyExpirationSeconds(Long maxAccessKeyExpirationSeconds) { - this.maxAccessKeyExpirationSeconds = maxAccessKeyExpirationSeconds; - } - - public ApiAccessPolicy requireTrustedEnv(Boolean requireTrustedEnv) { - - this.requireTrustedEnv = requireTrustedEnv; - return this; - } - - /** - * If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) - * enforcement. For more information, see [About Your API Access - * Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-Policy.html).<br - * /> If this is enabled, it is required that you and all your users log in to Cockpit v2 - * using the WebAuthn method for multi-factor authentication. For more information, see [About - * Authentication > Multi-Factor - * Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_factor_authentication). - * - * @return requireTrustedEnv - */ - @javax.annotation.Nullable - public Boolean getRequireTrustedEnv() { - return requireTrustedEnv; - } - - public void setRequireTrustedEnv(Boolean requireTrustedEnv) { - this.requireTrustedEnv = requireTrustedEnv; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAccessPolicy apiAccessPolicy = (ApiAccessPolicy) o; - return Objects.equals( - this.maxAccessKeyExpirationSeconds, - apiAccessPolicy.maxAccessKeyExpirationSeconds) - && Objects.equals(this.requireTrustedEnv, apiAccessPolicy.requireTrustedEnv); - } - - @Override - public int hashCode() { - return Objects.hash(maxAccessKeyExpirationSeconds, requireTrustedEnv); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAccessPolicy {\n"); - sb.append(" maxAccessKeyExpirationSeconds: ") - .append(toIndentedString(maxAccessKeyExpirationSeconds)) - .append("\n"); - sb.append(" requireTrustedEnv: ") - .append(toIndentedString(requireTrustedEnv)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("MaxAccessKeyExpirationSeconds"); - openapiFields.add("RequireTrustedEnv"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ApiAccessPolicy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApiAccessPolicy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ApiAccessPolicy is not found in the" - + " empty JSON string", - ApiAccessPolicy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ApiAccessPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ApiAccessPolicy` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApiAccessPolicy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApiAccessPolicy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ApiAccessPolicy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ApiAccessPolicy value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApiAccessPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ApiAccessPolicy given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApiAccessPolicy - * @throws IOException if the JSON string is invalid with respect to ApiAccessPolicy - */ - public static ApiAccessPolicy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApiAccessPolicy.class); - } - - /** - * Convert an instance of ApiAccessPolicy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRule.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRule.java deleted file mode 100644 index 7115e871..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRule.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the API access rule. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiAccessRule { - public static final String SERIALIZED_NAME_API_ACCESS_RULE_ID = "ApiAccessRuleId"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE_ID) - private String apiAccessRuleId; - - public static final String SERIALIZED_NAME_CA_IDS = "CaIds"; - - @SerializedName(SERIALIZED_NAME_CA_IDS) - private List caIds = null; - - public static final String SERIALIZED_NAME_CNS = "Cns"; - - @SerializedName(SERIALIZED_NAME_CNS) - private List cns = null; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public ApiAccessRule() {} - - public ApiAccessRule apiAccessRuleId(String apiAccessRuleId) { - - this.apiAccessRuleId = apiAccessRuleId; - return this; - } - - /** - * The ID of the API access rule. - * - * @return apiAccessRuleId - */ - @javax.annotation.Nullable - public String getApiAccessRuleId() { - return apiAccessRuleId; - } - - public void setApiAccessRuleId(String apiAccessRuleId) { - this.apiAccessRuleId = apiAccessRuleId; - } - - public ApiAccessRule caIds(List caIds) { - - this.caIds = caIds; - return this; - } - - public ApiAccessRule addCaIdsItem(String caIdsItem) { - if (this.caIds == null) { - this.caIds = new ArrayList<>(); - } - this.caIds.add(caIdsItem); - return this; - } - - /** - * One or more IDs of Client Certificate Authorities (CAs) used for the API access rule. - * - * @return caIds - */ - @javax.annotation.Nullable - public List getCaIds() { - return caIds; - } - - public void setCaIds(List caIds) { - this.caIds = caIds; - } - - public ApiAccessRule cns(List cns) { - - this.cns = cns; - return this; - } - - public ApiAccessRule addCnsItem(String cnsItem) { - if (this.cns == null) { - this.cns = new ArrayList<>(); - } - this.cns.add(cnsItem); - return this; - } - - /** - * One or more Client Certificate Common Names (CNs). - * - * @return cns - */ - @javax.annotation.Nullable - public List getCns() { - return cns; - } - - public void setCns(List cns) { - this.cns = cns; - } - - public ApiAccessRule description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the API access rule. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ApiAccessRule ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public ApiAccessRule addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * One or more IP ranges used for the API access rule, in CIDR notation (for example, - * `192.0.2.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAccessRule apiAccessRule = (ApiAccessRule) o; - return Objects.equals(this.apiAccessRuleId, apiAccessRule.apiAccessRuleId) - && Objects.equals(this.caIds, apiAccessRule.caIds) - && Objects.equals(this.cns, apiAccessRule.cns) - && Objects.equals(this.description, apiAccessRule.description) - && Objects.equals(this.ipRanges, apiAccessRule.ipRanges); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRuleId, caIds, cns, description, ipRanges); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAccessRule {\n"); - sb.append(" apiAccessRuleId: ").append(toIndentedString(apiAccessRuleId)).append("\n"); - sb.append(" caIds: ").append(toIndentedString(caIds)).append("\n"); - sb.append(" cns: ").append(toIndentedString(cns)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRuleId"); - openapiFields.add("CaIds"); - openapiFields.add("Cns"); - openapiFields.add("Description"); - openapiFields.add("IpRanges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ApiAccessRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApiAccessRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ApiAccessRule is not found in the" - + " empty JSON string", - ApiAccessRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ApiAccessRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ApiAccessRule` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ApiAccessRuleId") != null && !jsonObj.get("ApiAccessRuleId").isJsonNull()) - && !jsonObj.get("ApiAccessRuleId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiAccessRuleId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ApiAccessRuleId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaIds") != null && !jsonObj.get("CaIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("CaIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Cns") != null && !jsonObj.get("Cns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cns` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Cns").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApiAccessRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApiAccessRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ApiAccessRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ApiAccessRule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApiAccessRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ApiAccessRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApiAccessRule - * @throws IOException if the JSON string is invalid with respect to ApiAccessRule - */ - public static ApiAccessRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApiAccessRule.class); - } - - /** - * Convert an instance of ApiAccessRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicy.java deleted file mode 100644 index 8f0d2d36..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicy.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the stickiness policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationStickyCookiePolicy { - public static final String SERIALIZED_NAME_COOKIE_NAME = "CookieName"; - - @SerializedName(SERIALIZED_NAME_COOKIE_NAME) - private String cookieName; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public ApplicationStickyCookiePolicy() {} - - public ApplicationStickyCookiePolicy cookieName(String cookieName) { - - this.cookieName = cookieName; - return this; - } - - /** - * The name of the application cookie used for stickiness. - * - * @return cookieName - */ - @javax.annotation.Nullable - public String getCookieName() { - return cookieName; - } - - public void setCookieName(String cookieName) { - this.cookieName = cookieName; - } - - public ApplicationStickyCookiePolicy policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The mnemonic name for the policy being created. The name must be unique within a set of - * policies for this load balancer. - * - * @return policyName - */ - @javax.annotation.Nullable - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationStickyCookiePolicy applicationStickyCookiePolicy = - (ApplicationStickyCookiePolicy) o; - return Objects.equals(this.cookieName, applicationStickyCookiePolicy.cookieName) - && Objects.equals(this.policyName, applicationStickyCookiePolicy.policyName); - } - - @Override - public int hashCode() { - return Objects.hash(cookieName, policyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationStickyCookiePolicy {\n"); - sb.append(" cookieName: ").append(toIndentedString(cookieName)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CookieName"); - openapiFields.add("PolicyName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ApplicationStickyCookiePolicy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApplicationStickyCookiePolicy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ApplicationStickyCookiePolicy is not" - + " found in the empty JSON string", - ApplicationStickyCookiePolicy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ApplicationStickyCookiePolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ApplicationStickyCookiePolicy` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("CookieName") != null && !jsonObj.get("CookieName").isJsonNull()) - && !jsonObj.get("CookieName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CookieName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CookieName").toString())); - } - if ((jsonObj.get("PolicyName") != null && !jsonObj.get("PolicyName").isJsonNull()) - && !jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationStickyCookiePolicy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationStickyCookiePolicy' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ApplicationStickyCookiePolicy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationStickyCookiePolicy value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationStickyCookiePolicy read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationStickyCookiePolicy given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationStickyCookiePolicy - * @throws IOException if the JSON string is invalid with respect to - * ApplicationStickyCookiePolicy - */ - public static ApplicationStickyCookiePolicy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationStickyCookiePolicy.class); - } - - /** - * Convert an instance of ApplicationStickyCookiePolicy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealth.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealth.java deleted file mode 100644 index ddfe9fbe..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealth.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the health of a backend VM. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BackendVmHealth { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_REASON = "StateReason"; - - @SerializedName(SERIALIZED_NAME_STATE_REASON) - private String stateReason; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public BackendVmHealth() {} - - public BackendVmHealth description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the state of the backend VM. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public BackendVmHealth state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the backend VM (`InService` \\| `OutOfService` \\| - * `Unknown`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public BackendVmHealth stateReason(String stateReason) { - - this.stateReason = stateReason; - return this; - } - - /** - * Information about the cause of `OutOfService` VMs.<br /> Specifically, - * whether the cause is Elastic Load Balancing or the VM (`ELB` \\| - * `Instance` \\| `N/A`). - * - * @return stateReason - */ - @javax.annotation.Nullable - public String getStateReason() { - return stateReason; - } - - public void setStateReason(String stateReason) { - this.stateReason = stateReason; - } - - public BackendVmHealth vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the backend VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BackendVmHealth backendVmHealth = (BackendVmHealth) o; - return Objects.equals(this.description, backendVmHealth.description) - && Objects.equals(this.state, backendVmHealth.state) - && Objects.equals(this.stateReason, backendVmHealth.stateReason) - && Objects.equals(this.vmId, backendVmHealth.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(description, state, stateReason, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BackendVmHealth {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateReason: ").append(toIndentedString(stateReason)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("State"); - openapiFields.add("StateReason"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BackendVmHealth - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BackendVmHealth.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BackendVmHealth is not found in the" - + " empty JSON string", - BackendVmHealth.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BackendVmHealth.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BackendVmHealth` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("StateReason") != null && !jsonObj.get("StateReason").isJsonNull()) - && !jsonObj.get("StateReason").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateReason` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateReason").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BackendVmHealth.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BackendVmHealth' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BackendVmHealth.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BackendVmHealth value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BackendVmHealth read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BackendVmHealth given an JSON string - * - * @param jsonString JSON string - * @return An instance of BackendVmHealth - * @throws IOException if the JSON string is invalid with respect to BackendVmHealth - */ - public static BackendVmHealth fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BackendVmHealth.class); - } - - /** - * Convert an instance of BackendVmHealth to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreated.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreated.java deleted file mode 100644 index 1c6fd1a6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreated.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the created block device mapping. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BlockDeviceMappingCreated { - public static final String SERIALIZED_NAME_BSU = "Bsu"; - - @SerializedName(SERIALIZED_NAME_BSU) - private BsuCreated bsu; - - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public BlockDeviceMappingCreated() {} - - public BlockDeviceMappingCreated bsu(BsuCreated bsu) { - - this.bsu = bsu; - return this; - } - - /** - * Get bsu - * - * @return bsu - */ - @javax.annotation.Nullable - public BsuCreated getBsu() { - return bsu; - } - - public void setBsu(BsuCreated bsu) { - this.bsu = bsu; - } - - public BlockDeviceMappingCreated deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The name of the device. - * - * @return deviceName - */ - @javax.annotation.Nullable - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BlockDeviceMappingCreated blockDeviceMappingCreated = (BlockDeviceMappingCreated) o; - return Objects.equals(this.bsu, blockDeviceMappingCreated.bsu) - && Objects.equals(this.deviceName, blockDeviceMappingCreated.deviceName); - } - - @Override - public int hashCode() { - return Objects.hash(bsu, deviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BlockDeviceMappingCreated {\n"); - sb.append(" bsu: ").append(toIndentedString(bsu)).append("\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Bsu"); - openapiFields.add("DeviceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BlockDeviceMappingCreated - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BlockDeviceMappingCreated.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BlockDeviceMappingCreated is not" - + " found in the empty JSON string", - BlockDeviceMappingCreated.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BlockDeviceMappingCreated.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BlockDeviceMappingCreated` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Bsu` - if (jsonObj.get("Bsu") != null && !jsonObj.get("Bsu").isJsonNull()) { - BsuCreated.validateJsonObject(jsonObj.getAsJsonObject("Bsu")); - } - if ((jsonObj.get("DeviceName") != null && !jsonObj.get("DeviceName").isJsonNull()) - && !jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BlockDeviceMappingCreated.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BlockDeviceMappingCreated' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BlockDeviceMappingCreated.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BlockDeviceMappingCreated value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BlockDeviceMappingCreated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BlockDeviceMappingCreated given an JSON string - * - * @param jsonString JSON string - * @return An instance of BlockDeviceMappingCreated - * @throws IOException if the JSON string is invalid with respect to BlockDeviceMappingCreated - */ - public static BlockDeviceMappingCreated fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BlockDeviceMappingCreated.class); - } - - /** - * Convert an instance of BlockDeviceMappingCreated to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImage.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImage.java deleted file mode 100644 index b627de91..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImage.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more parameters used to automatically set up volumes when the VM is created. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BlockDeviceMappingImage { - public static final String SERIALIZED_NAME_BSU = "Bsu"; - - @SerializedName(SERIALIZED_NAME_BSU) - private BsuToCreate bsu; - - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public static final String SERIALIZED_NAME_VIRTUAL_DEVICE_NAME = "VirtualDeviceName"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_DEVICE_NAME) - private String virtualDeviceName; - - public BlockDeviceMappingImage() {} - - public BlockDeviceMappingImage bsu(BsuToCreate bsu) { - - this.bsu = bsu; - return this; - } - - /** - * Get bsu - * - * @return bsu - */ - @javax.annotation.Nullable - public BsuToCreate getBsu() { - return bsu; - } - - public void setBsu(BsuToCreate bsu) { - this.bsu = bsu; - } - - public BlockDeviceMappingImage deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The device name for the volume. For a root device, you must use `/dev/sda1`. For - * other volumes, you must use `/dev/sdX`, `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` and `z`, and the second `X` is a letter between - * `a` and `z`). - * - * @return deviceName - */ - @javax.annotation.Nullable - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public BlockDeviceMappingImage virtualDeviceName(String virtualDeviceName) { - - this.virtualDeviceName = virtualDeviceName; - return this; - } - - /** - * The name of the virtual device (`ephemeralN`). - * - * @return virtualDeviceName - */ - @javax.annotation.Nullable - public String getVirtualDeviceName() { - return virtualDeviceName; - } - - public void setVirtualDeviceName(String virtualDeviceName) { - this.virtualDeviceName = virtualDeviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BlockDeviceMappingImage blockDeviceMappingImage = (BlockDeviceMappingImage) o; - return Objects.equals(this.bsu, blockDeviceMappingImage.bsu) - && Objects.equals(this.deviceName, blockDeviceMappingImage.deviceName) - && Objects.equals( - this.virtualDeviceName, blockDeviceMappingImage.virtualDeviceName); - } - - @Override - public int hashCode() { - return Objects.hash(bsu, deviceName, virtualDeviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BlockDeviceMappingImage {\n"); - sb.append(" bsu: ").append(toIndentedString(bsu)).append("\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append(" virtualDeviceName: ") - .append(toIndentedString(virtualDeviceName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Bsu"); - openapiFields.add("DeviceName"); - openapiFields.add("VirtualDeviceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BlockDeviceMappingImage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BlockDeviceMappingImage.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BlockDeviceMappingImage is not found" - + " in the empty JSON string", - BlockDeviceMappingImage.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BlockDeviceMappingImage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BlockDeviceMappingImage` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Bsu` - if (jsonObj.get("Bsu") != null && !jsonObj.get("Bsu").isJsonNull()) { - BsuToCreate.validateJsonObject(jsonObj.getAsJsonObject("Bsu")); - } - if ((jsonObj.get("DeviceName") != null && !jsonObj.get("DeviceName").isJsonNull()) - && !jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - if ((jsonObj.get("VirtualDeviceName") != null - && !jsonObj.get("VirtualDeviceName").isJsonNull()) - && !jsonObj.get("VirtualDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualDeviceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BlockDeviceMappingImage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BlockDeviceMappingImage' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BlockDeviceMappingImage.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BlockDeviceMappingImage value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BlockDeviceMappingImage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BlockDeviceMappingImage given an JSON string - * - * @param jsonString JSON string - * @return An instance of BlockDeviceMappingImage - * @throws IOException if the JSON string is invalid with respect to BlockDeviceMappingImage - */ - public static BlockDeviceMappingImage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BlockDeviceMappingImage.class); - } - - /** - * Convert an instance of BlockDeviceMappingImage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreation.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreation.java deleted file mode 100644 index 9010eb84..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreation.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the block device mapping. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BlockDeviceMappingVmCreation { - public static final String SERIALIZED_NAME_BSU = "Bsu"; - - @SerializedName(SERIALIZED_NAME_BSU) - private BsuToCreate bsu; - - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public static final String SERIALIZED_NAME_NO_DEVICE = "NoDevice"; - - @SerializedName(SERIALIZED_NAME_NO_DEVICE) - private String noDevice; - - public static final String SERIALIZED_NAME_VIRTUAL_DEVICE_NAME = "VirtualDeviceName"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_DEVICE_NAME) - private String virtualDeviceName; - - public BlockDeviceMappingVmCreation() {} - - public BlockDeviceMappingVmCreation bsu(BsuToCreate bsu) { - - this.bsu = bsu; - return this; - } - - /** - * Get bsu - * - * @return bsu - */ - @javax.annotation.Nullable - public BsuToCreate getBsu() { - return bsu; - } - - public void setBsu(BsuToCreate bsu) { - this.bsu = bsu; - } - - public BlockDeviceMappingVmCreation deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The device name for the volume. For a root device, you must use `/dev/sda1`. For - * other volumes, you must use `/dev/sdX`, `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` and `z`, and the second `X` is a letter between - * `a` and `z`). - * - * @return deviceName - */ - @javax.annotation.Nullable - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public BlockDeviceMappingVmCreation noDevice(String noDevice) { - - this.noDevice = noDevice; - return this; - } - - /** - * Removes the device which is included in the block device mapping of the OMI. - * - * @return noDevice - */ - @javax.annotation.Nullable - public String getNoDevice() { - return noDevice; - } - - public void setNoDevice(String noDevice) { - this.noDevice = noDevice; - } - - public BlockDeviceMappingVmCreation virtualDeviceName(String virtualDeviceName) { - - this.virtualDeviceName = virtualDeviceName; - return this; - } - - /** - * The name of the virtual device (`ephemeralN`). - * - * @return virtualDeviceName - */ - @javax.annotation.Nullable - public String getVirtualDeviceName() { - return virtualDeviceName; - } - - public void setVirtualDeviceName(String virtualDeviceName) { - this.virtualDeviceName = virtualDeviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BlockDeviceMappingVmCreation blockDeviceMappingVmCreation = - (BlockDeviceMappingVmCreation) o; - return Objects.equals(this.bsu, blockDeviceMappingVmCreation.bsu) - && Objects.equals(this.deviceName, blockDeviceMappingVmCreation.deviceName) - && Objects.equals(this.noDevice, blockDeviceMappingVmCreation.noDevice) - && Objects.equals( - this.virtualDeviceName, blockDeviceMappingVmCreation.virtualDeviceName); - } - - @Override - public int hashCode() { - return Objects.hash(bsu, deviceName, noDevice, virtualDeviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BlockDeviceMappingVmCreation {\n"); - sb.append(" bsu: ").append(toIndentedString(bsu)).append("\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append(" noDevice: ").append(toIndentedString(noDevice)).append("\n"); - sb.append(" virtualDeviceName: ") - .append(toIndentedString(virtualDeviceName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Bsu"); - openapiFields.add("DeviceName"); - openapiFields.add("NoDevice"); - openapiFields.add("VirtualDeviceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * BlockDeviceMappingVmCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BlockDeviceMappingVmCreation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BlockDeviceMappingVmCreation is not" - + " found in the empty JSON string", - BlockDeviceMappingVmCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BlockDeviceMappingVmCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BlockDeviceMappingVmCreation` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Bsu` - if (jsonObj.get("Bsu") != null && !jsonObj.get("Bsu").isJsonNull()) { - BsuToCreate.validateJsonObject(jsonObj.getAsJsonObject("Bsu")); - } - if ((jsonObj.get("DeviceName") != null && !jsonObj.get("DeviceName").isJsonNull()) - && !jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - if ((jsonObj.get("NoDevice") != null && !jsonObj.get("NoDevice").isJsonNull()) - && !jsonObj.get("NoDevice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NoDevice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NoDevice").toString())); - } - if ((jsonObj.get("VirtualDeviceName") != null - && !jsonObj.get("VirtualDeviceName").isJsonNull()) - && !jsonObj.get("VirtualDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualDeviceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BlockDeviceMappingVmCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BlockDeviceMappingVmCreation' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(BlockDeviceMappingVmCreation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BlockDeviceMappingVmCreation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BlockDeviceMappingVmCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BlockDeviceMappingVmCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of BlockDeviceMappingVmCreation - * @throws IOException if the JSON string is invalid with respect to - * BlockDeviceMappingVmCreation - */ - public static BlockDeviceMappingVmCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BlockDeviceMappingVmCreation.class); - } - - /** - * Convert an instance of BlockDeviceMappingVmCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdate.java deleted file mode 100644 index 0527cd8b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdate.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the block device mapping. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BlockDeviceMappingVmUpdate { - public static final String SERIALIZED_NAME_BSU = "Bsu"; - - @SerializedName(SERIALIZED_NAME_BSU) - private BsuToUpdateVm bsu; - - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public static final String SERIALIZED_NAME_NO_DEVICE = "NoDevice"; - - @SerializedName(SERIALIZED_NAME_NO_DEVICE) - private String noDevice; - - public static final String SERIALIZED_NAME_VIRTUAL_DEVICE_NAME = "VirtualDeviceName"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_DEVICE_NAME) - private String virtualDeviceName; - - public BlockDeviceMappingVmUpdate() {} - - public BlockDeviceMappingVmUpdate bsu(BsuToUpdateVm bsu) { - - this.bsu = bsu; - return this; - } - - /** - * Get bsu - * - * @return bsu - */ - @javax.annotation.Nullable - public BsuToUpdateVm getBsu() { - return bsu; - } - - public void setBsu(BsuToUpdateVm bsu) { - this.bsu = bsu; - } - - public BlockDeviceMappingVmUpdate deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The device name for the volume. For a root device, you must use `/dev/sda1`. For - * other volumes, you must use `/dev/sdX`, `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` and `z`, and the second `X` is a letter between - * `a` and `z`). - * - * @return deviceName - */ - @javax.annotation.Nullable - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public BlockDeviceMappingVmUpdate noDevice(String noDevice) { - - this.noDevice = noDevice; - return this; - } - - /** - * Removes the device which is included in the block device mapping of the OMI. - * - * @return noDevice - */ - @javax.annotation.Nullable - public String getNoDevice() { - return noDevice; - } - - public void setNoDevice(String noDevice) { - this.noDevice = noDevice; - } - - public BlockDeviceMappingVmUpdate virtualDeviceName(String virtualDeviceName) { - - this.virtualDeviceName = virtualDeviceName; - return this; - } - - /** - * The name of the virtual device (`ephemeralN`). - * - * @return virtualDeviceName - */ - @javax.annotation.Nullable - public String getVirtualDeviceName() { - return virtualDeviceName; - } - - public void setVirtualDeviceName(String virtualDeviceName) { - this.virtualDeviceName = virtualDeviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BlockDeviceMappingVmUpdate blockDeviceMappingVmUpdate = (BlockDeviceMappingVmUpdate) o; - return Objects.equals(this.bsu, blockDeviceMappingVmUpdate.bsu) - && Objects.equals(this.deviceName, blockDeviceMappingVmUpdate.deviceName) - && Objects.equals(this.noDevice, blockDeviceMappingVmUpdate.noDevice) - && Objects.equals( - this.virtualDeviceName, blockDeviceMappingVmUpdate.virtualDeviceName); - } - - @Override - public int hashCode() { - return Objects.hash(bsu, deviceName, noDevice, virtualDeviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BlockDeviceMappingVmUpdate {\n"); - sb.append(" bsu: ").append(toIndentedString(bsu)).append("\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append(" noDevice: ").append(toIndentedString(noDevice)).append("\n"); - sb.append(" virtualDeviceName: ") - .append(toIndentedString(virtualDeviceName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Bsu"); - openapiFields.add("DeviceName"); - openapiFields.add("NoDevice"); - openapiFields.add("VirtualDeviceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BlockDeviceMappingVmUpdate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BlockDeviceMappingVmUpdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BlockDeviceMappingVmUpdate is not" - + " found in the empty JSON string", - BlockDeviceMappingVmUpdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BlockDeviceMappingVmUpdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BlockDeviceMappingVmUpdate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Bsu` - if (jsonObj.get("Bsu") != null && !jsonObj.get("Bsu").isJsonNull()) { - BsuToUpdateVm.validateJsonObject(jsonObj.getAsJsonObject("Bsu")); - } - if ((jsonObj.get("DeviceName") != null && !jsonObj.get("DeviceName").isJsonNull()) - && !jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - if ((jsonObj.get("NoDevice") != null && !jsonObj.get("NoDevice").isJsonNull()) - && !jsonObj.get("NoDevice").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NoDevice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NoDevice").toString())); - } - if ((jsonObj.get("VirtualDeviceName") != null - && !jsonObj.get("VirtualDeviceName").isJsonNull()) - && !jsonObj.get("VirtualDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualDeviceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BlockDeviceMappingVmUpdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BlockDeviceMappingVmUpdate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BlockDeviceMappingVmUpdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BlockDeviceMappingVmUpdate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BlockDeviceMappingVmUpdate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BlockDeviceMappingVmUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of BlockDeviceMappingVmUpdate - * @throws IOException if the JSON string is invalid with respect to BlockDeviceMappingVmUpdate - */ - public static BlockDeviceMappingVmUpdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BlockDeviceMappingVmUpdate.class); - } - - /** - * Convert an instance of BlockDeviceMappingVmUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuCreated.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuCreated.java deleted file mode 100644 index 53cfe036..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuCreated.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the created BSU volume. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BsuCreated { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_LINK_DATE = "LinkDate"; - - @SerializedName(SERIALIZED_NAME_LINK_DATE) - private OffsetDateTime linkDate; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public BsuCreated() {} - - public BsuCreated deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the volume is deleted when terminating the VM. If false, the volume is not deleted - * when terminating the VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public BsuCreated linkDate(OffsetDateTime linkDate) { - - this.linkDate = linkDate; - return this; - } - - /** - * The date and time (UTC) at which the volume was attached to the VM, in ISO 8601 date-time - * format. - * - * @return linkDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLinkDate() { - return linkDate; - } - - public void setLinkDate(OffsetDateTime linkDate) { - this.linkDate = linkDate; - } - - public BsuCreated state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the volume. - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public BsuCreated volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BsuCreated bsuCreated = (BsuCreated) o; - return Objects.equals(this.deleteOnVmDeletion, bsuCreated.deleteOnVmDeletion) - && Objects.equals(this.linkDate, bsuCreated.linkDate) - && Objects.equals(this.state, bsuCreated.state) - && Objects.equals(this.volumeId, bsuCreated.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, linkDate, state, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BsuCreated {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" linkDate: ").append(toIndentedString(linkDate)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("LinkDate"); - openapiFields.add("State"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BsuCreated - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BsuCreated.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BsuCreated is not found in the empty" - + " JSON string", - BsuCreated.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BsuCreated.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BsuCreated` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BsuCreated.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BsuCreated' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BsuCreated.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BsuCreated value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BsuCreated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BsuCreated given an JSON string - * - * @param jsonString JSON string - * @return An instance of BsuCreated - * @throws IOException if the JSON string is invalid with respect to BsuCreated - */ - public static BsuCreated fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BsuCreated.class); - } - - /** - * Convert an instance of BsuCreated to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreate.java deleted file mode 100644 index 3e5fb2f7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreate.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the BSU volume to create. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BsuToCreate { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion = true; - - public static final String SERIALIZED_NAME_IOPS = "Iops"; - - @SerializedName(SERIALIZED_NAME_IOPS) - private Integer iops; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public static final String SERIALIZED_NAME_VOLUME_SIZE = "VolumeSize"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZE) - private Integer volumeSize; - - public static final String SERIALIZED_NAME_VOLUME_TYPE = "VolumeType"; - - @SerializedName(SERIALIZED_NAME_VOLUME_TYPE) - private String volumeType; - - public BsuToCreate() {} - - public BsuToCreate deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * By default or if set to true, the volume is deleted when terminating the VM. If false, the - * volume is not deleted when terminating the VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public BsuToCreate iops(Integer iops) { - - this.iops = iops; - return this; - } - - /** - * The number of I/O operations per second (IOPS). This parameter must be specified only if you - * create an `io1` volume. The maximum number of IOPS allowed for `io1` - * volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. - * - * @return iops - */ - @javax.annotation.Nullable - public Integer getIops() { - return iops; - } - - public void setIops(Integer iops) { - this.iops = iops; - } - - public BsuToCreate snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot used to create the volume. - * - * @return snapshotId - */ - @javax.annotation.Nullable - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - public BsuToCreate volumeSize(Integer volumeSize) { - - this.volumeSize = volumeSize; - return this; - } - - /** - * The size of the volume, in gibibytes (GiB).<br /> If you specify a snapshot ID, the - * volume size must be at least equal to the snapshot size.<br /> If you specify a - * snapshot ID but no volume size, the volume is created with a size similar to the snapshot - * one. - * - * @return volumeSize - */ - @javax.annotation.Nullable - public Integer getVolumeSize() { - return volumeSize; - } - - public void setVolumeSize(Integer volumeSize) { - this.volumeSize = volumeSize; - } - - public BsuToCreate volumeType(String volumeType) { - - this.volumeType = volumeType; - return this; - } - - /** - * The type of the volume (`standard` \\| `io1` \\| `gp2`). If not - * specified in the request, a `standard` volume is created.<br /> For more - * information about volume types, see [About Volumes > Volume Types and - * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops). - * - * @return volumeType - */ - @javax.annotation.Nullable - public String getVolumeType() { - return volumeType; - } - - public void setVolumeType(String volumeType) { - this.volumeType = volumeType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BsuToCreate bsuToCreate = (BsuToCreate) o; - return Objects.equals(this.deleteOnVmDeletion, bsuToCreate.deleteOnVmDeletion) - && Objects.equals(this.iops, bsuToCreate.iops) - && Objects.equals(this.snapshotId, bsuToCreate.snapshotId) - && Objects.equals(this.volumeSize, bsuToCreate.volumeSize) - && Objects.equals(this.volumeType, bsuToCreate.volumeType); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, iops, snapshotId, volumeSize, volumeType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BsuToCreate {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" iops: ").append(toIndentedString(iops)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append(" volumeSize: ").append(toIndentedString(volumeSize)).append("\n"); - sb.append(" volumeType: ").append(toIndentedString(volumeType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("Iops"); - openapiFields.add("SnapshotId"); - openapiFields.add("VolumeSize"); - openapiFields.add("VolumeType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BsuToCreate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BsuToCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BsuToCreate is not found in the empty" - + " JSON string", - BsuToCreate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BsuToCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BsuToCreate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("SnapshotId") != null && !jsonObj.get("SnapshotId").isJsonNull()) - && !jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - if ((jsonObj.get("VolumeType") != null && !jsonObj.get("VolumeType").isJsonNull()) - && !jsonObj.get("VolumeType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BsuToCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BsuToCreate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BsuToCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BsuToCreate value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BsuToCreate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BsuToCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of BsuToCreate - * @throws IOException if the JSON string is invalid with respect to BsuToCreate - */ - public static BsuToCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BsuToCreate.class); - } - - /** - * Convert an instance of BsuToCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVm.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVm.java deleted file mode 100644 index 13cb6bac..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVm.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the BSU volume. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BsuToUpdateVm { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public BsuToUpdateVm() {} - - public BsuToUpdateVm deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If set to true, the volume is deleted when terminating the VM. If set to false, the volume is - * not deleted when terminating the VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public BsuToUpdateVm volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BsuToUpdateVm bsuToUpdateVm = (BsuToUpdateVm) o; - return Objects.equals(this.deleteOnVmDeletion, bsuToUpdateVm.deleteOnVmDeletion) - && Objects.equals(this.volumeId, bsuToUpdateVm.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BsuToUpdateVm {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BsuToUpdateVm - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BsuToUpdateVm.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BsuToUpdateVm is not found in the" - + " empty JSON string", - BsuToUpdateVm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BsuToUpdateVm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BsuToUpdateVm` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BsuToUpdateVm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BsuToUpdateVm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BsuToUpdateVm.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BsuToUpdateVm value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BsuToUpdateVm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BsuToUpdateVm given an JSON string - * - * @param jsonString JSON string - * @return An instance of BsuToUpdateVm - * @throws IOException if the JSON string is invalid with respect to BsuToUpdateVm - */ - public static BsuToUpdateVm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BsuToUpdateVm.class); - } - - /** - * Convert an instance of BsuToUpdateVm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Ca.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Ca.java deleted file mode 100644 index a0b9313a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Ca.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Client Certificate Authority (CA). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Ca { - public static final String SERIALIZED_NAME_CA_FINGERPRINT = "CaFingerprint"; - - @SerializedName(SERIALIZED_NAME_CA_FINGERPRINT) - private String caFingerprint; - - public static final String SERIALIZED_NAME_CA_ID = "CaId"; - - @SerializedName(SERIALIZED_NAME_CA_ID) - private String caId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public Ca() {} - - public Ca caFingerprint(String caFingerprint) { - - this.caFingerprint = caFingerprint; - return this; - } - - /** - * The fingerprint of the CA. - * - * @return caFingerprint - */ - @javax.annotation.Nullable - public String getCaFingerprint() { - return caFingerprint; - } - - public void setCaFingerprint(String caFingerprint) { - this.caFingerprint = caFingerprint; - } - - public Ca caId(String caId) { - - this.caId = caId; - return this; - } - - /** - * The ID of the CA. - * - * @return caId - */ - @javax.annotation.Nullable - public String getCaId() { - return caId; - } - - public void setCaId(String caId) { - this.caId = caId; - } - - public Ca description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the CA. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Ca ca = (Ca) o; - return Objects.equals(this.caFingerprint, ca.caFingerprint) - && Objects.equals(this.caId, ca.caId) - && Objects.equals(this.description, ca.description); - } - - @Override - public int hashCode() { - return Objects.hash(caFingerprint, caId, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Ca {\n"); - sb.append(" caFingerprint: ").append(toIndentedString(caFingerprint)).append("\n"); - sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaFingerprint"); - openapiFields.add("CaId"); - openapiFields.add("Description"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Ca - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Ca.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Ca is not found in the empty JSON" - + " string", - Ca.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Ca.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Ca`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("CaFingerprint") != null && !jsonObj.get("CaFingerprint").isJsonNull()) - && !jsonObj.get("CaFingerprint").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaFingerprint` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CaFingerprint").toString())); - } - if ((jsonObj.get("CaId") != null && !jsonObj.get("CaId").isJsonNull()) - && !jsonObj.get("CaId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("CaId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Ca.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Ca' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Ca.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Ca value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Ca read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Ca given an JSON string - * - * @param jsonString JSON string - * @return An instance of Ca - * @throws IOException if the JSON string is invalid with respect to Ca - */ - public static Ca fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Ca.class); - } - - /** - * Convert an instance of Ca to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalog.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalog.java deleted file mode 100644 index 4f2b4e66..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalog.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about our catalog of prices. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Catalog { - public static final String SERIALIZED_NAME_ENTRIES = "Entries"; - - @SerializedName(SERIALIZED_NAME_ENTRIES) - private List entries = null; - - public Catalog() {} - - public Catalog entries(List entries) { - - this.entries = entries; - return this; - } - - public Catalog addEntriesItem(CatalogEntry entriesItem) { - if (this.entries == null) { - this.entries = new ArrayList<>(); - } - this.entries.add(entriesItem); - return this; - } - - /** - * One or more catalog entries. - * - * @return entries - */ - @javax.annotation.Nullable - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Catalog catalog = (Catalog) o; - return Objects.equals(this.entries, catalog.entries); - } - - @Override - public int hashCode() { - return Objects.hash(entries); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Catalog {\n"); - sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Entries"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Catalog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Catalog.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Catalog is not found in the empty" - + " JSON string", - Catalog.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Catalog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Catalog`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Entries") != null && !jsonObj.get("Entries").isJsonNull()) { - JsonArray jsonArrayentries = jsonObj.getAsJsonArray("Entries"); - if (jsonArrayentries != null) { - // ensure the json data is an array - if (!jsonObj.get("Entries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Entries` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Entries").toString())); - } - - // validate the optional field `Entries` (array) - for (int i = 0; i < jsonArrayentries.size(); i++) { - CatalogEntry.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Catalog.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Catalog' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Catalog.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Catalog value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Catalog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Catalog given an JSON string - * - * @param jsonString JSON string - * @return An instance of Catalog - * @throws IOException if the JSON string is invalid with respect to Catalog - */ - public static Catalog fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Catalog.class); - } - - /** - * Convert an instance of Catalog to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntry.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntry.java deleted file mode 100644 index e84f5c03..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntry.java +++ /dev/null @@ -1,445 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the catalog entry. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatalogEntry { - public static final String SERIALIZED_NAME_CATEGORY = "Category"; - - @SerializedName(SERIALIZED_NAME_CATEGORY) - private String category; - - public static final String SERIALIZED_NAME_FLAGS = "Flags"; - - @SerializedName(SERIALIZED_NAME_FLAGS) - private String flags; - - public static final String SERIALIZED_NAME_OPERATION = "Operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - private String operation; - - public static final String SERIALIZED_NAME_SERVICE = "Service"; - - @SerializedName(SERIALIZED_NAME_SERVICE) - private String service; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TITLE = "Title"; - - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_TYPE = "Type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_UNIT_PRICE = "UnitPrice"; - - @SerializedName(SERIALIZED_NAME_UNIT_PRICE) - private Float unitPrice; - - public CatalogEntry() {} - - public CatalogEntry category(String category) { - - this.category = category; - return this; - } - - /** - * The category of the catalog entry (for example, `network`). - * - * @return category - */ - @javax.annotation.Nullable - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - - public CatalogEntry flags(String flags) { - - this.flags = flags; - return this; - } - - /** - * When returned and equal to `PER_MONTH`, the price of the catalog entry is - * calculated on a monthly basis. - * - * @return flags - */ - @javax.annotation.Nullable - public String getFlags() { - return flags; - } - - public void setFlags(String flags) { - this.flags = flags; - } - - public CatalogEntry operation(String operation) { - - this.operation = operation; - return this; - } - - /** - * The API call associated with the catalog entry (for example, `CreateVms` or - * `RunInstances`). - * - * @return operation - */ - @javax.annotation.Nullable - public String getOperation() { - return operation; - } - - public void setOperation(String operation) { - this.operation = operation; - } - - public CatalogEntry service(String service) { - - this.service = service; - return this; - } - - /** - * The service associated with the catalog entry (`TinaOS-FCU`, - * `TinaOS-LBU`, `TinaOS-DirectLink`, or `TinaOS-OOS`). - * - * @return service - */ - @javax.annotation.Nullable - public String getService() { - return service; - } - - public void setService(String service) { - this.service = service; - } - - public CatalogEntry subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion associated with the catalog entry. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public CatalogEntry title(String title) { - - this.title = title; - return this; - } - - /** - * The description of the catalog entry. - * - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public CatalogEntry type(String type) { - - this.type = type; - return this; - } - - /** - * The type of resource associated with the catalog entry. - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public CatalogEntry unitPrice(Float unitPrice) { - - this.unitPrice = unitPrice; - return this; - } - - /** - * The unit price of the catalog entry, in the currency of the Region's catalog. - * - * @return unitPrice - */ - @javax.annotation.Nullable - public Float getUnitPrice() { - return unitPrice; - } - - public void setUnitPrice(Float unitPrice) { - this.unitPrice = unitPrice; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatalogEntry catalogEntry = (CatalogEntry) o; - return Objects.equals(this.category, catalogEntry.category) - && Objects.equals(this.flags, catalogEntry.flags) - && Objects.equals(this.operation, catalogEntry.operation) - && Objects.equals(this.service, catalogEntry.service) - && Objects.equals(this.subregionName, catalogEntry.subregionName) - && Objects.equals(this.title, catalogEntry.title) - && Objects.equals(this.type, catalogEntry.type) - && Objects.equals(this.unitPrice, catalogEntry.unitPrice); - } - - @Override - public int hashCode() { - return Objects.hash( - category, flags, operation, service, subregionName, title, type, unitPrice); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatalogEntry {\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" flags: ").append(toIndentedString(flags)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" service: ").append(toIndentedString(service)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Category"); - openapiFields.add("Flags"); - openapiFields.add("Operation"); - openapiFields.add("Service"); - openapiFields.add("SubregionName"); - openapiFields.add("Title"); - openapiFields.add("Type"); - openapiFields.add("UnitPrice"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CatalogEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CatalogEntry.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CatalogEntry is not found in the" - + " empty JSON string", - CatalogEntry.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CatalogEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CatalogEntry` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Category") != null && !jsonObj.get("Category").isJsonNull()) - && !jsonObj.get("Category").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Category` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Category").toString())); - } - if ((jsonObj.get("Flags") != null && !jsonObj.get("Flags").isJsonNull()) - && !jsonObj.get("Flags").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Flags` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Flags").toString())); - } - if ((jsonObj.get("Operation") != null && !jsonObj.get("Operation").isJsonNull()) - && !jsonObj.get("Operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Operation").toString())); - } - if ((jsonObj.get("Service") != null && !jsonObj.get("Service").isJsonNull()) - && !jsonObj.get("Service").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Service` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Service").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("Title") != null && !jsonObj.get("Title").isJsonNull()) - && !jsonObj.get("Title").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Title` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Title").toString())); - } - if ((jsonObj.get("Type") != null && !jsonObj.get("Type").isJsonNull()) - && !jsonObj.get("Type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CatalogEntry.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CatalogEntry' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CatalogEntry.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CatalogEntry value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CatalogEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CatalogEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of CatalogEntry - * @throws IOException if the JSON string is invalid with respect to CatalogEntry - */ - public static CatalogEntry fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CatalogEntry.class); - } - - /** - * Convert an instance of CatalogEntry to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalogs.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalogs.java deleted file mode 100644 index eebd7a92..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Catalogs.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the catalogs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Catalogs { - public static final String SERIALIZED_NAME_ENTRIES = "Entries"; - - @SerializedName(SERIALIZED_NAME_ENTRIES) - private List entries = null; - - public static final String SERIALIZED_NAME_FROM_DATE = "FromDate"; - - @SerializedName(SERIALIZED_NAME_FROM_DATE) - private OffsetDateTime fromDate; - - /** The state of the catalog (`CURRENT` \\| `OBSOLETE`). */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - CURRENT("CURRENT"), - - OBSOLETE("OBSOLETE"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_TO_DATE = "ToDate"; - - @SerializedName(SERIALIZED_NAME_TO_DATE) - private OffsetDateTime toDate; - - public Catalogs() {} - - public Catalogs entries(List entries) { - - this.entries = entries; - return this; - } - - public Catalogs addEntriesItem(CatalogEntry entriesItem) { - if (this.entries == null) { - this.entries = new ArrayList<>(); - } - this.entries.add(entriesItem); - return this; - } - - /** - * One or more catalog entries. - * - * @return entries - */ - @javax.annotation.Nullable - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } - - public Catalogs fromDate(OffsetDateTime fromDate) { - - this.fromDate = fromDate; - return this; - } - - /** - * The beginning of the time period (UTC). - * - * @return fromDate - */ - @javax.annotation.Nullable - public OffsetDateTime getFromDate() { - return fromDate; - } - - public void setFromDate(OffsetDateTime fromDate) { - this.fromDate = fromDate; - } - - public Catalogs state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The state of the catalog (`CURRENT` \\| `OBSOLETE`). - * - * @return state - */ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - public void setState(StateEnum state) { - this.state = state; - } - - public Catalogs toDate(OffsetDateTime toDate) { - - this.toDate = toDate; - return this; - } - - /** - * The end of the time period (UTC). - * - * @return toDate - */ - @javax.annotation.Nullable - public OffsetDateTime getToDate() { - return toDate; - } - - public void setToDate(OffsetDateTime toDate) { - this.toDate = toDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Catalogs catalogs = (Catalogs) o; - return Objects.equals(this.entries, catalogs.entries) - && Objects.equals(this.fromDate, catalogs.fromDate) - && Objects.equals(this.state, catalogs.state) - && Objects.equals(this.toDate, catalogs.toDate); - } - - @Override - public int hashCode() { - return Objects.hash(entries, fromDate, state, toDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Catalogs {\n"); - sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" fromDate: ").append(toIndentedString(fromDate)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" toDate: ").append(toIndentedString(toDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Entries"); - openapiFields.add("FromDate"); - openapiFields.add("State"); - openapiFields.add("ToDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Catalogs - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Catalogs.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Catalogs is not found in the empty" - + " JSON string", - Catalogs.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Catalogs.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Catalogs` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Entries") != null && !jsonObj.get("Entries").isJsonNull()) { - JsonArray jsonArrayentries = jsonObj.getAsJsonArray("Entries"); - if (jsonArrayentries != null) { - // ensure the json data is an array - if (!jsonObj.get("Entries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Entries` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Entries").toString())); - } - - // validate the optional field `Entries` (array) - for (int i = 0; i < jsonArrayentries.size(); i++) { - CatalogEntry.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Catalogs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Catalogs' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Catalogs.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Catalogs value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Catalogs read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Catalogs given an JSON string - * - * @param jsonString JSON string - * @return An instance of Catalogs - * @throws IOException if the JSON string is invalid with respect to Catalogs - */ - public static Catalogs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Catalogs.class); - } - - /** - * Convert an instance of Catalogs to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequest.java deleted file mode 100644 index a8e9db58..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CheckAuthenticationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckAuthenticationRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOGIN = "Login"; - - @SerializedName(SERIALIZED_NAME_LOGIN) - private String login; - - public static final String SERIALIZED_NAME_PASSWORD = "Password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public CheckAuthenticationRequest() {} - - public CheckAuthenticationRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CheckAuthenticationRequest login(String login) { - - this.login = login; - return this; - } - - /** - * The email address of the account. - * - * @return login - */ - @javax.annotation.Nonnull - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public CheckAuthenticationRequest password(String password) { - - this.password = password; - return this; - } - - /** - * The password of the account. - * - * @return password - */ - @javax.annotation.Nonnull - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckAuthenticationRequest checkAuthenticationRequest = (CheckAuthenticationRequest) o; - return Objects.equals(this.dryRun, checkAuthenticationRequest.dryRun) - && Objects.equals(this.login, checkAuthenticationRequest.login) - && Objects.equals(this.password, checkAuthenticationRequest.password); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, login, password); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckAuthenticationRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" login: ").append(toIndentedString(login)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Login"); - openapiFields.add("Password"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Login"); - openapiRequiredFields.add("Password"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CheckAuthenticationRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CheckAuthenticationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CheckAuthenticationRequest is not" - + " found in the empty JSON string", - CheckAuthenticationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CheckAuthenticationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CheckAuthenticationRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckAuthenticationRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Login").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Login` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Login").toString())); - } - if (!jsonObj.get("Password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Password").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckAuthenticationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckAuthenticationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CheckAuthenticationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckAuthenticationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckAuthenticationRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CheckAuthenticationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckAuthenticationRequest - * @throws IOException if the JSON string is invalid with respect to CheckAuthenticationRequest - */ - public static CheckAuthenticationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckAuthenticationRequest.class); - } - - /** - * Convert an instance of CheckAuthenticationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponse.java deleted file mode 100644 index c819c508..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CheckAuthenticationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckAuthenticationResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CheckAuthenticationResponse() {} - - public CheckAuthenticationResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckAuthenticationResponse checkAuthenticationResponse = (CheckAuthenticationResponse) o; - return Objects.equals(this.responseContext, checkAuthenticationResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckAuthenticationResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CheckAuthenticationResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CheckAuthenticationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CheckAuthenticationResponse is not" - + " found in the empty JSON string", - CheckAuthenticationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CheckAuthenticationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CheckAuthenticationResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckAuthenticationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckAuthenticationResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CheckAuthenticationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckAuthenticationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckAuthenticationResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CheckAuthenticationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckAuthenticationResponse - * @throws IOException if the JSON string is invalid with respect to CheckAuthenticationResponse - */ - public static CheckAuthenticationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckAuthenticationResponse.class); - } - - /** - * Convert an instance of CheckAuthenticationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ClientGateway.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ClientGateway.java deleted file mode 100644 index b778dd78..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ClientGateway.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the client gateway. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ClientGateway { - public static final String SERIALIZED_NAME_BGP_ASN = "BgpAsn"; - - @SerializedName(SERIALIZED_NAME_BGP_ASN) - private Integer bgpAsn; - - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_ID = "ClientGatewayId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_ID) - private String clientGatewayId; - - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public ClientGateway() {} - - public ClientGateway bgpAsn(Integer bgpAsn) { - - this.bgpAsn = bgpAsn; - return this; - } - - /** - * The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path - * to your client gateway through the Internet. - * - * @return bgpAsn - */ - @javax.annotation.Nullable - public Integer getBgpAsn() { - return bgpAsn; - } - - public void setBgpAsn(Integer bgpAsn) { - this.bgpAsn = bgpAsn; - } - - public ClientGateway clientGatewayId(String clientGatewayId) { - - this.clientGatewayId = clientGatewayId; - return this; - } - - /** - * The ID of the client gateway. - * - * @return clientGatewayId - */ - @javax.annotation.Nullable - public String getClientGatewayId() { - return clientGatewayId; - } - - public void setClientGatewayId(String clientGatewayId) { - this.clientGatewayId = clientGatewayId; - } - - public ClientGateway connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The type of communication tunnel used by the client gateway (always `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nullable - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public ClientGateway publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IPv4 address of the client gateway (must be a fixed address into a NATed network). - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public ClientGateway state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the client gateway (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public ClientGateway tags(List tags) { - - this.tags = tags; - return this; - } - - public ClientGateway addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the client gateway. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClientGateway clientGateway = (ClientGateway) o; - return Objects.equals(this.bgpAsn, clientGateway.bgpAsn) - && Objects.equals(this.clientGatewayId, clientGateway.clientGatewayId) - && Objects.equals(this.connectionType, clientGateway.connectionType) - && Objects.equals(this.publicIp, clientGateway.publicIp) - && Objects.equals(this.state, clientGateway.state) - && Objects.equals(this.tags, clientGateway.tags); - } - - @Override - public int hashCode() { - return Objects.hash(bgpAsn, clientGatewayId, connectionType, publicIp, state, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClientGateway {\n"); - sb.append(" bgpAsn: ").append(toIndentedString(bgpAsn)).append("\n"); - sb.append(" clientGatewayId: ").append(toIndentedString(clientGatewayId)).append("\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BgpAsn"); - openapiFields.add("ClientGatewayId"); - openapiFields.add("ConnectionType"); - openapiFields.add("PublicIp"); - openapiFields.add("State"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ClientGateway - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ClientGateway.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ClientGateway is not found in the" - + " empty JSON string", - ClientGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ClientGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ClientGateway` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ClientGatewayId") != null && !jsonObj.get("ClientGatewayId").isJsonNull()) - && !jsonObj.get("ClientGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGatewayId").toString())); - } - if ((jsonObj.get("ConnectionType") != null && !jsonObj.get("ConnectionType").isJsonNull()) - && !jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ClientGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ClientGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ClientGateway.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ClientGateway value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ClientGateway read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ClientGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of ClientGateway - * @throws IOException if the JSON string is invalid with respect to ClientGateway - */ - public static ClientGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ClientGateway.class); - } - - /** - * Convert an instance of ClientGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntry.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntry.java deleted file mode 100644 index 3a2f9c67..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntry.java +++ /dev/null @@ -1,609 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the resources consumed during the specified time period. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ConsumptionEntry { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CATEGORY = "Category"; - - @SerializedName(SERIALIZED_NAME_CATEGORY) - private String category; - - public static final String SERIALIZED_NAME_FROM_DATE = "FromDate"; - - @SerializedName(SERIALIZED_NAME_FROM_DATE) - private OffsetDateTime fromDate; - - public static final String SERIALIZED_NAME_OPERATION = "Operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - private String operation; - - public static final String SERIALIZED_NAME_PAYING_ACCOUNT_ID = "PayingAccountId"; - - @SerializedName(SERIALIZED_NAME_PAYING_ACCOUNT_ID) - private String payingAccountId; - - public static final String SERIALIZED_NAME_PRICE = "Price"; - - @SerializedName(SERIALIZED_NAME_PRICE) - private Double price; - - public static final String SERIALIZED_NAME_SERVICE = "Service"; - - @SerializedName(SERIALIZED_NAME_SERVICE) - private String service; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TITLE = "Title"; - - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_TO_DATE = "ToDate"; - - @SerializedName(SERIALIZED_NAME_TO_DATE) - private OffsetDateTime toDate; - - public static final String SERIALIZED_NAME_TYPE = "Type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_UNIT_PRICE = "UnitPrice"; - - @SerializedName(SERIALIZED_NAME_UNIT_PRICE) - private Double unitPrice; - - public static final String SERIALIZED_NAME_VALUE = "Value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - private Double value; - - public ConsumptionEntry() {} - - public ConsumptionEntry accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The ID of your TINA account. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public ConsumptionEntry category(String category) { - - this.category = category; - return this; - } - - /** - * The category of the resource (for example, `network`). - * - * @return category - */ - @javax.annotation.Nullable - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - - public ConsumptionEntry fromDate(OffsetDateTime fromDate) { - - this.fromDate = fromDate; - return this; - } - - /** - * The beginning of the time period (UTC). - * - * @return fromDate - */ - @javax.annotation.Nullable - public OffsetDateTime getFromDate() { - return fromDate; - } - - public void setFromDate(OffsetDateTime fromDate) { - this.fromDate = fromDate; - } - - public ConsumptionEntry operation(String operation) { - - this.operation = operation; - return this; - } - - /** - * The API call that triggered the resource consumption (for example, `RunInstances` - * or `CreateVolume`). - * - * @return operation - */ - @javax.annotation.Nullable - public String getOperation() { - return operation; - } - - public void setOperation(String operation) { - this.operation = operation; - } - - public ConsumptionEntry payingAccountId(String payingAccountId) { - - this.payingAccountId = payingAccountId; - return this; - } - - /** - * The ID of the TINA account which is billed for your consumption. It can be different from - * your account in the `AccountId` parameter. - * - * @return payingAccountId - */ - @javax.annotation.Nullable - public String getPayingAccountId() { - return payingAccountId; - } - - public void setPayingAccountId(String payingAccountId) { - this.payingAccountId = payingAccountId; - } - - public ConsumptionEntry price(Double price) { - - this.price = price; - return this; - } - - /** - * The total price of the consumed resource during the specified time period, in the currency of - * the Region's catalog. - * - * @return price - */ - @javax.annotation.Nullable - public Double getPrice() { - return price; - } - - public void setPrice(Double price) { - this.price = price; - } - - public ConsumptionEntry service(String service) { - - this.service = service; - return this; - } - - /** - * The service of the API call (`TinaOS-FCU`, `TinaOS-LBU`, - * `TinaOS-DirectLink`, `TinaOS-OOS`, or `TinaOS-OSU`). - * - * @return service - */ - @javax.annotation.Nullable - public String getService() { - return service; - } - - public void setService(String service) { - this.service = service; - } - - public ConsumptionEntry subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public ConsumptionEntry title(String title) { - - this.title = title; - return this; - } - - /** - * A description of the consumed resource. - * - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public ConsumptionEntry toDate(OffsetDateTime toDate) { - - this.toDate = toDate; - return this; - } - - /** - * The end of the time period (UTC). - * - * @return toDate - */ - @javax.annotation.Nullable - public OffsetDateTime getToDate() { - return toDate; - } - - public void setToDate(OffsetDateTime toDate) { - this.toDate = toDate; - } - - public ConsumptionEntry type(String type) { - - this.type = type; - return this; - } - - /** - * The type of resource, depending on the API call. - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public ConsumptionEntry unitPrice(Double unitPrice) { - - this.unitPrice = unitPrice; - return this; - } - - /** - * The unit price of the consumed resource, in the currency of the Region's catalog. - * - * @return unitPrice - */ - @javax.annotation.Nullable - public Double getUnitPrice() { - return unitPrice; - } - - public void setUnitPrice(Double unitPrice) { - this.unitPrice = unitPrice; - } - - public ConsumptionEntry value(Double value) { - - this.value = value; - return this; - } - - /** - * The consumed amount for the resource. The unit depends on the resource type. For more - * information, see the `Title` element. - * - * @return value - */ - @javax.annotation.Nullable - public Double getValue() { - return value; - } - - public void setValue(Double value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsumptionEntry consumptionEntry = (ConsumptionEntry) o; - return Objects.equals(this.accountId, consumptionEntry.accountId) - && Objects.equals(this.category, consumptionEntry.category) - && Objects.equals(this.fromDate, consumptionEntry.fromDate) - && Objects.equals(this.operation, consumptionEntry.operation) - && Objects.equals(this.payingAccountId, consumptionEntry.payingAccountId) - && Objects.equals(this.price, consumptionEntry.price) - && Objects.equals(this.service, consumptionEntry.service) - && Objects.equals(this.subregionName, consumptionEntry.subregionName) - && Objects.equals(this.title, consumptionEntry.title) - && Objects.equals(this.toDate, consumptionEntry.toDate) - && Objects.equals(this.type, consumptionEntry.type) - && Objects.equals(this.unitPrice, consumptionEntry.unitPrice) - && Objects.equals(this.value, consumptionEntry.value); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - category, - fromDate, - operation, - payingAccountId, - price, - service, - subregionName, - title, - toDate, - type, - unitPrice, - value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsumptionEntry {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" fromDate: ").append(toIndentedString(fromDate)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" payingAccountId: ").append(toIndentedString(payingAccountId)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" service: ").append(toIndentedString(service)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" toDate: ").append(toIndentedString(toDate)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Category"); - openapiFields.add("FromDate"); - openapiFields.add("Operation"); - openapiFields.add("PayingAccountId"); - openapiFields.add("Price"); - openapiFields.add("Service"); - openapiFields.add("SubregionName"); - openapiFields.add("Title"); - openapiFields.add("ToDate"); - openapiFields.add("Type"); - openapiFields.add("UnitPrice"); - openapiFields.add("Value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConsumptionEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConsumptionEntry.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConsumptionEntry is not found in the" - + " empty JSON string", - ConsumptionEntry.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ConsumptionEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConsumptionEntry` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Category") != null && !jsonObj.get("Category").isJsonNull()) - && !jsonObj.get("Category").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Category` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Category").toString())); - } - if ((jsonObj.get("Operation") != null && !jsonObj.get("Operation").isJsonNull()) - && !jsonObj.get("Operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Operation").toString())); - } - if ((jsonObj.get("PayingAccountId") != null && !jsonObj.get("PayingAccountId").isJsonNull()) - && !jsonObj.get("PayingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PayingAccountId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PayingAccountId").toString())); - } - if ((jsonObj.get("Service") != null && !jsonObj.get("Service").isJsonNull()) - && !jsonObj.get("Service").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Service` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Service").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("Title") != null && !jsonObj.get("Title").isJsonNull()) - && !jsonObj.get("Title").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Title` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Title").toString())); - } - if ((jsonObj.get("Type") != null && !jsonObj.get("Type").isJsonNull()) - && !jsonObj.get("Type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConsumptionEntry.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConsumptionEntry' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ConsumptionEntry.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ConsumptionEntry value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConsumptionEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ConsumptionEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConsumptionEntry - * @throws IOException if the JSON string is invalid with respect to ConsumptionEntry - */ - public static ConsumptionEntry fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConsumptionEntry.class); - } - - /** - * Convert an instance of ConsumptionEntry to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequest.java deleted file mode 100644 index 6867f79f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequest.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateAccessKeyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccessKeyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private OffsetDateTime expirationDate; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public CreateAccessKeyRequest() {} - - public CreateAccessKeyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateAccessKeyRequest expirationDate(OffsetDateTime expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date and time, or the date, at which you want the access key to expire, in ISO 8601 - * format (for example, `2020-06-14T00:00:00.000Z`, or `2020-06-14`). To - * remove an existing expiration date, use the method without specifying this parameter. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - } - - public CreateAccessKeyRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user that owns the key to be created. If you do not specify a user name, - * this action creates an access key for the user who sends the request (which can be the root - * account). - * - * @return userName - */ - @javax.annotation.Nullable - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAccessKeyRequest createAccessKeyRequest = (CreateAccessKeyRequest) o; - return Objects.equals(this.dryRun, createAccessKeyRequest.dryRun) - && Objects.equals(this.expirationDate, createAccessKeyRequest.expirationDate) - && Objects.equals(this.userName, createAccessKeyRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, expirationDate, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAccessKeyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ExpirationDate"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAccessKeyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAccessKeyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateAccessKeyRequest is not found" - + " in the empty JSON string", - CreateAccessKeyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateAccessKeyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateAccessKeyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("UserName") != null && !jsonObj.get("UserName").isJsonNull()) - && !jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccessKeyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccessKeyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateAccessKeyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccessKeyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAccessKeyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAccessKeyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccessKeyRequest - * @throws IOException if the JSON string is invalid with respect to CreateAccessKeyRequest - */ - public static CreateAccessKeyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccessKeyRequest.class); - } - - /** - * Convert an instance of CreateAccessKeyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponse.java deleted file mode 100644 index 8632db19..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateAccessKeyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccessKeyResponse { - public static final String SERIALIZED_NAME_ACCESS_KEY = "AccessKey"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY) - private AccessKeySecretKey accessKey; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateAccessKeyResponse() {} - - public CreateAccessKeyResponse accessKey(AccessKeySecretKey accessKey) { - - this.accessKey = accessKey; - return this; - } - - /** - * Get accessKey - * - * @return accessKey - */ - @javax.annotation.Nullable - public AccessKeySecretKey getAccessKey() { - return accessKey; - } - - public void setAccessKey(AccessKeySecretKey accessKey) { - this.accessKey = accessKey; - } - - public CreateAccessKeyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAccessKeyResponse createAccessKeyResponse = (CreateAccessKeyResponse) o; - return Objects.equals(this.accessKey, createAccessKeyResponse.accessKey) - && Objects.equals(this.responseContext, createAccessKeyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(accessKey, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAccessKeyResponse {\n"); - sb.append(" accessKey: ").append(toIndentedString(accessKey)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKey"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAccessKeyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAccessKeyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateAccessKeyResponse is not found" - + " in the empty JSON string", - CreateAccessKeyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateAccessKeyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateAccessKeyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `AccessKey` - if (jsonObj.get("AccessKey") != null && !jsonObj.get("AccessKey").isJsonNull()) { - AccessKeySecretKey.validateJsonObject(jsonObj.getAsJsonObject("AccessKey")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccessKeyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccessKeyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateAccessKeyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccessKeyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAccessKeyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAccessKeyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccessKeyResponse - * @throws IOException if the JSON string is invalid with respect to CreateAccessKeyResponse - */ - public static CreateAccessKeyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccessKeyResponse.class); - } - - /** - * Convert an instance of CreateAccessKeyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequest.java deleted file mode 100644 index 4e6380cb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequest.java +++ /dev/null @@ -1,734 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateAccountRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccountRequest { - public static final String SERIALIZED_NAME_ADDITIONAL_EMAILS = "AdditionalEmails"; - - @SerializedName(SERIALIZED_NAME_ADDITIONAL_EMAILS) - private List additionalEmails = null; - - public static final String SERIALIZED_NAME_CITY = "City"; - - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "CompanyName"; - - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTRY = "Country"; - - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "CustomerId"; - - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_EMAIL = "Email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_FIRST_NAME = "FirstName"; - - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_JOB_TITLE = "JobTitle"; - - @SerializedName(SERIALIZED_NAME_JOB_TITLE) - private String jobTitle; - - public static final String SERIALIZED_NAME_LAST_NAME = "LastName"; - - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_MOBILE_NUMBER = "MobileNumber"; - - @SerializedName(SERIALIZED_NAME_MOBILE_NUMBER) - private String mobileNumber; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "PhoneNumber"; - - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_STATE_PROVINCE = "StateProvince"; - - @SerializedName(SERIALIZED_NAME_STATE_PROVINCE) - private String stateProvince; - - public static final String SERIALIZED_NAME_VAT_NUMBER = "VatNumber"; - - @SerializedName(SERIALIZED_NAME_VAT_NUMBER) - private String vatNumber; - - public static final String SERIALIZED_NAME_ZIP_CODE = "ZipCode"; - - @SerializedName(SERIALIZED_NAME_ZIP_CODE) - private String zipCode; - - public CreateAccountRequest() {} - - public CreateAccountRequest additionalEmails(List additionalEmails) { - - this.additionalEmails = additionalEmails; - return this; - } - - public CreateAccountRequest addAdditionalEmailsItem(String additionalEmailsItem) { - if (this.additionalEmails == null) { - this.additionalEmails = new ArrayList<>(); - } - this.additionalEmails.add(additionalEmailsItem); - return this; - } - - /** - * One or more additional email addresses for the account. These addresses are used for - * notifications only. If you already have a list of additional emails registered, you cannot - * add to it, only replace it. To remove all registered additional emails, specify an empty - * list. - * - * @return additionalEmails - */ - @javax.annotation.Nullable - public List getAdditionalEmails() { - return additionalEmails; - } - - public void setAdditionalEmails(List additionalEmails) { - this.additionalEmails = additionalEmails; - } - - public CreateAccountRequest city(String city) { - - this.city = city; - return this; - } - - /** - * The city of the account owner. - * - * @return city - */ - @javax.annotation.Nonnull - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public CreateAccountRequest companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * The name of the company for the account. - * - * @return companyName - */ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - public CreateAccountRequest country(String country) { - - this.country = country; - return this; - } - - /** - * The country of the account owner. - * - * @return country - */ - @javax.annotation.Nonnull - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public CreateAccountRequest customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * The ID of the customer. It must be 8 digits. - * - * @return customerId - */ - @javax.annotation.Nonnull - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public CreateAccountRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateAccountRequest email(String email) { - - this.email = email; - return this; - } - - /** - * The main email address for the account. This address is used for your credentials and - * notifications. - * - * @return email - */ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public CreateAccountRequest firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * The first name of the account owner. - * - * @return firstName - */ - @javax.annotation.Nonnull - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public CreateAccountRequest jobTitle(String jobTitle) { - - this.jobTitle = jobTitle; - return this; - } - - /** - * The job title of the account owner. - * - * @return jobTitle - */ - @javax.annotation.Nullable - public String getJobTitle() { - return jobTitle; - } - - public void setJobTitle(String jobTitle) { - this.jobTitle = jobTitle; - } - - public CreateAccountRequest lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * The last name of the account owner. - * - * @return lastName - */ - @javax.annotation.Nonnull - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public CreateAccountRequest mobileNumber(String mobileNumber) { - - this.mobileNumber = mobileNumber; - return this; - } - - /** - * The mobile phone number of the account owner. - * - * @return mobileNumber - */ - @javax.annotation.Nullable - public String getMobileNumber() { - return mobileNumber; - } - - public void setMobileNumber(String mobileNumber) { - this.mobileNumber = mobileNumber; - } - - public CreateAccountRequest phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * The landline phone number of the account owner. - * - * @return phoneNumber - */ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - public CreateAccountRequest stateProvince(String stateProvince) { - - this.stateProvince = stateProvince; - return this; - } - - /** - * The state/province of the account. - * - * @return stateProvince - */ - @javax.annotation.Nullable - public String getStateProvince() { - return stateProvince; - } - - public void setStateProvince(String stateProvince) { - this.stateProvince = stateProvince; - } - - public CreateAccountRequest vatNumber(String vatNumber) { - - this.vatNumber = vatNumber; - return this; - } - - /** - * The value added tax (VAT) number for the account. - * - * @return vatNumber - */ - @javax.annotation.Nullable - public String getVatNumber() { - return vatNumber; - } - - public void setVatNumber(String vatNumber) { - this.vatNumber = vatNumber; - } - - public CreateAccountRequest zipCode(String zipCode) { - - this.zipCode = zipCode; - return this; - } - - /** - * The ZIP code of the city. - * - * @return zipCode - */ - @javax.annotation.Nonnull - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAccountRequest createAccountRequest = (CreateAccountRequest) o; - return Objects.equals(this.additionalEmails, createAccountRequest.additionalEmails) - && Objects.equals(this.city, createAccountRequest.city) - && Objects.equals(this.companyName, createAccountRequest.companyName) - && Objects.equals(this.country, createAccountRequest.country) - && Objects.equals(this.customerId, createAccountRequest.customerId) - && Objects.equals(this.dryRun, createAccountRequest.dryRun) - && Objects.equals(this.email, createAccountRequest.email) - && Objects.equals(this.firstName, createAccountRequest.firstName) - && Objects.equals(this.jobTitle, createAccountRequest.jobTitle) - && Objects.equals(this.lastName, createAccountRequest.lastName) - && Objects.equals(this.mobileNumber, createAccountRequest.mobileNumber) - && Objects.equals(this.phoneNumber, createAccountRequest.phoneNumber) - && Objects.equals(this.stateProvince, createAccountRequest.stateProvince) - && Objects.equals(this.vatNumber, createAccountRequest.vatNumber) - && Objects.equals(this.zipCode, createAccountRequest.zipCode); - } - - @Override - public int hashCode() { - return Objects.hash( - additionalEmails, - city, - companyName, - country, - customerId, - dryRun, - email, - firstName, - jobTitle, - lastName, - mobileNumber, - phoneNumber, - stateProvince, - vatNumber, - zipCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAccountRequest {\n"); - sb.append(" additionalEmails: ").append(toIndentedString(additionalEmails)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" mobileNumber: ").append(toIndentedString(mobileNumber)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" stateProvince: ").append(toIndentedString(stateProvince)).append("\n"); - sb.append(" vatNumber: ").append(toIndentedString(vatNumber)).append("\n"); - sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AdditionalEmails"); - openapiFields.add("City"); - openapiFields.add("CompanyName"); - openapiFields.add("Country"); - openapiFields.add("CustomerId"); - openapiFields.add("DryRun"); - openapiFields.add("Email"); - openapiFields.add("FirstName"); - openapiFields.add("JobTitle"); - openapiFields.add("LastName"); - openapiFields.add("MobileNumber"); - openapiFields.add("PhoneNumber"); - openapiFields.add("StateProvince"); - openapiFields.add("VatNumber"); - openapiFields.add("ZipCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("City"); - openapiRequiredFields.add("CompanyName"); - openapiRequiredFields.add("Country"); - openapiRequiredFields.add("CustomerId"); - openapiRequiredFields.add("Email"); - openapiRequiredFields.add("FirstName"); - openapiRequiredFields.add("LastName"); - openapiRequiredFields.add("ZipCode"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAccountRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAccountRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateAccountRequest is not found in" - + " the empty JSON string", - CreateAccountRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateAccountRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAccountRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AdditionalEmails") != null - && !jsonObj.get("AdditionalEmails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AdditionalEmails` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AdditionalEmails").toString())); - } - if (!jsonObj.get("City").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `City` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("City").toString())); - } - if (!jsonObj.get("CompanyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CompanyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CompanyName").toString())); - } - if (!jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Country` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Country").toString())); - } - if (!jsonObj.get("CustomerId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CustomerId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CustomerId").toString())); - } - if (!jsonObj.get("Email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Email").toString())); - } - if (!jsonObj.get("FirstName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FirstName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FirstName").toString())); - } - if ((jsonObj.get("JobTitle") != null && !jsonObj.get("JobTitle").isJsonNull()) - && !jsonObj.get("JobTitle").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `JobTitle` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("JobTitle").toString())); - } - if (!jsonObj.get("LastName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LastName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LastName").toString())); - } - if ((jsonObj.get("MobileNumber") != null && !jsonObj.get("MobileNumber").isJsonNull()) - && !jsonObj.get("MobileNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MobileNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("MobileNumber").toString())); - } - if ((jsonObj.get("PhoneNumber") != null && !jsonObj.get("PhoneNumber").isJsonNull()) - && !jsonObj.get("PhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PhoneNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PhoneNumber").toString())); - } - if ((jsonObj.get("StateProvince") != null && !jsonObj.get("StateProvince").isJsonNull()) - && !jsonObj.get("StateProvince").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateProvince` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateProvince").toString())); - } - if ((jsonObj.get("VatNumber") != null && !jsonObj.get("VatNumber").isJsonNull()) - && !jsonObj.get("VatNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VatNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VatNumber").toString())); - } - if (!jsonObj.get("ZipCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ZipCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ZipCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccountRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccountRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateAccountRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccountRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAccountRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccountRequest - * @throws IOException if the JSON string is invalid with respect to CreateAccountRequest - */ - public static CreateAccountRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccountRequest.class); - } - - /** - * Convert an instance of CreateAccountRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponse.java deleted file mode 100644 index bbdc624e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateAccountResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccountResponse { - public static final String SERIALIZED_NAME_ACCOUNT = "Account"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Account account; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateAccountResponse() {} - - public CreateAccountResponse account(Account account) { - - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nullable - public Account getAccount() { - return account; - } - - public void setAccount(Account account) { - this.account = account; - } - - public CreateAccountResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAccountResponse createAccountResponse = (CreateAccountResponse) o; - return Objects.equals(this.account, createAccountResponse.account) - && Objects.equals(this.responseContext, createAccountResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(account, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAccountResponse {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Account"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAccountResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAccountResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateAccountResponse is not found in" - + " the empty JSON string", - CreateAccountResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateAccountResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateAccountResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Account` - if (jsonObj.get("Account") != null && !jsonObj.get("Account").isJsonNull()) { - Account.validateJsonObject(jsonObj.getAsJsonObject("Account")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccountResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccountResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateAccountResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccountResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAccountResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAccountResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccountResponse - * @throws IOException if the JSON string is invalid with respect to CreateAccountResponse - */ - public static CreateAccountResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccountResponse.class); - } - - /** - * Convert an instance of CreateAccountResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequest.java deleted file mode 100644 index dd82a119..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequest.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateApiAccessRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiAccessRuleRequest { - public static final String SERIALIZED_NAME_CA_IDS = "CaIds"; - - @SerializedName(SERIALIZED_NAME_CA_IDS) - private List caIds = null; - - public static final String SERIALIZED_NAME_CNS = "Cns"; - - @SerializedName(SERIALIZED_NAME_CNS) - private List cns = null; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public CreateApiAccessRuleRequest() {} - - public CreateApiAccessRuleRequest caIds(List caIds) { - - this.caIds = caIds; - return this; - } - - public CreateApiAccessRuleRequest addCaIdsItem(String caIdsItem) { - if (this.caIds == null) { - this.caIds = new ArrayList<>(); - } - this.caIds.add(caIdsItem); - return this; - } - - /** - * One or more IDs of Client Certificate Authorities (CAs). - * - * @return caIds - */ - @javax.annotation.Nullable - public List getCaIds() { - return caIds; - } - - public void setCaIds(List caIds) { - this.caIds = caIds; - } - - public CreateApiAccessRuleRequest cns(List cns) { - - this.cns = cns; - return this; - } - - public CreateApiAccessRuleRequest addCnsItem(String cnsItem) { - if (this.cns == null) { - this.cns = new ArrayList<>(); - } - this.cns.add(cnsItem); - return this; - } - - /** - * One or more Client Certificate Common Names (CNs). If this parameter is specified, you must - * also specify the `CaIds` parameter. - * - * @return cns - */ - @javax.annotation.Nullable - public List getCns() { - return cns; - } - - public void setCns(List cns) { - this.cns = cns; - } - - public CreateApiAccessRuleRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the API access rule. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateApiAccessRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateApiAccessRuleRequest ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public CreateApiAccessRuleRequest addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiAccessRuleRequest createApiAccessRuleRequest = (CreateApiAccessRuleRequest) o; - return Objects.equals(this.caIds, createApiAccessRuleRequest.caIds) - && Objects.equals(this.cns, createApiAccessRuleRequest.cns) - && Objects.equals(this.description, createApiAccessRuleRequest.description) - && Objects.equals(this.dryRun, createApiAccessRuleRequest.dryRun) - && Objects.equals(this.ipRanges, createApiAccessRuleRequest.ipRanges); - } - - @Override - public int hashCode() { - return Objects.hash(caIds, cns, description, dryRun, ipRanges); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiAccessRuleRequest {\n"); - sb.append(" caIds: ").append(toIndentedString(caIds)).append("\n"); - sb.append(" cns: ").append(toIndentedString(cns)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaIds"); - openapiFields.add("Cns"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("IpRanges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateApiAccessRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateApiAccessRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateApiAccessRuleRequest is not" - + " found in the empty JSON string", - CreateApiAccessRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateApiAccessRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateApiAccessRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaIds") != null && !jsonObj.get("CaIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("CaIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Cns") != null && !jsonObj.get("Cns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cns` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Cns").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiAccessRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiAccessRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateApiAccessRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiAccessRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiAccessRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiAccessRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiAccessRuleRequest - * @throws IOException if the JSON string is invalid with respect to CreateApiAccessRuleRequest - */ - public static CreateApiAccessRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiAccessRuleRequest.class); - } - - /** - * Convert an instance of CreateApiAccessRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponse.java deleted file mode 100644 index 57005afb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateApiAccessRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiAccessRuleResponse { - public static final String SERIALIZED_NAME_API_ACCESS_RULE = "ApiAccessRule"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE) - private ApiAccessRule apiAccessRule; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateApiAccessRuleResponse() {} - - public CreateApiAccessRuleResponse apiAccessRule(ApiAccessRule apiAccessRule) { - - this.apiAccessRule = apiAccessRule; - return this; - } - - /** - * Get apiAccessRule - * - * @return apiAccessRule - */ - @javax.annotation.Nullable - public ApiAccessRule getApiAccessRule() { - return apiAccessRule; - } - - public void setApiAccessRule(ApiAccessRule apiAccessRule) { - this.apiAccessRule = apiAccessRule; - } - - public CreateApiAccessRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiAccessRuleResponse createApiAccessRuleResponse = (CreateApiAccessRuleResponse) o; - return Objects.equals(this.apiAccessRule, createApiAccessRuleResponse.apiAccessRule) - && Objects.equals( - this.responseContext, createApiAccessRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRule, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiAccessRuleResponse {\n"); - sb.append(" apiAccessRule: ").append(toIndentedString(apiAccessRule)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRule"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateApiAccessRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateApiAccessRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateApiAccessRuleResponse is not" - + " found in the empty JSON string", - CreateApiAccessRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateApiAccessRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateApiAccessRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ApiAccessRule` - if (jsonObj.get("ApiAccessRule") != null && !jsonObj.get("ApiAccessRule").isJsonNull()) { - ApiAccessRule.validateJsonObject(jsonObj.getAsJsonObject("ApiAccessRule")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiAccessRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiAccessRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateApiAccessRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiAccessRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiAccessRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiAccessRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiAccessRuleResponse - * @throws IOException if the JSON string is invalid with respect to CreateApiAccessRuleResponse - */ - public static CreateApiAccessRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiAccessRuleResponse.class); - } - - /** - * Convert an instance of CreateApiAccessRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequest.java deleted file mode 100644 index 413ebf2f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateCaRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCaRequest { - public static final String SERIALIZED_NAME_CA_PEM = "CaPem"; - - @SerializedName(SERIALIZED_NAME_CA_PEM) - private String caPem; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public CreateCaRequest() {} - - public CreateCaRequest caPem(String caPem) { - - this.caPem = caPem; - return this; - } - - /** - * The CA in PEM format.<br />With OSC CLI, use the following syntax to make sure your CA - * file is correctly parsed: `--CaPem=&quot;$(cat FILENAME)&quot;`. - * - * @return caPem - */ - @javax.annotation.Nonnull - public String getCaPem() { - return caPem; - } - - public void setCaPem(String caPem) { - this.caPem = caPem; - } - - public CreateCaRequest description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the CA. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateCaRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCaRequest createCaRequest = (CreateCaRequest) o; - return Objects.equals(this.caPem, createCaRequest.caPem) - && Objects.equals(this.description, createCaRequest.description) - && Objects.equals(this.dryRun, createCaRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(caPem, description, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCaRequest {\n"); - sb.append(" caPem: ").append(toIndentedString(caPem)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaPem"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CaPem"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateCaRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateCaRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateCaRequest is not found in the" - + " empty JSON string", - CreateCaRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateCaRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateCaRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCaRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("CaPem").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaPem` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("CaPem").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCaRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCaRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateCaRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCaRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCaRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCaRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCaRequest - * @throws IOException if the JSON string is invalid with respect to CreateCaRequest - */ - public static CreateCaRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCaRequest.class); - } - - /** - * Convert an instance of CreateCaRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponse.java deleted file mode 100644 index eaf0fdc6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateCaResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCaResponse { - public static final String SERIALIZED_NAME_CA = "Ca"; - - @SerializedName(SERIALIZED_NAME_CA) - private Ca ca; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateCaResponse() {} - - public CreateCaResponse ca(Ca ca) { - - this.ca = ca; - return this; - } - - /** - * Get ca - * - * @return ca - */ - @javax.annotation.Nullable - public Ca getCa() { - return ca; - } - - public void setCa(Ca ca) { - this.ca = ca; - } - - public CreateCaResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCaResponse createCaResponse = (CreateCaResponse) o; - return Objects.equals(this.ca, createCaResponse.ca) - && Objects.equals(this.responseContext, createCaResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(ca, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCaResponse {\n"); - sb.append(" ca: ").append(toIndentedString(ca)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Ca"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateCaResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateCaResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateCaResponse is not found in the" - + " empty JSON string", - CreateCaResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateCaResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateCaResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Ca` - if (jsonObj.get("Ca") != null && !jsonObj.get("Ca").isJsonNull()) { - Ca.validateJsonObject(jsonObj.getAsJsonObject("Ca")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCaResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCaResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateCaResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCaResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCaResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCaResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCaResponse - * @throws IOException if the JSON string is invalid with respect to CreateCaResponse - */ - public static CreateCaResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCaResponse.class); - } - - /** - * Convert an instance of CreateCaResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequest.java deleted file mode 100644 index b718fd68..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequest.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateClientGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateClientGatewayRequest { - public static final String SERIALIZED_NAME_BGP_ASN = "BgpAsn"; - - @SerializedName(SERIALIZED_NAME_BGP_ASN) - private Integer bgpAsn; - - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public CreateClientGatewayRequest() {} - - public CreateClientGatewayRequest bgpAsn(Integer bgpAsn) { - - this.bgpAsn = bgpAsn; - return this; - } - - /** - * The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path - * to your client gateway through the Internet. <br/> This number must be between - * `1` and `4294967295`. If you do not have an ASN, you can choose one - * between 64512 and 65534, or between 4200000000 and 4294967294. - * - * @return bgpAsn - */ - @javax.annotation.Nonnull - public Integer getBgpAsn() { - return bgpAsn; - } - - public void setBgpAsn(Integer bgpAsn) { - this.bgpAsn = bgpAsn; - } - - public CreateClientGatewayRequest connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The communication protocol used to establish tunnel with your client gateway (always - * `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nonnull - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public CreateClientGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateClientGatewayRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public fixed IPv4 address of your client gateway. - * - * @return publicIp - */ - @javax.annotation.Nonnull - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateClientGatewayRequest createClientGatewayRequest = (CreateClientGatewayRequest) o; - return Objects.equals(this.bgpAsn, createClientGatewayRequest.bgpAsn) - && Objects.equals(this.connectionType, createClientGatewayRequest.connectionType) - && Objects.equals(this.dryRun, createClientGatewayRequest.dryRun) - && Objects.equals(this.publicIp, createClientGatewayRequest.publicIp); - } - - @Override - public int hashCode() { - return Objects.hash(bgpAsn, connectionType, dryRun, publicIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateClientGatewayRequest {\n"); - sb.append(" bgpAsn: ").append(toIndentedString(bgpAsn)).append("\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BgpAsn"); - openapiFields.add("ConnectionType"); - openapiFields.add("DryRun"); - openapiFields.add("PublicIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("BgpAsn"); - openapiRequiredFields.add("ConnectionType"); - openapiRequiredFields.add("PublicIp"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateClientGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateClientGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateClientGatewayRequest is not" - + " found in the empty JSON string", - CreateClientGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateClientGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateClientGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateClientGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - if (!jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateClientGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateClientGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateClientGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateClientGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateClientGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateClientGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateClientGatewayRequest - * @throws IOException if the JSON string is invalid with respect to CreateClientGatewayRequest - */ - public static CreateClientGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateClientGatewayRequest.class); - } - - /** - * Convert an instance of CreateClientGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponse.java deleted file mode 100644 index 4395f3d3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateClientGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateClientGatewayResponse { - public static final String SERIALIZED_NAME_CLIENT_GATEWAY = "ClientGateway"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY) - private ClientGateway clientGateway; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateClientGatewayResponse() {} - - public CreateClientGatewayResponse clientGateway(ClientGateway clientGateway) { - - this.clientGateway = clientGateway; - return this; - } - - /** - * Get clientGateway - * - * @return clientGateway - */ - @javax.annotation.Nullable - public ClientGateway getClientGateway() { - return clientGateway; - } - - public void setClientGateway(ClientGateway clientGateway) { - this.clientGateway = clientGateway; - } - - public CreateClientGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateClientGatewayResponse createClientGatewayResponse = (CreateClientGatewayResponse) o; - return Objects.equals(this.clientGateway, createClientGatewayResponse.clientGateway) - && Objects.equals( - this.responseContext, createClientGatewayResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(clientGateway, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateClientGatewayResponse {\n"); - sb.append(" clientGateway: ").append(toIndentedString(clientGateway)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGateway"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateClientGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateClientGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateClientGatewayResponse is not" - + " found in the empty JSON string", - CreateClientGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateClientGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateClientGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ClientGateway` - if (jsonObj.get("ClientGateway") != null && !jsonObj.get("ClientGateway").isJsonNull()) { - ClientGateway.validateJsonObject(jsonObj.getAsJsonObject("ClientGateway")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateClientGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateClientGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateClientGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateClientGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateClientGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateClientGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateClientGatewayResponse - * @throws IOException if the JSON string is invalid with respect to CreateClientGatewayResponse - */ - public static CreateClientGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateClientGatewayResponse.class); - } - - /** - * Convert an instance of CreateClientGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequest.java deleted file mode 100644 index 412f1139..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequest.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDedicatedGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDedicatedGroupRequest { - public static final String SERIALIZED_NAME_CPU_GENERATION = "CpuGeneration"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATION) - private Integer cpuGeneration; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public CreateDedicatedGroupRequest() {} - - public CreateDedicatedGroupRequest cpuGeneration(Integer cpuGeneration) { - - this.cpuGeneration = cpuGeneration; - return this; - } - - /** - * The processor generation for the VMs in the dedicated group (for example, `4`). - * - * @return cpuGeneration - */ - @javax.annotation.Nonnull - public Integer getCpuGeneration() { - return cpuGeneration; - } - - public void setCpuGeneration(Integer cpuGeneration) { - this.cpuGeneration = cpuGeneration; - } - - public CreateDedicatedGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateDedicatedGroupRequest name(String name) { - - this.name = name; - return this; - } - - /** - * A name for the dedicated group. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public CreateDedicatedGroupRequest subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion in which you want to create the dedicated group. - * - * @return subregionName - */ - @javax.annotation.Nonnull - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDedicatedGroupRequest createDedicatedGroupRequest = (CreateDedicatedGroupRequest) o; - return Objects.equals(this.cpuGeneration, createDedicatedGroupRequest.cpuGeneration) - && Objects.equals(this.dryRun, createDedicatedGroupRequest.dryRun) - && Objects.equals(this.name, createDedicatedGroupRequest.name) - && Objects.equals(this.subregionName, createDedicatedGroupRequest.subregionName); - } - - @Override - public int hashCode() { - return Objects.hash(cpuGeneration, dryRun, name, subregionName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDedicatedGroupRequest {\n"); - sb.append(" cpuGeneration: ").append(toIndentedString(cpuGeneration)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CpuGeneration"); - openapiFields.add("DryRun"); - openapiFields.add("Name"); - openapiFields.add("SubregionName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CpuGeneration"); - openapiRequiredFields.add("Name"); - openapiRequiredFields.add("SubregionName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateDedicatedGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDedicatedGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDedicatedGroupRequest is not" - + " found in the empty JSON string", - CreateDedicatedGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDedicatedGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDedicatedGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateDedicatedGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if (!jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDedicatedGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDedicatedGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateDedicatedGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDedicatedGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDedicatedGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDedicatedGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDedicatedGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateDedicatedGroupRequest - */ - public static CreateDedicatedGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDedicatedGroupRequest.class); - } - - /** - * Convert an instance of CreateDedicatedGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponse.java deleted file mode 100644 index d10503af..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDedicatedGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDedicatedGroupResponse { - public static final String SERIALIZED_NAME_DEDICATED_GROUP = "DedicatedGroup"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP) - private DedicatedGroup dedicatedGroup; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateDedicatedGroupResponse() {} - - public CreateDedicatedGroupResponse dedicatedGroup(DedicatedGroup dedicatedGroup) { - - this.dedicatedGroup = dedicatedGroup; - return this; - } - - /** - * Get dedicatedGroup - * - * @return dedicatedGroup - */ - @javax.annotation.Nullable - public DedicatedGroup getDedicatedGroup() { - return dedicatedGroup; - } - - public void setDedicatedGroup(DedicatedGroup dedicatedGroup) { - this.dedicatedGroup = dedicatedGroup; - } - - public CreateDedicatedGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDedicatedGroupResponse createDedicatedGroupResponse = - (CreateDedicatedGroupResponse) o; - return Objects.equals(this.dedicatedGroup, createDedicatedGroupResponse.dedicatedGroup) - && Objects.equals( - this.responseContext, createDedicatedGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(dedicatedGroup, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDedicatedGroupResponse {\n"); - sb.append(" dedicatedGroup: ").append(toIndentedString(dedicatedGroup)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DedicatedGroup"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateDedicatedGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDedicatedGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDedicatedGroupResponse is not" - + " found in the empty JSON string", - CreateDedicatedGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDedicatedGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDedicatedGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DedicatedGroup` - if (jsonObj.get("DedicatedGroup") != null && !jsonObj.get("DedicatedGroup").isJsonNull()) { - DedicatedGroup.validateJsonObject(jsonObj.getAsJsonObject("DedicatedGroup")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDedicatedGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDedicatedGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateDedicatedGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDedicatedGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDedicatedGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDedicatedGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDedicatedGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateDedicatedGroupResponse - */ - public static CreateDedicatedGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDedicatedGroupResponse.class); - } - - /** - * Convert an instance of CreateDedicatedGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequest.java deleted file mode 100644 index 9fbf80a6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequest.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDhcpOptionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDhcpOptionsRequest { - public static final String SERIALIZED_NAME_DOMAIN_NAME = "DomainName"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) - private String domainName; - - public static final String SERIALIZED_NAME_DOMAIN_NAME_SERVERS = "DomainNameServers"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAME_SERVERS) - private List domainNameServers = null; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOG_SERVERS = "LogServers"; - - @SerializedName(SERIALIZED_NAME_LOG_SERVERS) - private List logServers = null; - - public static final String SERIALIZED_NAME_NTP_SERVERS = "NtpServers"; - - @SerializedName(SERIALIZED_NAME_NTP_SERVERS) - private List ntpServers = null; - - public CreateDhcpOptionsRequest() {} - - public CreateDhcpOptionsRequest domainName(String domainName) { - - this.domainName = domainName; - return this; - } - - /** - * Specify a domain name (for example, `MyCompany.com`). You can specify only one - * domain name. You must specify at least one of the following parameters: - * `DomainName`, `DomainNameServers`, `LogServers`, or - * `NtpServers`. - * - * @return domainName - */ - @javax.annotation.Nullable - public String getDomainName() { - return domainName; - } - - public void setDomainName(String domainName) { - this.domainName = domainName; - } - - public CreateDhcpOptionsRequest domainNameServers(List domainNameServers) { - - this.domainNameServers = domainNameServers; - return this; - } - - public CreateDhcpOptionsRequest addDomainNameServersItem(String domainNameServersItem) { - if (this.domainNameServers == null) { - this.domainNameServers = new ArrayList<>(); - } - this.domainNameServers.add(domainNameServersItem); - return this; - } - - /** - * The IPs of domain name servers. If no IPs are specified, the `OutscaleProvidedDNS` - * value is set by default. You must specify at least one of the following parameters: - * `DomainName`, `DomainNameServers`, `LogServers`, or - * `NtpServers`. - * - * @return domainNameServers - */ - @javax.annotation.Nullable - public List getDomainNameServers() { - return domainNameServers; - } - - public void setDomainNameServers(List domainNameServers) { - this.domainNameServers = domainNameServers; - } - - public CreateDhcpOptionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateDhcpOptionsRequest logServers(List logServers) { - - this.logServers = logServers; - return this; - } - - public CreateDhcpOptionsRequest addLogServersItem(String logServersItem) { - if (this.logServers == null) { - this.logServers = new ArrayList<>(); - } - this.logServers.add(logServersItem); - return this; - } - - /** - * The IPs of the log servers. You must specify at least one of the following parameters: - * `DomainName`, `DomainNameServers`, `LogServers`, or - * `NtpServers`. - * - * @return logServers - */ - @javax.annotation.Nullable - public List getLogServers() { - return logServers; - } - - public void setLogServers(List logServers) { - this.logServers = logServers; - } - - public CreateDhcpOptionsRequest ntpServers(List ntpServers) { - - this.ntpServers = ntpServers; - return this; - } - - public CreateDhcpOptionsRequest addNtpServersItem(String ntpServersItem) { - if (this.ntpServers == null) { - this.ntpServers = new ArrayList<>(); - } - this.ntpServers.add(ntpServersItem); - return this; - } - - /** - * The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the - * following parameters: `DomainName`, `DomainNameServers`, - * `LogServers`, or `NtpServers`. - * - * @return ntpServers - */ - @javax.annotation.Nullable - public List getNtpServers() { - return ntpServers; - } - - public void setNtpServers(List ntpServers) { - this.ntpServers = ntpServers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDhcpOptionsRequest createDhcpOptionsRequest = (CreateDhcpOptionsRequest) o; - return Objects.equals(this.domainName, createDhcpOptionsRequest.domainName) - && Objects.equals( - this.domainNameServers, createDhcpOptionsRequest.domainNameServers) - && Objects.equals(this.dryRun, createDhcpOptionsRequest.dryRun) - && Objects.equals(this.logServers, createDhcpOptionsRequest.logServers) - && Objects.equals(this.ntpServers, createDhcpOptionsRequest.ntpServers); - } - - @Override - public int hashCode() { - return Objects.hash(domainName, domainNameServers, dryRun, logServers, ntpServers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDhcpOptionsRequest {\n"); - sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); - sb.append(" domainNameServers: ") - .append(toIndentedString(domainNameServers)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" logServers: ").append(toIndentedString(logServers)).append("\n"); - sb.append(" ntpServers: ").append(toIndentedString(ntpServers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DomainName"); - openapiFields.add("DomainNameServers"); - openapiFields.add("DryRun"); - openapiFields.add("LogServers"); - openapiFields.add("NtpServers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateDhcpOptionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDhcpOptionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDhcpOptionsRequest is not found" - + " in the empty JSON string", - CreateDhcpOptionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDhcpOptionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDhcpOptionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DomainName") != null && !jsonObj.get("DomainName").isJsonNull()) - && !jsonObj.get("DomainName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DomainName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DomainNameServers") != null - && !jsonObj.get("DomainNameServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainNameServers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DomainNameServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LogServers") != null && !jsonObj.get("LogServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LogServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LogServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NtpServers") != null && !jsonObj.get("NtpServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NtpServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NtpServers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDhcpOptionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDhcpOptionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateDhcpOptionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDhcpOptionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDhcpOptionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDhcpOptionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDhcpOptionsRequest - * @throws IOException if the JSON string is invalid with respect to CreateDhcpOptionsRequest - */ - public static CreateDhcpOptionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDhcpOptionsRequest.class); - } - - /** - * Convert an instance of CreateDhcpOptionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponse.java deleted file mode 100644 index d8d9cc77..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDhcpOptionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDhcpOptionsResponse { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET = "DhcpOptionsSet"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET) - private DhcpOptionsSet dhcpOptionsSet; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateDhcpOptionsResponse() {} - - public CreateDhcpOptionsResponse dhcpOptionsSet(DhcpOptionsSet dhcpOptionsSet) { - - this.dhcpOptionsSet = dhcpOptionsSet; - return this; - } - - /** - * Get dhcpOptionsSet - * - * @return dhcpOptionsSet - */ - @javax.annotation.Nullable - public DhcpOptionsSet getDhcpOptionsSet() { - return dhcpOptionsSet; - } - - public void setDhcpOptionsSet(DhcpOptionsSet dhcpOptionsSet) { - this.dhcpOptionsSet = dhcpOptionsSet; - } - - public CreateDhcpOptionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDhcpOptionsResponse createDhcpOptionsResponse = (CreateDhcpOptionsResponse) o; - return Objects.equals(this.dhcpOptionsSet, createDhcpOptionsResponse.dhcpOptionsSet) - && Objects.equals(this.responseContext, createDhcpOptionsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(dhcpOptionsSet, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDhcpOptionsResponse {\n"); - sb.append(" dhcpOptionsSet: ").append(toIndentedString(dhcpOptionsSet)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSet"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateDhcpOptionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDhcpOptionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDhcpOptionsResponse is not" - + " found in the empty JSON string", - CreateDhcpOptionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDhcpOptionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDhcpOptionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DhcpOptionsSet` - if (jsonObj.get("DhcpOptionsSet") != null && !jsonObj.get("DhcpOptionsSet").isJsonNull()) { - DhcpOptionsSet.validateJsonObject(jsonObj.getAsJsonObject("DhcpOptionsSet")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDhcpOptionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDhcpOptionsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateDhcpOptionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDhcpOptionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDhcpOptionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDhcpOptionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDhcpOptionsResponse - * @throws IOException if the JSON string is invalid with respect to CreateDhcpOptionsResponse - */ - public static CreateDhcpOptionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDhcpOptionsResponse.class); - } - - /** - * Convert an instance of CreateDhcpOptionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequest.java deleted file mode 100644 index 40ee2927..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDirectLinkInterfaceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDirectLinkInterfaceRequest { - public static final String SERIALIZED_NAME_DIRECT_LINK_ID = "DirectLinkId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_ID) - private String directLinkId; - - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE = "DirectLinkInterface"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE) - private DirectLinkInterface directLinkInterface; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public CreateDirectLinkInterfaceRequest() {} - - public CreateDirectLinkInterfaceRequest directLinkId(String directLinkId) { - - this.directLinkId = directLinkId; - return this; - } - - /** - * The ID of the existing DirectLink for which you want to create the DirectLink interface. - * - * @return directLinkId - */ - @javax.annotation.Nonnull - public String getDirectLinkId() { - return directLinkId; - } - - public void setDirectLinkId(String directLinkId) { - this.directLinkId = directLinkId; - } - - public CreateDirectLinkInterfaceRequest directLinkInterface( - DirectLinkInterface directLinkInterface) { - - this.directLinkInterface = directLinkInterface; - return this; - } - - /** - * Get directLinkInterface - * - * @return directLinkInterface - */ - @javax.annotation.Nonnull - public DirectLinkInterface getDirectLinkInterface() { - return directLinkInterface; - } - - public void setDirectLinkInterface(DirectLinkInterface directLinkInterface) { - this.directLinkInterface = directLinkInterface; - } - - public CreateDirectLinkInterfaceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest = - (CreateDirectLinkInterfaceRequest) o; - return Objects.equals(this.directLinkId, createDirectLinkInterfaceRequest.directLinkId) - && Objects.equals( - this.directLinkInterface, - createDirectLinkInterfaceRequest.directLinkInterface) - && Objects.equals(this.dryRun, createDirectLinkInterfaceRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkId, directLinkInterface, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDirectLinkInterfaceRequest {\n"); - sb.append(" directLinkId: ").append(toIndentedString(directLinkId)).append("\n"); - sb.append(" directLinkInterface: ") - .append(toIndentedString(directLinkInterface)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkId"); - openapiFields.add("DirectLinkInterface"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DirectLinkId"); - openapiRequiredFields.add("DirectLinkInterface"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateDirectLinkInterfaceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDirectLinkInterfaceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDirectLinkInterfaceRequest is" - + " not found in the empty JSON string", - CreateDirectLinkInterfaceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDirectLinkInterfaceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDirectLinkInterfaceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateDirectLinkInterfaceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DirectLinkId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DirectLinkId").toString())); - } - // validate the required field `DirectLinkInterface` - DirectLinkInterface.validateJsonObject(jsonObj.getAsJsonObject("DirectLinkInterface")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDirectLinkInterfaceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDirectLinkInterfaceRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateDirectLinkInterfaceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDirectLinkInterfaceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDirectLinkInterfaceRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDirectLinkInterfaceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDirectLinkInterfaceRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateDirectLinkInterfaceRequest - */ - public static CreateDirectLinkInterfaceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDirectLinkInterfaceRequest.class); - } - - /** - * Convert an instance of CreateDirectLinkInterfaceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponse.java deleted file mode 100644 index 5574d990..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponse.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDirectLinkInterfaceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDirectLinkInterfaceResponse { - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE = "DirectLinkInterface"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE) - private DirectLinkInterfaces directLinkInterface; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateDirectLinkInterfaceResponse() {} - - public CreateDirectLinkInterfaceResponse directLinkInterface( - DirectLinkInterfaces directLinkInterface) { - - this.directLinkInterface = directLinkInterface; - return this; - } - - /** - * Get directLinkInterface - * - * @return directLinkInterface - */ - @javax.annotation.Nullable - public DirectLinkInterfaces getDirectLinkInterface() { - return directLinkInterface; - } - - public void setDirectLinkInterface(DirectLinkInterfaces directLinkInterface) { - this.directLinkInterface = directLinkInterface; - } - - public CreateDirectLinkInterfaceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDirectLinkInterfaceResponse createDirectLinkInterfaceResponse = - (CreateDirectLinkInterfaceResponse) o; - return Objects.equals( - this.directLinkInterface, - createDirectLinkInterfaceResponse.directLinkInterface) - && Objects.equals( - this.responseContext, createDirectLinkInterfaceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkInterface, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDirectLinkInterfaceResponse {\n"); - sb.append(" directLinkInterface: ") - .append(toIndentedString(directLinkInterface)) - .append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkInterface"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateDirectLinkInterfaceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDirectLinkInterfaceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDirectLinkInterfaceResponse is" - + " not found in the empty JSON string", - CreateDirectLinkInterfaceResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDirectLinkInterfaceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDirectLinkInterfaceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DirectLinkInterface` - if (jsonObj.get("DirectLinkInterface") != null - && !jsonObj.get("DirectLinkInterface").isJsonNull()) { - DirectLinkInterfaces.validateJsonObject(jsonObj.getAsJsonObject("DirectLinkInterface")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDirectLinkInterfaceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDirectLinkInterfaceResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateDirectLinkInterfaceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDirectLinkInterfaceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDirectLinkInterfaceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDirectLinkInterfaceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDirectLinkInterfaceResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateDirectLinkInterfaceResponse - */ - public static CreateDirectLinkInterfaceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDirectLinkInterfaceResponse.class); - } - - /** - * Convert an instance of CreateDirectLinkInterfaceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequest.java deleted file mode 100644 index 6ce3d51c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequest.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDirectLinkRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDirectLinkRequest { - public static final String SERIALIZED_NAME_BANDWIDTH = "Bandwidth"; - - @SerializedName(SERIALIZED_NAME_BANDWIDTH) - private String bandwidth; - - public static final String SERIALIZED_NAME_DIRECT_LINK_NAME = "DirectLinkName"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_NAME) - private String directLinkName; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOCATION = "Location"; - - @SerializedName(SERIALIZED_NAME_LOCATION) - private String location; - - public CreateDirectLinkRequest() {} - - public CreateDirectLinkRequest bandwidth(String bandwidth) { - - this.bandwidth = bandwidth; - return this; - } - - /** - * The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`). - * - * @return bandwidth - */ - @javax.annotation.Nonnull - public String getBandwidth() { - return bandwidth; - } - - public void setBandwidth(String bandwidth) { - this.bandwidth = bandwidth; - } - - public CreateDirectLinkRequest directLinkName(String directLinkName) { - - this.directLinkName = directLinkName; - return this; - } - - /** - * The name of the DirectLink. - * - * @return directLinkName - */ - @javax.annotation.Nonnull - public String getDirectLinkName() { - return directLinkName; - } - - public void setDirectLinkName(String directLinkName) { - this.directLinkName = directLinkName; - } - - public CreateDirectLinkRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateDirectLinkRequest location(String location) { - - this.location = location; - return this; - } - - /** - * The code of the requested location for the DirectLink, returned by the - * [ReadLocations](#readlocations) method. - * - * @return location - */ - @javax.annotation.Nonnull - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDirectLinkRequest createDirectLinkRequest = (CreateDirectLinkRequest) o; - return Objects.equals(this.bandwidth, createDirectLinkRequest.bandwidth) - && Objects.equals(this.directLinkName, createDirectLinkRequest.directLinkName) - && Objects.equals(this.dryRun, createDirectLinkRequest.dryRun) - && Objects.equals(this.location, createDirectLinkRequest.location); - } - - @Override - public int hashCode() { - return Objects.hash(bandwidth, directLinkName, dryRun, location); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDirectLinkRequest {\n"); - sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); - sb.append(" directLinkName: ").append(toIndentedString(directLinkName)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Bandwidth"); - openapiFields.add("DirectLinkName"); - openapiFields.add("DryRun"); - openapiFields.add("Location"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Bandwidth"); - openapiRequiredFields.add("DirectLinkName"); - openapiRequiredFields.add("Location"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateDirectLinkRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDirectLinkRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDirectLinkRequest is not found" - + " in the empty JSON string", - CreateDirectLinkRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDirectLinkRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDirectLinkRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateDirectLinkRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Bandwidth").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Bandwidth` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Bandwidth").toString())); - } - if (!jsonObj.get("DirectLinkName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DirectLinkName").toString())); - } - if (!jsonObj.get("Location").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Location` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Location").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDirectLinkRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDirectLinkRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateDirectLinkRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDirectLinkRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDirectLinkRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDirectLinkRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDirectLinkRequest - * @throws IOException if the JSON string is invalid with respect to CreateDirectLinkRequest - */ - public static CreateDirectLinkRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDirectLinkRequest.class); - } - - /** - * Convert an instance of CreateDirectLinkRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponse.java deleted file mode 100644 index 43f53eb5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateDirectLinkResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDirectLinkResponse { - public static final String SERIALIZED_NAME_DIRECT_LINK = "DirectLink"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK) - private DirectLink directLink; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateDirectLinkResponse() {} - - public CreateDirectLinkResponse directLink(DirectLink directLink) { - - this.directLink = directLink; - return this; - } - - /** - * Get directLink - * - * @return directLink - */ - @javax.annotation.Nullable - public DirectLink getDirectLink() { - return directLink; - } - - public void setDirectLink(DirectLink directLink) { - this.directLink = directLink; - } - - public CreateDirectLinkResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDirectLinkResponse createDirectLinkResponse = (CreateDirectLinkResponse) o; - return Objects.equals(this.directLink, createDirectLinkResponse.directLink) - && Objects.equals(this.responseContext, createDirectLinkResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(directLink, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDirectLinkResponse {\n"); - sb.append(" directLink: ").append(toIndentedString(directLink)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLink"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateDirectLinkResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateDirectLinkResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateDirectLinkResponse is not found" - + " in the empty JSON string", - CreateDirectLinkResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateDirectLinkResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateDirectLinkResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DirectLink` - if (jsonObj.get("DirectLink") != null && !jsonObj.get("DirectLink").isJsonNull()) { - DirectLink.validateJsonObject(jsonObj.getAsJsonObject("DirectLink")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDirectLinkResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDirectLinkResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateDirectLinkResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDirectLinkResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDirectLinkResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDirectLinkResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDirectLinkResponse - * @throws IOException if the JSON string is invalid with respect to CreateDirectLinkResponse - */ - public static CreateDirectLinkResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDirectLinkResponse.class); - } - - /** - * Convert an instance of CreateDirectLinkResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequest.java deleted file mode 100644 index 6ce6582e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequest.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateFlexibleGpuRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateFlexibleGpuRequest { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion = false; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_GENERATION = "Generation"; - - @SerializedName(SERIALIZED_NAME_GENERATION) - private String generation; - - public static final String SERIALIZED_NAME_MODEL_NAME = "ModelName"; - - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - private String modelName; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public CreateFlexibleGpuRequest() {} - - public CreateFlexibleGpuRequest deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the fGPU is deleted when the VM is terminated. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public CreateFlexibleGpuRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateFlexibleGpuRequest generation(String generation) { - - this.generation = generation; - return this; - } - - /** - * The processor generation that the fGPU must be compatible with. If not specified, the oldest - * possible processor generation is selected (as provided by - * [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for the specified model of fGPU). - * - * @return generation - */ - @javax.annotation.Nullable - public String getGeneration() { - return generation; - } - - public void setGeneration(String generation) { - this.generation = generation; - } - - public CreateFlexibleGpuRequest modelName(String modelName) { - - this.modelName = modelName; - return this; - } - - /** - * The model of fGPU you want to allocate. For more information, see [About Flexible - * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). - * - * @return modelName - */ - @javax.annotation.Nonnull - public String getModelName() { - return modelName; - } - - public void setModelName(String modelName) { - this.modelName = modelName; - } - - public CreateFlexibleGpuRequest subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion in which you want to create the fGPU. - * - * @return subregionName - */ - @javax.annotation.Nonnull - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateFlexibleGpuRequest createFlexibleGpuRequest = (CreateFlexibleGpuRequest) o; - return Objects.equals(this.deleteOnVmDeletion, createFlexibleGpuRequest.deleteOnVmDeletion) - && Objects.equals(this.dryRun, createFlexibleGpuRequest.dryRun) - && Objects.equals(this.generation, createFlexibleGpuRequest.generation) - && Objects.equals(this.modelName, createFlexibleGpuRequest.modelName) - && Objects.equals(this.subregionName, createFlexibleGpuRequest.subregionName); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, dryRun, generation, modelName, subregionName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateFlexibleGpuRequest {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" generation: ").append(toIndentedString(generation)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("DryRun"); - openapiFields.add("Generation"); - openapiFields.add("ModelName"); - openapiFields.add("SubregionName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ModelName"); - openapiRequiredFields.add("SubregionName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateFlexibleGpuRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateFlexibleGpuRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateFlexibleGpuRequest is not found" - + " in the empty JSON string", - CreateFlexibleGpuRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateFlexibleGpuRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateFlexibleGpuRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFlexibleGpuRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Generation") != null && !jsonObj.get("Generation").isJsonNull()) - && !jsonObj.get("Generation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Generation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Generation").toString())); - } - if (!jsonObj.get("ModelName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ModelName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ModelName").toString())); - } - if (!jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFlexibleGpuRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFlexibleGpuRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateFlexibleGpuRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateFlexibleGpuRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateFlexibleGpuRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateFlexibleGpuRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateFlexibleGpuRequest - * @throws IOException if the JSON string is invalid with respect to CreateFlexibleGpuRequest - */ - public static CreateFlexibleGpuRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFlexibleGpuRequest.class); - } - - /** - * Convert an instance of CreateFlexibleGpuRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponse.java deleted file mode 100644 index abb99fef..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateFlexibleGpuResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateFlexibleGpuResponse { - public static final String SERIALIZED_NAME_FLEXIBLE_GPU = "FlexibleGpu"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU) - private FlexibleGpu flexibleGpu; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateFlexibleGpuResponse() {} - - public CreateFlexibleGpuResponse flexibleGpu(FlexibleGpu flexibleGpu) { - - this.flexibleGpu = flexibleGpu; - return this; - } - - /** - * Get flexibleGpu - * - * @return flexibleGpu - */ - @javax.annotation.Nullable - public FlexibleGpu getFlexibleGpu() { - return flexibleGpu; - } - - public void setFlexibleGpu(FlexibleGpu flexibleGpu) { - this.flexibleGpu = flexibleGpu; - } - - public CreateFlexibleGpuResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateFlexibleGpuResponse createFlexibleGpuResponse = (CreateFlexibleGpuResponse) o; - return Objects.equals(this.flexibleGpu, createFlexibleGpuResponse.flexibleGpu) - && Objects.equals(this.responseContext, createFlexibleGpuResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(flexibleGpu, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateFlexibleGpuResponse {\n"); - sb.append(" flexibleGpu: ").append(toIndentedString(flexibleGpu)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FlexibleGpu"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateFlexibleGpuResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateFlexibleGpuResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateFlexibleGpuResponse is not" - + " found in the empty JSON string", - CreateFlexibleGpuResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateFlexibleGpuResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateFlexibleGpuResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `FlexibleGpu` - if (jsonObj.get("FlexibleGpu") != null && !jsonObj.get("FlexibleGpu").isJsonNull()) { - FlexibleGpu.validateJsonObject(jsonObj.getAsJsonObject("FlexibleGpu")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFlexibleGpuResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFlexibleGpuResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateFlexibleGpuResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateFlexibleGpuResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateFlexibleGpuResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateFlexibleGpuResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateFlexibleGpuResponse - * @throws IOException if the JSON string is invalid with respect to CreateFlexibleGpuResponse - */ - public static CreateFlexibleGpuResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFlexibleGpuResponse.class); - } - - /** - * Convert an instance of CreateFlexibleGpuResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequest.java deleted file mode 100644 index f4cc5d22..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateImageExportTaskRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateImageExportTaskRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_OSU_EXPORT = "OsuExport"; - - @SerializedName(SERIALIZED_NAME_OSU_EXPORT) - private OsuExportToCreate osuExport; - - public CreateImageExportTaskRequest() {} - - public CreateImageExportTaskRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateImageExportTaskRequest imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI to export. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public CreateImageExportTaskRequest osuExport(OsuExportToCreate osuExport) { - - this.osuExport = osuExport; - return this; - } - - /** - * Get osuExport - * - * @return osuExport - */ - @javax.annotation.Nonnull - public OsuExportToCreate getOsuExport() { - return osuExport; - } - - public void setOsuExport(OsuExportToCreate osuExport) { - this.osuExport = osuExport; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateImageExportTaskRequest createImageExportTaskRequest = - (CreateImageExportTaskRequest) o; - return Objects.equals(this.dryRun, createImageExportTaskRequest.dryRun) - && Objects.equals(this.imageId, createImageExportTaskRequest.imageId) - && Objects.equals(this.osuExport, createImageExportTaskRequest.osuExport); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, imageId, osuExport); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateImageExportTaskRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" osuExport: ").append(toIndentedString(osuExport)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ImageId"); - openapiFields.add("OsuExport"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ImageId"); - openapiRequiredFields.add("OsuExport"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateImageExportTaskRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateImageExportTaskRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateImageExportTaskRequest is not" - + " found in the empty JSON string", - CreateImageExportTaskRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateImageExportTaskRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateImageExportTaskRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateImageExportTaskRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - // validate the required field `OsuExport` - OsuExportToCreate.validateJsonObject(jsonObj.getAsJsonObject("OsuExport")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateImageExportTaskRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateImageExportTaskRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateImageExportTaskRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateImageExportTaskRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateImageExportTaskRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateImageExportTaskRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateImageExportTaskRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateImageExportTaskRequest - */ - public static CreateImageExportTaskRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateImageExportTaskRequest.class); - } - - /** - * Convert an instance of CreateImageExportTaskRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponse.java deleted file mode 100644 index fb034295..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponse.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateImageExportTaskResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateImageExportTaskResponse { - public static final String SERIALIZED_NAME_IMAGE_EXPORT_TASK = "ImageExportTask"; - - @SerializedName(SERIALIZED_NAME_IMAGE_EXPORT_TASK) - private ImageExportTask imageExportTask; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateImageExportTaskResponse() {} - - public CreateImageExportTaskResponse imageExportTask(ImageExportTask imageExportTask) { - - this.imageExportTask = imageExportTask; - return this; - } - - /** - * Get imageExportTask - * - * @return imageExportTask - */ - @javax.annotation.Nullable - public ImageExportTask getImageExportTask() { - return imageExportTask; - } - - public void setImageExportTask(ImageExportTask imageExportTask) { - this.imageExportTask = imageExportTask; - } - - public CreateImageExportTaskResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateImageExportTaskResponse createImageExportTaskResponse = - (CreateImageExportTaskResponse) o; - return Objects.equals(this.imageExportTask, createImageExportTaskResponse.imageExportTask) - && Objects.equals( - this.responseContext, createImageExportTaskResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(imageExportTask, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateImageExportTaskResponse {\n"); - sb.append(" imageExportTask: ").append(toIndentedString(imageExportTask)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ImageExportTask"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateImageExportTaskResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateImageExportTaskResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateImageExportTaskResponse is not" - + " found in the empty JSON string", - CreateImageExportTaskResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateImageExportTaskResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateImageExportTaskResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ImageExportTask` - if (jsonObj.get("ImageExportTask") != null - && !jsonObj.get("ImageExportTask").isJsonNull()) { - ImageExportTask.validateJsonObject(jsonObj.getAsJsonObject("ImageExportTask")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateImageExportTaskResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateImageExportTaskResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateImageExportTaskResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateImageExportTaskResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateImageExportTaskResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateImageExportTaskResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateImageExportTaskResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateImageExportTaskResponse - */ - public static CreateImageExportTaskResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateImageExportTaskResponse.class); - } - - /** - * Convert an instance of CreateImageExportTaskResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequest.java deleted file mode 100644 index e21c4791..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequest.java +++ /dev/null @@ -1,642 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateImageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateImageRequest { - public static final String SERIALIZED_NAME_ARCHITECTURE = "Architecture"; - - @SerializedName(SERIALIZED_NAME_ARCHITECTURE) - private String architecture; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS = "BlockDeviceMappings"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS) - private List blockDeviceMappings = null; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILE_LOCATION = "FileLocation"; - - @SerializedName(SERIALIZED_NAME_FILE_LOCATION) - private String fileLocation; - - public static final String SERIALIZED_NAME_IMAGE_NAME = "ImageName"; - - @SerializedName(SERIALIZED_NAME_IMAGE_NAME) - private String imageName; - - public static final String SERIALIZED_NAME_NO_REBOOT = "NoReboot"; - - @SerializedName(SERIALIZED_NAME_NO_REBOOT) - private Boolean noReboot; - - public static final String SERIALIZED_NAME_PRODUCT_CODES = "ProductCodes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODES) - private List productCodes = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_NAME = "RootDeviceName"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_NAME) - private String rootDeviceName; - - public static final String SERIALIZED_NAME_SOURCE_IMAGE_ID = "SourceImageId"; - - @SerializedName(SERIALIZED_NAME_SOURCE_IMAGE_ID) - private String sourceImageId; - - public static final String SERIALIZED_NAME_SOURCE_REGION_NAME = "SourceRegionName"; - - @SerializedName(SERIALIZED_NAME_SOURCE_REGION_NAME) - private String sourceRegionName; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public CreateImageRequest() {} - - public CreateImageRequest architecture(String architecture) { - - this.architecture = architecture; - return this; - } - - /** - * **(when registering from a snapshot, or from a bucket without using a manifest file)** The - * architecture of the OMI (`i386` or `x86_64`). - * - * @return architecture - */ - @javax.annotation.Nullable - public String getArchitecture() { - return architecture; - } - - public void setArchitecture(String architecture) { - this.architecture = architecture; - } - - public CreateImageRequest blockDeviceMappings( - List blockDeviceMappings) { - - this.blockDeviceMappings = blockDeviceMappings; - return this; - } - - public CreateImageRequest addBlockDeviceMappingsItem( - BlockDeviceMappingImage blockDeviceMappingsItem) { - if (this.blockDeviceMappings == null) { - this.blockDeviceMappings = new ArrayList<>(); - } - this.blockDeviceMappings.add(blockDeviceMappingsItem); - return this; - } - - /** - * **(when registering from a snapshot, or from a bucket without using a manifest file)** One or - * more block device mappings. - * - * @return blockDeviceMappings - */ - @javax.annotation.Nullable - public List getBlockDeviceMappings() { - return blockDeviceMappings; - } - - public void setBlockDeviceMappings(List blockDeviceMappings) { - this.blockDeviceMappings = blockDeviceMappings; - } - - public CreateImageRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the new OMI. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateImageRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateImageRequest fileLocation(String fileLocation) { - - this.fileLocation = fileLocation; - return this; - } - - /** - * **(when registering from a bucket by using a manifest file)** The pre-signed URL of the - * manifest file for the OMI you want to register. For more information, see [Configuring a - * Pre-signed URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) or - * [Managing Access to Your Buckets and - * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.html).<br - * /> You can also specify the normal URL of the OMI if you have permission on the OOS - * bucket, without using the manifest file, but in that case, you need to manually specify - * through the other parameters all the information that would otherwise be read from the - * manifest file. - * - * @return fileLocation - */ - @javax.annotation.Nullable - public String getFileLocation() { - return fileLocation; - } - - public void setFileLocation(String fileLocation) { - this.fileLocation = fileLocation; - } - - public CreateImageRequest imageName(String imageName) { - - this.imageName = imageName; - return this; - } - - /** - * A unique name for the new OMI.<br /> Constraints: 3-128 alphanumeric characters, - * underscores (`_`), spaces (` `), parentheses (`()`), slashes - * (`/`), periods (`.`), or dashes (`-`). - * - * @return imageName - */ - @javax.annotation.Nullable - public String getImageName() { - return imageName; - } - - public void setImageName(String imageName) { - this.imageName = imageName; - } - - public CreateImageRequest noReboot(Boolean noReboot) { - - this.noReboot = noReboot; - return this; - } - - /** - * **(when creating from a VM)** If false, the VM shuts down before creating the OMI and then - * reboots. If true, the VM does not. - * - * @return noReboot - */ - @javax.annotation.Nullable - public Boolean getNoReboot() { - return noReboot; - } - - public void setNoReboot(Boolean noReboot) { - this.noReboot = noReboot; - } - - public CreateImageRequest productCodes(List productCodes) { - - this.productCodes = productCodes; - return this; - } - - public CreateImageRequest addProductCodesItem(String productCodesItem) { - if (this.productCodes == null) { - this.productCodes = new ArrayList<>(); - } - this.productCodes.add(productCodesItem); - return this; - } - - /** - * The product codes associated with the OMI. - * - * @return productCodes - */ - @javax.annotation.Nullable - public List getProductCodes() { - return productCodes; - } - - public void setProductCodes(List productCodes) { - this.productCodes = productCodes; - } - - public CreateImageRequest rootDeviceName(String rootDeviceName) { - - this.rootDeviceName = rootDeviceName; - return this; - } - - /** - * **(when registering from a snapshot, or from a bucket without using a manifest file)** The - * name of the root device for the new OMI. - * - * @return rootDeviceName - */ - @javax.annotation.Nullable - public String getRootDeviceName() { - return rootDeviceName; - } - - public void setRootDeviceName(String rootDeviceName) { - this.rootDeviceName = rootDeviceName; - } - - public CreateImageRequest sourceImageId(String sourceImageId) { - - this.sourceImageId = sourceImageId; - return this; - } - - /** - * **(when copying an OMI)** The ID of the OMI you want to copy. - * - * @return sourceImageId - */ - @javax.annotation.Nullable - public String getSourceImageId() { - return sourceImageId; - } - - public void setSourceImageId(String sourceImageId) { - this.sourceImageId = sourceImageId; - } - - public CreateImageRequest sourceRegionName(String sourceRegionName) { - - this.sourceRegionName = sourceRegionName; - return this; - } - - /** - * **(when copying an OMI)** The name of the source Region (always the same as the Region of - * your account). - * - * @return sourceRegionName - */ - @javax.annotation.Nullable - public String getSourceRegionName() { - return sourceRegionName; - } - - public void setSourceRegionName(String sourceRegionName) { - this.sourceRegionName = sourceRegionName; - } - - public CreateImageRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * **(when creating from a VM)** The ID of the VM from which you want to create the OMI. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateImageRequest createImageRequest = (CreateImageRequest) o; - return Objects.equals(this.architecture, createImageRequest.architecture) - && Objects.equals(this.blockDeviceMappings, createImageRequest.blockDeviceMappings) - && Objects.equals(this.description, createImageRequest.description) - && Objects.equals(this.dryRun, createImageRequest.dryRun) - && Objects.equals(this.fileLocation, createImageRequest.fileLocation) - && Objects.equals(this.imageName, createImageRequest.imageName) - && Objects.equals(this.noReboot, createImageRequest.noReboot) - && Objects.equals(this.productCodes, createImageRequest.productCodes) - && Objects.equals(this.rootDeviceName, createImageRequest.rootDeviceName) - && Objects.equals(this.sourceImageId, createImageRequest.sourceImageId) - && Objects.equals(this.sourceRegionName, createImageRequest.sourceRegionName) - && Objects.equals(this.vmId, createImageRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - architecture, - blockDeviceMappings, - description, - dryRun, - fileLocation, - imageName, - noReboot, - productCodes, - rootDeviceName, - sourceImageId, - sourceRegionName, - vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateImageRequest {\n"); - sb.append(" architecture: ").append(toIndentedString(architecture)).append("\n"); - sb.append(" blockDeviceMappings: ") - .append(toIndentedString(blockDeviceMappings)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); - sb.append(" imageName: ").append(toIndentedString(imageName)).append("\n"); - sb.append(" noReboot: ").append(toIndentedString(noReboot)).append("\n"); - sb.append(" productCodes: ").append(toIndentedString(productCodes)).append("\n"); - sb.append(" rootDeviceName: ").append(toIndentedString(rootDeviceName)).append("\n"); - sb.append(" sourceImageId: ").append(toIndentedString(sourceImageId)).append("\n"); - sb.append(" sourceRegionName: ").append(toIndentedString(sourceRegionName)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Architecture"); - openapiFields.add("BlockDeviceMappings"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("FileLocation"); - openapiFields.add("ImageName"); - openapiFields.add("NoReboot"); - openapiFields.add("ProductCodes"); - openapiFields.add("RootDeviceName"); - openapiFields.add("SourceImageId"); - openapiFields.add("SourceRegionName"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateImageRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateImageRequest is not found in" - + " the empty JSON string", - CreateImageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateImageRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Architecture") != null && !jsonObj.get("Architecture").isJsonNull()) - && !jsonObj.get("Architecture").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Architecture` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Architecture").toString())); - } - if (jsonObj.get("BlockDeviceMappings") != null - && !jsonObj.get("BlockDeviceMappings").isJsonNull()) { - JsonArray jsonArrayblockDeviceMappings = jsonObj.getAsJsonArray("BlockDeviceMappings"); - if (jsonArrayblockDeviceMappings != null) { - // ensure the json data is an array - if (!jsonObj.get("BlockDeviceMappings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappings` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappings").toString())); - } - - // validate the optional field `BlockDeviceMappings` (array) - for (int i = 0; i < jsonArrayblockDeviceMappings.size(); i++) { - BlockDeviceMappingImage.validateJsonObject( - jsonArrayblockDeviceMappings.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("FileLocation") != null && !jsonObj.get("FileLocation").isJsonNull()) - && !jsonObj.get("FileLocation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FileLocation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FileLocation").toString())); - } - if ((jsonObj.get("ImageName") != null && !jsonObj.get("ImageName").isJsonNull()) - && !jsonObj.get("ImageName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodes") != null && !jsonObj.get("ProductCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductCodes").toString())); - } - if ((jsonObj.get("RootDeviceName") != null && !jsonObj.get("RootDeviceName").isJsonNull()) - && !jsonObj.get("RootDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("RootDeviceName").toString())); - } - if ((jsonObj.get("SourceImageId") != null && !jsonObj.get("SourceImageId").isJsonNull()) - && !jsonObj.get("SourceImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SourceImageId").toString())); - } - if ((jsonObj.get("SourceRegionName") != null - && !jsonObj.get("SourceRegionName").isJsonNull()) - && !jsonObj.get("SourceRegionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceRegionName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SourceRegionName").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateImageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateImageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateImageRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateImageRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateImageRequest - * @throws IOException if the JSON string is invalid with respect to CreateImageRequest - */ - public static CreateImageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateImageRequest.class); - } - - /** - * Convert an instance of CreateImageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponse.java deleted file mode 100644 index 3d5de9f7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateImageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateImageResponse { - public static final String SERIALIZED_NAME_IMAGE = "Image"; - - @SerializedName(SERIALIZED_NAME_IMAGE) - private Image image; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateImageResponse() {} - - public CreateImageResponse image(Image image) { - - this.image = image; - return this; - } - - /** - * Get image - * - * @return image - */ - @javax.annotation.Nullable - public Image getImage() { - return image; - } - - public void setImage(Image image) { - this.image = image; - } - - public CreateImageResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateImageResponse createImageResponse = (CreateImageResponse) o; - return Objects.equals(this.image, createImageResponse.image) - && Objects.equals(this.responseContext, createImageResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(image, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateImageResponse {\n"); - sb.append(" image: ").append(toIndentedString(image)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Image"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateImageResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateImageResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateImageResponse is not found in" - + " the empty JSON string", - CreateImageResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateImageResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateImageResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Image` - if (jsonObj.get("Image") != null && !jsonObj.get("Image").isJsonNull()) { - Image.validateJsonObject(jsonObj.getAsJsonObject("Image")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateImageResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateImageResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateImageResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateImageResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateImageResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateImageResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateImageResponse - * @throws IOException if the JSON string is invalid with respect to CreateImageResponse - */ - public static CreateImageResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateImageResponse.class); - } - - /** - * Convert an instance of CreateImageResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequest.java deleted file mode 100644 index f449687c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequest.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateInternetServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateInternetServiceRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public CreateInternetServiceRequest() {} - - public CreateInternetServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateInternetServiceRequest createInternetServiceRequest = - (CreateInternetServiceRequest) o; - return Objects.equals(this.dryRun, createInternetServiceRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateInternetServiceRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateInternetServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateInternetServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateInternetServiceRequest is not" - + " found in the empty JSON string", - CreateInternetServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateInternetServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateInternetServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateInternetServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateInternetServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateInternetServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateInternetServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateInternetServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateInternetServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateInternetServiceRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateInternetServiceRequest - */ - public static CreateInternetServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateInternetServiceRequest.class); - } - - /** - * Convert an instance of CreateInternetServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponse.java deleted file mode 100644 index c4f54766..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponse.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateInternetServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateInternetServiceResponse { - public static final String SERIALIZED_NAME_INTERNET_SERVICE = "InternetService"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE) - private InternetService internetService; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateInternetServiceResponse() {} - - public CreateInternetServiceResponse internetService(InternetService internetService) { - - this.internetService = internetService; - return this; - } - - /** - * Get internetService - * - * @return internetService - */ - @javax.annotation.Nullable - public InternetService getInternetService() { - return internetService; - } - - public void setInternetService(InternetService internetService) { - this.internetService = internetService; - } - - public CreateInternetServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateInternetServiceResponse createInternetServiceResponse = - (CreateInternetServiceResponse) o; - return Objects.equals(this.internetService, createInternetServiceResponse.internetService) - && Objects.equals( - this.responseContext, createInternetServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(internetService, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateInternetServiceResponse {\n"); - sb.append(" internetService: ").append(toIndentedString(internetService)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("InternetService"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateInternetServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateInternetServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateInternetServiceResponse is not" - + " found in the empty JSON string", - CreateInternetServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateInternetServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateInternetServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `InternetService` - if (jsonObj.get("InternetService") != null - && !jsonObj.get("InternetService").isJsonNull()) { - InternetService.validateJsonObject(jsonObj.getAsJsonObject("InternetService")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateInternetServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateInternetServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateInternetServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateInternetServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateInternetServiceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateInternetServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateInternetServiceResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateInternetServiceResponse - */ - public static CreateInternetServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateInternetServiceResponse.class); - } - - /** - * Convert an instance of CreateInternetServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequest.java deleted file mode 100644 index 93cffe84..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequest.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateKeypairRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateKeypairRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_PUBLIC_KEY = "PublicKey"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_KEY) - private String publicKey; - - public CreateKeypairRequest() {} - - public CreateKeypairRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateKeypairRequest keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * A unique name for the keypair, with a maximum length of 255 [ASCII printable - * characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters). - * - * @return keypairName - */ - @javax.annotation.Nonnull - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public CreateKeypairRequest publicKey(String publicKey) { - - this.publicKey = publicKey; - return this; - } - - /** - * The public key to import in your account, if you are importing an existing keypair. This - * value must be Base64-encoded. - * - * @return publicKey - */ - @javax.annotation.Nullable - public String getPublicKey() { - return publicKey; - } - - public void setPublicKey(String publicKey) { - this.publicKey = publicKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateKeypairRequest createKeypairRequest = (CreateKeypairRequest) o; - return Objects.equals(this.dryRun, createKeypairRequest.dryRun) - && Objects.equals(this.keypairName, createKeypairRequest.keypairName) - && Objects.equals(this.publicKey, createKeypairRequest.publicKey); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, keypairName, publicKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateKeypairRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("KeypairName"); - openapiFields.add("PublicKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("KeypairName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateKeypairRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateKeypairRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateKeypairRequest is not found in" - + " the empty JSON string", - CreateKeypairRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateKeypairRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateKeypairRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateKeypairRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if ((jsonObj.get("PublicKey") != null && !jsonObj.get("PublicKey").isJsonNull()) - && !jsonObj.get("PublicKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateKeypairRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateKeypairRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateKeypairRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateKeypairRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateKeypairRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateKeypairRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateKeypairRequest - * @throws IOException if the JSON string is invalid with respect to CreateKeypairRequest - */ - public static CreateKeypairRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateKeypairRequest.class); - } - - /** - * Convert an instance of CreateKeypairRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponse.java deleted file mode 100644 index 15d2c6ba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateKeypairResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateKeypairResponse { - public static final String SERIALIZED_NAME_KEYPAIR = "Keypair"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR) - private KeypairCreated keypair; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateKeypairResponse() {} - - public CreateKeypairResponse keypair(KeypairCreated keypair) { - - this.keypair = keypair; - return this; - } - - /** - * Get keypair - * - * @return keypair - */ - @javax.annotation.Nullable - public KeypairCreated getKeypair() { - return keypair; - } - - public void setKeypair(KeypairCreated keypair) { - this.keypair = keypair; - } - - public CreateKeypairResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateKeypairResponse createKeypairResponse = (CreateKeypairResponse) o; - return Objects.equals(this.keypair, createKeypairResponse.keypair) - && Objects.equals(this.responseContext, createKeypairResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(keypair, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateKeypairResponse {\n"); - sb.append(" keypair: ").append(toIndentedString(keypair)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Keypair"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateKeypairResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateKeypairResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateKeypairResponse is not found in" - + " the empty JSON string", - CreateKeypairResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateKeypairResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateKeypairResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Keypair` - if (jsonObj.get("Keypair") != null && !jsonObj.get("Keypair").isJsonNull()) { - KeypairCreated.validateJsonObject(jsonObj.getAsJsonObject("Keypair")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateKeypairResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateKeypairResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateKeypairResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateKeypairResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateKeypairResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateKeypairResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateKeypairResponse - * @throws IOException if the JSON string is invalid with respect to CreateKeypairResponse - */ - public static CreateKeypairResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateKeypairResponse.class); - } - - /** - * Convert an instance of CreateKeypairResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequest.java deleted file mode 100644 index ea37f566..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequest.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateListenerRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateListenerRuleRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LISTENER = "Listener"; - - @SerializedName(SERIALIZED_NAME_LISTENER) - private LoadBalancerLight listener; - - public static final String SERIALIZED_NAME_LISTENER_RULE = "ListenerRule"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE) - private ListenerRuleForCreation listenerRule; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = new ArrayList<>(); - - public CreateListenerRuleRequest() {} - - public CreateListenerRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateListenerRuleRequest listener(LoadBalancerLight listener) { - - this.listener = listener; - return this; - } - - /** - * Get listener - * - * @return listener - */ - @javax.annotation.Nonnull - public LoadBalancerLight getListener() { - return listener; - } - - public void setListener(LoadBalancerLight listener) { - this.listener = listener; - } - - public CreateListenerRuleRequest listenerRule(ListenerRuleForCreation listenerRule) { - - this.listenerRule = listenerRule; - return this; - } - - /** - * Get listenerRule - * - * @return listenerRule - */ - @javax.annotation.Nonnull - public ListenerRuleForCreation getListenerRule() { - return listenerRule; - } - - public void setListenerRule(ListenerRuleForCreation listenerRule) { - this.listenerRule = listenerRule; - } - - public CreateListenerRuleRequest vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public CreateListenerRuleRequest addVmIdsItem(String vmIdsItem) { - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * The IDs of the backend VMs. - * - * @return vmIds - */ - @javax.annotation.Nonnull - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateListenerRuleRequest createListenerRuleRequest = (CreateListenerRuleRequest) o; - return Objects.equals(this.dryRun, createListenerRuleRequest.dryRun) - && Objects.equals(this.listener, createListenerRuleRequest.listener) - && Objects.equals(this.listenerRule, createListenerRuleRequest.listenerRule) - && Objects.equals(this.vmIds, createListenerRuleRequest.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, listener, listenerRule, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateListenerRuleRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" listener: ").append(toIndentedString(listener)).append("\n"); - sb.append(" listenerRule: ").append(toIndentedString(listenerRule)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Listener"); - openapiFields.add("ListenerRule"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Listener"); - openapiRequiredFields.add("ListenerRule"); - openapiRequiredFields.add("VmIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateListenerRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateListenerRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateListenerRuleRequest is not" - + " found in the empty JSON string", - CreateListenerRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateListenerRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateListenerRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateListenerRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the required field `Listener` - LoadBalancerLight.validateJsonObject(jsonObj.getAsJsonObject("Listener")); - // validate the required field `ListenerRule` - ListenerRuleForCreation.validateJsonObject(jsonObj.getAsJsonObject("ListenerRule")); - // ensure the required json array is present - if (jsonObj.get("VmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateListenerRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateListenerRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateListenerRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateListenerRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateListenerRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateListenerRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateListenerRuleRequest - * @throws IOException if the JSON string is invalid with respect to CreateListenerRuleRequest - */ - public static CreateListenerRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateListenerRuleRequest.class); - } - - /** - * Convert an instance of CreateListenerRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponse.java deleted file mode 100644 index 0186a263..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateListenerRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateListenerRuleResponse { - public static final String SERIALIZED_NAME_LISTENER_RULE = "ListenerRule"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE) - private ListenerRule listenerRule; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateListenerRuleResponse() {} - - public CreateListenerRuleResponse listenerRule(ListenerRule listenerRule) { - - this.listenerRule = listenerRule; - return this; - } - - /** - * Get listenerRule - * - * @return listenerRule - */ - @javax.annotation.Nullable - public ListenerRule getListenerRule() { - return listenerRule; - } - - public void setListenerRule(ListenerRule listenerRule) { - this.listenerRule = listenerRule; - } - - public CreateListenerRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateListenerRuleResponse createListenerRuleResponse = (CreateListenerRuleResponse) o; - return Objects.equals(this.listenerRule, createListenerRuleResponse.listenerRule) - && Objects.equals(this.responseContext, createListenerRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(listenerRule, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateListenerRuleResponse {\n"); - sb.append(" listenerRule: ").append(toIndentedString(listenerRule)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ListenerRule"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateListenerRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateListenerRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateListenerRuleResponse is not" - + " found in the empty JSON string", - CreateListenerRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateListenerRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateListenerRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ListenerRule` - if (jsonObj.get("ListenerRule") != null && !jsonObj.get("ListenerRule").isJsonNull()) { - ListenerRule.validateJsonObject(jsonObj.getAsJsonObject("ListenerRule")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateListenerRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateListenerRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateListenerRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateListenerRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateListenerRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateListenerRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateListenerRuleResponse - * @throws IOException if the JSON string is invalid with respect to CreateListenerRuleResponse - */ - public static CreateListenerRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateListenerRuleResponse.class); - } - - /** - * Convert an instance of CreateListenerRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequest.java deleted file mode 100644 index e602ea48..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequest.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerListenersRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerListenersRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LISTENERS = "Listeners"; - - @SerializedName(SERIALIZED_NAME_LISTENERS) - private List listeners = new ArrayList<>(); - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public CreateLoadBalancerListenersRequest() {} - - public CreateLoadBalancerListenersRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateLoadBalancerListenersRequest listeners(List listeners) { - - this.listeners = listeners; - return this; - } - - public CreateLoadBalancerListenersRequest addListenersItem(ListenerForCreation listenersItem) { - this.listeners.add(listenersItem); - return this; - } - - /** - * One or more listeners for the load balancer. - * - * @return listeners - */ - @javax.annotation.Nonnull - public List getListeners() { - return listeners; - } - - public void setListeners(List listeners) { - this.listeners = listeners; - } - - public CreateLoadBalancerListenersRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer for which you want to create listeners. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest = - (CreateLoadBalancerListenersRequest) o; - return Objects.equals(this.dryRun, createLoadBalancerListenersRequest.dryRun) - && Objects.equals(this.listeners, createLoadBalancerListenersRequest.listeners) - && Objects.equals( - this.loadBalancerName, createLoadBalancerListenersRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, listeners, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerListenersRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" listeners: ").append(toIndentedString(listeners)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Listeners"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Listeners"); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerListenersRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerListenersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerListenersRequest is" - + " not found in the empty JSON string", - CreateLoadBalancerListenersRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerListenersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerListenersRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateLoadBalancerListenersRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the json data is an array - if (!jsonObj.get("Listeners").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Listeners` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Listeners").toString())); - } - - JsonArray jsonArraylisteners = jsonObj.getAsJsonArray("Listeners"); - // validate the required field `Listeners` (array) - for (int i = 0; i < jsonArraylisteners.size(); i++) { - ListenerForCreation.validateJsonObject(jsonArraylisteners.get(i).getAsJsonObject()); - } - ; - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerListenersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerListenersRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerListenersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerListenersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerListenersRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerListenersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerListenersRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerListenersRequest - */ - public static CreateLoadBalancerListenersRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerListenersRequest.class); - } - - /** - * Convert an instance of CreateLoadBalancerListenersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponse.java deleted file mode 100644 index f51f3d25..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponse.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerListenersResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerListenersResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateLoadBalancerListenersResponse() {} - - public CreateLoadBalancerListenersResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public CreateLoadBalancerListenersResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerListenersResponse createLoadBalancerListenersResponse = - (CreateLoadBalancerListenersResponse) o; - return Objects.equals(this.loadBalancer, createLoadBalancerListenersResponse.loadBalancer) - && Objects.equals( - this.responseContext, createLoadBalancerListenersResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerListenersResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerListenersResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerListenersResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerListenersResponse" - + " is not found in the empty JSON string", - CreateLoadBalancerListenersResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerListenersResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerListenersResponse` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerListenersResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerListenersResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerListenersResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerListenersResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerListenersResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerListenersResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerListenersResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerListenersResponse - */ - public static CreateLoadBalancerListenersResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerListenersResponse.class); - } - - /** - * Convert an instance of CreateLoadBalancerListenersResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequest.java deleted file mode 100644 index 17661622..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequest.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerPolicyRequest { - public static final String SERIALIZED_NAME_COOKIE_EXPIRATION_PERIOD = "CookieExpirationPeriod"; - - @SerializedName(SERIALIZED_NAME_COOKIE_EXPIRATION_PERIOD) - private Integer cookieExpirationPeriod; - - public static final String SERIALIZED_NAME_COOKIE_NAME = "CookieName"; - - @SerializedName(SERIALIZED_NAME_COOKIE_NAME) - private String cookieName; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public static final String SERIALIZED_NAME_POLICY_TYPE = "PolicyType"; - - @SerializedName(SERIALIZED_NAME_POLICY_TYPE) - private String policyType; - - public CreateLoadBalancerPolicyRequest() {} - - public CreateLoadBalancerPolicyRequest cookieExpirationPeriod(Integer cookieExpirationPeriod) { - - this.cookieExpirationPeriod = cookieExpirationPeriod; - return this; - } - - /** - * The lifetime of the cookie, in seconds. If not specified, the default value of this parameter - * is `1`, which means that the sticky session lasts for the duration of the browser - * session. - * - * @return cookieExpirationPeriod - */ - @javax.annotation.Nullable - public Integer getCookieExpirationPeriod() { - return cookieExpirationPeriod; - } - - public void setCookieExpirationPeriod(Integer cookieExpirationPeriod) { - this.cookieExpirationPeriod = cookieExpirationPeriod; - } - - public CreateLoadBalancerPolicyRequest cookieName(String cookieName) { - - this.cookieName = cookieName; - return this; - } - - /** - * The name of the application cookie used for stickiness. This parameter is required if you - * create a stickiness policy based on an application-generated cookie. - * - * @return cookieName - */ - @javax.annotation.Nullable - public String getCookieName() { - return cookieName; - } - - public void setCookieName(String cookieName) { - this.cookieName = cookieName; - } - - public CreateLoadBalancerPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateLoadBalancerPolicyRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer for which you want to create a policy. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public CreateLoadBalancerPolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The unique name of the policy, with a maximum length of 32 alphanumeric characters and dashes - * (-). - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - public CreateLoadBalancerPolicyRequest policyType(String policyType) { - - this.policyType = policyType; - return this; - } - - /** - * The type of stickiness policy you want to create: `app` or - * `load_balancer`. - * - * @return policyType - */ - @javax.annotation.Nonnull - public String getPolicyType() { - return policyType; - } - - public void setPolicyType(String policyType) { - this.policyType = policyType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest = - (CreateLoadBalancerPolicyRequest) o; - return Objects.equals( - this.cookieExpirationPeriod, - createLoadBalancerPolicyRequest.cookieExpirationPeriod) - && Objects.equals(this.cookieName, createLoadBalancerPolicyRequest.cookieName) - && Objects.equals(this.dryRun, createLoadBalancerPolicyRequest.dryRun) - && Objects.equals( - this.loadBalancerName, createLoadBalancerPolicyRequest.loadBalancerName) - && Objects.equals(this.policyName, createLoadBalancerPolicyRequest.policyName) - && Objects.equals(this.policyType, createLoadBalancerPolicyRequest.policyType); - } - - @Override - public int hashCode() { - return Objects.hash( - cookieExpirationPeriod, - cookieName, - dryRun, - loadBalancerName, - policyName, - policyType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerPolicyRequest {\n"); - sb.append(" cookieExpirationPeriod: ") - .append(toIndentedString(cookieExpirationPeriod)) - .append("\n"); - sb.append(" cookieName: ").append(toIndentedString(cookieName)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CookieExpirationPeriod"); - openapiFields.add("CookieName"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("PolicyName"); - openapiFields.add("PolicyType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - openapiRequiredFields.add("PolicyName"); - openapiRequiredFields.add("PolicyType"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerPolicyRequest is" - + " not found in the empty JSON string", - CreateLoadBalancerPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateLoadBalancerPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("CookieName") != null && !jsonObj.get("CookieName").isJsonNull()) - && !jsonObj.get("CookieName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CookieName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CookieName").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - if (!jsonObj.get("PolicyType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerPolicyRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerPolicyRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerPolicyRequest - */ - public static CreateLoadBalancerPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerPolicyRequest.class); - } - - /** - * Convert an instance of CreateLoadBalancerPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponse.java deleted file mode 100644 index 1565c017..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponse.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerPolicyResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateLoadBalancerPolicyResponse() {} - - public CreateLoadBalancerPolicyResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public CreateLoadBalancerPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerPolicyResponse createLoadBalancerPolicyResponse = - (CreateLoadBalancerPolicyResponse) o; - return Objects.equals(this.loadBalancer, createLoadBalancerPolicyResponse.loadBalancer) - && Objects.equals( - this.responseContext, createLoadBalancerPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerPolicyResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerPolicyResponse is" - + " not found in the empty JSON string", - CreateLoadBalancerPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerPolicyResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerPolicyResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerPolicyResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerPolicyResponse - */ - public static CreateLoadBalancerPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerPolicyResponse.class); - } - - /** - * Convert an instance of CreateLoadBalancerPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequest.java deleted file mode 100644 index e12edb3d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequest.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LISTENERS = "Listeners"; - - @SerializedName(SERIALIZED_NAME_LISTENERS) - private List listeners = new ArrayList<>(); - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_TYPE = "LoadBalancerType"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_TYPE) - private String loadBalancerType; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_SUBNETS = "Subnets"; - - @SerializedName(SERIALIZED_NAME_SUBNETS) - private List subnets = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public CreateLoadBalancerRequest() {} - - public CreateLoadBalancerRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateLoadBalancerRequest listeners(List listeners) { - - this.listeners = listeners; - return this; - } - - public CreateLoadBalancerRequest addListenersItem(ListenerForCreation listenersItem) { - this.listeners.add(listenersItem); - return this; - } - - /** - * One or more listeners to create. - * - * @return listeners - */ - @javax.annotation.Nonnull - public List getListeners() { - return listeners; - } - - public void setListeners(List listeners) { - this.listeners = listeners; - } - - public CreateLoadBalancerRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The unique name of the load balancer, with a maximum length of 32 alphanumeric characters and - * dashes (-). This name must not start or end with a dash. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public CreateLoadBalancerRequest loadBalancerType(String loadBalancerType) { - - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * The type of load balancer: `internet-facing` or `internal`. Use this - * parameter only for load balancers in a Net. - * - * @return loadBalancerType - */ - @javax.annotation.Nullable - public String getLoadBalancerType() { - return loadBalancerType; - } - - public void setLoadBalancerType(String loadBalancerType) { - this.loadBalancerType = loadBalancerType; - } - - public CreateLoadBalancerRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * (internet-facing only) The public IP you want to associate with the load balancer. If not - * specified, a public IP owned by 3DS OUTSCALE is associated. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public CreateLoadBalancerRequest securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public CreateLoadBalancerRequest addSecurityGroupsItem(String securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * (Net only) One or more IDs of security groups you want to assign to the load balancer. If not - * specified, the default security group of the Net is assigned to the load balancer. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public CreateLoadBalancerRequest subnets(List subnets) { - - this.subnets = subnets; - return this; - } - - public CreateLoadBalancerRequest addSubnetsItem(String subnetsItem) { - if (this.subnets == null) { - this.subnets = new ArrayList<>(); - } - this.subnets.add(subnetsItem); - return this; - } - - /** - * (Net only) The ID of the Subnet in which you want to create the load balancer. Regardless of - * this Subnet, the load balancer can distribute traffic to all Subnets. This parameter is - * required in a Net. - * - * @return subnets - */ - @javax.annotation.Nullable - public List getSubnets() { - return subnets; - } - - public void setSubnets(List subnets) { - this.subnets = subnets; - } - - public CreateLoadBalancerRequest subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public CreateLoadBalancerRequest addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * (public Cloud only) The Subregion in which you want to create the load balancer. Regardless - * of this Subregion, the load balancer can distribute traffic to all Subregions. This parameter - * is required in the public Cloud. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public CreateLoadBalancerRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public CreateLoadBalancerRequest addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags assigned to the load balancer. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerRequest createLoadBalancerRequest = (CreateLoadBalancerRequest) o; - return Objects.equals(this.dryRun, createLoadBalancerRequest.dryRun) - && Objects.equals(this.listeners, createLoadBalancerRequest.listeners) - && Objects.equals(this.loadBalancerName, createLoadBalancerRequest.loadBalancerName) - && Objects.equals(this.loadBalancerType, createLoadBalancerRequest.loadBalancerType) - && Objects.equals(this.publicIp, createLoadBalancerRequest.publicIp) - && Objects.equals(this.securityGroups, createLoadBalancerRequest.securityGroups) - && Objects.equals(this.subnets, createLoadBalancerRequest.subnets) - && Objects.equals(this.subregionNames, createLoadBalancerRequest.subregionNames) - && Objects.equals(this.tags, createLoadBalancerRequest.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - dryRun, - listeners, - loadBalancerName, - loadBalancerType, - publicIp, - securityGroups, - subnets, - subregionNames, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" listeners: ").append(toIndentedString(listeners)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" loadBalancerType: ").append(toIndentedString(loadBalancerType)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" subnets: ").append(toIndentedString(subnets)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Listeners"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("LoadBalancerType"); - openapiFields.add("PublicIp"); - openapiFields.add("SecurityGroups"); - openapiFields.add("Subnets"); - openapiFields.add("SubregionNames"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Listeners"); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateLoadBalancerRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerRequest is not" - + " found in the empty JSON string", - CreateLoadBalancerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateLoadBalancerRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the json data is an array - if (!jsonObj.get("Listeners").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Listeners` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Listeners").toString())); - } - - JsonArray jsonArraylisteners = jsonObj.getAsJsonArray("Listeners"); - // validate the required field `Listeners` (array) - for (int i = 0; i < jsonArraylisteners.size(); i++) { - ListenerForCreation.validateJsonObject(jsonArraylisteners.get(i).getAsJsonObject()); - } - ; - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - if ((jsonObj.get("LoadBalancerType") != null - && !jsonObj.get("LoadBalancerType").isJsonNull()) - && !jsonObj.get("LoadBalancerType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerType").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Subnets") != null && !jsonObj.get("Subnets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Subnets` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Subnets").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateLoadBalancerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerRequest - * @throws IOException if the JSON string is invalid with respect to CreateLoadBalancerRequest - */ - public static CreateLoadBalancerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerRequest.class); - } - - /** - * Convert an instance of CreateLoadBalancerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponse.java deleted file mode 100644 index 6a635a28..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateLoadBalancerResponse() {} - - public CreateLoadBalancerResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public CreateLoadBalancerResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerResponse createLoadBalancerResponse = (CreateLoadBalancerResponse) o; - return Objects.equals(this.loadBalancer, createLoadBalancerResponse.loadBalancer) - && Objects.equals(this.responseContext, createLoadBalancerResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateLoadBalancerResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerResponse is not" - + " found in the empty JSON string", - CreateLoadBalancerResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateLoadBalancerResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerResponse - * @throws IOException if the JSON string is invalid with respect to CreateLoadBalancerResponse - */ - public static CreateLoadBalancerResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerResponse.class); - } - - /** - * Convert an instance of CreateLoadBalancerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequest.java deleted file mode 100644 index a3714e66..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequest.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAMES = "LoadBalancerNames"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAMES) - private List loadBalancerNames = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList<>(); - - public CreateLoadBalancerTagsRequest() {} - - public CreateLoadBalancerTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateLoadBalancerTagsRequest loadBalancerNames(List loadBalancerNames) { - - this.loadBalancerNames = loadBalancerNames; - return this; - } - - public CreateLoadBalancerTagsRequest addLoadBalancerNamesItem(String loadBalancerNamesItem) { - this.loadBalancerNames.add(loadBalancerNamesItem); - return this; - } - - /** - * One or more load balancer names. - * - * @return loadBalancerNames - */ - @javax.annotation.Nonnull - public List getLoadBalancerNames() { - return loadBalancerNames; - } - - public void setLoadBalancerNames(List loadBalancerNames) { - this.loadBalancerNames = loadBalancerNames; - } - - public CreateLoadBalancerTagsRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public CreateLoadBalancerTagsRequest addTagsItem(ResourceTag tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to add to the specified load balancers. - * - * @return tags - */ - @javax.annotation.Nonnull - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest = - (CreateLoadBalancerTagsRequest) o; - return Objects.equals(this.dryRun, createLoadBalancerTagsRequest.dryRun) - && Objects.equals( - this.loadBalancerNames, createLoadBalancerTagsRequest.loadBalancerNames) - && Objects.equals(this.tags, createLoadBalancerTagsRequest.tags); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerNames, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerNames: ") - .append(toIndentedString(loadBalancerNames)) - .append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerNames"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerNames"); - openapiRequiredFields.add("Tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerTagsRequest is not" - + " found in the empty JSON string", - CreateLoadBalancerTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateLoadBalancerTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("LoadBalancerNames") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("LoadBalancerNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancerNames").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - // validate the required field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerTagsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerTagsRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerTagsRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerTagsRequest - */ - public static CreateLoadBalancerTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerTagsRequest.class); - } - - /** - * Convert an instance of CreateLoadBalancerTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponse.java deleted file mode 100644 index fd4e30c8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponse.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateLoadBalancerTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateLoadBalancerTagsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateLoadBalancerTagsResponse() {} - - public CreateLoadBalancerTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLoadBalancerTagsResponse createLoadBalancerTagsResponse = - (CreateLoadBalancerTagsResponse) o; - return Objects.equals(this.responseContext, createLoadBalancerTagsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLoadBalancerTagsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateLoadBalancerTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLoadBalancerTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateLoadBalancerTagsResponse is not" - + " found in the empty JSON string", - CreateLoadBalancerTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateLoadBalancerTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateLoadBalancerTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLoadBalancerTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLoadBalancerTagsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateLoadBalancerTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLoadBalancerTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateLoadBalancerTagsResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLoadBalancerTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLoadBalancerTagsResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateLoadBalancerTagsResponse - */ - public static CreateLoadBalancerTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLoadBalancerTagsResponse.class); - } - - /** - * Convert an instance of CreateLoadBalancerTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequest.java deleted file mode 100644 index ef67dd6f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequest.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNatServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNatServiceRequest { - public static final String SERIALIZED_NAME_CLIENT_TOKEN = "ClientToken"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKEN) - private String clientToken; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public CreateNatServiceRequest() {} - - public CreateNatServiceRequest clientToken(String clientToken) { - - this.clientToken = clientToken; - return this; - } - - /** - * A unique identifier which enables you to manage the idempotency. - * - * @return clientToken - */ - @javax.annotation.Nullable - public String getClientToken() { - return clientToken; - } - - public void setClientToken(String clientToken) { - this.clientToken = clientToken; - } - - public CreateNatServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateNatServiceRequest publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The allocation ID of the public IP to associate with the NAT service.<br /> If the - * public IP is already associated with another resource, you must first disassociate it. - * - * @return publicIpId - */ - @javax.annotation.Nonnull - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - public CreateNatServiceRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet in which you want to create the NAT service. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNatServiceRequest createNatServiceRequest = (CreateNatServiceRequest) o; - return Objects.equals(this.clientToken, createNatServiceRequest.clientToken) - && Objects.equals(this.dryRun, createNatServiceRequest.dryRun) - && Objects.equals(this.publicIpId, createNatServiceRequest.publicIpId) - && Objects.equals(this.subnetId, createNatServiceRequest.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(clientToken, dryRun, publicIpId, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNatServiceRequest {\n"); - sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientToken"); - openapiFields.add("DryRun"); - openapiFields.add("PublicIpId"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PublicIpId"); - openapiRequiredFields.add("SubnetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNatServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNatServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNatServiceRequest is not found" - + " in the empty JSON string", - CreateNatServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNatServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNatServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateNatServiceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("ClientToken") != null && !jsonObj.get("ClientToken").isJsonNull()) - && !jsonObj.get("ClientToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ClientToken").toString())); - } - if (!jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNatServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNatServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNatServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNatServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNatServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNatServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNatServiceRequest - * @throws IOException if the JSON string is invalid with respect to CreateNatServiceRequest - */ - public static CreateNatServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNatServiceRequest.class); - } - - /** - * Convert an instance of CreateNatServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponse.java deleted file mode 100644 index 17a7928a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNatServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNatServiceResponse { - public static final String SERIALIZED_NAME_NAT_SERVICE = "NatService"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE) - private NatService natService; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateNatServiceResponse() {} - - public CreateNatServiceResponse natService(NatService natService) { - - this.natService = natService; - return this; - } - - /** - * Get natService - * - * @return natService - */ - @javax.annotation.Nullable - public NatService getNatService() { - return natService; - } - - public void setNatService(NatService natService) { - this.natService = natService; - } - - public CreateNatServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNatServiceResponse createNatServiceResponse = (CreateNatServiceResponse) o; - return Objects.equals(this.natService, createNatServiceResponse.natService) - && Objects.equals(this.responseContext, createNatServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(natService, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNatServiceResponse {\n"); - sb.append(" natService: ").append(toIndentedString(natService)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NatService"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNatServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNatServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNatServiceResponse is not found" - + " in the empty JSON string", - CreateNatServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNatServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNatServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NatService` - if (jsonObj.get("NatService") != null && !jsonObj.get("NatService").isJsonNull()) { - NatService.validateJsonObject(jsonObj.getAsJsonObject("NatService")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNatServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNatServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNatServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNatServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNatServiceResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNatServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNatServiceResponse - * @throws IOException if the JSON string is invalid with respect to CreateNatServiceResponse - */ - public static CreateNatServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNatServiceResponse.class); - } - - /** - * Convert an instance of CreateNatServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequest.java deleted file mode 100644 index 4793b4a4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequest.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetAccessPointRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetAccessPointRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_IDS = "RouteTableIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_IDS) - private List routeTableIds = null; - - public static final String SERIALIZED_NAME_SERVICE_NAME = "ServiceName"; - - @SerializedName(SERIALIZED_NAME_SERVICE_NAME) - private String serviceName; - - public CreateNetAccessPointRequest() {} - - public CreateNetAccessPointRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateNetAccessPointRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public CreateNetAccessPointRequest routeTableIds(List routeTableIds) { - - this.routeTableIds = routeTableIds; - return this; - } - - public CreateNetAccessPointRequest addRouteTableIdsItem(String routeTableIdsItem) { - if (this.routeTableIds == null) { - this.routeTableIds = new ArrayList<>(); - } - this.routeTableIds.add(routeTableIdsItem); - return this; - } - - /** - * One or more IDs of route tables to use for the connection. - * - * @return routeTableIds - */ - @javax.annotation.Nullable - public List getRouteTableIds() { - return routeTableIds; - } - - public void setRouteTableIds(List routeTableIds) { - this.routeTableIds = routeTableIds; - } - - public CreateNetAccessPointRequest serviceName(String serviceName) { - - this.serviceName = serviceName; - return this; - } - - /** - * The name of the service (in the format `com.outscale.region.service`). - * - * @return serviceName - */ - @javax.annotation.Nonnull - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetAccessPointRequest createNetAccessPointRequest = (CreateNetAccessPointRequest) o; - return Objects.equals(this.dryRun, createNetAccessPointRequest.dryRun) - && Objects.equals(this.netId, createNetAccessPointRequest.netId) - && Objects.equals(this.routeTableIds, createNetAccessPointRequest.routeTableIds) - && Objects.equals(this.serviceName, createNetAccessPointRequest.serviceName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netId, routeTableIds, serviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetAccessPointRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" routeTableIds: ").append(toIndentedString(routeTableIds)).append("\n"); - sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - openapiFields.add("RouteTableIds"); - openapiFields.add("ServiceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetId"); - openapiRequiredFields.add("ServiceName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNetAccessPointRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetAccessPointRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetAccessPointRequest is not" - + " found in the empty JSON string", - CreateNetAccessPointRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetAccessPointRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetAccessPointRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateNetAccessPointRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteTableIds") != null && !jsonObj.get("RouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("RouteTableIds").toString())); - } - if (!jsonObj.get("ServiceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ServiceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetAccessPointRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetAccessPointRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNetAccessPointRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetAccessPointRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetAccessPointRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetAccessPointRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetAccessPointRequest - * @throws IOException if the JSON string is invalid with respect to CreateNetAccessPointRequest - */ - public static CreateNetAccessPointRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetAccessPointRequest.class); - } - - /** - * Convert an instance of CreateNetAccessPointRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponse.java deleted file mode 100644 index 397588b8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetAccessPointResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetAccessPointResponse { - public static final String SERIALIZED_NAME_NET_ACCESS_POINT = "NetAccessPoint"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT) - private NetAccessPoint netAccessPoint; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateNetAccessPointResponse() {} - - public CreateNetAccessPointResponse netAccessPoint(NetAccessPoint netAccessPoint) { - - this.netAccessPoint = netAccessPoint; - return this; - } - - /** - * Get netAccessPoint - * - * @return netAccessPoint - */ - @javax.annotation.Nullable - public NetAccessPoint getNetAccessPoint() { - return netAccessPoint; - } - - public void setNetAccessPoint(NetAccessPoint netAccessPoint) { - this.netAccessPoint = netAccessPoint; - } - - public CreateNetAccessPointResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetAccessPointResponse createNetAccessPointResponse = - (CreateNetAccessPointResponse) o; - return Objects.equals(this.netAccessPoint, createNetAccessPointResponse.netAccessPoint) - && Objects.equals( - this.responseContext, createNetAccessPointResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netAccessPoint, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetAccessPointResponse {\n"); - sb.append(" netAccessPoint: ").append(toIndentedString(netAccessPoint)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetAccessPoint"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateNetAccessPointResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetAccessPointResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetAccessPointResponse is not" - + " found in the empty JSON string", - CreateNetAccessPointResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetAccessPointResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetAccessPointResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NetAccessPoint` - if (jsonObj.get("NetAccessPoint") != null && !jsonObj.get("NetAccessPoint").isJsonNull()) { - NetAccessPoint.validateJsonObject(jsonObj.getAsJsonObject("NetAccessPoint")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetAccessPointResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetAccessPointResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateNetAccessPointResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetAccessPointResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetAccessPointResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetAccessPointResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetAccessPointResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateNetAccessPointResponse - */ - public static CreateNetAccessPointResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetAccessPointResponse.class); - } - - /** - * Convert an instance of CreateNetAccessPointResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequest.java deleted file mode 100644 index b86573af..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetPeeringRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetPeeringRequest { - public static final String SERIALIZED_NAME_ACCEPTER_NET_ID = "AccepterNetId"; - - @SerializedName(SERIALIZED_NAME_ACCEPTER_NET_ID) - private String accepterNetId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_SOURCE_NET_ID = "SourceNetId"; - - @SerializedName(SERIALIZED_NAME_SOURCE_NET_ID) - private String sourceNetId; - - public CreateNetPeeringRequest() {} - - public CreateNetPeeringRequest accepterNetId(String accepterNetId) { - - this.accepterNetId = accepterNetId; - return this; - } - - /** - * The ID of the Net you want to connect with. - * - * @return accepterNetId - */ - @javax.annotation.Nonnull - public String getAccepterNetId() { - return accepterNetId; - } - - public void setAccepterNetId(String accepterNetId) { - this.accepterNetId = accepterNetId; - } - - public CreateNetPeeringRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateNetPeeringRequest sourceNetId(String sourceNetId) { - - this.sourceNetId = sourceNetId; - return this; - } - - /** - * The ID of the Net you send the peering request from. - * - * @return sourceNetId - */ - @javax.annotation.Nonnull - public String getSourceNetId() { - return sourceNetId; - } - - public void setSourceNetId(String sourceNetId) { - this.sourceNetId = sourceNetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetPeeringRequest createNetPeeringRequest = (CreateNetPeeringRequest) o; - return Objects.equals(this.accepterNetId, createNetPeeringRequest.accepterNetId) - && Objects.equals(this.dryRun, createNetPeeringRequest.dryRun) - && Objects.equals(this.sourceNetId, createNetPeeringRequest.sourceNetId); - } - - @Override - public int hashCode() { - return Objects.hash(accepterNetId, dryRun, sourceNetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetPeeringRequest {\n"); - sb.append(" accepterNetId: ").append(toIndentedString(accepterNetId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" sourceNetId: ").append(toIndentedString(sourceNetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccepterNetId"); - openapiFields.add("DryRun"); - openapiFields.add("SourceNetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AccepterNetId"); - openapiRequiredFields.add("SourceNetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNetPeeringRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetPeeringRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetPeeringRequest is not found" - + " in the empty JSON string", - CreateNetPeeringRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetPeeringRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetPeeringRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateNetPeeringRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("AccepterNetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccepterNetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccepterNetId").toString())); - } - if (!jsonObj.get("SourceNetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceNetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SourceNetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetPeeringRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetPeeringRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNetPeeringRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetPeeringRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetPeeringRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetPeeringRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetPeeringRequest - * @throws IOException if the JSON string is invalid with respect to CreateNetPeeringRequest - */ - public static CreateNetPeeringRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetPeeringRequest.class); - } - - /** - * Convert an instance of CreateNetPeeringRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponse.java deleted file mode 100644 index 9c5bb32b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetPeeringResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetPeeringResponse { - public static final String SERIALIZED_NAME_NET_PEERING = "NetPeering"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING) - private NetPeering netPeering; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateNetPeeringResponse() {} - - public CreateNetPeeringResponse netPeering(NetPeering netPeering) { - - this.netPeering = netPeering; - return this; - } - - /** - * Get netPeering - * - * @return netPeering - */ - @javax.annotation.Nullable - public NetPeering getNetPeering() { - return netPeering; - } - - public void setNetPeering(NetPeering netPeering) { - this.netPeering = netPeering; - } - - public CreateNetPeeringResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetPeeringResponse createNetPeeringResponse = (CreateNetPeeringResponse) o; - return Objects.equals(this.netPeering, createNetPeeringResponse.netPeering) - && Objects.equals(this.responseContext, createNetPeeringResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netPeering, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetPeeringResponse {\n"); - sb.append(" netPeering: ").append(toIndentedString(netPeering)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetPeering"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNetPeeringResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetPeeringResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetPeeringResponse is not found" - + " in the empty JSON string", - CreateNetPeeringResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetPeeringResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetPeeringResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NetPeering` - if (jsonObj.get("NetPeering") != null && !jsonObj.get("NetPeering").isJsonNull()) { - NetPeering.validateJsonObject(jsonObj.getAsJsonObject("NetPeering")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetPeeringResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetPeeringResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNetPeeringResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetPeeringResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetPeeringResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetPeeringResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetPeeringResponse - * @throws IOException if the JSON string is invalid with respect to CreateNetPeeringResponse - */ - public static CreateNetPeeringResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetPeeringResponse.class); - } - - /** - * Convert an instance of CreateNetPeeringResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequest.java deleted file mode 100644 index 80ecf3f8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_TENANCY = "Tenancy"; - - @SerializedName(SERIALIZED_NAME_TENANCY) - private String tenancy; - - public CreateNetRequest() {} - - public CreateNetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateNetRequest ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nonnull - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public CreateNetRequest tenancy(String tenancy) { - - this.tenancy = tenancy; - return this; - } - - /** - * The tenancy options for the VMs:<br /> - `default` if a VM created in a Net - * can be launched with any tenancy.<br /> - `dedicated` if it can be launched - * with dedicated tenancy VMs running on single-tenant hardware.<br /> - `dedicated - * group ID`: if it can be launched in a dedicated group on single-tenant hardware. - * - * @return tenancy - */ - @javax.annotation.Nullable - public String getTenancy() { - return tenancy; - } - - public void setTenancy(String tenancy) { - this.tenancy = tenancy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetRequest createNetRequest = (CreateNetRequest) o; - return Objects.equals(this.dryRun, createNetRequest.dryRun) - && Objects.equals(this.ipRange, createNetRequest.ipRange) - && Objects.equals(this.tenancy, createNetRequest.tenancy); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, ipRange, tenancy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" tenancy: ").append(toIndentedString(tenancy)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("IpRange"); - openapiFields.add("Tenancy"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("IpRange"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetRequest is not found in the" - + " empty JSON string", - CreateNetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateNetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if ((jsonObj.get("Tenancy") != null && !jsonObj.get("Tenancy").isJsonNull()) - && !jsonObj.get("Tenancy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tenancy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Tenancy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetRequest - * @throws IOException if the JSON string is invalid with respect to CreateNetRequest - */ - public static CreateNetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetRequest.class); - } - - /** - * Convert an instance of CreateNetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponse.java deleted file mode 100644 index 5fbfee69..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNetResponse { - public static final String SERIALIZED_NAME_NET = "Net"; - - @SerializedName(SERIALIZED_NAME_NET) - private Net net; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateNetResponse() {} - - public CreateNetResponse net(Net net) { - - this.net = net; - return this; - } - - /** - * Get net - * - * @return net - */ - @javax.annotation.Nullable - public Net getNet() { - return net; - } - - public void setNet(Net net) { - this.net = net; - } - - public CreateNetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNetResponse createNetResponse = (CreateNetResponse) o; - return Objects.equals(this.net, createNetResponse.net) - && Objects.equals(this.responseContext, createNetResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(net, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNetResponse {\n"); - sb.append(" net: ").append(toIndentedString(net)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Net"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNetResponse is not found in the" - + " empty JSON string", - CreateNetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Net` - if (jsonObj.get("Net") != null && !jsonObj.get("Net").isJsonNull()) { - Net.validateJsonObject(jsonObj.getAsJsonObject("Net")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNetResponse - * @throws IOException if the JSON string is invalid with respect to CreateNetResponse - */ - public static CreateNetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNetResponse.class); - } - - /** - * Convert an instance of CreateNetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequest.java deleted file mode 100644 index c830ce77..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequest.java +++ /dev/null @@ -1,377 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNicRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNicRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public CreateNicRequest() {} - - public CreateNicRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the NIC. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateNicRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateNicRequest privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public CreateNicRequest addPrivateIpsItem(PrivateIpLight privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The primary private IP for the NIC.<br /> This IP must be within the IP range of the - * Subnet that you specify with the `SubnetId` attribute.<br /> If you do not - * specify this attribute, a random private IP is selected within the IP range of the Subnet. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public CreateNicRequest securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public CreateNicRequest addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the NIC. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public CreateNicRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet in which you want to create the NIC. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNicRequest createNicRequest = (CreateNicRequest) o; - return Objects.equals(this.description, createNicRequest.description) - && Objects.equals(this.dryRun, createNicRequest.dryRun) - && Objects.equals(this.privateIps, createNicRequest.privateIps) - && Objects.equals(this.securityGroupIds, createNicRequest.securityGroupIds) - && Objects.equals(this.subnetId, createNicRequest.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, privateIps, securityGroupIds, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNicRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("SubnetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNicRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNicRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNicRequest is not found in the" - + " empty JSON string", - CreateNicRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNicRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNicRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateNicRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonNull()) { - JsonArray jsonArrayprivateIps = jsonObj.getAsJsonArray("PrivateIps"); - if (jsonArrayprivateIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIps").toString())); - } - - // validate the optional field `PrivateIps` (array) - for (int i = 0; i < jsonArrayprivateIps.size(); i++) { - PrivateIpLight.validateJsonObject(jsonArrayprivateIps.get(i).getAsJsonObject()); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNicRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNicRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNicRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNicRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNicRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNicRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNicRequest - * @throws IOException if the JSON string is invalid with respect to CreateNicRequest - */ - public static CreateNicRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNicRequest.class); - } - - /** - * Convert an instance of CreateNicRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponse.java deleted file mode 100644 index 76881453..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateNicResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateNicResponse { - public static final String SERIALIZED_NAME_NIC = "Nic"; - - @SerializedName(SERIALIZED_NAME_NIC) - private Nic nic; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateNicResponse() {} - - public CreateNicResponse nic(Nic nic) { - - this.nic = nic; - return this; - } - - /** - * Get nic - * - * @return nic - */ - @javax.annotation.Nullable - public Nic getNic() { - return nic; - } - - public void setNic(Nic nic) { - this.nic = nic; - } - - public CreateNicResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateNicResponse createNicResponse = (CreateNicResponse) o; - return Objects.equals(this.nic, createNicResponse.nic) - && Objects.equals(this.responseContext, createNicResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(nic, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateNicResponse {\n"); - sb.append(" nic: ").append(toIndentedString(nic)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Nic"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateNicResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateNicResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateNicResponse is not found in the" - + " empty JSON string", - CreateNicResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateNicResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateNicResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Nic` - if (jsonObj.get("Nic") != null && !jsonObj.get("Nic").isJsonNull()) { - Nic.validateJsonObject(jsonObj.getAsJsonObject("Nic")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateNicResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateNicResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateNicResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateNicResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateNicResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateNicResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateNicResponse - * @throws IOException if the JSON string is invalid with respect to CreateNicResponse - */ - public static CreateNicResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateNicResponse.class); - } - - /** - * Convert an instance of CreateNicResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequest.java deleted file mode 100644 index 7022fd1a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequest.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePolicyRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DOCUMENT = "Document"; - - @SerializedName(SERIALIZED_NAME_DOCUMENT) - private String document; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public CreatePolicyRequest() {} - - public CreatePolicyRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the policy. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreatePolicyRequest document(String document) { - - this.document = document; - return this; - } - - /** - * The policy document, corresponding to a JSON string that contains the policy. For more - * information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and [EIM - * Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html). - * - * @return document - */ - @javax.annotation.Nonnull - public String getDocument() { - return document; - } - - public void setDocument(String document) { - this.document = document; - } - - public CreatePolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreatePolicyRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path of the policy. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public CreatePolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy. - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePolicyRequest createPolicyRequest = (CreatePolicyRequest) o; - return Objects.equals(this.description, createPolicyRequest.description) - && Objects.equals(this.document, createPolicyRequest.document) - && Objects.equals(this.dryRun, createPolicyRequest.dryRun) - && Objects.equals(this.path, createPolicyRequest.path) - && Objects.equals(this.policyName, createPolicyRequest.policyName); - } - - @Override - public int hashCode() { - return Objects.hash(description, document, dryRun, path, policyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePolicyRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" document: ").append(toIndentedString(document)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("Document"); - openapiFields.add("DryRun"); - openapiFields.add("Path"); - openapiFields.add("PolicyName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Document"); - openapiRequiredFields.add("PolicyName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePolicyRequest is not found in" - + " the empty JSON string", - CreatePolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (!jsonObj.get("Document").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Document` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Document").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePolicyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePolicyRequest - * @throws IOException if the JSON string is invalid with respect to CreatePolicyRequest - */ - public static CreatePolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePolicyRequest.class); - } - - /** - * Convert an instance of CreatePolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponse.java deleted file mode 100644 index 203f1bc6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePolicyResponse { - public static final String SERIALIZED_NAME_POLICY = "Policy"; - - @SerializedName(SERIALIZED_NAME_POLICY) - private Policy policy; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreatePolicyResponse() {} - - public CreatePolicyResponse policy(Policy policy) { - - this.policy = policy; - return this; - } - - /** - * Get policy - * - * @return policy - */ - @javax.annotation.Nullable - public Policy getPolicy() { - return policy; - } - - public void setPolicy(Policy policy) { - this.policy = policy; - } - - public CreatePolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePolicyResponse createPolicyResponse = (CreatePolicyResponse) o; - return Objects.equals(this.policy, createPolicyResponse.policy) - && Objects.equals(this.responseContext, createPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(policy, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePolicyResponse {\n"); - sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Policy"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePolicyResponse is not found in" - + " the empty JSON string", - CreatePolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Policy` - if (jsonObj.get("Policy") != null && !jsonObj.get("Policy").isJsonNull()) { - Policy.validateJsonObject(jsonObj.getAsJsonObject("Policy")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePolicyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePolicyResponse - * @throws IOException if the JSON string is invalid with respect to CreatePolicyResponse - */ - public static CreatePolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePolicyResponse.class); - } - - /** - * Convert an instance of CreatePolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequest.java deleted file mode 100644 index 939736d5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePolicyVersionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePolicyVersionRequest { - public static final String SERIALIZED_NAME_DOCUMENT = "Document"; - - @SerializedName(SERIALIZED_NAME_DOCUMENT) - private String document; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_SET_AS_DEFAULT = "SetAsDefault"; - - @SerializedName(SERIALIZED_NAME_SET_AS_DEFAULT) - private Boolean setAsDefault; - - public CreatePolicyVersionRequest() {} - - public CreatePolicyVersionRequest document(String document) { - - this.document = document; - return this; - } - - /** - * The policy document, corresponding to a JSON string that contains the policy. For more - * information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and [EIM - * Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html). - * - * @return document - */ - @javax.annotation.Nonnull - public String getDocument() { - return document; - } - - public void setDocument(String document) { - this.document = document; - } - - public CreatePolicyVersionRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public CreatePolicyVersionRequest setAsDefault(Boolean setAsDefault) { - - this.setAsDefault = setAsDefault; - return this; - } - - /** - * If set to true, the new policy version is set as the default version and becomes the - * operative one. - * - * @return setAsDefault - */ - @javax.annotation.Nullable - public Boolean getSetAsDefault() { - return setAsDefault; - } - - public void setSetAsDefault(Boolean setAsDefault) { - this.setAsDefault = setAsDefault; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePolicyVersionRequest createPolicyVersionRequest = (CreatePolicyVersionRequest) o; - return Objects.equals(this.document, createPolicyVersionRequest.document) - && Objects.equals(this.policyOrn, createPolicyVersionRequest.policyOrn) - && Objects.equals(this.setAsDefault, createPolicyVersionRequest.setAsDefault); - } - - @Override - public int hashCode() { - return Objects.hash(document, policyOrn, setAsDefault); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePolicyVersionRequest {\n"); - sb.append(" document: ").append(toIndentedString(document)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" setAsDefault: ").append(toIndentedString(setAsDefault)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Document"); - openapiFields.add("PolicyOrn"); - openapiFields.add("SetAsDefault"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Document"); - openapiRequiredFields.add("PolicyOrn"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePolicyVersionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePolicyVersionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePolicyVersionRequest is not" - + " found in the empty JSON string", - CreatePolicyVersionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePolicyVersionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePolicyVersionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePolicyVersionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Document").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Document` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Document").toString())); - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePolicyVersionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePolicyVersionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePolicyVersionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePolicyVersionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePolicyVersionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePolicyVersionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePolicyVersionRequest - * @throws IOException if the JSON string is invalid with respect to CreatePolicyVersionRequest - */ - public static CreatePolicyVersionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePolicyVersionRequest.class); - } - - /** - * Convert an instance of CreatePolicyVersionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponse.java deleted file mode 100644 index b17aec2e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePolicyVersionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePolicyVersionResponse { - public static final String SERIALIZED_NAME_POLICY_VERSION = "PolicyVersion"; - - @SerializedName(SERIALIZED_NAME_POLICY_VERSION) - private PolicyVersion policyVersion; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreatePolicyVersionResponse() {} - - public CreatePolicyVersionResponse policyVersion(PolicyVersion policyVersion) { - - this.policyVersion = policyVersion; - return this; - } - - /** - * Get policyVersion - * - * @return policyVersion - */ - @javax.annotation.Nullable - public PolicyVersion getPolicyVersion() { - return policyVersion; - } - - public void setPolicyVersion(PolicyVersion policyVersion) { - this.policyVersion = policyVersion; - } - - public CreatePolicyVersionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePolicyVersionResponse createPolicyVersionResponse = (CreatePolicyVersionResponse) o; - return Objects.equals(this.policyVersion, createPolicyVersionResponse.policyVersion) - && Objects.equals( - this.responseContext, createPolicyVersionResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(policyVersion, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePolicyVersionResponse {\n"); - sb.append(" policyVersion: ").append(toIndentedString(policyVersion)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyVersion"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePolicyVersionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePolicyVersionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePolicyVersionResponse is not" - + " found in the empty JSON string", - CreatePolicyVersionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePolicyVersionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePolicyVersionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `PolicyVersion` - if (jsonObj.get("PolicyVersion") != null && !jsonObj.get("PolicyVersion").isJsonNull()) { - PolicyVersion.validateJsonObject(jsonObj.getAsJsonObject("PolicyVersion")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePolicyVersionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePolicyVersionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePolicyVersionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePolicyVersionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePolicyVersionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePolicyVersionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePolicyVersionResponse - * @throws IOException if the JSON string is invalid with respect to CreatePolicyVersionResponse - */ - public static CreatePolicyVersionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePolicyVersionResponse.class); - } - - /** - * Convert an instance of CreatePolicyVersionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequest.java deleted file mode 100644 index e9ea2e76..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateProductTypeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateProductTypeRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VENDOR = "Vendor"; - - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public CreateProductTypeRequest() {} - - public CreateProductTypeRequest description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the product type. - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateProductTypeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateProductTypeRequest vendor(String vendor) { - - this.vendor = vendor; - return this; - } - - /** - * The vendor of the product type. - * - * @return vendor - */ - @javax.annotation.Nullable - public String getVendor() { - return vendor; - } - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateProductTypeRequest createProductTypeRequest = (CreateProductTypeRequest) o; - return Objects.equals(this.description, createProductTypeRequest.description) - && Objects.equals(this.dryRun, createProductTypeRequest.dryRun) - && Objects.equals(this.vendor, createProductTypeRequest.vendor); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, vendor); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateProductTypeRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("Vendor"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Description"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateProductTypeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateProductTypeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateProductTypeRequest is not found" - + " in the empty JSON string", - CreateProductTypeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateProductTypeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateProductTypeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateProductTypeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("Vendor") != null && !jsonObj.get("Vendor").isJsonNull()) - && !jsonObj.get("Vendor").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vendor` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Vendor").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateProductTypeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateProductTypeRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateProductTypeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateProductTypeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateProductTypeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateProductTypeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateProductTypeRequest - * @throws IOException if the JSON string is invalid with respect to CreateProductTypeRequest - */ - public static CreateProductTypeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateProductTypeRequest.class); - } - - /** - * Convert an instance of CreateProductTypeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponse.java deleted file mode 100644 index 1fc91253..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateProductTypeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateProductTypeResponse { - public static final String SERIALIZED_NAME_PRODUCT_TYPE = "ProductType"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) - private ProductType productType; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateProductTypeResponse() {} - - public CreateProductTypeResponse productType(ProductType productType) { - - this.productType = productType; - return this; - } - - /** - * Get productType - * - * @return productType - */ - @javax.annotation.Nullable - public ProductType getProductType() { - return productType; - } - - public void setProductType(ProductType productType) { - this.productType = productType; - } - - public CreateProductTypeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateProductTypeResponse createProductTypeResponse = (CreateProductTypeResponse) o; - return Objects.equals(this.productType, createProductTypeResponse.productType) - && Objects.equals(this.responseContext, createProductTypeResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(productType, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateProductTypeResponse {\n"); - sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ProductType"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateProductTypeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateProductTypeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateProductTypeResponse is not" - + " found in the empty JSON string", - CreateProductTypeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateProductTypeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateProductTypeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ProductType` - if (jsonObj.get("ProductType") != null && !jsonObj.get("ProductType").isJsonNull()) { - ProductType.validateJsonObject(jsonObj.getAsJsonObject("ProductType")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateProductTypeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateProductTypeResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateProductTypeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateProductTypeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateProductTypeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateProductTypeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateProductTypeResponse - * @throws IOException if the JSON string is invalid with respect to CreateProductTypeResponse - */ - public static CreateProductTypeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateProductTypeResponse.class); - } - - /** - * Convert an instance of CreateProductTypeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequest.java deleted file mode 100644 index 0ca73514..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePublicIpRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePublicIpRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public CreatePublicIpRequest() {} - - public CreatePublicIpRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePublicIpRequest createPublicIpRequest = (CreatePublicIpRequest) o; - return Objects.equals(this.dryRun, createPublicIpRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePublicIpRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePublicIpRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePublicIpRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePublicIpRequest is not found in" - + " the empty JSON string", - CreatePublicIpRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePublicIpRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePublicIpRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePublicIpRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePublicIpRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePublicIpRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePublicIpRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePublicIpRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePublicIpRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePublicIpRequest - * @throws IOException if the JSON string is invalid with respect to CreatePublicIpRequest - */ - public static CreatePublicIpRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePublicIpRequest.class); - } - - /** - * Convert an instance of CreatePublicIpRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponse.java deleted file mode 100644 index 22b165cb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreatePublicIpResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePublicIpResponse { - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private PublicIp publicIp; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreatePublicIpResponse() {} - - public CreatePublicIpResponse publicIp(PublicIp publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * Get publicIp - * - * @return publicIp - */ - @javax.annotation.Nullable - public PublicIp getPublicIp() { - return publicIp; - } - - public void setPublicIp(PublicIp publicIp) { - this.publicIp = publicIp; - } - - public CreatePublicIpResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePublicIpResponse createPublicIpResponse = (CreatePublicIpResponse) o; - return Objects.equals(this.publicIp, createPublicIpResponse.publicIp) - && Objects.equals(this.responseContext, createPublicIpResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(publicIp, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePublicIpResponse {\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PublicIp"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePublicIpResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePublicIpResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreatePublicIpResponse is not found" - + " in the empty JSON string", - CreatePublicIpResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreatePublicIpResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreatePublicIpResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `PublicIp` - if (jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) { - PublicIp.validateJsonObject(jsonObj.getAsJsonObject("PublicIp")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePublicIpResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePublicIpResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreatePublicIpResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePublicIpResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePublicIpResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePublicIpResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePublicIpResponse - * @throws IOException if the JSON string is invalid with respect to CreatePublicIpResponse - */ - public static CreatePublicIpResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePublicIpResponse.class); - } - - /** - * Convert an instance of CreatePublicIpResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequest.java deleted file mode 100644 index b3b03d92..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequest.java +++ /dev/null @@ -1,463 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateRouteRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRouteRequest { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_GATEWAY_ID = "GatewayId"; - - @SerializedName(SERIALIZED_NAME_GATEWAY_ID) - private String gatewayId; - - public static final String SERIALIZED_NAME_NAT_SERVICE_ID = "NatServiceId"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_ID) - private String natServiceId; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public CreateRouteRequest() {} - - public CreateRouteRequest destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The IP range used for the destination match, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return destinationIpRange - */ - @javax.annotation.Nonnull - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public CreateRouteRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateRouteRequest gatewayId(String gatewayId) { - - this.gatewayId = gatewayId; - return this; - } - - /** - * The ID of an Internet service or virtual gateway attached to your Net. - * - * @return gatewayId - */ - @javax.annotation.Nullable - public String getGatewayId() { - return gatewayId; - } - - public void setGatewayId(String gatewayId) { - this.gatewayId = gatewayId; - } - - public CreateRouteRequest natServiceId(String natServiceId) { - - this.natServiceId = natServiceId; - return this; - } - - /** - * The ID of a NAT service. - * - * @return natServiceId - */ - @javax.annotation.Nullable - public String getNatServiceId() { - return natServiceId; - } - - public void setNatServiceId(String natServiceId) { - this.natServiceId = natServiceId; - } - - public CreateRouteRequest netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of a Net peering. - * - * @return netPeeringId - */ - @javax.annotation.Nullable - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - public CreateRouteRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of a NIC. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public CreateRouteRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table for which you want to create a route. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public CreateRouteRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of a NAT VM in your Net (attached to exactly one NIC). - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRouteRequest createRouteRequest = (CreateRouteRequest) o; - return Objects.equals(this.destinationIpRange, createRouteRequest.destinationIpRange) - && Objects.equals(this.dryRun, createRouteRequest.dryRun) - && Objects.equals(this.gatewayId, createRouteRequest.gatewayId) - && Objects.equals(this.natServiceId, createRouteRequest.natServiceId) - && Objects.equals(this.netPeeringId, createRouteRequest.netPeeringId) - && Objects.equals(this.nicId, createRouteRequest.nicId) - && Objects.equals(this.routeTableId, createRouteRequest.routeTableId) - && Objects.equals(this.vmId, createRouteRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - destinationIpRange, - dryRun, - gatewayId, - natServiceId, - netPeeringId, - nicId, - routeTableId, - vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRouteRequest {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" gatewayId: ").append(toIndentedString(gatewayId)).append("\n"); - sb.append(" natServiceId: ").append(toIndentedString(natServiceId)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DryRun"); - openapiFields.add("GatewayId"); - openapiFields.add("NatServiceId"); - openapiFields.add("NetPeeringId"); - openapiFields.add("NicId"); - openapiFields.add("RouteTableId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DestinationIpRange"); - openapiRequiredFields.add("RouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateRouteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateRouteRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateRouteRequest is not found in" - + " the empty JSON string", - CreateRouteRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateRouteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateRouteRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRouteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if ((jsonObj.get("GatewayId") != null && !jsonObj.get("GatewayId").isJsonNull()) - && !jsonObj.get("GatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `GatewayId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("GatewayId").toString())); - } - if ((jsonObj.get("NatServiceId") != null && !jsonObj.get("NatServiceId").isJsonNull()) - && !jsonObj.get("NatServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NatServiceId").toString())); - } - if ((jsonObj.get("NetPeeringId") != null && !jsonObj.get("NetPeeringId").isJsonNull()) - && !jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRouteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRouteRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateRouteRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRouteRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRouteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRouteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRouteRequest - * @throws IOException if the JSON string is invalid with respect to CreateRouteRequest - */ - public static CreateRouteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRouteRequest.class); - } - - /** - * Convert an instance of CreateRouteRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponse.java deleted file mode 100644 index 26c506cc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateRouteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRouteResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLE = "RouteTable"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE) - private RouteTable routeTable; - - public CreateRouteResponse() {} - - public CreateRouteResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateRouteResponse routeTable(RouteTable routeTable) { - - this.routeTable = routeTable; - return this; - } - - /** - * Get routeTable - * - * @return routeTable - */ - @javax.annotation.Nullable - public RouteTable getRouteTable() { - return routeTable; - } - - public void setRouteTable(RouteTable routeTable) { - this.routeTable = routeTable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRouteResponse createRouteResponse = (CreateRouteResponse) o; - return Objects.equals(this.responseContext, createRouteResponse.responseContext) - && Objects.equals(this.routeTable, createRouteResponse.routeTable); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, routeTable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRouteResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTable: ").append(toIndentedString(routeTable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateRouteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateRouteResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateRouteResponse is not found in" - + " the empty JSON string", - CreateRouteResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateRouteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateRouteResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `RouteTable` - if (jsonObj.get("RouteTable") != null && !jsonObj.get("RouteTable").isJsonNull()) { - RouteTable.validateJsonObject(jsonObj.getAsJsonObject("RouteTable")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRouteResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRouteResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateRouteResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRouteResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRouteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRouteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRouteResponse - * @throws IOException if the JSON string is invalid with respect to CreateRouteResponse - */ - public static CreateRouteResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRouteResponse.class); - } - - /** - * Convert an instance of CreateRouteResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequest.java deleted file mode 100644 index 3307da55..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateRouteTableRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRouteTableRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public CreateRouteTableRequest() {} - - public CreateRouteTableRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateRouteTableRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for which you want to create a route table. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRouteTableRequest createRouteTableRequest = (CreateRouteTableRequest) o; - return Objects.equals(this.dryRun, createRouteTableRequest.dryRun) - && Objects.equals(this.netId, createRouteTableRequest.netId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRouteTableRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateRouteTableRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateRouteTableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateRouteTableRequest is not found" - + " in the empty JSON string", - CreateRouteTableRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateRouteTableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateRouteTableRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRouteTableRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRouteTableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRouteTableRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateRouteTableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRouteTableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRouteTableRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRouteTableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRouteTableRequest - * @throws IOException if the JSON string is invalid with respect to CreateRouteTableRequest - */ - public static CreateRouteTableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRouteTableRequest.class); - } - - /** - * Convert an instance of CreateRouteTableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponse.java deleted file mode 100644 index 994a6cfa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateRouteTableResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRouteTableResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLE = "RouteTable"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE) - private RouteTable routeTable; - - public CreateRouteTableResponse() {} - - public CreateRouteTableResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateRouteTableResponse routeTable(RouteTable routeTable) { - - this.routeTable = routeTable; - return this; - } - - /** - * Get routeTable - * - * @return routeTable - */ - @javax.annotation.Nullable - public RouteTable getRouteTable() { - return routeTable; - } - - public void setRouteTable(RouteTable routeTable) { - this.routeTable = routeTable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRouteTableResponse createRouteTableResponse = (CreateRouteTableResponse) o; - return Objects.equals(this.responseContext, createRouteTableResponse.responseContext) - && Objects.equals(this.routeTable, createRouteTableResponse.routeTable); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, routeTable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRouteTableResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTable: ").append(toIndentedString(routeTable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateRouteTableResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateRouteTableResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateRouteTableResponse is not found" - + " in the empty JSON string", - CreateRouteTableResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateRouteTableResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateRouteTableResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `RouteTable` - if (jsonObj.get("RouteTable") != null && !jsonObj.get("RouteTable").isJsonNull()) { - RouteTable.validateJsonObject(jsonObj.getAsJsonObject("RouteTable")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRouteTableResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRouteTableResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateRouteTableResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRouteTableResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRouteTableResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRouteTableResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRouteTableResponse - * @throws IOException if the JSON string is invalid with respect to CreateRouteTableResponse - */ - public static CreateRouteTableResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRouteTableResponse.class); - } - - /** - * Convert an instance of CreateRouteTableResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequest.java deleted file mode 100644 index 867482ae..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequest.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSecurityGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSecurityGroupRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public CreateSecurityGroupRequest() {} - - public CreateSecurityGroupRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the security group.<br /> This description can contain between 1 and - * 255 characters. Allowed characters are `a-z`, `A-Z`, `0-9`, - * accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`. - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateSecurityGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateSecurityGroupRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the security group. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public CreateSecurityGroupRequest securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * The name of the security group.<br /> This name must not start with - * `sg-`.<br /> This name must be unique and contain between 1 and 255 - * characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, - * and `_.-:/()#,@[]+=&;{}!$*`. - * - * @return securityGroupName - */ - @javax.annotation.Nonnull - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSecurityGroupRequest createSecurityGroupRequest = (CreateSecurityGroupRequest) o; - return Objects.equals(this.description, createSecurityGroupRequest.description) - && Objects.equals(this.dryRun, createSecurityGroupRequest.dryRun) - && Objects.equals(this.netId, createSecurityGroupRequest.netId) - && Objects.equals( - this.securityGroupName, createSecurityGroupRequest.securityGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, netId, securityGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSecurityGroupRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - openapiFields.add("SecurityGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Description"); - openapiRequiredFields.add("SecurityGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSecurityGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSecurityGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSecurityGroupRequest is not" - + " found in the empty JSON string", - CreateSecurityGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSecurityGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSecurityGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSecurityGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (!jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSecurityGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSecurityGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSecurityGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSecurityGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSecurityGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSecurityGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSecurityGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateSecurityGroupRequest - */ - public static CreateSecurityGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSecurityGroupRequest.class); - } - - /** - * Convert an instance of CreateSecurityGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponse.java deleted file mode 100644 index 940fb67c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSecurityGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSecurityGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SECURITY_GROUP = "SecurityGroup"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP) - private SecurityGroup securityGroup; - - public CreateSecurityGroupResponse() {} - - public CreateSecurityGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateSecurityGroupResponse securityGroup(SecurityGroup securityGroup) { - - this.securityGroup = securityGroup; - return this; - } - - /** - * Get securityGroup - * - * @return securityGroup - */ - @javax.annotation.Nullable - public SecurityGroup getSecurityGroup() { - return securityGroup; - } - - public void setSecurityGroup(SecurityGroup securityGroup) { - this.securityGroup = securityGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSecurityGroupResponse createSecurityGroupResponse = (CreateSecurityGroupResponse) o; - return Objects.equals(this.responseContext, createSecurityGroupResponse.responseContext) - && Objects.equals(this.securityGroup, createSecurityGroupResponse.securityGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, securityGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSecurityGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" securityGroup: ").append(toIndentedString(securityGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("SecurityGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSecurityGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSecurityGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSecurityGroupResponse is not" - + " found in the empty JSON string", - CreateSecurityGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSecurityGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSecurityGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `SecurityGroup` - if (jsonObj.get("SecurityGroup") != null && !jsonObj.get("SecurityGroup").isJsonNull()) { - SecurityGroup.validateJsonObject(jsonObj.getAsJsonObject("SecurityGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSecurityGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSecurityGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSecurityGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSecurityGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSecurityGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSecurityGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSecurityGroupResponse - * @throws IOException if the JSON string is invalid with respect to CreateSecurityGroupResponse - */ - public static CreateSecurityGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSecurityGroupResponse.class); - } - - /** - * Convert an instance of CreateSecurityGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequest.java deleted file mode 100644 index 1741f6ec..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequest.java +++ /dev/null @@ -1,577 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSecurityGroupRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSecurityGroupRuleRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLOW = "Flow"; - - @SerializedName(SERIALIZED_NAME_FLOW) - private String flow; - - public static final String SERIALIZED_NAME_FROM_PORT_RANGE = "FromPortRange"; - - @SerializedName(SERIALIZED_NAME_FROM_PORT_RANGE) - private Integer fromPortRange; - - public static final String SERIALIZED_NAME_IP_PROTOCOL = "IpProtocol"; - - @SerializedName(SERIALIZED_NAME_IP_PROTOCOL) - private String ipProtocol; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_RULES = "Rules"; - - @SerializedName(SERIALIZED_NAME_RULES) - private List rules = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID_TO_LINK = - "SecurityGroupAccountIdToLink"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID_TO_LINK) - private String securityGroupAccountIdToLink; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME_TO_LINK = - "SecurityGroupNameToLink"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME_TO_LINK) - private String securityGroupNameToLink; - - public static final String SERIALIZED_NAME_TO_PORT_RANGE = "ToPortRange"; - - @SerializedName(SERIALIZED_NAME_TO_PORT_RANGE) - private Integer toPortRange; - - public CreateSecurityGroupRuleRequest() {} - - public CreateSecurityGroupRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateSecurityGroupRuleRequest flow(String flow) { - - this.flow = flow; - return this; - } - - /** - * The direction of the flow: `Inbound` or `Outbound`. You can specify - * `Outbound` for Nets only. - * - * @return flow - */ - @javax.annotation.Nonnull - public String getFlow() { - return flow; - } - - public void setFlow(String flow) { - this.flow = flow; - } - - public CreateSecurityGroupRuleRequest fromPortRange(Integer fromPortRange) { - - this.fromPortRange = fromPortRange; - return this; - } - - /** - * The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If you - * specify this parameter, you cannot specify the `Rules` parameter and its - * subparameters. - * - * @return fromPortRange - */ - @javax.annotation.Nullable - public Integer getFromPortRange() { - return fromPortRange; - } - - public void setFromPortRange(Integer fromPortRange) { - this.fromPortRange = fromPortRange; - } - - public CreateSecurityGroupRuleRequest ipProtocol(String ipProtocol) { - - this.ipProtocol = ipProtocol; - return this; - } - - /** - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` - * for all protocols). By default, `-1`. In a Net, this can also be an IP protocol - * number. For more information, see the [IANA.org - * website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). If you - * specify this parameter, you cannot specify the `Rules` parameter and its - * subparameters. - * - * @return ipProtocol - */ - @javax.annotation.Nullable - public String getIpProtocol() { - return ipProtocol; - } - - public void setIpProtocol(String ipProtocol) { - this.ipProtocol = ipProtocol; - } - - public CreateSecurityGroupRuleRequest ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If you - * specify this parameter, you cannot specify the `Rules` parameter and its - * subparameters. - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public CreateSecurityGroupRuleRequest rules(List rules) { - - this.rules = rules; - return this; - } - - public CreateSecurityGroupRuleRequest addRulesItem(SecurityGroupRule rulesItem) { - if (this.rules == null) { - this.rules = new ArrayList<>(); - } - this.rules.add(rulesItem); - return this; - } - - /** - * Information about the security group rule to create. If you specify this parent parameter and - * its subparameters, you cannot specify the following parent parameters: - * `FromPortRange`, `IpProtocol`, `IpRange`, and - * `ToPortRange`. - * - * @return rules - */ - @javax.annotation.Nullable - public List getRules() { - return rules; - } - - public void setRules(List rules) { - this.rules = rules; - } - - public CreateSecurityGroupRuleRequest securityGroupAccountIdToLink( - String securityGroupAccountIdToLink) { - - this.securityGroupAccountIdToLink = securityGroupAccountIdToLink; - return this; - } - - /** - * The account ID that owns the source or destination security group specified in the - * `SecurityGroupNameToLink` parameter. - * - * @return securityGroupAccountIdToLink - */ - @javax.annotation.Nullable - public String getSecurityGroupAccountIdToLink() { - return securityGroupAccountIdToLink; - } - - public void setSecurityGroupAccountIdToLink(String securityGroupAccountIdToLink) { - this.securityGroupAccountIdToLink = securityGroupAccountIdToLink; - } - - public CreateSecurityGroupRuleRequest securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of the security group for which you want to create a rule. - * - * @return securityGroupId - */ - @javax.annotation.Nonnull - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public CreateSecurityGroupRuleRequest securityGroupNameToLink(String securityGroupNameToLink) { - - this.securityGroupNameToLink = securityGroupNameToLink; - return this; - } - - /** - * The ID of a source or destination security group that you want to link to the security group - * of the rule. - * - * @return securityGroupNameToLink - */ - @javax.annotation.Nullable - public String getSecurityGroupNameToLink() { - return securityGroupNameToLink; - } - - public void setSecurityGroupNameToLink(String securityGroupNameToLink) { - this.securityGroupNameToLink = securityGroupNameToLink; - } - - public CreateSecurityGroupRuleRequest toPortRange(Integer toPortRange) { - - this.toPortRange = toPortRange; - return this; - } - - /** - * The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you - * specify this parameter, you cannot specify the `Rules` parameter and its - * subparameters. - * - * @return toPortRange - */ - @javax.annotation.Nullable - public Integer getToPortRange() { - return toPortRange; - } - - public void setToPortRange(Integer toPortRange) { - this.toPortRange = toPortRange; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest = - (CreateSecurityGroupRuleRequest) o; - return Objects.equals(this.dryRun, createSecurityGroupRuleRequest.dryRun) - && Objects.equals(this.flow, createSecurityGroupRuleRequest.flow) - && Objects.equals(this.fromPortRange, createSecurityGroupRuleRequest.fromPortRange) - && Objects.equals(this.ipProtocol, createSecurityGroupRuleRequest.ipProtocol) - && Objects.equals(this.ipRange, createSecurityGroupRuleRequest.ipRange) - && Objects.equals(this.rules, createSecurityGroupRuleRequest.rules) - && Objects.equals( - this.securityGroupAccountIdToLink, - createSecurityGroupRuleRequest.securityGroupAccountIdToLink) - && Objects.equals( - this.securityGroupId, createSecurityGroupRuleRequest.securityGroupId) - && Objects.equals( - this.securityGroupNameToLink, - createSecurityGroupRuleRequest.securityGroupNameToLink) - && Objects.equals(this.toPortRange, createSecurityGroupRuleRequest.toPortRange); - } - - @Override - public int hashCode() { - return Objects.hash( - dryRun, - flow, - fromPortRange, - ipProtocol, - ipRange, - rules, - securityGroupAccountIdToLink, - securityGroupId, - securityGroupNameToLink, - toPortRange); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSecurityGroupRuleRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flow: ").append(toIndentedString(flow)).append("\n"); - sb.append(" fromPortRange: ").append(toIndentedString(fromPortRange)).append("\n"); - sb.append(" ipProtocol: ").append(toIndentedString(ipProtocol)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); - sb.append(" securityGroupAccountIdToLink: ") - .append(toIndentedString(securityGroupAccountIdToLink)) - .append("\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupNameToLink: ") - .append(toIndentedString(securityGroupNameToLink)) - .append("\n"); - sb.append(" toPortRange: ").append(toIndentedString(toPortRange)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Flow"); - openapiFields.add("FromPortRange"); - openapiFields.add("IpProtocol"); - openapiFields.add("IpRange"); - openapiFields.add("Rules"); - openapiFields.add("SecurityGroupAccountIdToLink"); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupNameToLink"); - openapiFields.add("ToPortRange"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Flow"); - openapiRequiredFields.add("SecurityGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateSecurityGroupRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSecurityGroupRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSecurityGroupRuleRequest is not" - + " found in the empty JSON string", - CreateSecurityGroupRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSecurityGroupRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSecurityGroupRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSecurityGroupRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Flow").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Flow` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Flow").toString())); - } - if ((jsonObj.get("IpProtocol") != null && !jsonObj.get("IpProtocol").isJsonNull()) - && !jsonObj.get("IpProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpProtocol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpProtocol").toString())); - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if (jsonObj.get("Rules") != null && !jsonObj.get("Rules").isJsonNull()) { - JsonArray jsonArrayrules = jsonObj.getAsJsonArray("Rules"); - if (jsonArrayrules != null) { - // ensure the json data is an array - if (!jsonObj.get("Rules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Rules` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Rules").toString())); - } - - // validate the optional field `Rules` (array) - for (int i = 0; i < jsonArrayrules.size(); i++) { - SecurityGroupRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("SecurityGroupAccountIdToLink") != null - && !jsonObj.get("SecurityGroupAccountIdToLink").isJsonNull()) - && !jsonObj.get("SecurityGroupAccountIdToLink").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupAccountIdToLink` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("SecurityGroupAccountIdToLink").toString())); - } - if (!jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupNameToLink") != null - && !jsonObj.get("SecurityGroupNameToLink").isJsonNull()) - && !jsonObj.get("SecurityGroupNameToLink").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupNameToLink` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("SecurityGroupNameToLink").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSecurityGroupRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSecurityGroupRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateSecurityGroupRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSecurityGroupRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSecurityGroupRuleRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSecurityGroupRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSecurityGroupRuleRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateSecurityGroupRuleRequest - */ - public static CreateSecurityGroupRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSecurityGroupRuleRequest.class); - } - - /** - * Convert an instance of CreateSecurityGroupRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponse.java deleted file mode 100644 index 00890e45..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponse.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSecurityGroupRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSecurityGroupRuleResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SECURITY_GROUP = "SecurityGroup"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP) - private SecurityGroup securityGroup; - - public CreateSecurityGroupRuleResponse() {} - - public CreateSecurityGroupRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateSecurityGroupRuleResponse securityGroup(SecurityGroup securityGroup) { - - this.securityGroup = securityGroup; - return this; - } - - /** - * Get securityGroup - * - * @return securityGroup - */ - @javax.annotation.Nullable - public SecurityGroup getSecurityGroup() { - return securityGroup; - } - - public void setSecurityGroup(SecurityGroup securityGroup) { - this.securityGroup = securityGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSecurityGroupRuleResponse createSecurityGroupRuleResponse = - (CreateSecurityGroupRuleResponse) o; - return Objects.equals(this.responseContext, createSecurityGroupRuleResponse.responseContext) - && Objects.equals( - this.securityGroup, createSecurityGroupRuleResponse.securityGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, securityGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSecurityGroupRuleResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" securityGroup: ").append(toIndentedString(securityGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("SecurityGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateSecurityGroupRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSecurityGroupRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSecurityGroupRuleResponse is" - + " not found in the empty JSON string", - CreateSecurityGroupRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSecurityGroupRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSecurityGroupRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `SecurityGroup` - if (jsonObj.get("SecurityGroup") != null && !jsonObj.get("SecurityGroup").isJsonNull()) { - SecurityGroup.validateJsonObject(jsonObj.getAsJsonObject("SecurityGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSecurityGroupRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSecurityGroupRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateSecurityGroupRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSecurityGroupRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSecurityGroupRuleResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSecurityGroupRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSecurityGroupRuleResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateSecurityGroupRuleResponse - */ - public static CreateSecurityGroupRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSecurityGroupRuleResponse.class); - } - - /** - * Convert an instance of CreateSecurityGroupRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequest.java deleted file mode 100644 index e0f3976c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequest.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateServerCertificateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateServerCertificateRequest { - public static final String SERIALIZED_NAME_BODY = "Body"; - - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_CHAIN = "Chain"; - - @SerializedName(SERIALIZED_NAME_CHAIN) - private String chain; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_PRIVATE_KEY = "PrivateKey"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_KEY) - private String privateKey; - - public CreateServerCertificateRequest() {} - - public CreateServerCertificateRequest body(String body) { - - this.body = body; - return this; - } - - /** - * The PEM-encoded X509 certificate.<br />With OSC CLI, use the following syntax to make - * sure your certificate file is correctly parsed: `--Body=&quot;$(cat - * FILENAME)&quot;`. - * - * @return body - */ - @javax.annotation.Nonnull - public String getBody() { - return body; - } - - public void setBody(String body) { - this.body = body; - } - - public CreateServerCertificateRequest chain(String chain) { - - this.chain = chain; - return this; - } - - /** - * The PEM-encoded intermediate certification authorities.<br />With OSC CLI, use the - * following syntax to make sure your certificate chain file is correctly parsed: - * `--Chain=&quot;$(cat FILENAME)&quot;`. - * - * @return chain - */ - @javax.annotation.Nullable - public String getChain() { - return chain; - } - - public void setChain(String chain) { - this.chain = chain; - } - - public CreateServerCertificateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateServerCertificateRequest name(String name) { - - this.name = name; - return this; - } - - /** - * A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), - * equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_). - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public CreateServerCertificateRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the server certificate, set to a slash (/) if not specified. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public CreateServerCertificateRequest privateKey(String privateKey) { - - this.privateKey = privateKey; - return this; - } - - /** - * The PEM-encoded private key matching the certificate.<br />With OSC CLI, use the - * following syntax to make sure your key file is correctly parsed: - * `--PrivateKey=&quot;$(cat FILENAME)&quot;`. - * - * @return privateKey - */ - @javax.annotation.Nonnull - public String getPrivateKey() { - return privateKey; - } - - public void setPrivateKey(String privateKey) { - this.privateKey = privateKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateServerCertificateRequest createServerCertificateRequest = - (CreateServerCertificateRequest) o; - return Objects.equals(this.body, createServerCertificateRequest.body) - && Objects.equals(this.chain, createServerCertificateRequest.chain) - && Objects.equals(this.dryRun, createServerCertificateRequest.dryRun) - && Objects.equals(this.name, createServerCertificateRequest.name) - && Objects.equals(this.path, createServerCertificateRequest.path) - && Objects.equals(this.privateKey, createServerCertificateRequest.privateKey); - } - - @Override - public int hashCode() { - return Objects.hash(body, chain, dryRun, name, path, privateKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateServerCertificateRequest {\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" chain: ").append(toIndentedString(chain)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" privateKey: ").append(toIndentedString(privateKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Body"); - openapiFields.add("Chain"); - openapiFields.add("DryRun"); - openapiFields.add("Name"); - openapiFields.add("Path"); - openapiFields.add("PrivateKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Body"); - openapiRequiredFields.add("Name"); - openapiRequiredFields.add("PrivateKey"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateServerCertificateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateServerCertificateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateServerCertificateRequest is not" - + " found in the empty JSON string", - CreateServerCertificateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateServerCertificateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateServerCertificateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateServerCertificateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Body").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Body` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Body").toString())); - } - if ((jsonObj.get("Chain") != null && !jsonObj.get("Chain").isJsonNull()) - && !jsonObj.get("Chain").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Chain` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Chain").toString())); - } - if (!jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("PrivateKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateServerCertificateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateServerCertificateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateServerCertificateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateServerCertificateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateServerCertificateRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateServerCertificateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateServerCertificateRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateServerCertificateRequest - */ - public static CreateServerCertificateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateServerCertificateRequest.class); - } - - /** - * Convert an instance of CreateServerCertificateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponse.java deleted file mode 100644 index 88268418..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponse.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateServerCertificateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateServerCertificateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATE = "ServerCertificate"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATE) - private ServerCertificate serverCertificate; - - public CreateServerCertificateResponse() {} - - public CreateServerCertificateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateServerCertificateResponse serverCertificate(ServerCertificate serverCertificate) { - - this.serverCertificate = serverCertificate; - return this; - } - - /** - * Get serverCertificate - * - * @return serverCertificate - */ - @javax.annotation.Nullable - public ServerCertificate getServerCertificate() { - return serverCertificate; - } - - public void setServerCertificate(ServerCertificate serverCertificate) { - this.serverCertificate = serverCertificate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateServerCertificateResponse createServerCertificateResponse = - (CreateServerCertificateResponse) o; - return Objects.equals(this.responseContext, createServerCertificateResponse.responseContext) - && Objects.equals( - this.serverCertificate, createServerCertificateResponse.serverCertificate); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, serverCertificate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateServerCertificateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" serverCertificate: ") - .append(toIndentedString(serverCertificate)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("ServerCertificate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateServerCertificateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateServerCertificateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateServerCertificateResponse is" - + " not found in the empty JSON string", - CreateServerCertificateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateServerCertificateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateServerCertificateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `ServerCertificate` - if (jsonObj.get("ServerCertificate") != null - && !jsonObj.get("ServerCertificate").isJsonNull()) { - ServerCertificate.validateJsonObject(jsonObj.getAsJsonObject("ServerCertificate")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateServerCertificateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateServerCertificateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateServerCertificateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateServerCertificateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateServerCertificateResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateServerCertificateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateServerCertificateResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateServerCertificateResponse - */ - public static CreateServerCertificateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateServerCertificateResponse.class); - } - - /** - * Convert an instance of CreateServerCertificateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequest.java deleted file mode 100644 index 15d25eb5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSnapshotExportTaskRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSnapshotExportTaskRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_OSU_EXPORT = "OsuExport"; - - @SerializedName(SERIALIZED_NAME_OSU_EXPORT) - private OsuExportToCreate osuExport; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public CreateSnapshotExportTaskRequest() {} - - public CreateSnapshotExportTaskRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateSnapshotExportTaskRequest osuExport(OsuExportToCreate osuExport) { - - this.osuExport = osuExport; - return this; - } - - /** - * Get osuExport - * - * @return osuExport - */ - @javax.annotation.Nonnull - public OsuExportToCreate getOsuExport() { - return osuExport; - } - - public void setOsuExport(OsuExportToCreate osuExport) { - this.osuExport = osuExport; - } - - public CreateSnapshotExportTaskRequest snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot to export. - * - * @return snapshotId - */ - @javax.annotation.Nonnull - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest = - (CreateSnapshotExportTaskRequest) o; - return Objects.equals(this.dryRun, createSnapshotExportTaskRequest.dryRun) - && Objects.equals(this.osuExport, createSnapshotExportTaskRequest.osuExport) - && Objects.equals(this.snapshotId, createSnapshotExportTaskRequest.snapshotId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, osuExport, snapshotId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSnapshotExportTaskRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" osuExport: ").append(toIndentedString(osuExport)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("OsuExport"); - openapiFields.add("SnapshotId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("OsuExport"); - openapiRequiredFields.add("SnapshotId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateSnapshotExportTaskRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSnapshotExportTaskRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSnapshotExportTaskRequest is" - + " not found in the empty JSON string", - CreateSnapshotExportTaskRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSnapshotExportTaskRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSnapshotExportTaskRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSnapshotExportTaskRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the required field `OsuExport` - OsuExportToCreate.validateJsonObject(jsonObj.getAsJsonObject("OsuExport")); - if (!jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSnapshotExportTaskRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSnapshotExportTaskRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateSnapshotExportTaskRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSnapshotExportTaskRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSnapshotExportTaskRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSnapshotExportTaskRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSnapshotExportTaskRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateSnapshotExportTaskRequest - */ - public static CreateSnapshotExportTaskRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSnapshotExportTaskRequest.class); - } - - /** - * Convert an instance of CreateSnapshotExportTaskRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponse.java deleted file mode 100644 index baa345a6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponse.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSnapshotExportTaskResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSnapshotExportTaskResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SNAPSHOT_EXPORT_TASK = "SnapshotExportTask"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_EXPORT_TASK) - private SnapshotExportTask snapshotExportTask; - - public CreateSnapshotExportTaskResponse() {} - - public CreateSnapshotExportTaskResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateSnapshotExportTaskResponse snapshotExportTask( - SnapshotExportTask snapshotExportTask) { - - this.snapshotExportTask = snapshotExportTask; - return this; - } - - /** - * Get snapshotExportTask - * - * @return snapshotExportTask - */ - @javax.annotation.Nullable - public SnapshotExportTask getSnapshotExportTask() { - return snapshotExportTask; - } - - public void setSnapshotExportTask(SnapshotExportTask snapshotExportTask) { - this.snapshotExportTask = snapshotExportTask; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSnapshotExportTaskResponse createSnapshotExportTaskResponse = - (CreateSnapshotExportTaskResponse) o; - return Objects.equals( - this.responseContext, createSnapshotExportTaskResponse.responseContext) - && Objects.equals( - this.snapshotExportTask, - createSnapshotExportTaskResponse.snapshotExportTask); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, snapshotExportTask); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSnapshotExportTaskResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" snapshotExportTask: ") - .append(toIndentedString(snapshotExportTask)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("SnapshotExportTask"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateSnapshotExportTaskResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSnapshotExportTaskResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSnapshotExportTaskResponse is" - + " not found in the empty JSON string", - CreateSnapshotExportTaskResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSnapshotExportTaskResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSnapshotExportTaskResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `SnapshotExportTask` - if (jsonObj.get("SnapshotExportTask") != null - && !jsonObj.get("SnapshotExportTask").isJsonNull()) { - SnapshotExportTask.validateJsonObject(jsonObj.getAsJsonObject("SnapshotExportTask")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSnapshotExportTaskResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSnapshotExportTaskResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateSnapshotExportTaskResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSnapshotExportTaskResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSnapshotExportTaskResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSnapshotExportTaskResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSnapshotExportTaskResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateSnapshotExportTaskResponse - */ - public static CreateSnapshotExportTaskResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSnapshotExportTaskResponse.class); - } - - /** - * Convert an instance of CreateSnapshotExportTaskResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequest.java deleted file mode 100644 index bbd0a828..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequest.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSnapshotRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSnapshotRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILE_LOCATION = "FileLocation"; - - @SerializedName(SERIALIZED_NAME_FILE_LOCATION) - private String fileLocation; - - public static final String SERIALIZED_NAME_SNAPSHOT_SIZE = "SnapshotSize"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_SIZE) - private Long snapshotSize; - - public static final String SERIALIZED_NAME_SOURCE_REGION_NAME = "SourceRegionName"; - - @SerializedName(SERIALIZED_NAME_SOURCE_REGION_NAME) - private String sourceRegionName; - - public static final String SERIALIZED_NAME_SOURCE_SNAPSHOT_ID = "SourceSnapshotId"; - - @SerializedName(SERIALIZED_NAME_SOURCE_SNAPSHOT_ID) - private String sourceSnapshotId; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public CreateSnapshotRequest() {} - - public CreateSnapshotRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the snapshot. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateSnapshotRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateSnapshotRequest fileLocation(String fileLocation) { - - this.fileLocation = fileLocation; - return this; - } - - /** - * **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import, or - * the normal URL of the snapshot if you have permission on the OOS bucket. For more - * information, see [Configuring a Pre-signed - * URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL.html) or [Managing - * Access to Your Buckets and - * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-and-Objects.html). - * - * @return fileLocation - */ - @javax.annotation.Nullable - public String getFileLocation() { - return fileLocation; - } - - public void setFileLocation(String fileLocation) { - this.fileLocation = fileLocation; - } - - public CreateSnapshotRequest snapshotSize(Long snapshotSize) { - - this.snapshotSize = snapshotSize; - return this; - } - - /** - * **(when importing from a bucket)** The size of the snapshot you want to create in your - * account, in bytes. This size must be greater than or equal to the size of the original, - * uncompressed snapshot. - * - * @return snapshotSize - */ - @javax.annotation.Nullable - public Long getSnapshotSize() { - return snapshotSize; - } - - public void setSnapshotSize(Long snapshotSize) { - this.snapshotSize = snapshotSize; - } - - public CreateSnapshotRequest sourceRegionName(String sourceRegionName) { - - this.sourceRegionName = sourceRegionName; - return this; - } - - /** - * **(when copying a snapshot)** The name of the source Region, which must be the same as the - * Region of your account. - * - * @return sourceRegionName - */ - @javax.annotation.Nullable - public String getSourceRegionName() { - return sourceRegionName; - } - - public void setSourceRegionName(String sourceRegionName) { - this.sourceRegionName = sourceRegionName; - } - - public CreateSnapshotRequest sourceSnapshotId(String sourceSnapshotId) { - - this.sourceSnapshotId = sourceSnapshotId; - return this; - } - - /** - * **(when copying a snapshot)** The ID of the snapshot you want to copy. - * - * @return sourceSnapshotId - */ - @javax.annotation.Nullable - public String getSourceSnapshotId() { - return sourceSnapshotId; - } - - public void setSourceSnapshotId(String sourceSnapshotId) { - this.sourceSnapshotId = sourceSnapshotId; - } - - public CreateSnapshotRequest volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * **(when creating from a volume)** The ID of the volume you want to create a snapshot of. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSnapshotRequest createSnapshotRequest = (CreateSnapshotRequest) o; - return Objects.equals(this.description, createSnapshotRequest.description) - && Objects.equals(this.dryRun, createSnapshotRequest.dryRun) - && Objects.equals(this.fileLocation, createSnapshotRequest.fileLocation) - && Objects.equals(this.snapshotSize, createSnapshotRequest.snapshotSize) - && Objects.equals(this.sourceRegionName, createSnapshotRequest.sourceRegionName) - && Objects.equals(this.sourceSnapshotId, createSnapshotRequest.sourceSnapshotId) - && Objects.equals(this.volumeId, createSnapshotRequest.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash( - description, - dryRun, - fileLocation, - snapshotSize, - sourceRegionName, - sourceSnapshotId, - volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSnapshotRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); - sb.append(" snapshotSize: ").append(toIndentedString(snapshotSize)).append("\n"); - sb.append(" sourceRegionName: ").append(toIndentedString(sourceRegionName)).append("\n"); - sb.append(" sourceSnapshotId: ").append(toIndentedString(sourceSnapshotId)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("FileLocation"); - openapiFields.add("SnapshotSize"); - openapiFields.add("SourceRegionName"); - openapiFields.add("SourceSnapshotId"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSnapshotRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSnapshotRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSnapshotRequest is not found in" - + " the empty JSON string", - CreateSnapshotRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSnapshotRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSnapshotRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("FileLocation") != null && !jsonObj.get("FileLocation").isJsonNull()) - && !jsonObj.get("FileLocation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FileLocation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FileLocation").toString())); - } - if ((jsonObj.get("SourceRegionName") != null - && !jsonObj.get("SourceRegionName").isJsonNull()) - && !jsonObj.get("SourceRegionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceRegionName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SourceRegionName").toString())); - } - if ((jsonObj.get("SourceSnapshotId") != null - && !jsonObj.get("SourceSnapshotId").isJsonNull()) - && !jsonObj.get("SourceSnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceSnapshotId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SourceSnapshotId").toString())); - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSnapshotRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSnapshotRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSnapshotRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSnapshotRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSnapshotRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSnapshotRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSnapshotRequest - * @throws IOException if the JSON string is invalid with respect to CreateSnapshotRequest - */ - public static CreateSnapshotRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSnapshotRequest.class); - } - - /** - * Convert an instance of CreateSnapshotRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponse.java deleted file mode 100644 index bffb212b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSnapshotResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSnapshotResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SNAPSHOT = "Snapshot"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT) - private Snapshot snapshot; - - public CreateSnapshotResponse() {} - - public CreateSnapshotResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateSnapshotResponse snapshot(Snapshot snapshot) { - - this.snapshot = snapshot; - return this; - } - - /** - * Get snapshot - * - * @return snapshot - */ - @javax.annotation.Nullable - public Snapshot getSnapshot() { - return snapshot; - } - - public void setSnapshot(Snapshot snapshot) { - this.snapshot = snapshot; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSnapshotResponse createSnapshotResponse = (CreateSnapshotResponse) o; - return Objects.equals(this.responseContext, createSnapshotResponse.responseContext) - && Objects.equals(this.snapshot, createSnapshotResponse.snapshot); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, snapshot); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSnapshotResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" snapshot: ").append(toIndentedString(snapshot)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Snapshot"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSnapshotResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSnapshotResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSnapshotResponse is not found" - + " in the empty JSON string", - CreateSnapshotResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSnapshotResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSnapshotResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Snapshot` - if (jsonObj.get("Snapshot") != null && !jsonObj.get("Snapshot").isJsonNull()) { - Snapshot.validateJsonObject(jsonObj.getAsJsonObject("Snapshot")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSnapshotResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSnapshotResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSnapshotResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSnapshotResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSnapshotResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSnapshotResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSnapshotResponse - * @throws IOException if the JSON string is invalid with respect to CreateSnapshotResponse - */ - public static CreateSnapshotResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSnapshotResponse.class); - } - - /** - * Convert an instance of CreateSnapshotResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequest.java deleted file mode 100644 index 0d5e921e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequest.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSubnetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSubnetRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public CreateSubnetRequest() {} - - public CreateSubnetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateSubnetRequest ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`).<br - * /> The IP range of the Subnet can be either the same as the Net one if you create only a - * single Subnet in this Net, or a subset of the Net one. In case of several Subnets in a Net, - * their IP ranges must not overlap. The smallest Subnet you can create uses a /29 netmask - * (eight IPs). For more information, see [About - * Nets](https://docs.outscale.com/en/userguide/About-Nets.html). - * - * @return ipRange - */ - @javax.annotation.Nonnull - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public CreateSubnetRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for which you want to create a Subnet. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public CreateSubnetRequest subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion in which you want to create the Subnet. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSubnetRequest createSubnetRequest = (CreateSubnetRequest) o; - return Objects.equals(this.dryRun, createSubnetRequest.dryRun) - && Objects.equals(this.ipRange, createSubnetRequest.ipRange) - && Objects.equals(this.netId, createSubnetRequest.netId) - && Objects.equals(this.subregionName, createSubnetRequest.subregionName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, ipRange, netId, subregionName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSubnetRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("IpRange"); - openapiFields.add("NetId"); - openapiFields.add("SubregionName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("IpRange"); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSubnetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSubnetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSubnetRequest is not found in" - + " the empty JSON string", - CreateSubnetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSubnetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSubnetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSubnetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSubnetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSubnetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSubnetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSubnetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSubnetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSubnetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSubnetRequest - * @throws IOException if the JSON string is invalid with respect to CreateSubnetRequest - */ - public static CreateSubnetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSubnetRequest.class); - } - - /** - * Convert an instance of CreateSubnetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponse.java deleted file mode 100644 index 2b2e99c4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateSubnetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSubnetResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SUBNET = "Subnet"; - - @SerializedName(SERIALIZED_NAME_SUBNET) - private Subnet subnet; - - public CreateSubnetResponse() {} - - public CreateSubnetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateSubnetResponse subnet(Subnet subnet) { - - this.subnet = subnet; - return this; - } - - /** - * Get subnet - * - * @return subnet - */ - @javax.annotation.Nullable - public Subnet getSubnet() { - return subnet; - } - - public void setSubnet(Subnet subnet) { - this.subnet = subnet; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSubnetResponse createSubnetResponse = (CreateSubnetResponse) o; - return Objects.equals(this.responseContext, createSubnetResponse.responseContext) - && Objects.equals(this.subnet, createSubnetResponse.subnet); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, subnet); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSubnetResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" subnet: ").append(toIndentedString(subnet)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Subnet"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateSubnetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateSubnetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateSubnetResponse is not found in" - + " the empty JSON string", - CreateSubnetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateSubnetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateSubnetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Subnet` - if (jsonObj.get("Subnet") != null && !jsonObj.get("Subnet").isJsonNull()) { - Subnet.validateJsonObject(jsonObj.getAsJsonObject("Subnet")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSubnetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSubnetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateSubnetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSubnetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSubnetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSubnetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSubnetResponse - * @throws IOException if the JSON string is invalid with respect to CreateSubnetResponse - */ - public static CreateSubnetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSubnetResponse.class); - } - - /** - * Convert an instance of CreateSubnetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequest.java deleted file mode 100644 index e8ee7e9d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequest.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_RESOURCE_IDS = "ResourceIds"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_IDS) - private List resourceIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList<>(); - - public CreateTagsRequest() {} - - public CreateTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateTagsRequest resourceIds(List resourceIds) { - - this.resourceIds = resourceIds; - return this; - } - - public CreateTagsRequest addResourceIdsItem(String resourceIdsItem) { - this.resourceIds.add(resourceIdsItem); - return this; - } - - /** - * One or more resource IDs. - * - * @return resourceIds - */ - @javax.annotation.Nonnull - public List getResourceIds() { - return resourceIds; - } - - public void setResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - } - - public CreateTagsRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public CreateTagsRequest addTagsItem(ResourceTag tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to add to the specified resources. - * - * @return tags - */ - @javax.annotation.Nonnull - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateTagsRequest createTagsRequest = (CreateTagsRequest) o; - return Objects.equals(this.dryRun, createTagsRequest.dryRun) - && Objects.equals(this.resourceIds, createTagsRequest.resourceIds) - && Objects.equals(this.tags, createTagsRequest.tags); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, resourceIds, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" resourceIds: ").append(toIndentedString(resourceIds)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ResourceIds"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ResourceIds"); - openapiRequiredFields.add("Tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateTagsRequest is not found in the" - + " empty JSON string", - CreateTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("ResourceIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("ResourceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ResourceIds").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - // validate the required field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateTagsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateTagsRequest - * @throws IOException if the JSON string is invalid with respect to CreateTagsRequest - */ - public static CreateTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateTagsRequest.class); - } - - /** - * Convert an instance of CreateTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponse.java deleted file mode 100644 index bd2e0fc9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateTagsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateTagsResponse() {} - - public CreateTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateTagsResponse createTagsResponse = (CreateTagsResponse) o; - return Objects.equals(this.responseContext, createTagsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateTagsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateTagsResponse is not found in" - + " the empty JSON string", - CreateTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateTagsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateTagsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateTagsResponse - * @throws IOException if the JSON string is invalid with respect to CreateTagsResponse - */ - public static CreateTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateTagsResponse.class); - } - - /** - * Convert an instance of CreateTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequest.java deleted file mode 100644 index 08534c09..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public CreateUserGroupRequest() {} - - public CreateUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateUserGroupRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public CreateUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserGroupRequest createUserGroupRequest = (CreateUserGroupRequest) o; - return Objects.equals(this.dryRun, createUserGroupRequest.dryRun) - && Objects.equals(this.path, createUserGroupRequest.path) - && Objects.equals(this.userGroupName, createUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, path, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Path"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserGroupRequest is not found" - + " in the empty JSON string", - CreateUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateUserGroupRequest - */ - public static CreateUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserGroupRequest.class); - } - - /** - * Convert an instance of CreateUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponse.java deleted file mode 100644 index cf7b0d5f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER_GROUP = "UserGroup"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP) - private UserGroup userGroup; - - public CreateUserGroupResponse() {} - - public CreateUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateUserGroupResponse userGroup(UserGroup userGroup) { - - this.userGroup = userGroup; - return this; - } - - /** - * Get userGroup - * - * @return userGroup - */ - @javax.annotation.Nullable - public UserGroup getUserGroup() { - return userGroup; - } - - public void setUserGroup(UserGroup userGroup) { - this.userGroup = userGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserGroupResponse createUserGroupResponse = (CreateUserGroupResponse) o; - return Objects.equals(this.responseContext, createUserGroupResponse.responseContext) - && Objects.equals(this.userGroup, createUserGroupResponse.userGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, userGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" userGroup: ").append(toIndentedString(userGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("UserGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserGroupResponse is not found" - + " in the empty JSON string", - CreateUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `UserGroup` - if (jsonObj.get("UserGroup") != null && !jsonObj.get("UserGroup").isJsonNull()) { - UserGroup.validateJsonObject(jsonObj.getAsJsonObject("UserGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to CreateUserGroupResponse - */ - public static CreateUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserGroupResponse.class); - } - - /** - * Convert an instance of CreateUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequest.java deleted file mode 100644 index 5af7093c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateUserRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateUserRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public CreateUserRequest() {} - - public CreateUserRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateUserRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the EIM user you want to create (by default, `/`). This path name must - * begin and end with a slash (`/`), and contain between 1 and 512 alphanumeric - * characters and/or slashes (`/`), or underscores (_). - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public CreateUserRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user. This user name must contain between 1 and 64 alphanumeric - * characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes - * (-), or underscores (_). - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserRequest createUserRequest = (CreateUserRequest) o; - return Objects.equals(this.dryRun, createUserRequest.dryRun) - && Objects.equals(this.path, createUserRequest.path) - && Objects.equals(this.userName, createUserRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, path, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Path"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserRequest is not found in the" - + " empty JSON string", - CreateUserRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateUserRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserRequest - * @throws IOException if the JSON string is invalid with respect to CreateUserRequest - */ - public static CreateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserRequest.class); - } - - /** - * Convert an instance of CreateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponse.java deleted file mode 100644 index b4af373b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateUserResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateUserResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER = "User"; - - @SerializedName(SERIALIZED_NAME_USER) - private User user; - - public CreateUserResponse() {} - - public CreateUserResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateUserResponse user(User user) { - - this.user = user; - return this; - } - - /** - * Get user - * - * @return user - */ - @javax.annotation.Nullable - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserResponse createUserResponse = (CreateUserResponse) o; - return Objects.equals(this.responseContext, createUserResponse.responseContext) - && Objects.equals(this.user, createUserResponse.user); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, user); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("User"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateUserResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateUserResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserResponse is not found in" - + " the empty JSON string", - CreateUserResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateUserResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `User` - if (jsonObj.get("User") != null && !jsonObj.get("User").isJsonNull()) { - User.validateJsonObject(jsonObj.getAsJsonObject("User")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserResponse - * @throws IOException if the JSON string is invalid with respect to CreateUserResponse - */ - public static CreateUserResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserResponse.class); - } - - /** - * Convert an instance of CreateUserResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequest.java deleted file mode 100644 index 3768ee7d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVirtualGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVirtualGatewayRequest { - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public CreateVirtualGatewayRequest() {} - - public CreateVirtualGatewayRequest connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The type of VPN connection supported by the virtual gateway (always `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nonnull - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public CreateVirtualGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVirtualGatewayRequest createVirtualGatewayRequest = (CreateVirtualGatewayRequest) o; - return Objects.equals(this.connectionType, createVirtualGatewayRequest.connectionType) - && Objects.equals(this.dryRun, createVirtualGatewayRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(connectionType, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVirtualGatewayRequest {\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ConnectionType"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ConnectionType"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVirtualGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVirtualGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVirtualGatewayRequest is not" - + " found in the empty JSON string", - CreateVirtualGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVirtualGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVirtualGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVirtualGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVirtualGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVirtualGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVirtualGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVirtualGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVirtualGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVirtualGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVirtualGatewayRequest - * @throws IOException if the JSON string is invalid with respect to CreateVirtualGatewayRequest - */ - public static CreateVirtualGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVirtualGatewayRequest.class); - } - - /** - * Convert an instance of CreateVirtualGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponse.java deleted file mode 100644 index 98a038dc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponse.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVirtualGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVirtualGatewayResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY = "VirtualGateway"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY) - private VirtualGateway virtualGateway; - - public CreateVirtualGatewayResponse() {} - - public CreateVirtualGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVirtualGatewayResponse virtualGateway(VirtualGateway virtualGateway) { - - this.virtualGateway = virtualGateway; - return this; - } - - /** - * Get virtualGateway - * - * @return virtualGateway - */ - @javax.annotation.Nullable - public VirtualGateway getVirtualGateway() { - return virtualGateway; - } - - public void setVirtualGateway(VirtualGateway virtualGateway) { - this.virtualGateway = virtualGateway; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVirtualGatewayResponse createVirtualGatewayResponse = - (CreateVirtualGatewayResponse) o; - return Objects.equals(this.responseContext, createVirtualGatewayResponse.responseContext) - && Objects.equals(this.virtualGateway, createVirtualGatewayResponse.virtualGateway); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, virtualGateway); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVirtualGatewayResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" virtualGateway: ").append(toIndentedString(virtualGateway)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VirtualGateway"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateVirtualGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVirtualGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVirtualGatewayResponse is not" - + " found in the empty JSON string", - CreateVirtualGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVirtualGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVirtualGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VirtualGateway` - if (jsonObj.get("VirtualGateway") != null && !jsonObj.get("VirtualGateway").isJsonNull()) { - VirtualGateway.validateJsonObject(jsonObj.getAsJsonObject("VirtualGateway")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVirtualGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVirtualGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateVirtualGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVirtualGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVirtualGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVirtualGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVirtualGatewayResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateVirtualGatewayResponse - */ - public static CreateVirtualGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVirtualGatewayResponse.class); - } - - /** - * Convert an instance of CreateVirtualGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequest.java deleted file mode 100644 index 491246e8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequest.java +++ /dev/null @@ -1,586 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmGroupRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - /** - * The positioning strategy of VMs on hypervisors. By default, or if set to - * `no-strategy` our orchestrator determines the most adequate position for your VMs. - * If set to `attract`, your VMs are deployed on the same hypervisor, which improves - * network performance. If set to `repulse`, your VMs are deployed on a different - * hypervisor, which improves fault tolerance. - */ - @JsonAdapter(PositioningStrategyEnum.Adapter.class) - public enum PositioningStrategyEnum { - ATTRACT("attract"), - - NO_STRATEGY("no-strategy"), - - REPULSE("repulse"); - - private String value; - - PositioningStrategyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositioningStrategyEnum fromValue(String value) { - for (PositioningStrategyEnum b : PositioningStrategyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final PositioningStrategyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositioningStrategyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositioningStrategyEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_POSITIONING_STRATEGY = "PositioningStrategy"; - - @SerializedName(SERIALIZED_NAME_POSITIONING_STRATEGY) - private PositioningStrategyEnum positioningStrategy = PositioningStrategyEnum.NO_STRATEGY; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_COUNT = "VmCount"; - - @SerializedName(SERIALIZED_NAME_VM_COUNT) - private Integer vmCount; - - public static final String SERIALIZED_NAME_VM_GROUP_NAME = "VmGroupName"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_NAME) - private String vmGroupName; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public CreateVmGroupRequest() {} - - public CreateVmGroupRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the VM group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateVmGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVmGroupRequest positioningStrategy(PositioningStrategyEnum positioningStrategy) { - - this.positioningStrategy = positioningStrategy; - return this; - } - - /** - * The positioning strategy of VMs on hypervisors. By default, or if set to - * `no-strategy` our orchestrator determines the most adequate position for your VMs. - * If set to `attract`, your VMs are deployed on the same hypervisor, which improves - * network performance. If set to `repulse`, your VMs are deployed on a different - * hypervisor, which improves fault tolerance. - * - * @return positioningStrategy - */ - @javax.annotation.Nullable - public PositioningStrategyEnum getPositioningStrategy() { - return positioningStrategy; - } - - public void setPositioningStrategy(PositioningStrategyEnum positioningStrategy) { - this.positioningStrategy = positioningStrategy; - } - - public CreateVmGroupRequest securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public CreateVmGroupRequest addSecurityGroupIdsItem(String securityGroupIdsItem) { - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the VM group. - * - * @return securityGroupIds - */ - @javax.annotation.Nonnull - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public CreateVmGroupRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet in which you want to create the VM group. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public CreateVmGroupRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public CreateVmGroupRequest addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to add to the VM group. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public CreateVmGroupRequest vmCount(Integer vmCount) { - - this.vmCount = vmCount; - return this; - } - - /** - * The number of VMs deployed in the VM group. - * - * @return vmCount - */ - @javax.annotation.Nonnull - public Integer getVmCount() { - return vmCount; - } - - public void setVmCount(Integer vmCount) { - this.vmCount = vmCount; - } - - public CreateVmGroupRequest vmGroupName(String vmGroupName) { - - this.vmGroupName = vmGroupName; - return this; - } - - /** - * The name of the VM group. - * - * @return vmGroupName - */ - @javax.annotation.Nonnull - public String getVmGroupName() { - return vmGroupName; - } - - public void setVmGroupName(String vmGroupName) { - this.vmGroupName = vmGroupName; - } - - public CreateVmGroupRequest vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * The ID of the VM template used to launch VMs in the VM group. - * - * @return vmTemplateId - */ - @javax.annotation.Nonnull - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmGroupRequest createVmGroupRequest = (CreateVmGroupRequest) o; - return Objects.equals(this.description, createVmGroupRequest.description) - && Objects.equals(this.dryRun, createVmGroupRequest.dryRun) - && Objects.equals( - this.positioningStrategy, createVmGroupRequest.positioningStrategy) - && Objects.equals(this.securityGroupIds, createVmGroupRequest.securityGroupIds) - && Objects.equals(this.subnetId, createVmGroupRequest.subnetId) - && Objects.equals(this.tags, createVmGroupRequest.tags) - && Objects.equals(this.vmCount, createVmGroupRequest.vmCount) - && Objects.equals(this.vmGroupName, createVmGroupRequest.vmGroupName) - && Objects.equals(this.vmTemplateId, createVmGroupRequest.vmTemplateId); - } - - @Override - public int hashCode() { - return Objects.hash( - description, - dryRun, - positioningStrategy, - securityGroupIds, - subnetId, - tags, - vmCount, - vmGroupName, - vmTemplateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmGroupRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" positioningStrategy: ") - .append(toIndentedString(positioningStrategy)) - .append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmCount: ").append(toIndentedString(vmCount)).append("\n"); - sb.append(" vmGroupName: ").append(toIndentedString(vmGroupName)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("PositioningStrategy"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SubnetId"); - openapiFields.add("Tags"); - openapiFields.add("VmCount"); - openapiFields.add("VmGroupName"); - openapiFields.add("VmTemplateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("SecurityGroupIds"); - openapiRequiredFields.add("SubnetId"); - openapiRequiredFields.add("VmCount"); - openapiRequiredFields.add("VmGroupName"); - openapiRequiredFields.add("VmTemplateId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmGroupRequest is not found in" - + " the empty JSON string", - CreateVmGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVmGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("PositioningStrategy") != null - && !jsonObj.get("PositioningStrategy").isJsonNull()) - && !jsonObj.get("PositioningStrategy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PositioningStrategy` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("PositioningStrategy").toString())); - } - // ensure the required json array is present - if (jsonObj.get("SecurityGroupIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (!jsonObj.get("VmGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupName").toString())); - } - if (!jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateVmGroupRequest - */ - public static CreateVmGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmGroupRequest.class); - } - - /** - * Convert an instance of CreateVmGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponse.java deleted file mode 100644 index 0cecbdba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_GROUP = "VmGroup"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP) - private VmGroup vmGroup; - - public CreateVmGroupResponse() {} - - public CreateVmGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVmGroupResponse vmGroup(VmGroup vmGroup) { - - this.vmGroup = vmGroup; - return this; - } - - /** - * Get vmGroup - * - * @return vmGroup - */ - @javax.annotation.Nullable - public VmGroup getVmGroup() { - return vmGroup; - } - - public void setVmGroup(VmGroup vmGroup) { - this.vmGroup = vmGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmGroupResponse createVmGroupResponse = (CreateVmGroupResponse) o; - return Objects.equals(this.responseContext, createVmGroupResponse.responseContext) - && Objects.equals(this.vmGroup, createVmGroupResponse.vmGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmGroup: ").append(toIndentedString(vmGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmGroupResponse is not found in" - + " the empty JSON string", - CreateVmGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VmGroup` - if (jsonObj.get("VmGroup") != null && !jsonObj.get("VmGroup").isJsonNull()) { - VmGroup.validateJsonObject(jsonObj.getAsJsonObject("VmGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmGroupResponse - * @throws IOException if the JSON string is invalid with respect to CreateVmGroupResponse - */ - public static CreateVmGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmGroupResponse.class); - } - - /** - * Convert an instance of CreateVmGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequest.java deleted file mode 100644 index 52b0d717..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmTemplateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmTemplateRequest { - public static final String SERIALIZED_NAME_CPU_CORES = "CpuCores"; - - @SerializedName(SERIALIZED_NAME_CPU_CORES) - private Integer cpuCores; - - public static final String SERIALIZED_NAME_CPU_GENERATION = "CpuGeneration"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATION) - private String cpuGeneration; - - /** - * The performance of the VMs (`medium` \\| `high` \\| `highest`). - */ - @JsonAdapter(CpuPerformanceEnum.Adapter.class) - public enum CpuPerformanceEnum { - MEDIUM("medium"), - - HIGH("high"), - - HIGHEST("highest"); - - private String value; - - CpuPerformanceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CpuPerformanceEnum fromValue(String value) { - for (CpuPerformanceEnum b : CpuPerformanceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CpuPerformanceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CpuPerformanceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CpuPerformanceEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CPU_PERFORMANCE = "CpuPerformance"; - - @SerializedName(SERIALIZED_NAME_CPU_PERFORMANCE) - private CpuPerformanceEnum cpuPerformance = CpuPerformanceEnum.HIGH; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_RAM = "Ram"; - - @SerializedName(SERIALIZED_NAME_RAM) - private Integer ram; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_NAME = "VmTemplateName"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_NAME) - private String vmTemplateName; - - public CreateVmTemplateRequest() {} - - public CreateVmTemplateRequest cpuCores(Integer cpuCores) { - - this.cpuCores = cpuCores; - return this; - } - - /** - * The number of vCores to use for each VM. - * - * @return cpuCores - */ - @javax.annotation.Nonnull - public Integer getCpuCores() { - return cpuCores; - } - - public void setCpuCores(Integer cpuCores) { - this.cpuCores = cpuCores; - } - - public CreateVmTemplateRequest cpuGeneration(String cpuGeneration) { - - this.cpuGeneration = cpuGeneration; - return this; - } - - /** - * The processor generation to use for each VM (for example, `v4`). - * - * @return cpuGeneration - */ - @javax.annotation.Nonnull - public String getCpuGeneration() { - return cpuGeneration; - } - - public void setCpuGeneration(String cpuGeneration) { - this.cpuGeneration = cpuGeneration; - } - - public CreateVmTemplateRequest cpuPerformance(CpuPerformanceEnum cpuPerformance) { - - this.cpuPerformance = cpuPerformance; - return this; - } - - /** - * The performance of the VMs (`medium` \\| `high` \\| `highest`). - * - * @return cpuPerformance - */ - @javax.annotation.Nullable - public CpuPerformanceEnum getCpuPerformance() { - return cpuPerformance; - } - - public void setCpuPerformance(CpuPerformanceEnum cpuPerformance) { - this.cpuPerformance = cpuPerformance; - } - - public CreateVmTemplateRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A description for the VM template. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateVmTemplateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVmTemplateRequest imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI to use for each VM. You can find a list of OMIs by calling the - * [ReadImages](#readimages) method. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public CreateVmTemplateRequest keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair to use for each VM. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public CreateVmTemplateRequest ram(Integer ram) { - - this.ram = ram; - return this; - } - - /** - * The amount of RAM to use for each VM. - * - * @return ram - */ - @javax.annotation.Nonnull - public Integer getRam() { - return ram; - } - - public void setRam(Integer ram) { - this.ram = ram; - } - - public CreateVmTemplateRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public CreateVmTemplateRequest addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to add to the VM template. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public CreateVmTemplateRequest vmTemplateName(String vmTemplateName) { - - this.vmTemplateName = vmTemplateName; - return this; - } - - /** - * The name of the VM template. - * - * @return vmTemplateName - */ - @javax.annotation.Nonnull - public String getVmTemplateName() { - return vmTemplateName; - } - - public void setVmTemplateName(String vmTemplateName) { - this.vmTemplateName = vmTemplateName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmTemplateRequest createVmTemplateRequest = (CreateVmTemplateRequest) o; - return Objects.equals(this.cpuCores, createVmTemplateRequest.cpuCores) - && Objects.equals(this.cpuGeneration, createVmTemplateRequest.cpuGeneration) - && Objects.equals(this.cpuPerformance, createVmTemplateRequest.cpuPerformance) - && Objects.equals(this.description, createVmTemplateRequest.description) - && Objects.equals(this.dryRun, createVmTemplateRequest.dryRun) - && Objects.equals(this.imageId, createVmTemplateRequest.imageId) - && Objects.equals(this.keypairName, createVmTemplateRequest.keypairName) - && Objects.equals(this.ram, createVmTemplateRequest.ram) - && Objects.equals(this.tags, createVmTemplateRequest.tags) - && Objects.equals(this.vmTemplateName, createVmTemplateRequest.vmTemplateName); - } - - @Override - public int hashCode() { - return Objects.hash( - cpuCores, - cpuGeneration, - cpuPerformance, - description, - dryRun, - imageId, - keypairName, - ram, - tags, - vmTemplateName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmTemplateRequest {\n"); - sb.append(" cpuCores: ").append(toIndentedString(cpuCores)).append("\n"); - sb.append(" cpuGeneration: ").append(toIndentedString(cpuGeneration)).append("\n"); - sb.append(" cpuPerformance: ").append(toIndentedString(cpuPerformance)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" ram: ").append(toIndentedString(ram)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmTemplateName: ").append(toIndentedString(vmTemplateName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CpuCores"); - openapiFields.add("CpuGeneration"); - openapiFields.add("CpuPerformance"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("ImageId"); - openapiFields.add("KeypairName"); - openapiFields.add("Ram"); - openapiFields.add("Tags"); - openapiFields.add("VmTemplateName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CpuCores"); - openapiRequiredFields.add("CpuGeneration"); - openapiRequiredFields.add("ImageId"); - openapiRequiredFields.add("Ram"); - openapiRequiredFields.add("VmTemplateName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmTemplateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmTemplateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmTemplateRequest is not found" - + " in the empty JSON string", - CreateVmTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmTemplateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVmTemplateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("CpuGeneration").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuGeneration` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CpuGeneration").toString())); - } - if ((jsonObj.get("CpuPerformance") != null && !jsonObj.get("CpuPerformance").isJsonNull()) - && !jsonObj.get("CpuPerformance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuPerformance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("CpuPerformance").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (!jsonObj.get("VmTemplateName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VmTemplateName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmTemplateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmTemplateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmTemplateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmTemplateRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmTemplateRequest - * @throws IOException if the JSON string is invalid with respect to CreateVmTemplateRequest - */ - public static CreateVmTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmTemplateRequest.class); - } - - /** - * Convert an instance of CreateVmTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponse.java deleted file mode 100644 index 9bb784aa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmTemplateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmTemplateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_TEMPLATE = "VmTemplate"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE) - private VmTemplate vmTemplate; - - public CreateVmTemplateResponse() {} - - public CreateVmTemplateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVmTemplateResponse vmTemplate(VmTemplate vmTemplate) { - - this.vmTemplate = vmTemplate; - return this; - } - - /** - * Get vmTemplate - * - * @return vmTemplate - */ - @javax.annotation.Nullable - public VmTemplate getVmTemplate() { - return vmTemplate; - } - - public void setVmTemplate(VmTemplate vmTemplate) { - this.vmTemplate = vmTemplate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmTemplateResponse createVmTemplateResponse = (CreateVmTemplateResponse) o; - return Objects.equals(this.responseContext, createVmTemplateResponse.responseContext) - && Objects.equals(this.vmTemplate, createVmTemplateResponse.vmTemplate); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmTemplate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmTemplateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmTemplate: ").append(toIndentedString(vmTemplate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmTemplate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmTemplateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmTemplateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmTemplateResponse is not found" - + " in the empty JSON string", - CreateVmTemplateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmTemplateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmTemplateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VmTemplate` - if (jsonObj.get("VmTemplate") != null && !jsonObj.get("VmTemplate").isJsonNull()) { - VmTemplate.validateJsonObject(jsonObj.getAsJsonObject("VmTemplate")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmTemplateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmTemplateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmTemplateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmTemplateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmTemplateResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmTemplateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmTemplateResponse - * @throws IOException if the JSON string is invalid with respect to CreateVmTemplateResponse - */ - public static CreateVmTemplateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmTemplateResponse.class); - } - - /** - * Convert an instance of CreateVmTemplateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequest.java deleted file mode 100644 index a4e2d133..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequest.java +++ /dev/null @@ -1,1043 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmsRequest { - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS = "BlockDeviceMappings"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS) - private List blockDeviceMappings = null; - - public static final String SERIALIZED_NAME_BOOT_ON_CREATION = "BootOnCreation"; - - @SerializedName(SERIALIZED_NAME_BOOT_ON_CREATION) - private Boolean bootOnCreation = true; - - public static final String SERIALIZED_NAME_BSU_OPTIMIZED = "BsuOptimized"; - - @SerializedName(SERIALIZED_NAME_BSU_OPTIMIZED) - private Boolean bsuOptimized; - - public static final String SERIALIZED_NAME_CLIENT_TOKEN = "ClientToken"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKEN) - private String clientToken; - - public static final String SERIALIZED_NAME_DELETION_PROTECTION = "DeletionProtection"; - - @SerializedName(SERIALIZED_NAME_DELETION_PROTECTION) - private Boolean deletionProtection; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_MAX_VMS_COUNT = "MaxVmsCount"; - - @SerializedName(SERIALIZED_NAME_MAX_VMS_COUNT) - private Integer maxVmsCount; - - public static final String SERIALIZED_NAME_MIN_VMS_COUNT = "MinVmsCount"; - - @SerializedName(SERIALIZED_NAME_MIN_VMS_COUNT) - private Integer minVmsCount; - - public static final String SERIALIZED_NAME_NESTED_VIRTUALIZATION = "NestedVirtualization"; - - @SerializedName(SERIALIZED_NAME_NESTED_VIRTUALIZATION) - private Boolean nestedVirtualization = false; - - public static final String SERIALIZED_NAME_NICS = "Nics"; - - @SerializedName(SERIALIZED_NAME_NICS) - private List nics = null; - - /** - * The performance of the VM (`medium` \\| `high` \\| `highest`). - * By default, `high`. This parameter is ignored if you specify a performance flag - * directly in the `VmType` parameter. - */ - @JsonAdapter(PerformanceEnum.Adapter.class) - public enum PerformanceEnum { - MEDIUM("medium"), - - HIGH("high"), - - HIGHEST("highest"); - - private String value; - - PerformanceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PerformanceEnum fromValue(String value) { - for (PerformanceEnum b : PerformanceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PerformanceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PerformanceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PerformanceEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERFORMANCE = "Performance"; - - @SerializedName(SERIALIZED_NAME_PERFORMANCE) - private PerformanceEnum performance = PerformanceEnum.HIGH; - - public static final String SERIALIZED_NAME_PLACEMENT = "Placement"; - - @SerializedName(SERIALIZED_NAME_PLACEMENT) - private Placement placement; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_USER_DATA = "UserData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) - private String userData; - - public static final String SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR = - "VmInitiatedShutdownBehavior"; - - @SerializedName(SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR) - private String vmInitiatedShutdownBehavior = "stop"; - - public static final String SERIALIZED_NAME_VM_TYPE = "VmType"; - - @SerializedName(SERIALIZED_NAME_VM_TYPE) - private String vmType; - - public CreateVmsRequest() {} - - public CreateVmsRequest blockDeviceMappings( - List blockDeviceMappings) { - - this.blockDeviceMappings = blockDeviceMappings; - return this; - } - - public CreateVmsRequest addBlockDeviceMappingsItem( - BlockDeviceMappingVmCreation blockDeviceMappingsItem) { - if (this.blockDeviceMappings == null) { - this.blockDeviceMappings = new ArrayList<>(); - } - this.blockDeviceMappings.add(blockDeviceMappingsItem); - return this; - } - - /** - * One or more block device mappings. - * - * @return blockDeviceMappings - */ - @javax.annotation.Nullable - public List getBlockDeviceMappings() { - return blockDeviceMappings; - } - - public void setBlockDeviceMappings(List blockDeviceMappings) { - this.blockDeviceMappings = blockDeviceMappings; - } - - public CreateVmsRequest bootOnCreation(Boolean bootOnCreation) { - - this.bootOnCreation = bootOnCreation; - return this; - } - - /** - * By default or if true, the VM is started on creation. If false, the VM is stopped on - * creation. - * - * @return bootOnCreation - */ - @javax.annotation.Nullable - public Boolean getBootOnCreation() { - return bootOnCreation; - } - - public void setBootOnCreation(Boolean bootOnCreation) { - this.bootOnCreation = bootOnCreation; - } - - public CreateVmsRequest bsuOptimized(Boolean bsuOptimized) { - - this.bsuOptimized = bsuOptimized; - return this; - } - - /** - * This parameter is not available. It is present in our API for the sake of historical - * compatibility with AWS. - * - * @return bsuOptimized - */ - @javax.annotation.Nullable - public Boolean getBsuOptimized() { - return bsuOptimized; - } - - public void setBsuOptimized(Boolean bsuOptimized) { - this.bsuOptimized = bsuOptimized; - } - - public CreateVmsRequest clientToken(String clientToken) { - - this.clientToken = clientToken; - return this; - } - - /** - * A unique identifier which enables you to manage the idempotency. - * - * @return clientToken - */ - @javax.annotation.Nullable - public String getClientToken() { - return clientToken; - } - - public void setClientToken(String clientToken) { - this.clientToken = clientToken; - } - - public CreateVmsRequest deletionProtection(Boolean deletionProtection) { - - this.deletionProtection = deletionProtection; - return this; - } - - /** - * If true, you cannot delete the VM unless you change this parameter back to false. - * - * @return deletionProtection - */ - @javax.annotation.Nullable - public Boolean getDeletionProtection() { - return deletionProtection; - } - - public void setDeletionProtection(Boolean deletionProtection) { - this.deletionProtection = deletionProtection; - } - - public CreateVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVmsRequest imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI used to create the VM. You can find the list of OMIs by calling the - * [ReadImages](#readimages) method. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public CreateVmsRequest keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public CreateVmsRequest maxVmsCount(Integer maxVmsCount) { - - this.maxVmsCount = maxVmsCount; - return this; - } - - /** - * The maximum number of VMs you want to create. If all the VMs cannot be created, the largest - * possible number of VMs above MinVmsCount is created. - * - * @return maxVmsCount - */ - @javax.annotation.Nullable - public Integer getMaxVmsCount() { - return maxVmsCount; - } - - public void setMaxVmsCount(Integer maxVmsCount) { - this.maxVmsCount = maxVmsCount; - } - - public CreateVmsRequest minVmsCount(Integer minVmsCount) { - - this.minVmsCount = minVmsCount; - return this; - } - - /** - * The minimum number of VMs you want to create. If this number of VMs cannot be created, no VMs - * are created. - * - * @return minVmsCount - */ - @javax.annotation.Nullable - public Integer getMinVmsCount() { - return minVmsCount; - } - - public void setMinVmsCount(Integer minVmsCount) { - this.minVmsCount = minVmsCount; - } - - public CreateVmsRequest nestedVirtualization(Boolean nestedVirtualization) { - - this.nestedVirtualization = nestedVirtualization; - return this; - } - - /** - * (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled. - * - * @return nestedVirtualization - */ - @javax.annotation.Nullable - public Boolean getNestedVirtualization() { - return nestedVirtualization; - } - - public void setNestedVirtualization(Boolean nestedVirtualization) { - this.nestedVirtualization = nestedVirtualization; - } - - public CreateVmsRequest nics(List nics) { - - this.nics = nics; - return this; - } - - public CreateVmsRequest addNicsItem(NicForVmCreation nicsItem) { - if (this.nics == null) { - this.nics = new ArrayList<>(); - } - this.nics.add(nicsItem); - return this; - } - - /** - * One or more NICs. If you specify this parameter, you must not specify the - * `SubnetId` and `SubregionName` parameters. You also must define one NIC - * as the primary network interface of the VM with `0` as its device number. - * - * @return nics - */ - @javax.annotation.Nullable - public List getNics() { - return nics; - } - - public void setNics(List nics) { - this.nics = nics; - } - - public CreateVmsRequest performance(PerformanceEnum performance) { - - this.performance = performance; - return this; - } - - /** - * The performance of the VM (`medium` \\| `high` \\| `highest`). - * By default, `high`. This parameter is ignored if you specify a performance flag - * directly in the `VmType` parameter. - * - * @return performance - */ - @javax.annotation.Nullable - public PerformanceEnum getPerformance() { - return performance; - } - - public void setPerformance(PerformanceEnum performance) { - this.performance = performance; - } - - public CreateVmsRequest placement(Placement placement) { - - this.placement = placement; - return this; - } - - /** - * Get placement - * - * @return placement - */ - @javax.annotation.Nullable - public Placement getPlacement() { - return placement; - } - - public void setPlacement(Placement placement) { - this.placement = placement; - } - - public CreateVmsRequest privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public CreateVmsRequest addPrivateIpsItem(String privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * One or more private IPs of the VM. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public CreateVmsRequest securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public CreateVmsRequest addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security group for the VMs. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public CreateVmsRequest securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public CreateVmsRequest addSecurityGroupsItem(String securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * One or more names of security groups for the VMs. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public CreateVmsRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet in which you want to create the VM. If you specify this parameter, you - * must not specify the `Nics` parameter. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public CreateVmsRequest userData(String userData) { - - this.userData = userData; - return this; - } - - /** - * Data or script used to add a specific configuration to the VM. It must be Base64-encoded and - * is limited to 500 kibibytes (KiB). - * - * @return userData - */ - @javax.annotation.Nullable - public String getUserData() { - return userData; - } - - public void setUserData(String userData) { - this.userData = userData; - } - - public CreateVmsRequest vmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - return this; - } - - /** - * The VM behavior when you stop it. By default or if set to `stop`, the VM stops. If - * set to `restart`, the VM stops then automatically restarts. If set to - * `terminate`, the VM stops and is terminated. - * - * @return vmInitiatedShutdownBehavior - */ - @javax.annotation.Nullable - public String getVmInitiatedShutdownBehavior() { - return vmInitiatedShutdownBehavior; - } - - public void setVmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - } - - public CreateVmsRequest vmType(String vmType) { - - this.vmType = vmType; - return this; - } - - /** - * The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` or - * `tinavW.cXrY` format), or an AWS type (for example, `t2.small`, which is - * the default value).<br /> If you specify an AWS type, it is converted in the background - * to its corresponding TINA type, but the AWS type is still returned. If the specified or - * converted TINA type includes a performance flag, this performance flag is applied regardless - * of the value you may have provided in the `Performance` parameter. For more - * information, see [VM Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * - * @return vmType - */ - @javax.annotation.Nullable - public String getVmType() { - return vmType; - } - - public void setVmType(String vmType) { - this.vmType = vmType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmsRequest createVmsRequest = (CreateVmsRequest) o; - return Objects.equals(this.blockDeviceMappings, createVmsRequest.blockDeviceMappings) - && Objects.equals(this.bootOnCreation, createVmsRequest.bootOnCreation) - && Objects.equals(this.bsuOptimized, createVmsRequest.bsuOptimized) - && Objects.equals(this.clientToken, createVmsRequest.clientToken) - && Objects.equals(this.deletionProtection, createVmsRequest.deletionProtection) - && Objects.equals(this.dryRun, createVmsRequest.dryRun) - && Objects.equals(this.imageId, createVmsRequest.imageId) - && Objects.equals(this.keypairName, createVmsRequest.keypairName) - && Objects.equals(this.maxVmsCount, createVmsRequest.maxVmsCount) - && Objects.equals(this.minVmsCount, createVmsRequest.minVmsCount) - && Objects.equals(this.nestedVirtualization, createVmsRequest.nestedVirtualization) - && Objects.equals(this.nics, createVmsRequest.nics) - && Objects.equals(this.performance, createVmsRequest.performance) - && Objects.equals(this.placement, createVmsRequest.placement) - && Objects.equals(this.privateIps, createVmsRequest.privateIps) - && Objects.equals(this.securityGroupIds, createVmsRequest.securityGroupIds) - && Objects.equals(this.securityGroups, createVmsRequest.securityGroups) - && Objects.equals(this.subnetId, createVmsRequest.subnetId) - && Objects.equals(this.userData, createVmsRequest.userData) - && Objects.equals( - this.vmInitiatedShutdownBehavior, - createVmsRequest.vmInitiatedShutdownBehavior) - && Objects.equals(this.vmType, createVmsRequest.vmType); - } - - @Override - public int hashCode() { - return Objects.hash( - blockDeviceMappings, - bootOnCreation, - bsuOptimized, - clientToken, - deletionProtection, - dryRun, - imageId, - keypairName, - maxVmsCount, - minVmsCount, - nestedVirtualization, - nics, - performance, - placement, - privateIps, - securityGroupIds, - securityGroups, - subnetId, - userData, - vmInitiatedShutdownBehavior, - vmType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmsRequest {\n"); - sb.append(" blockDeviceMappings: ") - .append(toIndentedString(blockDeviceMappings)) - .append("\n"); - sb.append(" bootOnCreation: ").append(toIndentedString(bootOnCreation)).append("\n"); - sb.append(" bsuOptimized: ").append(toIndentedString(bsuOptimized)).append("\n"); - sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n"); - sb.append(" deletionProtection: ") - .append(toIndentedString(deletionProtection)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" maxVmsCount: ").append(toIndentedString(maxVmsCount)).append("\n"); - sb.append(" minVmsCount: ").append(toIndentedString(minVmsCount)).append("\n"); - sb.append(" nestedVirtualization: ") - .append(toIndentedString(nestedVirtualization)) - .append("\n"); - sb.append(" nics: ").append(toIndentedString(nics)).append("\n"); - sb.append(" performance: ").append(toIndentedString(performance)).append("\n"); - sb.append(" placement: ").append(toIndentedString(placement)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" vmInitiatedShutdownBehavior: ") - .append(toIndentedString(vmInitiatedShutdownBehavior)) - .append("\n"); - sb.append(" vmType: ").append(toIndentedString(vmType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BlockDeviceMappings"); - openapiFields.add("BootOnCreation"); - openapiFields.add("BsuOptimized"); - openapiFields.add("ClientToken"); - openapiFields.add("DeletionProtection"); - openapiFields.add("DryRun"); - openapiFields.add("ImageId"); - openapiFields.add("KeypairName"); - openapiFields.add("MaxVmsCount"); - openapiFields.add("MinVmsCount"); - openapiFields.add("NestedVirtualization"); - openapiFields.add("Nics"); - openapiFields.add("Performance"); - openapiFields.add("Placement"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SecurityGroups"); - openapiFields.add("SubnetId"); - openapiFields.add("UserData"); - openapiFields.add("VmInitiatedShutdownBehavior"); - openapiFields.add("VmType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ImageId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmsRequest is not found in the" - + " empty JSON string", - CreateVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVmsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (jsonObj.get("BlockDeviceMappings") != null - && !jsonObj.get("BlockDeviceMappings").isJsonNull()) { - JsonArray jsonArrayblockDeviceMappings = jsonObj.getAsJsonArray("BlockDeviceMappings"); - if (jsonArrayblockDeviceMappings != null) { - // ensure the json data is an array - if (!jsonObj.get("BlockDeviceMappings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappings` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappings").toString())); - } - - // validate the optional field `BlockDeviceMappings` (array) - for (int i = 0; i < jsonArrayblockDeviceMappings.size(); i++) { - BlockDeviceMappingVmCreation.validateJsonObject( - jsonArrayblockDeviceMappings.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("ClientToken") != null && !jsonObj.get("ClientToken").isJsonNull()) - && !jsonObj.get("ClientToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ClientToken").toString())); - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if (jsonObj.get("Nics") != null && !jsonObj.get("Nics").isJsonNull()) { - JsonArray jsonArraynics = jsonObj.getAsJsonArray("Nics"); - if (jsonArraynics != null) { - // ensure the json data is an array - if (!jsonObj.get("Nics").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Nics` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Nics").toString())); - } - - // validate the optional field `Nics` (array) - for (int i = 0; i < jsonArraynics.size(); i++) { - NicForVmCreation.validateJsonObject(jsonArraynics.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("Performance") != null && !jsonObj.get("Performance").isJsonNull()) - && !jsonObj.get("Performance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Performance` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Performance").toString())); - } - // validate the optional field `Placement` - if (jsonObj.get("Placement") != null && !jsonObj.get("Placement").isJsonNull()) { - Placement.validateJsonObject(jsonObj.getAsJsonObject("Placement")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PrivateIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if ((jsonObj.get("UserData") != null && !jsonObj.get("UserData").isJsonNull()) - && !jsonObj.get("UserData").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserData` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserData").toString())); - } - if ((jsonObj.get("VmInitiatedShutdownBehavior") != null - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonNull()) - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmInitiatedShutdownBehavior` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("VmInitiatedShutdownBehavior").toString())); - } - if ((jsonObj.get("VmType") != null && !jsonObj.get("VmType").isJsonNull()) - && !jsonObj.get("VmType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmType` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmsRequest - * @throws IOException if the JSON string is invalid with respect to CreateVmsRequest - */ - public static CreateVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmsRequest.class); - } - - /** - * Convert an instance of CreateVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponse.java deleted file mode 100644 index 204d11e5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVmsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VMS = "Vms"; - - @SerializedName(SERIALIZED_NAME_VMS) - private List vms = null; - - public CreateVmsResponse() {} - - public CreateVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVmsResponse vms(List vms) { - - this.vms = vms; - return this; - } - - public CreateVmsResponse addVmsItem(Vm vmsItem) { - if (this.vms == null) { - this.vms = new ArrayList<>(); - } - this.vms.add(vmsItem); - return this; - } - - /** - * Information about one or more created VMs. - * - * @return vms - */ - @javax.annotation.Nullable - public List getVms() { - return vms; - } - - public void setVms(List vms) { - this.vms = vms; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVmsResponse createVmsResponse = (CreateVmsResponse) o; - return Objects.equals(this.responseContext, createVmsResponse.responseContext) - && Objects.equals(this.vms, createVmsResponse.vms); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vms); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVmsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vms: ").append(toIndentedString(vms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Vms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVmsResponse is not found in the" - + " empty JSON string", - CreateVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Vms") != null && !jsonObj.get("Vms").isJsonNull()) { - JsonArray jsonArrayvms = jsonObj.getAsJsonArray("Vms"); - if (jsonArrayvms != null) { - // ensure the json data is an array - if (!jsonObj.get("Vms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vms` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Vms").toString())); - } - - // validate the optional field `Vms` (array) - for (int i = 0; i < jsonArrayvms.size(); i++) { - Vm.validateJsonObject(jsonArrayvms.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVmsResponse - * @throws IOException if the JSON string is invalid with respect to CreateVmsResponse - */ - public static CreateVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVmsResponse.class); - } - - /** - * Convert an instance of CreateVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequest.java deleted file mode 100644 index aad9fc31..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequest.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVolumeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVolumeRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IOPS = "Iops"; - - @SerializedName(SERIALIZED_NAME_IOPS) - private Integer iops; - - public static final String SERIALIZED_NAME_SIZE = "Size"; - - @SerializedName(SERIALIZED_NAME_SIZE) - private Integer size; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_VOLUME_TYPE = "VolumeType"; - - @SerializedName(SERIALIZED_NAME_VOLUME_TYPE) - private String volumeType; - - public CreateVolumeRequest() {} - - public CreateVolumeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVolumeRequest iops(Integer iops) { - - this.iops = iops; - return this; - } - - /** - * The number of I/O operations per second (IOPS). This parameter must be specified only if you - * create an `io1` volume. The maximum number of IOPS allowed for `io1` - * volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. - * - * @return iops - */ - @javax.annotation.Nullable - public Integer getIops() { - return iops; - } - - public void setIops(Integer iops) { - this.iops = iops; - } - - public CreateVolumeRequest size(Integer size) { - - this.size = size; - return this; - } - - /** - * The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 - * GiB. This parameter is required if the volume is not created from a snapshot - * (`SnapshotId` unspecified). - * - * @return size - */ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public CreateVolumeRequest snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot from which you want to create the volume. - * - * @return snapshotId - */ - @javax.annotation.Nullable - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - public CreateVolumeRequest subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion in which you want to create the volume. - * - * @return subregionName - */ - @javax.annotation.Nonnull - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public CreateVolumeRequest volumeType(String volumeType) { - - this.volumeType = volumeType; - return this; - } - - /** - * The type of volume you want to create (`io1` \\| `gp2` \\| - * `standard`). If not specified, a `standard` volume is created.<br - * /> For more information about volume types, see [About Volumes > Volume Types and - * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops). - * - * @return volumeType - */ - @javax.annotation.Nullable - public String getVolumeType() { - return volumeType; - } - - public void setVolumeType(String volumeType) { - this.volumeType = volumeType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVolumeRequest createVolumeRequest = (CreateVolumeRequest) o; - return Objects.equals(this.dryRun, createVolumeRequest.dryRun) - && Objects.equals(this.iops, createVolumeRequest.iops) - && Objects.equals(this.size, createVolumeRequest.size) - && Objects.equals(this.snapshotId, createVolumeRequest.snapshotId) - && Objects.equals(this.subregionName, createVolumeRequest.subregionName) - && Objects.equals(this.volumeType, createVolumeRequest.volumeType); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, iops, size, snapshotId, subregionName, volumeType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVolumeRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" iops: ").append(toIndentedString(iops)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" volumeType: ").append(toIndentedString(volumeType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Iops"); - openapiFields.add("Size"); - openapiFields.add("SnapshotId"); - openapiFields.add("SubregionName"); - openapiFields.add("VolumeType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("SubregionName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVolumeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVolumeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVolumeRequest is not found in" - + " the empty JSON string", - CreateVolumeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVolumeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVolumeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVolumeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("SnapshotId") != null && !jsonObj.get("SnapshotId").isJsonNull()) - && !jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - if (!jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("VolumeType") != null && !jsonObj.get("VolumeType").isJsonNull()) - && !jsonObj.get("VolumeType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVolumeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVolumeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVolumeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVolumeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVolumeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVolumeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVolumeRequest - * @throws IOException if the JSON string is invalid with respect to CreateVolumeRequest - */ - public static CreateVolumeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVolumeRequest.class); - } - - /** - * Convert an instance of CreateVolumeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponse.java deleted file mode 100644 index 364cbd0a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVolumeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVolumeResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VOLUME = "Volume"; - - @SerializedName(SERIALIZED_NAME_VOLUME) - private Volume volume; - - public CreateVolumeResponse() {} - - public CreateVolumeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVolumeResponse volume(Volume volume) { - - this.volume = volume; - return this; - } - - /** - * Get volume - * - * @return volume - */ - @javax.annotation.Nullable - public Volume getVolume() { - return volume; - } - - public void setVolume(Volume volume) { - this.volume = volume; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVolumeResponse createVolumeResponse = (CreateVolumeResponse) o; - return Objects.equals(this.responseContext, createVolumeResponse.responseContext) - && Objects.equals(this.volume, createVolumeResponse.volume); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, volume); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVolumeResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" volume: ").append(toIndentedString(volume)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Volume"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVolumeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVolumeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVolumeResponse is not found in" - + " the empty JSON string", - CreateVolumeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVolumeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVolumeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Volume` - if (jsonObj.get("Volume") != null && !jsonObj.get("Volume").isJsonNull()) { - Volume.validateJsonObject(jsonObj.getAsJsonObject("Volume")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVolumeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVolumeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVolumeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVolumeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVolumeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVolumeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVolumeResponse - * @throws IOException if the JSON string is invalid with respect to CreateVolumeResponse - */ - public static CreateVolumeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVolumeResponse.class); - } - - /** - * Convert an instance of CreateVolumeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequest.java deleted file mode 100644 index 2d81900a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequest.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVpnConnectionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVpnConnectionRequest { - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_ID = "ClientGatewayId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_ID) - private String clientGatewayId; - - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_STATIC_ROUTES_ONLY = "StaticRoutesOnly"; - - @SerializedName(SERIALIZED_NAME_STATIC_ROUTES_ONLY) - private Boolean staticRoutesOnly; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public CreateVpnConnectionRequest() {} - - public CreateVpnConnectionRequest clientGatewayId(String clientGatewayId) { - - this.clientGatewayId = clientGatewayId; - return this; - } - - /** - * The ID of the client gateway. - * - * @return clientGatewayId - */ - @javax.annotation.Nonnull - public String getClientGatewayId() { - return clientGatewayId; - } - - public void setClientGatewayId(String clientGatewayId) { - this.clientGatewayId = clientGatewayId; - } - - public CreateVpnConnectionRequest connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The type of VPN connection (always `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nonnull - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public CreateVpnConnectionRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVpnConnectionRequest staticRoutesOnly(Boolean staticRoutesOnly) { - - this.staticRoutesOnly = staticRoutesOnly; - return this; - } - - /** - * By default or if false, the VPN connection uses dynamic routing with Border Gateway Protocol - * (BGP). If true, routing is controlled using static routes. For more information about how to - * create and delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) - * and [DeleteVpnConnectionRoute](#deletevpnconnectionroute). - * - * @return staticRoutesOnly - */ - @javax.annotation.Nullable - public Boolean getStaticRoutesOnly() { - return staticRoutesOnly; - } - - public void setStaticRoutesOnly(Boolean staticRoutesOnly) { - this.staticRoutesOnly = staticRoutesOnly; - } - - public CreateVpnConnectionRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVpnConnectionRequest createVpnConnectionRequest = (CreateVpnConnectionRequest) o; - return Objects.equals(this.clientGatewayId, createVpnConnectionRequest.clientGatewayId) - && Objects.equals(this.connectionType, createVpnConnectionRequest.connectionType) - && Objects.equals(this.dryRun, createVpnConnectionRequest.dryRun) - && Objects.equals( - this.staticRoutesOnly, createVpnConnectionRequest.staticRoutesOnly) - && Objects.equals( - this.virtualGatewayId, createVpnConnectionRequest.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash( - clientGatewayId, connectionType, dryRun, staticRoutesOnly, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVpnConnectionRequest {\n"); - sb.append(" clientGatewayId: ").append(toIndentedString(clientGatewayId)).append("\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" staticRoutesOnly: ").append(toIndentedString(staticRoutesOnly)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGatewayId"); - openapiFields.add("ConnectionType"); - openapiFields.add("DryRun"); - openapiFields.add("StaticRoutesOnly"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ClientGatewayId"); - openapiRequiredFields.add("ConnectionType"); - openapiRequiredFields.add("VirtualGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVpnConnectionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVpnConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVpnConnectionRequest is not" - + " found in the empty JSON string", - CreateVpnConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVpnConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVpnConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVpnConnectionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ClientGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGatewayId").toString())); - } - if (!jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVpnConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVpnConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVpnConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVpnConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVpnConnectionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVpnConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVpnConnectionRequest - * @throws IOException if the JSON string is invalid with respect to CreateVpnConnectionRequest - */ - public static CreateVpnConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVpnConnectionRequest.class); - } - - /** - * Convert an instance of CreateVpnConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponse.java deleted file mode 100644 index 5f55eee7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVpnConnectionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVpnConnectionResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VPN_CONNECTION = "VpnConnection"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION) - private VpnConnection vpnConnection; - - public CreateVpnConnectionResponse() {} - - public CreateVpnConnectionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public CreateVpnConnectionResponse vpnConnection(VpnConnection vpnConnection) { - - this.vpnConnection = vpnConnection; - return this; - } - - /** - * Get vpnConnection - * - * @return vpnConnection - */ - @javax.annotation.Nullable - public VpnConnection getVpnConnection() { - return vpnConnection; - } - - public void setVpnConnection(VpnConnection vpnConnection) { - this.vpnConnection = vpnConnection; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVpnConnectionResponse createVpnConnectionResponse = (CreateVpnConnectionResponse) o; - return Objects.equals(this.responseContext, createVpnConnectionResponse.responseContext) - && Objects.equals(this.vpnConnection, createVpnConnectionResponse.vpnConnection); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vpnConnection); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVpnConnectionResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vpnConnection: ").append(toIndentedString(vpnConnection)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VpnConnection"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVpnConnectionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVpnConnectionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVpnConnectionResponse is not" - + " found in the empty JSON string", - CreateVpnConnectionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVpnConnectionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVpnConnectionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VpnConnection` - if (jsonObj.get("VpnConnection") != null && !jsonObj.get("VpnConnection").isJsonNull()) { - VpnConnection.validateJsonObject(jsonObj.getAsJsonObject("VpnConnection")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVpnConnectionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVpnConnectionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVpnConnectionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVpnConnectionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVpnConnectionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVpnConnectionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVpnConnectionResponse - * @throws IOException if the JSON string is invalid with respect to CreateVpnConnectionResponse - */ - public static CreateVpnConnectionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVpnConnectionResponse.class); - } - - /** - * Convert an instance of CreateVpnConnectionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequest.java deleted file mode 100644 index 138d8154..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequest.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVpnConnectionRouteRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVpnConnectionRouteRequest { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_ID = "VpnConnectionId"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_ID) - private String vpnConnectionId; - - public CreateVpnConnectionRouteRequest() {} - - public CreateVpnConnectionRouteRequest destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The network prefix of the route, in CIDR notation (for example, `10.12.0.0/16`). - * - * @return destinationIpRange - */ - @javax.annotation.Nonnull - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public CreateVpnConnectionRouteRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public CreateVpnConnectionRouteRequest vpnConnectionId(String vpnConnectionId) { - - this.vpnConnectionId = vpnConnectionId; - return this; - } - - /** - * The ID of the target VPN connection of the static route. - * - * @return vpnConnectionId - */ - @javax.annotation.Nonnull - public String getVpnConnectionId() { - return vpnConnectionId; - } - - public void setVpnConnectionId(String vpnConnectionId) { - this.vpnConnectionId = vpnConnectionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest = - (CreateVpnConnectionRouteRequest) o; - return Objects.equals( - this.destinationIpRange, createVpnConnectionRouteRequest.destinationIpRange) - && Objects.equals(this.dryRun, createVpnConnectionRouteRequest.dryRun) - && Objects.equals( - this.vpnConnectionId, createVpnConnectionRouteRequest.vpnConnectionId); - } - - @Override - public int hashCode() { - return Objects.hash(destinationIpRange, dryRun, vpnConnectionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVpnConnectionRouteRequest {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vpnConnectionId: ").append(toIndentedString(vpnConnectionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DryRun"); - openapiFields.add("VpnConnectionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DestinationIpRange"); - openapiRequiredFields.add("VpnConnectionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateVpnConnectionRouteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVpnConnectionRouteRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVpnConnectionRouteRequest is" - + " not found in the empty JSON string", - CreateVpnConnectionRouteRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVpnConnectionRouteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVpnConnectionRouteRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVpnConnectionRouteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if (!jsonObj.get("VpnConnectionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnectionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVpnConnectionRouteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVpnConnectionRouteRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateVpnConnectionRouteRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVpnConnectionRouteRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVpnConnectionRouteRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVpnConnectionRouteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVpnConnectionRouteRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateVpnConnectionRouteRequest - */ - public static CreateVpnConnectionRouteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVpnConnectionRouteRequest.class); - } - - /** - * Convert an instance of CreateVpnConnectionRouteRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponse.java deleted file mode 100644 index 3f5e3aed..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** CreateVpnConnectionRouteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateVpnConnectionRouteResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public CreateVpnConnectionRouteResponse() {} - - public CreateVpnConnectionRouteResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVpnConnectionRouteResponse createVpnConnectionRouteResponse = - (CreateVpnConnectionRouteResponse) o; - return Objects.equals( - this.responseContext, createVpnConnectionRouteResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVpnConnectionRouteResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * CreateVpnConnectionRouteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVpnConnectionRouteResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVpnConnectionRouteResponse is" - + " not found in the empty JSON string", - CreateVpnConnectionRouteResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CreateVpnConnectionRouteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVpnConnectionRouteResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVpnConnectionRouteResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVpnConnectionRouteResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateVpnConnectionRouteResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVpnConnectionRouteResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVpnConnectionRouteResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVpnConnectionRouteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVpnConnectionRouteResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateVpnConnectionRouteResponse - */ - public static CreateVpnConnectionRouteResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVpnConnectionRouteResponse.class); - } - - /** - * Convert an instance of CreateVpnConnectionRouteResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroup.java deleted file mode 100644 index 809a5dd3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroup.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the dedicated group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DedicatedGroup { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CPU_GENERATION = "CpuGeneration"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATION) - private Integer cpuGeneration; - - public static final String SERIALIZED_NAME_DEDICATED_GROUP_ID = "DedicatedGroupId"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP_ID) - private String dedicatedGroupId; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public DedicatedGroup() {} - - public DedicatedGroup accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owners of the dedicated group. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public DedicatedGroup cpuGeneration(Integer cpuGeneration) { - - this.cpuGeneration = cpuGeneration; - return this; - } - - /** - * The processor generation. - * - * @return cpuGeneration - */ - @javax.annotation.Nullable - public Integer getCpuGeneration() { - return cpuGeneration; - } - - public void setCpuGeneration(Integer cpuGeneration) { - this.cpuGeneration = cpuGeneration; - } - - public DedicatedGroup dedicatedGroupId(String dedicatedGroupId) { - - this.dedicatedGroupId = dedicatedGroupId; - return this; - } - - /** - * The ID of the dedicated group. - * - * @return dedicatedGroupId - */ - @javax.annotation.Nullable - public String getDedicatedGroupId() { - return dedicatedGroupId; - } - - public void setDedicatedGroupId(String dedicatedGroupId) { - this.dedicatedGroupId = dedicatedGroupId; - } - - public DedicatedGroup name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the dedicated group. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public DedicatedGroup netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public DedicatedGroup addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets in the dedicated group. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public DedicatedGroup subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion in which the dedicated group is located. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public DedicatedGroup vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public DedicatedGroup addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * The IDs of the VMs in the dedicated group. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DedicatedGroup dedicatedGroup = (DedicatedGroup) o; - return Objects.equals(this.accountId, dedicatedGroup.accountId) - && Objects.equals(this.cpuGeneration, dedicatedGroup.cpuGeneration) - && Objects.equals(this.dedicatedGroupId, dedicatedGroup.dedicatedGroupId) - && Objects.equals(this.name, dedicatedGroup.name) - && Objects.equals(this.netIds, dedicatedGroup.netIds) - && Objects.equals(this.subregionName, dedicatedGroup.subregionName) - && Objects.equals(this.vmIds, dedicatedGroup.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, cpuGeneration, dedicatedGroupId, name, netIds, subregionName, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DedicatedGroup {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" cpuGeneration: ").append(toIndentedString(cpuGeneration)).append("\n"); - sb.append(" dedicatedGroupId: ").append(toIndentedString(dedicatedGroupId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("CpuGeneration"); - openapiFields.add("DedicatedGroupId"); - openapiFields.add("Name"); - openapiFields.add("NetIds"); - openapiFields.add("SubregionName"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DedicatedGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DedicatedGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DedicatedGroup is not found in the" - + " empty JSON string", - DedicatedGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DedicatedGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DedicatedGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("DedicatedGroupId") != null - && !jsonObj.get("DedicatedGroupId").isJsonNull()) - && !jsonObj.get("DedicatedGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DedicatedGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DedicatedGroupId").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DedicatedGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DedicatedGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DedicatedGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DedicatedGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DedicatedGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DedicatedGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of DedicatedGroup - * @throws IOException if the JSON string is invalid with respect to DedicatedGroup - */ - public static DedicatedGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DedicatedGroup.class); - } - - /** - * Convert an instance of DedicatedGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequest.java deleted file mode 100644 index 9b43fa49..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteAccessKeyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteAccessKeyRequest { - public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "AccessKeyId"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) - private String accessKeyId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public DeleteAccessKeyRequest() {} - - public DeleteAccessKeyRequest accessKeyId(String accessKeyId) { - - this.accessKeyId = accessKeyId; - return this; - } - - /** - * The ID of the access key you want to delete. - * - * @return accessKeyId - */ - @javax.annotation.Nonnull - public String getAccessKeyId() { - return accessKeyId; - } - - public void setAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - } - - public DeleteAccessKeyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteAccessKeyRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user the access key you want to delete is associated with. By default, - * the user who sends the request (which can be the root account). - * - * @return userName - */ - @javax.annotation.Nullable - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteAccessKeyRequest deleteAccessKeyRequest = (DeleteAccessKeyRequest) o; - return Objects.equals(this.accessKeyId, deleteAccessKeyRequest.accessKeyId) - && Objects.equals(this.dryRun, deleteAccessKeyRequest.dryRun) - && Objects.equals(this.userName, deleteAccessKeyRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeyId, dryRun, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteAccessKeyRequest {\n"); - sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyId"); - openapiFields.add("DryRun"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AccessKeyId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteAccessKeyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteAccessKeyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteAccessKeyRequest is not found" - + " in the empty JSON string", - DeleteAccessKeyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteAccessKeyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteAccessKeyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteAccessKeyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("AccessKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeyId").toString())); - } - if ((jsonObj.get("UserName") != null && !jsonObj.get("UserName").isJsonNull()) - && !jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteAccessKeyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteAccessKeyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteAccessKeyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteAccessKeyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteAccessKeyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteAccessKeyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteAccessKeyRequest - * @throws IOException if the JSON string is invalid with respect to DeleteAccessKeyRequest - */ - public static DeleteAccessKeyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteAccessKeyRequest.class); - } - - /** - * Convert an instance of DeleteAccessKeyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponse.java deleted file mode 100644 index ce44f8be..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteAccessKeyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteAccessKeyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteAccessKeyResponse() {} - - public DeleteAccessKeyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteAccessKeyResponse deleteAccessKeyResponse = (DeleteAccessKeyResponse) o; - return Objects.equals(this.responseContext, deleteAccessKeyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteAccessKeyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteAccessKeyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteAccessKeyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteAccessKeyResponse is not found" - + " in the empty JSON string", - DeleteAccessKeyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteAccessKeyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteAccessKeyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteAccessKeyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteAccessKeyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteAccessKeyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteAccessKeyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteAccessKeyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteAccessKeyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteAccessKeyResponse - * @throws IOException if the JSON string is invalid with respect to DeleteAccessKeyResponse - */ - public static DeleteAccessKeyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteAccessKeyResponse.class); - } - - /** - * Convert an instance of DeleteAccessKeyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequest.java deleted file mode 100644 index 6805dae3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteApiAccessRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteApiAccessRuleRequest { - public static final String SERIALIZED_NAME_API_ACCESS_RULE_ID = "ApiAccessRuleId"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE_ID) - private String apiAccessRuleId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteApiAccessRuleRequest() {} - - public DeleteApiAccessRuleRequest apiAccessRuleId(String apiAccessRuleId) { - - this.apiAccessRuleId = apiAccessRuleId; - return this; - } - - /** - * The ID of the API access rule you want to delete. - * - * @return apiAccessRuleId - */ - @javax.annotation.Nonnull - public String getApiAccessRuleId() { - return apiAccessRuleId; - } - - public void setApiAccessRuleId(String apiAccessRuleId) { - this.apiAccessRuleId = apiAccessRuleId; - } - - public DeleteApiAccessRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest = (DeleteApiAccessRuleRequest) o; - return Objects.equals(this.apiAccessRuleId, deleteApiAccessRuleRequest.apiAccessRuleId) - && Objects.equals(this.dryRun, deleteApiAccessRuleRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRuleId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteApiAccessRuleRequest {\n"); - sb.append(" apiAccessRuleId: ").append(toIndentedString(apiAccessRuleId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRuleId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ApiAccessRuleId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteApiAccessRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteApiAccessRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteApiAccessRuleRequest is not" - + " found in the empty JSON string", - DeleteApiAccessRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteApiAccessRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteApiAccessRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteApiAccessRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ApiAccessRuleId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiAccessRuleId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ApiAccessRuleId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteApiAccessRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteApiAccessRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteApiAccessRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteApiAccessRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteApiAccessRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteApiAccessRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteApiAccessRuleRequest - * @throws IOException if the JSON string is invalid with respect to DeleteApiAccessRuleRequest - */ - public static DeleteApiAccessRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteApiAccessRuleRequest.class); - } - - /** - * Convert an instance of DeleteApiAccessRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponse.java deleted file mode 100644 index 5a42d185..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteApiAccessRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteApiAccessRuleResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteApiAccessRuleResponse() {} - - public DeleteApiAccessRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteApiAccessRuleResponse deleteApiAccessRuleResponse = (DeleteApiAccessRuleResponse) o; - return Objects.equals(this.responseContext, deleteApiAccessRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteApiAccessRuleResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteApiAccessRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteApiAccessRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteApiAccessRuleResponse is not" - + " found in the empty JSON string", - DeleteApiAccessRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteApiAccessRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteApiAccessRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteApiAccessRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteApiAccessRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteApiAccessRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteApiAccessRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteApiAccessRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteApiAccessRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteApiAccessRuleResponse - * @throws IOException if the JSON string is invalid with respect to DeleteApiAccessRuleResponse - */ - public static DeleteApiAccessRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteApiAccessRuleResponse.class); - } - - /** - * Convert an instance of DeleteApiAccessRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequest.java deleted file mode 100644 index d4f43f59..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteCaRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteCaRequest { - public static final String SERIALIZED_NAME_CA_ID = "CaId"; - - @SerializedName(SERIALIZED_NAME_CA_ID) - private String caId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteCaRequest() {} - - public DeleteCaRequest caId(String caId) { - - this.caId = caId; - return this; - } - - /** - * The ID of the CA you want to delete. - * - * @return caId - */ - @javax.annotation.Nonnull - public String getCaId() { - return caId; - } - - public void setCaId(String caId) { - this.caId = caId; - } - - public DeleteCaRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteCaRequest deleteCaRequest = (DeleteCaRequest) o; - return Objects.equals(this.caId, deleteCaRequest.caId) - && Objects.equals(this.dryRun, deleteCaRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(caId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteCaRequest {\n"); - sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CaId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteCaRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteCaRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteCaRequest is not found in the" - + " empty JSON string", - DeleteCaRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteCaRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteCaRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteCaRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("CaId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("CaId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteCaRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteCaRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteCaRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteCaRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteCaRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteCaRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteCaRequest - * @throws IOException if the JSON string is invalid with respect to DeleteCaRequest - */ - public static DeleteCaRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteCaRequest.class); - } - - /** - * Convert an instance of DeleteCaRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponse.java deleted file mode 100644 index ed01a573..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteCaResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteCaResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteCaResponse() {} - - public DeleteCaResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteCaResponse deleteCaResponse = (DeleteCaResponse) o; - return Objects.equals(this.responseContext, deleteCaResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteCaResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteCaResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteCaResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteCaResponse is not found in the" - + " empty JSON string", - DeleteCaResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteCaResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteCaResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteCaResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteCaResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteCaResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteCaResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteCaResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteCaResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteCaResponse - * @throws IOException if the JSON string is invalid with respect to DeleteCaResponse - */ - public static DeleteCaResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteCaResponse.class); - } - - /** - * Convert an instance of DeleteCaResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequest.java deleted file mode 100644 index 84ac864b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteClientGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteClientGatewayRequest { - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_ID = "ClientGatewayId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_ID) - private String clientGatewayId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteClientGatewayRequest() {} - - public DeleteClientGatewayRequest clientGatewayId(String clientGatewayId) { - - this.clientGatewayId = clientGatewayId; - return this; - } - - /** - * The ID of the client gateway you want to delete. - * - * @return clientGatewayId - */ - @javax.annotation.Nonnull - public String getClientGatewayId() { - return clientGatewayId; - } - - public void setClientGatewayId(String clientGatewayId) { - this.clientGatewayId = clientGatewayId; - } - - public DeleteClientGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteClientGatewayRequest deleteClientGatewayRequest = (DeleteClientGatewayRequest) o; - return Objects.equals(this.clientGatewayId, deleteClientGatewayRequest.clientGatewayId) - && Objects.equals(this.dryRun, deleteClientGatewayRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(clientGatewayId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteClientGatewayRequest {\n"); - sb.append(" clientGatewayId: ").append(toIndentedString(clientGatewayId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGatewayId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ClientGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteClientGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteClientGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteClientGatewayRequest is not" - + " found in the empty JSON string", - DeleteClientGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteClientGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteClientGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteClientGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ClientGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteClientGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteClientGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteClientGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteClientGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteClientGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteClientGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteClientGatewayRequest - * @throws IOException if the JSON string is invalid with respect to DeleteClientGatewayRequest - */ - public static DeleteClientGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteClientGatewayRequest.class); - } - - /** - * Convert an instance of DeleteClientGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponse.java deleted file mode 100644 index 980e0bfa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteClientGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteClientGatewayResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteClientGatewayResponse() {} - - public DeleteClientGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteClientGatewayResponse deleteClientGatewayResponse = (DeleteClientGatewayResponse) o; - return Objects.equals(this.responseContext, deleteClientGatewayResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteClientGatewayResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteClientGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteClientGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteClientGatewayResponse is not" - + " found in the empty JSON string", - DeleteClientGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteClientGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteClientGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteClientGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteClientGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteClientGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteClientGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteClientGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteClientGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteClientGatewayResponse - * @throws IOException if the JSON string is invalid with respect to DeleteClientGatewayResponse - */ - public static DeleteClientGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteClientGatewayResponse.class); - } - - /** - * Convert an instance of DeleteClientGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequest.java deleted file mode 100644 index 3f211263..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDedicatedGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDedicatedGroupRequest { - public static final String SERIALIZED_NAME_DEDICATED_GROUP_ID = "DedicatedGroupId"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP_ID) - private String dedicatedGroupId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FORCE = "Force"; - - @SerializedName(SERIALIZED_NAME_FORCE) - private Boolean force; - - public DeleteDedicatedGroupRequest() {} - - public DeleteDedicatedGroupRequest dedicatedGroupId(String dedicatedGroupId) { - - this.dedicatedGroupId = dedicatedGroupId; - return this; - } - - /** - * The ID of the dedicated group you want to delete. - * - * @return dedicatedGroupId - */ - @javax.annotation.Nonnull - public String getDedicatedGroupId() { - return dedicatedGroupId; - } - - public void setDedicatedGroupId(String dedicatedGroupId) { - this.dedicatedGroupId = dedicatedGroupId; - } - - public DeleteDedicatedGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteDedicatedGroupRequest force(Boolean force) { - - this.force = force; - return this; - } - - /** - * If true, forces the deletion of the dedicated group and all its dependencies. - * - * @return force - */ - @javax.annotation.Nullable - public Boolean getForce() { - return force; - } - - public void setForce(Boolean force) { - this.force = force; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest = (DeleteDedicatedGroupRequest) o; - return Objects.equals(this.dedicatedGroupId, deleteDedicatedGroupRequest.dedicatedGroupId) - && Objects.equals(this.dryRun, deleteDedicatedGroupRequest.dryRun) - && Objects.equals(this.force, deleteDedicatedGroupRequest.force); - } - - @Override - public int hashCode() { - return Objects.hash(dedicatedGroupId, dryRun, force); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDedicatedGroupRequest {\n"); - sb.append(" dedicatedGroupId: ").append(toIndentedString(dedicatedGroupId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" force: ").append(toIndentedString(force)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DedicatedGroupId"); - openapiFields.add("DryRun"); - openapiFields.add("Force"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DedicatedGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteDedicatedGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDedicatedGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDedicatedGroupRequest is not" - + " found in the empty JSON string", - DeleteDedicatedGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDedicatedGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDedicatedGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteDedicatedGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DedicatedGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DedicatedGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DedicatedGroupId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDedicatedGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDedicatedGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteDedicatedGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDedicatedGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDedicatedGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDedicatedGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDedicatedGroupRequest - * @throws IOException if the JSON string is invalid with respect to DeleteDedicatedGroupRequest - */ - public static DeleteDedicatedGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDedicatedGroupRequest.class); - } - - /** - * Convert an instance of DeleteDedicatedGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponse.java deleted file mode 100644 index 41f0ba58..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponse.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDedicatedGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDedicatedGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteDedicatedGroupResponse() {} - - public DeleteDedicatedGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDedicatedGroupResponse deleteDedicatedGroupResponse = - (DeleteDedicatedGroupResponse) o; - return Objects.equals(this.responseContext, deleteDedicatedGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDedicatedGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteDedicatedGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDedicatedGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDedicatedGroupResponse is not" - + " found in the empty JSON string", - DeleteDedicatedGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDedicatedGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDedicatedGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDedicatedGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDedicatedGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteDedicatedGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDedicatedGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDedicatedGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDedicatedGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDedicatedGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteDedicatedGroupResponse - */ - public static DeleteDedicatedGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDedicatedGroupResponse.class); - } - - /** - * Convert an instance of DeleteDedicatedGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequest.java deleted file mode 100644 index ee8100ac..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDhcpOptionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDhcpOptionsRequest { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_ID = "DhcpOptionsSetId"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_ID) - private String dhcpOptionsSetId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteDhcpOptionsRequest() {} - - public DeleteDhcpOptionsRequest dhcpOptionsSetId(String dhcpOptionsSetId) { - - this.dhcpOptionsSetId = dhcpOptionsSetId; - return this; - } - - /** - * The ID of the DHCP options set you want to delete. - * - * @return dhcpOptionsSetId - */ - @javax.annotation.Nonnull - public String getDhcpOptionsSetId() { - return dhcpOptionsSetId; - } - - public void setDhcpOptionsSetId(String dhcpOptionsSetId) { - this.dhcpOptionsSetId = dhcpOptionsSetId; - } - - public DeleteDhcpOptionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest = (DeleteDhcpOptionsRequest) o; - return Objects.equals(this.dhcpOptionsSetId, deleteDhcpOptionsRequest.dhcpOptionsSetId) - && Objects.equals(this.dryRun, deleteDhcpOptionsRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dhcpOptionsSetId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDhcpOptionsRequest {\n"); - sb.append(" dhcpOptionsSetId: ").append(toIndentedString(dhcpOptionsSetId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSetId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DhcpOptionsSetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteDhcpOptionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDhcpOptionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDhcpOptionsRequest is not found" - + " in the empty JSON string", - DeleteDhcpOptionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDhcpOptionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDhcpOptionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteDhcpOptionsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DhcpOptionsSetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DhcpOptionsSetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDhcpOptionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDhcpOptionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteDhcpOptionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDhcpOptionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDhcpOptionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDhcpOptionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDhcpOptionsRequest - * @throws IOException if the JSON string is invalid with respect to DeleteDhcpOptionsRequest - */ - public static DeleteDhcpOptionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDhcpOptionsRequest.class); - } - - /** - * Convert an instance of DeleteDhcpOptionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponse.java deleted file mode 100644 index 734fbf44..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDhcpOptionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDhcpOptionsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteDhcpOptionsResponse() {} - - public DeleteDhcpOptionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDhcpOptionsResponse deleteDhcpOptionsResponse = (DeleteDhcpOptionsResponse) o; - return Objects.equals(this.responseContext, deleteDhcpOptionsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDhcpOptionsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteDhcpOptionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDhcpOptionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDhcpOptionsResponse is not" - + " found in the empty JSON string", - DeleteDhcpOptionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDhcpOptionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDhcpOptionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDhcpOptionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDhcpOptionsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteDhcpOptionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDhcpOptionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDhcpOptionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDhcpOptionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDhcpOptionsResponse - * @throws IOException if the JSON string is invalid with respect to DeleteDhcpOptionsResponse - */ - public static DeleteDhcpOptionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDhcpOptionsResponse.class); - } - - /** - * Convert an instance of DeleteDhcpOptionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequest.java deleted file mode 100644 index 3becf412..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDirectLinkInterfaceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDirectLinkInterfaceRequest { - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID = "DirectLinkInterfaceId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID) - private String directLinkInterfaceId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteDirectLinkInterfaceRequest() {} - - public DeleteDirectLinkInterfaceRequest directLinkInterfaceId(String directLinkInterfaceId) { - - this.directLinkInterfaceId = directLinkInterfaceId; - return this; - } - - /** - * The ID of the DirectLink interface you want to delete. - * - * @return directLinkInterfaceId - */ - @javax.annotation.Nonnull - public String getDirectLinkInterfaceId() { - return directLinkInterfaceId; - } - - public void setDirectLinkInterfaceId(String directLinkInterfaceId) { - this.directLinkInterfaceId = directLinkInterfaceId; - } - - public DeleteDirectLinkInterfaceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest = - (DeleteDirectLinkInterfaceRequest) o; - return Objects.equals( - this.directLinkInterfaceId, - deleteDirectLinkInterfaceRequest.directLinkInterfaceId) - && Objects.equals(this.dryRun, deleteDirectLinkInterfaceRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkInterfaceId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDirectLinkInterfaceRequest {\n"); - sb.append(" directLinkInterfaceId: ") - .append(toIndentedString(directLinkInterfaceId)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkInterfaceId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DirectLinkInterfaceId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteDirectLinkInterfaceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDirectLinkInterfaceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDirectLinkInterfaceRequest is" - + " not found in the empty JSON string", - DeleteDirectLinkInterfaceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDirectLinkInterfaceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDirectLinkInterfaceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteDirectLinkInterfaceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DirectLinkInterfaceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDirectLinkInterfaceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDirectLinkInterfaceRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteDirectLinkInterfaceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDirectLinkInterfaceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDirectLinkInterfaceRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDirectLinkInterfaceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDirectLinkInterfaceRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteDirectLinkInterfaceRequest - */ - public static DeleteDirectLinkInterfaceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDirectLinkInterfaceRequest.class); - } - - /** - * Convert an instance of DeleteDirectLinkInterfaceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponse.java deleted file mode 100644 index c24b7217..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponse.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDirectLinkInterfaceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDirectLinkInterfaceResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteDirectLinkInterfaceResponse() {} - - public DeleteDirectLinkInterfaceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDirectLinkInterfaceResponse deleteDirectLinkInterfaceResponse = - (DeleteDirectLinkInterfaceResponse) o; - return Objects.equals( - this.responseContext, deleteDirectLinkInterfaceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDirectLinkInterfaceResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteDirectLinkInterfaceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDirectLinkInterfaceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDirectLinkInterfaceResponse is" - + " not found in the empty JSON string", - DeleteDirectLinkInterfaceResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDirectLinkInterfaceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDirectLinkInterfaceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDirectLinkInterfaceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDirectLinkInterfaceResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteDirectLinkInterfaceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDirectLinkInterfaceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDirectLinkInterfaceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDirectLinkInterfaceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDirectLinkInterfaceResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteDirectLinkInterfaceResponse - */ - public static DeleteDirectLinkInterfaceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDirectLinkInterfaceResponse.class); - } - - /** - * Convert an instance of DeleteDirectLinkInterfaceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequest.java deleted file mode 100644 index 6cef7957..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDirectLinkRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDirectLinkRequest { - public static final String SERIALIZED_NAME_DIRECT_LINK_ID = "DirectLinkId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_ID) - private String directLinkId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public DeleteDirectLinkRequest() {} - - public DeleteDirectLinkRequest directLinkId(String directLinkId) { - - this.directLinkId = directLinkId; - return this; - } - - /** - * The ID of the DirectLink you want to delete. - * - * @return directLinkId - */ - @javax.annotation.Nonnull - public String getDirectLinkId() { - return directLinkId; - } - - public void setDirectLinkId(String directLinkId) { - this.directLinkId = directLinkId; - } - - public DeleteDirectLinkRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDirectLinkRequest deleteDirectLinkRequest = (DeleteDirectLinkRequest) o; - return Objects.equals(this.directLinkId, deleteDirectLinkRequest.directLinkId) - && Objects.equals(this.dryRun, deleteDirectLinkRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDirectLinkRequest {\n"); - sb.append(" directLinkId: ").append(toIndentedString(directLinkId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DirectLinkId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteDirectLinkRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDirectLinkRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDirectLinkRequest is not found" - + " in the empty JSON string", - DeleteDirectLinkRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDirectLinkRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDirectLinkRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteDirectLinkRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DirectLinkId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DirectLinkId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDirectLinkRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDirectLinkRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteDirectLinkRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDirectLinkRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDirectLinkRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDirectLinkRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDirectLinkRequest - * @throws IOException if the JSON string is invalid with respect to DeleteDirectLinkRequest - */ - public static DeleteDirectLinkRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDirectLinkRequest.class); - } - - /** - * Convert an instance of DeleteDirectLinkRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponse.java deleted file mode 100644 index 9a7df23a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteDirectLinkResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteDirectLinkResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteDirectLinkResponse() {} - - public DeleteDirectLinkResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteDirectLinkResponse deleteDirectLinkResponse = (DeleteDirectLinkResponse) o; - return Objects.equals(this.responseContext, deleteDirectLinkResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteDirectLinkResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteDirectLinkResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteDirectLinkResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteDirectLinkResponse is not found" - + " in the empty JSON string", - DeleteDirectLinkResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteDirectLinkResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteDirectLinkResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteDirectLinkResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteDirectLinkResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteDirectLinkResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteDirectLinkResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteDirectLinkResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteDirectLinkResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteDirectLinkResponse - * @throws IOException if the JSON string is invalid with respect to DeleteDirectLinkResponse - */ - public static DeleteDirectLinkResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteDirectLinkResponse.class); - } - - /** - * Convert an instance of DeleteDirectLinkResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequest.java deleted file mode 100644 index b01e33dc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteExportTaskRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteExportTaskRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_EXPORT_TASK_ID = "ExportTaskId"; - - @SerializedName(SERIALIZED_NAME_EXPORT_TASK_ID) - private String exportTaskId; - - public DeleteExportTaskRequest() {} - - public DeleteExportTaskRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteExportTaskRequest exportTaskId(String exportTaskId) { - - this.exportTaskId = exportTaskId; - return this; - } - - /** - * The ID of the export task to delete. - * - * @return exportTaskId - */ - @javax.annotation.Nonnull - public String getExportTaskId() { - return exportTaskId; - } - - public void setExportTaskId(String exportTaskId) { - this.exportTaskId = exportTaskId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteExportTaskRequest deleteExportTaskRequest = (DeleteExportTaskRequest) o; - return Objects.equals(this.dryRun, deleteExportTaskRequest.dryRun) - && Objects.equals(this.exportTaskId, deleteExportTaskRequest.exportTaskId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, exportTaskId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteExportTaskRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" exportTaskId: ").append(toIndentedString(exportTaskId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ExportTaskId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ExportTaskId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteExportTaskRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteExportTaskRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteExportTaskRequest is not found" - + " in the empty JSON string", - DeleteExportTaskRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteExportTaskRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteExportTaskRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteExportTaskRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ExportTaskId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ExportTaskId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ExportTaskId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteExportTaskRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteExportTaskRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteExportTaskRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteExportTaskRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteExportTaskRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteExportTaskRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteExportTaskRequest - * @throws IOException if the JSON string is invalid with respect to DeleteExportTaskRequest - */ - public static DeleteExportTaskRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteExportTaskRequest.class); - } - - /** - * Convert an instance of DeleteExportTaskRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponse.java deleted file mode 100644 index e15fc10f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteExportTaskResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteExportTaskResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteExportTaskResponse() {} - - public DeleteExportTaskResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteExportTaskResponse deleteExportTaskResponse = (DeleteExportTaskResponse) o; - return Objects.equals(this.responseContext, deleteExportTaskResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteExportTaskResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteExportTaskResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteExportTaskResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteExportTaskResponse is not found" - + " in the empty JSON string", - DeleteExportTaskResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteExportTaskResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteExportTaskResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteExportTaskResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteExportTaskResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteExportTaskResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteExportTaskResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteExportTaskResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteExportTaskResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteExportTaskResponse - * @throws IOException if the JSON string is invalid with respect to DeleteExportTaskResponse - */ - public static DeleteExportTaskResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteExportTaskResponse.class); - } - - /** - * Convert an instance of DeleteExportTaskResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequest.java deleted file mode 100644 index 5a297f5d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteFlexibleGpuRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteFlexibleGpuRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_ID = "FlexibleGpuId"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_ID) - private String flexibleGpuId; - - public DeleteFlexibleGpuRequest() {} - - public DeleteFlexibleGpuRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteFlexibleGpuRequest flexibleGpuId(String flexibleGpuId) { - - this.flexibleGpuId = flexibleGpuId; - return this; - } - - /** - * The ID of the fGPU you want to delete. - * - * @return flexibleGpuId - */ - @javax.annotation.Nonnull - public String getFlexibleGpuId() { - return flexibleGpuId; - } - - public void setFlexibleGpuId(String flexibleGpuId) { - this.flexibleGpuId = flexibleGpuId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest = (DeleteFlexibleGpuRequest) o; - return Objects.equals(this.dryRun, deleteFlexibleGpuRequest.dryRun) - && Objects.equals(this.flexibleGpuId, deleteFlexibleGpuRequest.flexibleGpuId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, flexibleGpuId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteFlexibleGpuRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flexibleGpuId: ").append(toIndentedString(flexibleGpuId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("FlexibleGpuId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("FlexibleGpuId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteFlexibleGpuRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteFlexibleGpuRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteFlexibleGpuRequest is not found" - + " in the empty JSON string", - DeleteFlexibleGpuRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteFlexibleGpuRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteFlexibleGpuRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteFlexibleGpuRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("FlexibleGpuId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpuId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteFlexibleGpuRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteFlexibleGpuRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteFlexibleGpuRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteFlexibleGpuRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteFlexibleGpuRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteFlexibleGpuRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteFlexibleGpuRequest - * @throws IOException if the JSON string is invalid with respect to DeleteFlexibleGpuRequest - */ - public static DeleteFlexibleGpuRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteFlexibleGpuRequest.class); - } - - /** - * Convert an instance of DeleteFlexibleGpuRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponse.java deleted file mode 100644 index 2657f2dd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteFlexibleGpuResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteFlexibleGpuResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteFlexibleGpuResponse() {} - - public DeleteFlexibleGpuResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteFlexibleGpuResponse deleteFlexibleGpuResponse = (DeleteFlexibleGpuResponse) o; - return Objects.equals(this.responseContext, deleteFlexibleGpuResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteFlexibleGpuResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteFlexibleGpuResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteFlexibleGpuResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteFlexibleGpuResponse is not" - + " found in the empty JSON string", - DeleteFlexibleGpuResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteFlexibleGpuResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteFlexibleGpuResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteFlexibleGpuResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteFlexibleGpuResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteFlexibleGpuResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteFlexibleGpuResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteFlexibleGpuResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteFlexibleGpuResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteFlexibleGpuResponse - * @throws IOException if the JSON string is invalid with respect to DeleteFlexibleGpuResponse - */ - public static DeleteFlexibleGpuResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteFlexibleGpuResponse.class); - } - - /** - * Convert an instance of DeleteFlexibleGpuResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequest.java deleted file mode 100644 index 947971f0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteImageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteImageRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public DeleteImageRequest() {} - - public DeleteImageRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteImageRequest imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI you want to delete. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteImageRequest deleteImageRequest = (DeleteImageRequest) o; - return Objects.equals(this.dryRun, deleteImageRequest.dryRun) - && Objects.equals(this.imageId, deleteImageRequest.imageId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, imageId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteImageRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ImageId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ImageId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteImageRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteImageRequest is not found in" - + " the empty JSON string", - DeleteImageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteImageRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteImageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteImageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteImageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteImageRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteImageRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteImageRequest - * @throws IOException if the JSON string is invalid with respect to DeleteImageRequest - */ - public static DeleteImageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteImageRequest.class); - } - - /** - * Convert an instance of DeleteImageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponse.java deleted file mode 100644 index 0c3bddf6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteImageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteImageResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteImageResponse() {} - - public DeleteImageResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteImageResponse deleteImageResponse = (DeleteImageResponse) o; - return Objects.equals(this.responseContext, deleteImageResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteImageResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteImageResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteImageResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteImageResponse is not found in" - + " the empty JSON string", - DeleteImageResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteImageResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteImageResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteImageResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteImageResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteImageResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteImageResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteImageResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteImageResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteImageResponse - * @throws IOException if the JSON string is invalid with respect to DeleteImageResponse - */ - public static DeleteImageResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteImageResponse.class); - } - - /** - * Convert an instance of DeleteImageResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequest.java deleted file mode 100644 index 0b7386c7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequest.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteInternetServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteInternetServiceRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_INTERNET_SERVICE_ID = "InternetServiceId"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE_ID) - private String internetServiceId; - - public DeleteInternetServiceRequest() {} - - public DeleteInternetServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteInternetServiceRequest internetServiceId(String internetServiceId) { - - this.internetServiceId = internetServiceId; - return this; - } - - /** - * The ID of the Internet service you want to delete. - * - * @return internetServiceId - */ - @javax.annotation.Nonnull - public String getInternetServiceId() { - return internetServiceId; - } - - public void setInternetServiceId(String internetServiceId) { - this.internetServiceId = internetServiceId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteInternetServiceRequest deleteInternetServiceRequest = - (DeleteInternetServiceRequest) o; - return Objects.equals(this.dryRun, deleteInternetServiceRequest.dryRun) - && Objects.equals( - this.internetServiceId, deleteInternetServiceRequest.internetServiceId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, internetServiceId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteInternetServiceRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" internetServiceId: ") - .append(toIndentedString(internetServiceId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("InternetServiceId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("InternetServiceId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteInternetServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteInternetServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteInternetServiceRequest is not" - + " found in the empty JSON string", - DeleteInternetServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteInternetServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteInternetServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteInternetServiceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("InternetServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServiceId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("InternetServiceId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteInternetServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteInternetServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteInternetServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteInternetServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteInternetServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteInternetServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteInternetServiceRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteInternetServiceRequest - */ - public static DeleteInternetServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteInternetServiceRequest.class); - } - - /** - * Convert an instance of DeleteInternetServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponse.java deleted file mode 100644 index 1e9a2ccf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponse.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteInternetServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteInternetServiceResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteInternetServiceResponse() {} - - public DeleteInternetServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteInternetServiceResponse deleteInternetServiceResponse = - (DeleteInternetServiceResponse) o; - return Objects.equals(this.responseContext, deleteInternetServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteInternetServiceResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteInternetServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteInternetServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteInternetServiceResponse is not" - + " found in the empty JSON string", - DeleteInternetServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteInternetServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteInternetServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteInternetServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteInternetServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteInternetServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteInternetServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteInternetServiceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteInternetServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteInternetServiceResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteInternetServiceResponse - */ - public static DeleteInternetServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteInternetServiceResponse.class); - } - - /** - * Convert an instance of DeleteInternetServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequest.java deleted file mode 100644 index d61db2f0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteKeypairRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteKeypairRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public DeleteKeypairRequest() {} - - public DeleteKeypairRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteKeypairRequest keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair you want to delete. - * - * @return keypairName - */ - @javax.annotation.Nonnull - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteKeypairRequest deleteKeypairRequest = (DeleteKeypairRequest) o; - return Objects.equals(this.dryRun, deleteKeypairRequest.dryRun) - && Objects.equals(this.keypairName, deleteKeypairRequest.keypairName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, keypairName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteKeypairRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("KeypairName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("KeypairName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteKeypairRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteKeypairRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteKeypairRequest is not found in" - + " the empty JSON string", - DeleteKeypairRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteKeypairRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteKeypairRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteKeypairRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteKeypairRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteKeypairRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteKeypairRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteKeypairRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteKeypairRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteKeypairRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteKeypairRequest - * @throws IOException if the JSON string is invalid with respect to DeleteKeypairRequest - */ - public static DeleteKeypairRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteKeypairRequest.class); - } - - /** - * Convert an instance of DeleteKeypairRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponse.java deleted file mode 100644 index 37cc2fbf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteKeypairResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteKeypairResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteKeypairResponse() {} - - public DeleteKeypairResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteKeypairResponse deleteKeypairResponse = (DeleteKeypairResponse) o; - return Objects.equals(this.responseContext, deleteKeypairResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteKeypairResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteKeypairResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteKeypairResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteKeypairResponse is not found in" - + " the empty JSON string", - DeleteKeypairResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteKeypairResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteKeypairResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteKeypairResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteKeypairResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteKeypairResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteKeypairResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteKeypairResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteKeypairResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteKeypairResponse - * @throws IOException if the JSON string is invalid with respect to DeleteKeypairResponse - */ - public static DeleteKeypairResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteKeypairResponse.class); - } - - /** - * Convert an instance of DeleteKeypairResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequest.java deleted file mode 100644 index 4c86060d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteListenerRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteListenerRuleRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LISTENER_RULE_NAME = "ListenerRuleName"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_NAME) - private String listenerRuleName; - - public DeleteListenerRuleRequest() {} - - public DeleteListenerRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteListenerRuleRequest listenerRuleName(String listenerRuleName) { - - this.listenerRuleName = listenerRuleName; - return this; - } - - /** - * The name of the rule you want to delete. - * - * @return listenerRuleName - */ - @javax.annotation.Nonnull - public String getListenerRuleName() { - return listenerRuleName; - } - - public void setListenerRuleName(String listenerRuleName) { - this.listenerRuleName = listenerRuleName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteListenerRuleRequest deleteListenerRuleRequest = (DeleteListenerRuleRequest) o; - return Objects.equals(this.dryRun, deleteListenerRuleRequest.dryRun) - && Objects.equals( - this.listenerRuleName, deleteListenerRuleRequest.listenerRuleName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, listenerRuleName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteListenerRuleRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" listenerRuleName: ").append(toIndentedString(listenerRuleName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ListenerRuleName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ListenerRuleName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteListenerRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteListenerRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteListenerRuleRequest is not" - + " found in the empty JSON string", - DeleteListenerRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteListenerRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteListenerRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteListenerRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ListenerRuleName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRuleName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ListenerRuleName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteListenerRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteListenerRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteListenerRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteListenerRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteListenerRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteListenerRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteListenerRuleRequest - * @throws IOException if the JSON string is invalid with respect to DeleteListenerRuleRequest - */ - public static DeleteListenerRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteListenerRuleRequest.class); - } - - /** - * Convert an instance of DeleteListenerRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponse.java deleted file mode 100644 index 8f711f0e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteListenerRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteListenerRuleResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteListenerRuleResponse() {} - - public DeleteListenerRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteListenerRuleResponse deleteListenerRuleResponse = (DeleteListenerRuleResponse) o; - return Objects.equals(this.responseContext, deleteListenerRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteListenerRuleResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteListenerRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteListenerRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteListenerRuleResponse is not" - + " found in the empty JSON string", - DeleteListenerRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteListenerRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteListenerRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteListenerRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteListenerRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteListenerRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteListenerRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteListenerRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteListenerRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteListenerRuleResponse - * @throws IOException if the JSON string is invalid with respect to DeleteListenerRuleResponse - */ - public static DeleteListenerRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteListenerRuleResponse.class); - } - - /** - * Convert an instance of DeleteListenerRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequest.java deleted file mode 100644 index 23302b7d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequest.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerListenersRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerListenersRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PORTS = "LoadBalancerPorts"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PORTS) - private List loadBalancerPorts = new ArrayList<>(); - - public DeleteLoadBalancerListenersRequest() {} - - public DeleteLoadBalancerListenersRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteLoadBalancerListenersRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer for which you want to delete listeners. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public DeleteLoadBalancerListenersRequest loadBalancerPorts(List loadBalancerPorts) { - - this.loadBalancerPorts = loadBalancerPorts; - return this; - } - - public DeleteLoadBalancerListenersRequest addLoadBalancerPortsItem( - Integer loadBalancerPortsItem) { - this.loadBalancerPorts.add(loadBalancerPortsItem); - return this; - } - - /** - * One or more port numbers of the listeners you want to delete. - * - * @return loadBalancerPorts - */ - @javax.annotation.Nonnull - public List getLoadBalancerPorts() { - return loadBalancerPorts; - } - - public void setLoadBalancerPorts(List loadBalancerPorts) { - this.loadBalancerPorts = loadBalancerPorts; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest = - (DeleteLoadBalancerListenersRequest) o; - return Objects.equals(this.dryRun, deleteLoadBalancerListenersRequest.dryRun) - && Objects.equals( - this.loadBalancerName, deleteLoadBalancerListenersRequest.loadBalancerName) - && Objects.equals( - this.loadBalancerPorts, - deleteLoadBalancerListenersRequest.loadBalancerPorts); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerName, loadBalancerPorts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerListenersRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" loadBalancerPorts: ") - .append(toIndentedString(loadBalancerPorts)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("LoadBalancerPorts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - openapiRequiredFields.add("LoadBalancerPorts"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerListenersRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerListenersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerListenersRequest is" - + " not found in the empty JSON string", - DeleteLoadBalancerListenersRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerListenersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerListenersRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteLoadBalancerListenersRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - // ensure the required json array is present - if (jsonObj.get("LoadBalancerPorts") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("LoadBalancerPorts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerPorts` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancerPorts").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerListenersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerListenersRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerListenersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerListenersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerListenersRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerListenersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerListenersRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerListenersRequest - */ - public static DeleteLoadBalancerListenersRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerListenersRequest.class); - } - - /** - * Convert an instance of DeleteLoadBalancerListenersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponse.java deleted file mode 100644 index bec63be9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponse.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerListenersResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerListenersResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteLoadBalancerListenersResponse() {} - - public DeleteLoadBalancerListenersResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public DeleteLoadBalancerListenersResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerListenersResponse deleteLoadBalancerListenersResponse = - (DeleteLoadBalancerListenersResponse) o; - return Objects.equals(this.loadBalancer, deleteLoadBalancerListenersResponse.loadBalancer) - && Objects.equals( - this.responseContext, deleteLoadBalancerListenersResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerListenersResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerListenersResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerListenersResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerListenersResponse" - + " is not found in the empty JSON string", - DeleteLoadBalancerListenersResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerListenersResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerListenersResponse` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerListenersResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerListenersResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerListenersResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerListenersResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerListenersResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerListenersResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerListenersResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerListenersResponse - */ - public static DeleteLoadBalancerListenersResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerListenersResponse.class); - } - - /** - * Convert an instance of DeleteLoadBalancerListenersResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequest.java deleted file mode 100644 index cacee8f5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public DeleteLoadBalancerPolicyRequest() {} - - public DeleteLoadBalancerPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteLoadBalancerPolicyRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer for which you want to delete a policy. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public DeleteLoadBalancerPolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy you want to delete. - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest = - (DeleteLoadBalancerPolicyRequest) o; - return Objects.equals(this.dryRun, deleteLoadBalancerPolicyRequest.dryRun) - && Objects.equals( - this.loadBalancerName, deleteLoadBalancerPolicyRequest.loadBalancerName) - && Objects.equals(this.policyName, deleteLoadBalancerPolicyRequest.policyName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerName, policyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("PolicyName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - openapiRequiredFields.add("PolicyName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerPolicyRequest is" - + " not found in the empty JSON string", - DeleteLoadBalancerPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteLoadBalancerPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerPolicyRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerPolicyRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerPolicyRequest - */ - public static DeleteLoadBalancerPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerPolicyRequest.class); - } - - /** - * Convert an instance of DeleteLoadBalancerPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponse.java deleted file mode 100644 index dc8f18bd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponse.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerPolicyResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteLoadBalancerPolicyResponse() {} - - public DeleteLoadBalancerPolicyResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public DeleteLoadBalancerPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerPolicyResponse deleteLoadBalancerPolicyResponse = - (DeleteLoadBalancerPolicyResponse) o; - return Objects.equals(this.loadBalancer, deleteLoadBalancerPolicyResponse.loadBalancer) - && Objects.equals( - this.responseContext, deleteLoadBalancerPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerPolicyResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerPolicyResponse is" - + " not found in the empty JSON string", - DeleteLoadBalancerPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerPolicyResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerPolicyResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerPolicyResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerPolicyResponse - */ - public static DeleteLoadBalancerPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerPolicyResponse.class); - } - - /** - * Convert an instance of DeleteLoadBalancerPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequest.java deleted file mode 100644 index 934674d0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public DeleteLoadBalancerRequest() {} - - public DeleteLoadBalancerRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteLoadBalancerRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer you want to delete. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerRequest deleteLoadBalancerRequest = (DeleteLoadBalancerRequest) o; - return Objects.equals(this.dryRun, deleteLoadBalancerRequest.dryRun) - && Objects.equals( - this.loadBalancerName, deleteLoadBalancerRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteLoadBalancerRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerRequest is not" - + " found in the empty JSON string", - DeleteLoadBalancerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteLoadBalancerRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteLoadBalancerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerRequest - * @throws IOException if the JSON string is invalid with respect to DeleteLoadBalancerRequest - */ - public static DeleteLoadBalancerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerRequest.class); - } - - /** - * Convert an instance of DeleteLoadBalancerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponse.java deleted file mode 100644 index 541261ba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteLoadBalancerResponse() {} - - public DeleteLoadBalancerResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerResponse deleteLoadBalancerResponse = (DeleteLoadBalancerResponse) o; - return Objects.equals(this.responseContext, deleteLoadBalancerResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteLoadBalancerResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerResponse is not" - + " found in the empty JSON string", - DeleteLoadBalancerResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteLoadBalancerResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerResponse - * @throws IOException if the JSON string is invalid with respect to DeleteLoadBalancerResponse - */ - public static DeleteLoadBalancerResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerResponse.class); - } - - /** - * Convert an instance of DeleteLoadBalancerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequest.java deleted file mode 100644 index 42ce5a63..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequest.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAMES = "LoadBalancerNames"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAMES) - private List loadBalancerNames = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList<>(); - - public DeleteLoadBalancerTagsRequest() {} - - public DeleteLoadBalancerTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteLoadBalancerTagsRequest loadBalancerNames(List loadBalancerNames) { - - this.loadBalancerNames = loadBalancerNames; - return this; - } - - public DeleteLoadBalancerTagsRequest addLoadBalancerNamesItem(String loadBalancerNamesItem) { - this.loadBalancerNames.add(loadBalancerNamesItem); - return this; - } - - /** - * One or more load balancer names. - * - * @return loadBalancerNames - */ - @javax.annotation.Nonnull - public List getLoadBalancerNames() { - return loadBalancerNames; - } - - public void setLoadBalancerNames(List loadBalancerNames) { - this.loadBalancerNames = loadBalancerNames; - } - - public DeleteLoadBalancerTagsRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public DeleteLoadBalancerTagsRequest addTagsItem(ResourceLoadBalancerTag tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to delete from the load balancers. - * - * @return tags - */ - @javax.annotation.Nonnull - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest = - (DeleteLoadBalancerTagsRequest) o; - return Objects.equals(this.dryRun, deleteLoadBalancerTagsRequest.dryRun) - && Objects.equals( - this.loadBalancerNames, deleteLoadBalancerTagsRequest.loadBalancerNames) - && Objects.equals(this.tags, deleteLoadBalancerTagsRequest.tags); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerNames, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerNames: ") - .append(toIndentedString(loadBalancerNames)) - .append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerNames"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerNames"); - openapiRequiredFields.add("Tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerTagsRequest is not" - + " found in the empty JSON string", - DeleteLoadBalancerTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteLoadBalancerTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("LoadBalancerNames") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("LoadBalancerNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancerNames").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - // validate the required field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceLoadBalancerTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerTagsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerTagsRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerTagsRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerTagsRequest - */ - public static DeleteLoadBalancerTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerTagsRequest.class); - } - - /** - * Convert an instance of DeleteLoadBalancerTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponse.java deleted file mode 100644 index 0a4962fa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponse.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteLoadBalancerTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteLoadBalancerTagsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteLoadBalancerTagsResponse() {} - - public DeleteLoadBalancerTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLoadBalancerTagsResponse deleteLoadBalancerTagsResponse = - (DeleteLoadBalancerTagsResponse) o; - return Objects.equals(this.responseContext, deleteLoadBalancerTagsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteLoadBalancerTagsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteLoadBalancerTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteLoadBalancerTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteLoadBalancerTagsResponse is not" - + " found in the empty JSON string", - DeleteLoadBalancerTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteLoadBalancerTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteLoadBalancerTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteLoadBalancerTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteLoadBalancerTagsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteLoadBalancerTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteLoadBalancerTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteLoadBalancerTagsResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteLoadBalancerTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteLoadBalancerTagsResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteLoadBalancerTagsResponse - */ - public static DeleteLoadBalancerTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteLoadBalancerTagsResponse.class); - } - - /** - * Convert an instance of DeleteLoadBalancerTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequest.java deleted file mode 100644 index e05133d1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNatServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNatServiceRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAT_SERVICE_ID = "NatServiceId"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_ID) - private String natServiceId; - - public DeleteNatServiceRequest() {} - - public DeleteNatServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteNatServiceRequest natServiceId(String natServiceId) { - - this.natServiceId = natServiceId; - return this; - } - - /** - * The ID of the NAT service you want to delete. - * - * @return natServiceId - */ - @javax.annotation.Nonnull - public String getNatServiceId() { - return natServiceId; - } - - public void setNatServiceId(String natServiceId) { - this.natServiceId = natServiceId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNatServiceRequest deleteNatServiceRequest = (DeleteNatServiceRequest) o; - return Objects.equals(this.dryRun, deleteNatServiceRequest.dryRun) - && Objects.equals(this.natServiceId, deleteNatServiceRequest.natServiceId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, natServiceId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNatServiceRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" natServiceId: ").append(toIndentedString(natServiceId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NatServiceId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NatServiceId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNatServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNatServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNatServiceRequest is not found" - + " in the empty JSON string", - DeleteNatServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNatServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNatServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteNatServiceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NatServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NatServiceId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNatServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNatServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNatServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNatServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNatServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNatServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNatServiceRequest - * @throws IOException if the JSON string is invalid with respect to DeleteNatServiceRequest - */ - public static DeleteNatServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNatServiceRequest.class); - } - - /** - * Convert an instance of DeleteNatServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponse.java deleted file mode 100644 index 5e8b8d32..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNatServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNatServiceResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteNatServiceResponse() {} - - public DeleteNatServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNatServiceResponse deleteNatServiceResponse = (DeleteNatServiceResponse) o; - return Objects.equals(this.responseContext, deleteNatServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNatServiceResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNatServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNatServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNatServiceResponse is not found" - + " in the empty JSON string", - DeleteNatServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNatServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNatServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNatServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNatServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNatServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNatServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNatServiceResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNatServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNatServiceResponse - * @throws IOException if the JSON string is invalid with respect to DeleteNatServiceResponse - */ - public static DeleteNatServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNatServiceResponse.class); - } - - /** - * Convert an instance of DeleteNatServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequest.java deleted file mode 100644 index 720f37c3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetAccessPointRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetAccessPointRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ACCESS_POINT_ID = "NetAccessPointId"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT_ID) - private String netAccessPointId; - - public DeleteNetAccessPointRequest() {} - - public DeleteNetAccessPointRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteNetAccessPointRequest netAccessPointId(String netAccessPointId) { - - this.netAccessPointId = netAccessPointId; - return this; - } - - /** - * The ID of the Net access point. - * - * @return netAccessPointId - */ - @javax.annotation.Nonnull - public String getNetAccessPointId() { - return netAccessPointId; - } - - public void setNetAccessPointId(String netAccessPointId) { - this.netAccessPointId = netAccessPointId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetAccessPointRequest deleteNetAccessPointRequest = (DeleteNetAccessPointRequest) o; - return Objects.equals(this.dryRun, deleteNetAccessPointRequest.dryRun) - && Objects.equals( - this.netAccessPointId, deleteNetAccessPointRequest.netAccessPointId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netAccessPointId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetAccessPointRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netAccessPointId: ").append(toIndentedString(netAccessPointId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetAccessPointId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetAccessPointId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNetAccessPointRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetAccessPointRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetAccessPointRequest is not" - + " found in the empty JSON string", - DeleteNetAccessPointRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetAccessPointRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetAccessPointRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteNetAccessPointRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetAccessPointId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPointId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("NetAccessPointId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetAccessPointRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetAccessPointRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNetAccessPointRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetAccessPointRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetAccessPointRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetAccessPointRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetAccessPointRequest - * @throws IOException if the JSON string is invalid with respect to DeleteNetAccessPointRequest - */ - public static DeleteNetAccessPointRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetAccessPointRequest.class); - } - - /** - * Convert an instance of DeleteNetAccessPointRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponse.java deleted file mode 100644 index d1088612..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponse.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetAccessPointResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetAccessPointResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteNetAccessPointResponse() {} - - public DeleteNetAccessPointResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetAccessPointResponse deleteNetAccessPointResponse = - (DeleteNetAccessPointResponse) o; - return Objects.equals(this.responseContext, deleteNetAccessPointResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetAccessPointResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteNetAccessPointResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetAccessPointResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetAccessPointResponse is not" - + " found in the empty JSON string", - DeleteNetAccessPointResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetAccessPointResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetAccessPointResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetAccessPointResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetAccessPointResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteNetAccessPointResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetAccessPointResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetAccessPointResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetAccessPointResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetAccessPointResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteNetAccessPointResponse - */ - public static DeleteNetAccessPointResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetAccessPointResponse.class); - } - - /** - * Convert an instance of DeleteNetAccessPointResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequest.java deleted file mode 100644 index 37121100..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetPeeringRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetPeeringRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public DeleteNetPeeringRequest() {} - - public DeleteNetPeeringRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteNetPeeringRequest netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of the Net peering you want to delete. - * - * @return netPeeringId - */ - @javax.annotation.Nonnull - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetPeeringRequest deleteNetPeeringRequest = (DeleteNetPeeringRequest) o; - return Objects.equals(this.dryRun, deleteNetPeeringRequest.dryRun) - && Objects.equals(this.netPeeringId, deleteNetPeeringRequest.netPeeringId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netPeeringId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetPeeringRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetPeeringId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetPeeringId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNetPeeringRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetPeeringRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetPeeringRequest is not found" - + " in the empty JSON string", - DeleteNetPeeringRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetPeeringRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetPeeringRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteNetPeeringRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetPeeringRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetPeeringRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNetPeeringRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetPeeringRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetPeeringRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetPeeringRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetPeeringRequest - * @throws IOException if the JSON string is invalid with respect to DeleteNetPeeringRequest - */ - public static DeleteNetPeeringRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetPeeringRequest.class); - } - - /** - * Convert an instance of DeleteNetPeeringRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponse.java deleted file mode 100644 index a3578bd8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetPeeringResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetPeeringResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteNetPeeringResponse() {} - - public DeleteNetPeeringResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetPeeringResponse deleteNetPeeringResponse = (DeleteNetPeeringResponse) o; - return Objects.equals(this.responseContext, deleteNetPeeringResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetPeeringResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNetPeeringResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetPeeringResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetPeeringResponse is not found" - + " in the empty JSON string", - DeleteNetPeeringResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetPeeringResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetPeeringResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetPeeringResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetPeeringResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNetPeeringResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetPeeringResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetPeeringResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetPeeringResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetPeeringResponse - * @throws IOException if the JSON string is invalid with respect to DeleteNetPeeringResponse - */ - public static DeleteNetPeeringResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetPeeringResponse.class); - } - - /** - * Convert an instance of DeleteNetPeeringResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequest.java deleted file mode 100644 index 9b42c930..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public DeleteNetRequest() {} - - public DeleteNetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteNetRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net you want to delete. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetRequest deleteNetRequest = (DeleteNetRequest) o; - return Objects.equals(this.dryRun, deleteNetRequest.dryRun) - && Objects.equals(this.netId, deleteNetRequest.netId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetRequest is not found in the" - + " empty JSON string", - DeleteNetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteNetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetRequest - * @throws IOException if the JSON string is invalid with respect to DeleteNetRequest - */ - public static DeleteNetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetRequest.class); - } - - /** - * Convert an instance of DeleteNetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponse.java deleted file mode 100644 index 4579784c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNetResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteNetResponse() {} - - public DeleteNetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNetResponse deleteNetResponse = (DeleteNetResponse) o; - return Objects.equals(this.responseContext, deleteNetResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNetResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNetResponse is not found in the" - + " empty JSON string", - DeleteNetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNetResponse - * @throws IOException if the JSON string is invalid with respect to DeleteNetResponse - */ - public static DeleteNetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNetResponse.class); - } - - /** - * Convert an instance of DeleteNetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequest.java deleted file mode 100644 index de5b5fb2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNicRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNicRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public DeleteNicRequest() {} - - public DeleteNicRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteNicRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC you want to delete. - * - * @return nicId - */ - @javax.annotation.Nonnull - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNicRequest deleteNicRequest = (DeleteNicRequest) o; - return Objects.equals(this.dryRun, deleteNicRequest.dryRun) - && Objects.equals(this.nicId, deleteNicRequest.nicId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, nicId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNicRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NicId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NicId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNicRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNicRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNicRequest is not found in the" - + " empty JSON string", - DeleteNicRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNicRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNicRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteNicRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNicRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNicRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNicRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNicRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNicRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNicRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNicRequest - * @throws IOException if the JSON string is invalid with respect to DeleteNicRequest - */ - public static DeleteNicRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNicRequest.class); - } - - /** - * Convert an instance of DeleteNicRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponse.java deleted file mode 100644 index 827f395f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteNicResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteNicResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteNicResponse() {} - - public DeleteNicResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteNicResponse deleteNicResponse = (DeleteNicResponse) o; - return Objects.equals(this.responseContext, deleteNicResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteNicResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteNicResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteNicResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteNicResponse is not found in the" - + " empty JSON string", - DeleteNicResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteNicResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteNicResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteNicResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteNicResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteNicResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteNicResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteNicResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteNicResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteNicResponse - * @throws IOException if the JSON string is invalid with respect to DeleteNicResponse - */ - public static DeleteNicResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteNicResponse.class); - } - - /** - * Convert an instance of DeleteNicResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequest.java deleted file mode 100644 index e07d742b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public DeletePolicyRequest() {} - - public DeletePolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeletePolicyRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy you want to delete. For more information, see - * [Resource Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePolicyRequest deletePolicyRequest = (DeletePolicyRequest) o; - return Objects.equals(this.dryRun, deletePolicyRequest.dryRun) - && Objects.equals(this.policyOrn, deletePolicyRequest.policyOrn); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyOrn); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyOrn"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePolicyRequest is not found in" - + " the empty JSON string", - DeletePolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeletePolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePolicyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePolicyRequest - * @throws IOException if the JSON string is invalid with respect to DeletePolicyRequest - */ - public static DeletePolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePolicyRequest.class); - } - - /** - * Convert an instance of DeletePolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponse.java deleted file mode 100644 index dcc57150..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePolicyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeletePolicyResponse() {} - - public DeletePolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePolicyResponse deletePolicyResponse = (DeletePolicyResponse) o; - return Objects.equals(this.responseContext, deletePolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePolicyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePolicyResponse is not found in" - + " the empty JSON string", - DeletePolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePolicyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePolicyResponse - * @throws IOException if the JSON string is invalid with respect to DeletePolicyResponse - */ - public static DeletePolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePolicyResponse.class); - } - - /** - * Convert an instance of DeletePolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequest.java deleted file mode 100644 index 11d77b96..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePolicyVersionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePolicyVersionRequest { - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_VERSION_ID = "VersionId"; - - @SerializedName(SERIALIZED_NAME_VERSION_ID) - private String versionId; - - public DeletePolicyVersionRequest() {} - - public DeletePolicyVersionRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public DeletePolicyVersionRequest versionId(String versionId) { - - this.versionId = versionId; - return this; - } - - /** - * The ID of the version of the policy you want to delete. - * - * @return versionId - */ - @javax.annotation.Nonnull - public String getVersionId() { - return versionId; - } - - public void setVersionId(String versionId) { - this.versionId = versionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePolicyVersionRequest deletePolicyVersionRequest = (DeletePolicyVersionRequest) o; - return Objects.equals(this.policyOrn, deletePolicyVersionRequest.policyOrn) - && Objects.equals(this.versionId, deletePolicyVersionRequest.versionId); - } - - @Override - public int hashCode() { - return Objects.hash(policyOrn, versionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePolicyVersionRequest {\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyOrn"); - openapiFields.add("VersionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("VersionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePolicyVersionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePolicyVersionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePolicyVersionRequest is not" - + " found in the empty JSON string", - DeletePolicyVersionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePolicyVersionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePolicyVersionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeletePolicyVersionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("VersionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VersionId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VersionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePolicyVersionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePolicyVersionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePolicyVersionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePolicyVersionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePolicyVersionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePolicyVersionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePolicyVersionRequest - * @throws IOException if the JSON string is invalid with respect to DeletePolicyVersionRequest - */ - public static DeletePolicyVersionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePolicyVersionRequest.class); - } - - /** - * Convert an instance of DeletePolicyVersionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponse.java deleted file mode 100644 index caa3e7a9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePolicyVersionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePolicyVersionResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeletePolicyVersionResponse() {} - - public DeletePolicyVersionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePolicyVersionResponse deletePolicyVersionResponse = (DeletePolicyVersionResponse) o; - return Objects.equals(this.responseContext, deletePolicyVersionResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePolicyVersionResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePolicyVersionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePolicyVersionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePolicyVersionResponse is not" - + " found in the empty JSON string", - DeletePolicyVersionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePolicyVersionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePolicyVersionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePolicyVersionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePolicyVersionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePolicyVersionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePolicyVersionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePolicyVersionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePolicyVersionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePolicyVersionResponse - * @throws IOException if the JSON string is invalid with respect to DeletePolicyVersionResponse - */ - public static DeletePolicyVersionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePolicyVersionResponse.class); - } - - /** - * Convert an instance of DeletePolicyVersionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequest.java deleted file mode 100644 index 7e071259..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequest.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePublicIpRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePublicIpRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public DeletePublicIpRequest() {} - - public DeletePublicIpRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeletePublicIpRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP. In the public Cloud, this parameter is required. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public DeletePublicIpRequest publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The ID representing the association of the public IP with the VM or the NIC. In a Net, this - * parameter is required. - * - * @return publicIpId - */ - @javax.annotation.Nullable - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePublicIpRequest deletePublicIpRequest = (DeletePublicIpRequest) o; - return Objects.equals(this.dryRun, deletePublicIpRequest.dryRun) - && Objects.equals(this.publicIp, deletePublicIpRequest.publicIp) - && Objects.equals(this.publicIpId, deletePublicIpRequest.publicIpId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, publicIp, publicIpId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePublicIpRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePublicIpRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePublicIpRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePublicIpRequest is not found in" - + " the empty JSON string", - DeletePublicIpRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePublicIpRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePublicIpRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpId") != null && !jsonObj.get("PublicIpId").isJsonNull()) - && !jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePublicIpRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePublicIpRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePublicIpRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePublicIpRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePublicIpRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePublicIpRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePublicIpRequest - * @throws IOException if the JSON string is invalid with respect to DeletePublicIpRequest - */ - public static DeletePublicIpRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePublicIpRequest.class); - } - - /** - * Convert an instance of DeletePublicIpRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponse.java deleted file mode 100644 index 230e47c4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeletePublicIpResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeletePublicIpResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeletePublicIpResponse() {} - - public DeletePublicIpResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePublicIpResponse deletePublicIpResponse = (DeletePublicIpResponse) o; - return Objects.equals(this.responseContext, deletePublicIpResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletePublicIpResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeletePublicIpResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeletePublicIpResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeletePublicIpResponse is not found" - + " in the empty JSON string", - DeletePublicIpResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeletePublicIpResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeletePublicIpResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeletePublicIpResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeletePublicIpResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeletePublicIpResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeletePublicIpResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeletePublicIpResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeletePublicIpResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeletePublicIpResponse - * @throws IOException if the JSON string is invalid with respect to DeletePublicIpResponse - */ - public static DeletePublicIpResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeletePublicIpResponse.class); - } - - /** - * Convert an instance of DeletePublicIpResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequest.java deleted file mode 100644 index 5a45300f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequest.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteRouteRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteRouteRequest { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public DeleteRouteRequest() {} - - public DeleteRouteRequest destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The exact IP range for the route. - * - * @return destinationIpRange - */ - @javax.annotation.Nonnull - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public DeleteRouteRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteRouteRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table from which you want to delete a route. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteRouteRequest deleteRouteRequest = (DeleteRouteRequest) o; - return Objects.equals(this.destinationIpRange, deleteRouteRequest.destinationIpRange) - && Objects.equals(this.dryRun, deleteRouteRequest.dryRun) - && Objects.equals(this.routeTableId, deleteRouteRequest.routeTableId); - } - - @Override - public int hashCode() { - return Objects.hash(destinationIpRange, dryRun, routeTableId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteRouteRequest {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DryRun"); - openapiFields.add("RouteTableId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DestinationIpRange"); - openapiRequiredFields.add("RouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteRouteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteRouteRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteRouteRequest is not found in" - + " the empty JSON string", - DeleteRouteRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteRouteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteRouteRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteRouteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteRouteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteRouteRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteRouteRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteRouteRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteRouteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteRouteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteRouteRequest - * @throws IOException if the JSON string is invalid with respect to DeleteRouteRequest - */ - public static DeleteRouteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteRouteRequest.class); - } - - /** - * Convert an instance of DeleteRouteRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponse.java deleted file mode 100644 index 1eb2aba4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteRouteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteRouteResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLE = "RouteTable"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE) - private RouteTable routeTable; - - public DeleteRouteResponse() {} - - public DeleteRouteResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public DeleteRouteResponse routeTable(RouteTable routeTable) { - - this.routeTable = routeTable; - return this; - } - - /** - * Get routeTable - * - * @return routeTable - */ - @javax.annotation.Nullable - public RouteTable getRouteTable() { - return routeTable; - } - - public void setRouteTable(RouteTable routeTable) { - this.routeTable = routeTable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteRouteResponse deleteRouteResponse = (DeleteRouteResponse) o; - return Objects.equals(this.responseContext, deleteRouteResponse.responseContext) - && Objects.equals(this.routeTable, deleteRouteResponse.routeTable); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, routeTable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteRouteResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTable: ").append(toIndentedString(routeTable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteRouteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteRouteResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteRouteResponse is not found in" - + " the empty JSON string", - DeleteRouteResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteRouteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteRouteResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `RouteTable` - if (jsonObj.get("RouteTable") != null && !jsonObj.get("RouteTable").isJsonNull()) { - RouteTable.validateJsonObject(jsonObj.getAsJsonObject("RouteTable")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteRouteResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteRouteResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteRouteResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteRouteResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteRouteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteRouteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteRouteResponse - * @throws IOException if the JSON string is invalid with respect to DeleteRouteResponse - */ - public static DeleteRouteResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteRouteResponse.class); - } - - /** - * Convert an instance of DeleteRouteResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequest.java deleted file mode 100644 index e586951f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteRouteTableRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteRouteTableRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public DeleteRouteTableRequest() {} - - public DeleteRouteTableRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteRouteTableRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table you want to delete. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteRouteTableRequest deleteRouteTableRequest = (DeleteRouteTableRequest) o; - return Objects.equals(this.dryRun, deleteRouteTableRequest.dryRun) - && Objects.equals(this.routeTableId, deleteRouteTableRequest.routeTableId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, routeTableId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteRouteTableRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("RouteTableId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("RouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteRouteTableRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteRouteTableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteRouteTableRequest is not found" - + " in the empty JSON string", - DeleteRouteTableRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteRouteTableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteRouteTableRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteRouteTableRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteRouteTableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteRouteTableRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteRouteTableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteRouteTableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteRouteTableRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteRouteTableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteRouteTableRequest - * @throws IOException if the JSON string is invalid with respect to DeleteRouteTableRequest - */ - public static DeleteRouteTableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteRouteTableRequest.class); - } - - /** - * Convert an instance of DeleteRouteTableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponse.java deleted file mode 100644 index e2acbcd9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteRouteTableResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteRouteTableResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteRouteTableResponse() {} - - public DeleteRouteTableResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteRouteTableResponse deleteRouteTableResponse = (DeleteRouteTableResponse) o; - return Objects.equals(this.responseContext, deleteRouteTableResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteRouteTableResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteRouteTableResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteRouteTableResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteRouteTableResponse is not found" - + " in the empty JSON string", - DeleteRouteTableResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteRouteTableResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteRouteTableResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteRouteTableResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteRouteTableResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteRouteTableResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteRouteTableResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteRouteTableResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteRouteTableResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteRouteTableResponse - * @throws IOException if the JSON string is invalid with respect to DeleteRouteTableResponse - */ - public static DeleteRouteTableResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteRouteTableResponse.class); - } - - /** - * Convert an instance of DeleteRouteTableResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequest.java deleted file mode 100644 index 85d9759f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSecurityGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSecurityGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public DeleteSecurityGroupRequest() {} - - public DeleteSecurityGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteSecurityGroupRequest securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of the security group you want to delete. - * - * @return securityGroupId - */ - @javax.annotation.Nullable - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public DeleteSecurityGroupRequest securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * The name of the security group. - * - * @return securityGroupName - */ - @javax.annotation.Nullable - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSecurityGroupRequest deleteSecurityGroupRequest = (DeleteSecurityGroupRequest) o; - return Objects.equals(this.dryRun, deleteSecurityGroupRequest.dryRun) - && Objects.equals(this.securityGroupId, deleteSecurityGroupRequest.securityGroupId) - && Objects.equals( - this.securityGroupName, deleteSecurityGroupRequest.securityGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, securityGroupId, securityGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSecurityGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSecurityGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSecurityGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSecurityGroupRequest is not" - + " found in the empty JSON string", - DeleteSecurityGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSecurityGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSecurityGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("SecurityGroupId") != null && !jsonObj.get("SecurityGroupId").isJsonNull()) - && !jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupName") != null - && !jsonObj.get("SecurityGroupName").isJsonNull()) - && !jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSecurityGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSecurityGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSecurityGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSecurityGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSecurityGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSecurityGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSecurityGroupRequest - * @throws IOException if the JSON string is invalid with respect to DeleteSecurityGroupRequest - */ - public static DeleteSecurityGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSecurityGroupRequest.class); - } - - /** - * Convert an instance of DeleteSecurityGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponse.java deleted file mode 100644 index 34d497d1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSecurityGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSecurityGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteSecurityGroupResponse() {} - - public DeleteSecurityGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSecurityGroupResponse deleteSecurityGroupResponse = (DeleteSecurityGroupResponse) o; - return Objects.equals(this.responseContext, deleteSecurityGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSecurityGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSecurityGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSecurityGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSecurityGroupResponse is not" - + " found in the empty JSON string", - DeleteSecurityGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSecurityGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSecurityGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSecurityGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSecurityGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSecurityGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSecurityGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSecurityGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSecurityGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSecurityGroupResponse - * @throws IOException if the JSON string is invalid with respect to DeleteSecurityGroupResponse - */ - public static DeleteSecurityGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSecurityGroupResponse.class); - } - - /** - * Convert an instance of DeleteSecurityGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequest.java deleted file mode 100644 index 28b4be44..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequest.java +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSecurityGroupRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSecurityGroupRuleRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLOW = "Flow"; - - @SerializedName(SERIALIZED_NAME_FLOW) - private String flow; - - public static final String SERIALIZED_NAME_FROM_PORT_RANGE = "FromPortRange"; - - @SerializedName(SERIALIZED_NAME_FROM_PORT_RANGE) - private Integer fromPortRange; - - public static final String SERIALIZED_NAME_IP_PROTOCOL = "IpProtocol"; - - @SerializedName(SERIALIZED_NAME_IP_PROTOCOL) - private String ipProtocol; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_RULES = "Rules"; - - @SerializedName(SERIALIZED_NAME_RULES) - private List rules = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID_TO_UNLINK = - "SecurityGroupAccountIdToUnlink"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID_TO_UNLINK) - private String securityGroupAccountIdToUnlink; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME_TO_UNLINK = - "SecurityGroupNameToUnlink"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME_TO_UNLINK) - private String securityGroupNameToUnlink; - - public static final String SERIALIZED_NAME_TO_PORT_RANGE = "ToPortRange"; - - @SerializedName(SERIALIZED_NAME_TO_PORT_RANGE) - private Integer toPortRange; - - public DeleteSecurityGroupRuleRequest() {} - - public DeleteSecurityGroupRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteSecurityGroupRuleRequest flow(String flow) { - - this.flow = flow; - return this; - } - - /** - * The direction of the flow: `Inbound` or `Outbound`. You can specify - * `Outbound` for Nets only. - * - * @return flow - */ - @javax.annotation.Nonnull - public String getFlow() { - return flow; - } - - public void setFlow(String flow) { - this.flow = flow; - } - - public DeleteSecurityGroupRuleRequest fromPortRange(Integer fromPortRange) { - - this.fromPortRange = fromPortRange; - return this; - } - - /** - * The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. - * - * @return fromPortRange - */ - @javax.annotation.Nullable - public Integer getFromPortRange() { - return fromPortRange; - } - - public void setFromPortRange(Integer fromPortRange) { - this.fromPortRange = fromPortRange; - } - - public DeleteSecurityGroupRuleRequest ipProtocol(String ipProtocol) { - - this.ipProtocol = ipProtocol; - return this; - } - - /** - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` - * for all protocols). By default, `-1`. In a Net, this can also be an IP protocol - * number. For more information, see the [IANA.org - * website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). - * - * @return ipProtocol - */ - @javax.annotation.Nullable - public String getIpProtocol() { - return ipProtocol; - } - - public void setIpProtocol(String ipProtocol) { - this.ipProtocol = ipProtocol; - } - - public DeleteSecurityGroupRuleRequest ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the security group rule, in CIDR notation (for example, - * `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public DeleteSecurityGroupRuleRequest rules(List rules) { - - this.rules = rules; - return this; - } - - public DeleteSecurityGroupRuleRequest addRulesItem(SecurityGroupRule rulesItem) { - if (this.rules == null) { - this.rules = new ArrayList<>(); - } - this.rules.add(rulesItem); - return this; - } - - /** - * One or more rules you want to delete from the security group. - * - * @return rules - */ - @javax.annotation.Nullable - public List getRules() { - return rules; - } - - public void setRules(List rules) { - this.rules = rules; - } - - public DeleteSecurityGroupRuleRequest securityGroupAccountIdToUnlink( - String securityGroupAccountIdToUnlink) { - - this.securityGroupAccountIdToUnlink = securityGroupAccountIdToUnlink; - return this; - } - - /** - * The account ID of the owner of the security group you want to delete a rule from. - * - * @return securityGroupAccountIdToUnlink - */ - @javax.annotation.Nullable - public String getSecurityGroupAccountIdToUnlink() { - return securityGroupAccountIdToUnlink; - } - - public void setSecurityGroupAccountIdToUnlink(String securityGroupAccountIdToUnlink) { - this.securityGroupAccountIdToUnlink = securityGroupAccountIdToUnlink; - } - - public DeleteSecurityGroupRuleRequest securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of the security group you want to delete a rule from. - * - * @return securityGroupId - */ - @javax.annotation.Nonnull - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public DeleteSecurityGroupRuleRequest securityGroupNameToUnlink( - String securityGroupNameToUnlink) { - - this.securityGroupNameToUnlink = securityGroupNameToUnlink; - return this; - } - - /** - * The ID of the source security group. If you are in the Public Cloud, you can also specify the - * name of the source security group. - * - * @return securityGroupNameToUnlink - */ - @javax.annotation.Nullable - public String getSecurityGroupNameToUnlink() { - return securityGroupNameToUnlink; - } - - public void setSecurityGroupNameToUnlink(String securityGroupNameToUnlink) { - this.securityGroupNameToUnlink = securityGroupNameToUnlink; - } - - public DeleteSecurityGroupRuleRequest toPortRange(Integer toPortRange) { - - this.toPortRange = toPortRange; - return this; - } - - /** - * The end of the port range for the TCP and UDP protocols, or an ICMP code number. - * - * @return toPortRange - */ - @javax.annotation.Nullable - public Integer getToPortRange() { - return toPortRange; - } - - public void setToPortRange(Integer toPortRange) { - this.toPortRange = toPortRange; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest = - (DeleteSecurityGroupRuleRequest) o; - return Objects.equals(this.dryRun, deleteSecurityGroupRuleRequest.dryRun) - && Objects.equals(this.flow, deleteSecurityGroupRuleRequest.flow) - && Objects.equals(this.fromPortRange, deleteSecurityGroupRuleRequest.fromPortRange) - && Objects.equals(this.ipProtocol, deleteSecurityGroupRuleRequest.ipProtocol) - && Objects.equals(this.ipRange, deleteSecurityGroupRuleRequest.ipRange) - && Objects.equals(this.rules, deleteSecurityGroupRuleRequest.rules) - && Objects.equals( - this.securityGroupAccountIdToUnlink, - deleteSecurityGroupRuleRequest.securityGroupAccountIdToUnlink) - && Objects.equals( - this.securityGroupId, deleteSecurityGroupRuleRequest.securityGroupId) - && Objects.equals( - this.securityGroupNameToUnlink, - deleteSecurityGroupRuleRequest.securityGroupNameToUnlink) - && Objects.equals(this.toPortRange, deleteSecurityGroupRuleRequest.toPortRange); - } - - @Override - public int hashCode() { - return Objects.hash( - dryRun, - flow, - fromPortRange, - ipProtocol, - ipRange, - rules, - securityGroupAccountIdToUnlink, - securityGroupId, - securityGroupNameToUnlink, - toPortRange); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSecurityGroupRuleRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flow: ").append(toIndentedString(flow)).append("\n"); - sb.append(" fromPortRange: ").append(toIndentedString(fromPortRange)).append("\n"); - sb.append(" ipProtocol: ").append(toIndentedString(ipProtocol)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); - sb.append(" securityGroupAccountIdToUnlink: ") - .append(toIndentedString(securityGroupAccountIdToUnlink)) - .append("\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupNameToUnlink: ") - .append(toIndentedString(securityGroupNameToUnlink)) - .append("\n"); - sb.append(" toPortRange: ").append(toIndentedString(toPortRange)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Flow"); - openapiFields.add("FromPortRange"); - openapiFields.add("IpProtocol"); - openapiFields.add("IpRange"); - openapiFields.add("Rules"); - openapiFields.add("SecurityGroupAccountIdToUnlink"); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupNameToUnlink"); - openapiFields.add("ToPortRange"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Flow"); - openapiRequiredFields.add("SecurityGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteSecurityGroupRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSecurityGroupRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSecurityGroupRuleRequest is not" - + " found in the empty JSON string", - DeleteSecurityGroupRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSecurityGroupRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSecurityGroupRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteSecurityGroupRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Flow").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Flow` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Flow").toString())); - } - if ((jsonObj.get("IpProtocol") != null && !jsonObj.get("IpProtocol").isJsonNull()) - && !jsonObj.get("IpProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpProtocol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpProtocol").toString())); - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if (jsonObj.get("Rules") != null && !jsonObj.get("Rules").isJsonNull()) { - JsonArray jsonArrayrules = jsonObj.getAsJsonArray("Rules"); - if (jsonArrayrules != null) { - // ensure the json data is an array - if (!jsonObj.get("Rules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Rules` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Rules").toString())); - } - - // validate the optional field `Rules` (array) - for (int i = 0; i < jsonArrayrules.size(); i++) { - SecurityGroupRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("SecurityGroupAccountIdToUnlink") != null - && !jsonObj.get("SecurityGroupAccountIdToUnlink").isJsonNull()) - && !jsonObj.get("SecurityGroupAccountIdToUnlink").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupAccountIdToUnlink` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("SecurityGroupAccountIdToUnlink").toString())); - } - if (!jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupNameToUnlink") != null - && !jsonObj.get("SecurityGroupNameToUnlink").isJsonNull()) - && !jsonObj.get("SecurityGroupNameToUnlink").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupNameToUnlink` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("SecurityGroupNameToUnlink").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSecurityGroupRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSecurityGroupRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteSecurityGroupRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSecurityGroupRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSecurityGroupRuleRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSecurityGroupRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSecurityGroupRuleRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteSecurityGroupRuleRequest - */ - public static DeleteSecurityGroupRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSecurityGroupRuleRequest.class); - } - - /** - * Convert an instance of DeleteSecurityGroupRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponse.java deleted file mode 100644 index ceaff75a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponse.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSecurityGroupRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSecurityGroupRuleResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SECURITY_GROUP = "SecurityGroup"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP) - private SecurityGroup securityGroup; - - public DeleteSecurityGroupRuleResponse() {} - - public DeleteSecurityGroupRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public DeleteSecurityGroupRuleResponse securityGroup(SecurityGroup securityGroup) { - - this.securityGroup = securityGroup; - return this; - } - - /** - * Get securityGroup - * - * @return securityGroup - */ - @javax.annotation.Nullable - public SecurityGroup getSecurityGroup() { - return securityGroup; - } - - public void setSecurityGroup(SecurityGroup securityGroup) { - this.securityGroup = securityGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSecurityGroupRuleResponse deleteSecurityGroupRuleResponse = - (DeleteSecurityGroupRuleResponse) o; - return Objects.equals(this.responseContext, deleteSecurityGroupRuleResponse.responseContext) - && Objects.equals( - this.securityGroup, deleteSecurityGroupRuleResponse.securityGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, securityGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSecurityGroupRuleResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" securityGroup: ").append(toIndentedString(securityGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("SecurityGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteSecurityGroupRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSecurityGroupRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSecurityGroupRuleResponse is" - + " not found in the empty JSON string", - DeleteSecurityGroupRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSecurityGroupRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSecurityGroupRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `SecurityGroup` - if (jsonObj.get("SecurityGroup") != null && !jsonObj.get("SecurityGroup").isJsonNull()) { - SecurityGroup.validateJsonObject(jsonObj.getAsJsonObject("SecurityGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSecurityGroupRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSecurityGroupRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteSecurityGroupRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSecurityGroupRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSecurityGroupRuleResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSecurityGroupRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSecurityGroupRuleResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteSecurityGroupRuleResponse - */ - public static DeleteSecurityGroupRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSecurityGroupRuleResponse.class); - } - - /** - * Convert an instance of DeleteSecurityGroupRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequest.java deleted file mode 100644 index 9e12bea9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequest.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteServerCertificateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteServerCertificateRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public DeleteServerCertificateRequest() {} - - public DeleteServerCertificateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteServerCertificateRequest name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the server certificate you want to delete. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteServerCertificateRequest deleteServerCertificateRequest = - (DeleteServerCertificateRequest) o; - return Objects.equals(this.dryRun, deleteServerCertificateRequest.dryRun) - && Objects.equals(this.name, deleteServerCertificateRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteServerCertificateRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteServerCertificateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteServerCertificateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteServerCertificateRequest is not" - + " found in the empty JSON string", - DeleteServerCertificateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteServerCertificateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteServerCertificateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteServerCertificateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteServerCertificateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteServerCertificateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteServerCertificateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteServerCertificateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteServerCertificateRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteServerCertificateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteServerCertificateRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteServerCertificateRequest - */ - public static DeleteServerCertificateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteServerCertificateRequest.class); - } - - /** - * Convert an instance of DeleteServerCertificateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponse.java deleted file mode 100644 index fdf470d9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteServerCertificateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteServerCertificateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteServerCertificateResponse() {} - - public DeleteServerCertificateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteServerCertificateResponse deleteServerCertificateResponse = - (DeleteServerCertificateResponse) o; - return Objects.equals( - this.responseContext, deleteServerCertificateResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteServerCertificateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteServerCertificateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteServerCertificateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteServerCertificateResponse is" - + " not found in the empty JSON string", - DeleteServerCertificateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteServerCertificateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteServerCertificateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteServerCertificateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteServerCertificateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteServerCertificateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteServerCertificateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteServerCertificateResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteServerCertificateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteServerCertificateResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteServerCertificateResponse - */ - public static DeleteServerCertificateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteServerCertificateResponse.class); - } - - /** - * Convert an instance of DeleteServerCertificateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequest.java deleted file mode 100644 index ded7e8e0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSnapshotRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSnapshotRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public DeleteSnapshotRequest() {} - - public DeleteSnapshotRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteSnapshotRequest snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot you want to delete. - * - * @return snapshotId - */ - @javax.annotation.Nonnull - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSnapshotRequest deleteSnapshotRequest = (DeleteSnapshotRequest) o; - return Objects.equals(this.dryRun, deleteSnapshotRequest.dryRun) - && Objects.equals(this.snapshotId, deleteSnapshotRequest.snapshotId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, snapshotId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSnapshotRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("SnapshotId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("SnapshotId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSnapshotRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSnapshotRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSnapshotRequest is not found in" - + " the empty JSON string", - DeleteSnapshotRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSnapshotRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSnapshotRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteSnapshotRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSnapshotRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSnapshotRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSnapshotRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSnapshotRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSnapshotRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSnapshotRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSnapshotRequest - * @throws IOException if the JSON string is invalid with respect to DeleteSnapshotRequest - */ - public static DeleteSnapshotRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSnapshotRequest.class); - } - - /** - * Convert an instance of DeleteSnapshotRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponse.java deleted file mode 100644 index d6f60196..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSnapshotResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSnapshotResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteSnapshotResponse() {} - - public DeleteSnapshotResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSnapshotResponse deleteSnapshotResponse = (DeleteSnapshotResponse) o; - return Objects.equals(this.responseContext, deleteSnapshotResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSnapshotResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSnapshotResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSnapshotResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSnapshotResponse is not found" - + " in the empty JSON string", - DeleteSnapshotResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSnapshotResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSnapshotResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSnapshotResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSnapshotResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSnapshotResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSnapshotResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSnapshotResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSnapshotResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSnapshotResponse - * @throws IOException if the JSON string is invalid with respect to DeleteSnapshotResponse - */ - public static DeleteSnapshotResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSnapshotResponse.class); - } - - /** - * Convert an instance of DeleteSnapshotResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequest.java deleted file mode 100644 index ed31316b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSubnetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSubnetRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public DeleteSubnetRequest() {} - - public DeleteSubnetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteSubnetRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet you want to delete. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSubnetRequest deleteSubnetRequest = (DeleteSubnetRequest) o; - return Objects.equals(this.dryRun, deleteSubnetRequest.dryRun) - && Objects.equals(this.subnetId, deleteSubnetRequest.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSubnetRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("SubnetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSubnetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSubnetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSubnetRequest is not found in" - + " the empty JSON string", - DeleteSubnetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSubnetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSubnetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteSubnetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSubnetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSubnetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSubnetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSubnetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSubnetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSubnetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSubnetRequest - * @throws IOException if the JSON string is invalid with respect to DeleteSubnetRequest - */ - public static DeleteSubnetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSubnetRequest.class); - } - - /** - * Convert an instance of DeleteSubnetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponse.java deleted file mode 100644 index f33db830..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteSubnetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteSubnetResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteSubnetResponse() {} - - public DeleteSubnetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSubnetResponse deleteSubnetResponse = (DeleteSubnetResponse) o; - return Objects.equals(this.responseContext, deleteSubnetResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSubnetResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteSubnetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteSubnetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteSubnetResponse is not found in" - + " the empty JSON string", - DeleteSubnetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteSubnetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteSubnetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteSubnetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteSubnetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteSubnetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteSubnetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteSubnetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteSubnetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteSubnetResponse - * @throws IOException if the JSON string is invalid with respect to DeleteSubnetResponse - */ - public static DeleteSubnetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteSubnetResponse.class); - } - - /** - * Convert an instance of DeleteSubnetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequest.java deleted file mode 100644 index 1d12250c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequest.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_RESOURCE_IDS = "ResourceIds"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_IDS) - private List resourceIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList<>(); - - public DeleteTagsRequest() {} - - public DeleteTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteTagsRequest resourceIds(List resourceIds) { - - this.resourceIds = resourceIds; - return this; - } - - public DeleteTagsRequest addResourceIdsItem(String resourceIdsItem) { - this.resourceIds.add(resourceIdsItem); - return this; - } - - /** - * One or more resource IDs. - * - * @return resourceIds - */ - @javax.annotation.Nonnull - public List getResourceIds() { - return resourceIds; - } - - public void setResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - } - - public DeleteTagsRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public DeleteTagsRequest addTagsItem(ResourceTag tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags to delete (if you set a tag value, only the tags matching exactly this value - * are deleted). - * - * @return tags - */ - @javax.annotation.Nonnull - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteTagsRequest deleteTagsRequest = (DeleteTagsRequest) o; - return Objects.equals(this.dryRun, deleteTagsRequest.dryRun) - && Objects.equals(this.resourceIds, deleteTagsRequest.resourceIds) - && Objects.equals(this.tags, deleteTagsRequest.tags); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, resourceIds, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" resourceIds: ").append(toIndentedString(resourceIds)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ResourceIds"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ResourceIds"); - openapiRequiredFields.add("Tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteTagsRequest is not found in the" - + " empty JSON string", - DeleteTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("ResourceIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("ResourceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ResourceIds").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - // validate the required field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteTagsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteTagsRequest - * @throws IOException if the JSON string is invalid with respect to DeleteTagsRequest - */ - public static DeleteTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteTagsRequest.class); - } - - /** - * Convert an instance of DeleteTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponse.java deleted file mode 100644 index 6a958075..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteTagsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteTagsResponse() {} - - public DeleteTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteTagsResponse deleteTagsResponse = (DeleteTagsResponse) o; - return Objects.equals(this.responseContext, deleteTagsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteTagsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteTagsResponse is not found in" - + " the empty JSON string", - DeleteTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteTagsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteTagsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteTagsResponse - * @throws IOException if the JSON string is invalid with respect to DeleteTagsResponse - */ - public static DeleteTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteTagsResponse.class); - } - - /** - * Convert an instance of DeleteTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequest.java deleted file mode 100644 index 56f9d883..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequest.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserGroupPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserGroupPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public DeleteUserGroupPolicyRequest() {} - - public DeleteUserGroupPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteUserGroupPolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy document you want to delete. - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - public DeleteUserGroupPolicyRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public DeleteUserGroupPolicyRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest = - (DeleteUserGroupPolicyRequest) o; - return Objects.equals(this.dryRun, deleteUserGroupPolicyRequest.dryRun) - && Objects.equals(this.policyName, deleteUserGroupPolicyRequest.policyName) - && Objects.equals(this.userGroupName, deleteUserGroupPolicyRequest.userGroupName) - && Objects.equals(this.userGroupPath, deleteUserGroupPolicyRequest.userGroupPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyName, userGroupName, userGroupPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserGroupPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyName"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyName"); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteUserGroupPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserGroupPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserGroupPolicyRequest is not" - + " found in the empty JSON string", - DeleteUserGroupPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserGroupPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserGroupPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteUserGroupPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserGroupPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserGroupPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteUserGroupPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserGroupPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserGroupPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserGroupPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserGroupPolicyRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteUserGroupPolicyRequest - */ - public static DeleteUserGroupPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserGroupPolicyRequest.class); - } - - /** - * Convert an instance of DeleteUserGroupPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponse.java deleted file mode 100644 index 80340188..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponse.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserGroupPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserGroupPolicyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteUserGroupPolicyResponse() {} - - public DeleteUserGroupPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserGroupPolicyResponse deleteUserGroupPolicyResponse = - (DeleteUserGroupPolicyResponse) o; - return Objects.equals(this.responseContext, deleteUserGroupPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserGroupPolicyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteUserGroupPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserGroupPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserGroupPolicyResponse is not" - + " found in the empty JSON string", - DeleteUserGroupPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserGroupPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserGroupPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserGroupPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserGroupPolicyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteUserGroupPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserGroupPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserGroupPolicyResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserGroupPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserGroupPolicyResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteUserGroupPolicyResponse - */ - public static DeleteUserGroupPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserGroupPolicyResponse.class); - } - - /** - * Convert an instance of DeleteUserGroupPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequest.java deleted file mode 100644 index 4ddf0568..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequest.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FORCE = "Force"; - - @SerializedName(SERIALIZED_NAME_FORCE) - private Boolean force; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public DeleteUserGroupRequest() {} - - public DeleteUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteUserGroupRequest force(Boolean force) { - - this.force = force; - return this; - } - - /** - * If true, forces the deletion of the user group even if it is not empty. - * - * @return force - */ - @javax.annotation.Nullable - public Boolean getForce() { - return force; - } - - public void setForce(Boolean force) { - this.force = force; - } - - public DeleteUserGroupRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public DeleteUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to delete. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserGroupRequest deleteUserGroupRequest = (DeleteUserGroupRequest) o; - return Objects.equals(this.dryRun, deleteUserGroupRequest.dryRun) - && Objects.equals(this.force, deleteUserGroupRequest.force) - && Objects.equals(this.path, deleteUserGroupRequest.path) - && Objects.equals(this.userGroupName, deleteUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, force, path, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" force: ").append(toIndentedString(force)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Force"); - openapiFields.add("Path"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserGroupRequest is not found" - + " in the empty JSON string", - DeleteUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to DeleteUserGroupRequest - */ - public static DeleteUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserGroupRequest.class); - } - - /** - * Convert an instance of DeleteUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponse.java deleted file mode 100644 index ab3d5991..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteUserGroupResponse() {} - - public DeleteUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserGroupResponse deleteUserGroupResponse = (DeleteUserGroupResponse) o; - return Objects.equals(this.responseContext, deleteUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserGroupResponse is not found" - + " in the empty JSON string", - DeleteUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to DeleteUserGroupResponse - */ - public static DeleteUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserGroupResponse.class); - } - - /** - * Convert an instance of DeleteUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequest.java deleted file mode 100644 index e962a6d3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public DeleteUserRequest() {} - - public DeleteUserRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteUserRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user you want to delete. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserRequest deleteUserRequest = (DeleteUserRequest) o; - return Objects.equals(this.dryRun, deleteUserRequest.dryRun) - && Objects.equals(this.userName, deleteUserRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserRequest is not found in the" - + " empty JSON string", - DeleteUserRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteUserRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserRequest - * @throws IOException if the JSON string is invalid with respect to DeleteUserRequest - */ - public static DeleteUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserRequest.class); - } - - /** - * Convert an instance of DeleteUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponse.java deleted file mode 100644 index 8ccea89f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteUserResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteUserResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteUserResponse() {} - - public DeleteUserResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserResponse deleteUserResponse = (DeleteUserResponse) o; - return Objects.equals(this.responseContext, deleteUserResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteUserResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteUserResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteUserResponse is not found in" - + " the empty JSON string", - DeleteUserResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteUserResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteUserResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteUserResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteUserResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteUserResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteUserResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteUserResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteUserResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteUserResponse - * @throws IOException if the JSON string is invalid with respect to DeleteUserResponse - */ - public static DeleteUserResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteUserResponse.class); - } - - /** - * Convert an instance of DeleteUserResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequest.java deleted file mode 100644 index e72290c4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVirtualGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVirtualGatewayRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public DeleteVirtualGatewayRequest() {} - - public DeleteVirtualGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVirtualGatewayRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway you want to delete. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest = (DeleteVirtualGatewayRequest) o; - return Objects.equals(this.dryRun, deleteVirtualGatewayRequest.dryRun) - && Objects.equals( - this.virtualGatewayId, deleteVirtualGatewayRequest.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVirtualGatewayRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VirtualGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVirtualGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVirtualGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVirtualGatewayRequest is not" - + " found in the empty JSON string", - DeleteVirtualGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVirtualGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVirtualGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVirtualGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVirtualGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVirtualGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVirtualGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVirtualGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVirtualGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVirtualGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVirtualGatewayRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVirtualGatewayRequest - */ - public static DeleteVirtualGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVirtualGatewayRequest.class); - } - - /** - * Convert an instance of DeleteVirtualGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponse.java deleted file mode 100644 index 1c577549..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponse.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVirtualGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVirtualGatewayResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVirtualGatewayResponse() {} - - public DeleteVirtualGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVirtualGatewayResponse deleteVirtualGatewayResponse = - (DeleteVirtualGatewayResponse) o; - return Objects.equals(this.responseContext, deleteVirtualGatewayResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVirtualGatewayResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteVirtualGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVirtualGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVirtualGatewayResponse is not" - + " found in the empty JSON string", - DeleteVirtualGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVirtualGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVirtualGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVirtualGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVirtualGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteVirtualGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVirtualGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVirtualGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVirtualGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVirtualGatewayResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteVirtualGatewayResponse - */ - public static DeleteVirtualGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVirtualGatewayResponse.class); - } - - /** - * Convert an instance of DeleteVirtualGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequest.java deleted file mode 100644 index 02261a1d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_GROUP_ID = "VmGroupId"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_ID) - private String vmGroupId; - - public DeleteVmGroupRequest() {} - - public DeleteVmGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVmGroupRequest vmGroupId(String vmGroupId) { - - this.vmGroupId = vmGroupId; - return this; - } - - /** - * The ID of the VM group you want to delete. - * - * @return vmGroupId - */ - @javax.annotation.Nonnull - public String getVmGroupId() { - return vmGroupId; - } - - public void setVmGroupId(String vmGroupId) { - this.vmGroupId = vmGroupId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmGroupRequest deleteVmGroupRequest = (DeleteVmGroupRequest) o; - return Objects.equals(this.dryRun, deleteVmGroupRequest.dryRun) - && Objects.equals(this.vmGroupId, deleteVmGroupRequest.vmGroupId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmGroupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmGroupId: ").append(toIndentedString(vmGroupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmGroupId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmGroupRequest is not found in" - + " the empty JSON string", - DeleteVmGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVmGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmGroupRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVmGroupRequest - */ - public static DeleteVmGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmGroupRequest.class); - } - - /** - * Convert an instance of DeleteVmGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponse.java deleted file mode 100644 index f42eb683..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVmGroupResponse() {} - - public DeleteVmGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmGroupResponse deleteVmGroupResponse = (DeleteVmGroupResponse) o; - return Objects.equals(this.responseContext, deleteVmGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmGroupResponse is not found in" - + " the empty JSON string", - DeleteVmGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmGroupResponse - * @throws IOException if the JSON string is invalid with respect to DeleteVmGroupResponse - */ - public static DeleteVmGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmGroupResponse.class); - } - - /** - * Convert an instance of DeleteVmGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequest.java deleted file mode 100644 index a07409be..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmTemplateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmTemplateRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public DeleteVmTemplateRequest() {} - - public DeleteVmTemplateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVmTemplateRequest vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * The ID of the VM template you want to delete. - * - * @return vmTemplateId - */ - @javax.annotation.Nonnull - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmTemplateRequest deleteVmTemplateRequest = (DeleteVmTemplateRequest) o; - return Objects.equals(this.dryRun, deleteVmTemplateRequest.dryRun) - && Objects.equals(this.vmTemplateId, deleteVmTemplateRequest.vmTemplateId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmTemplateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmTemplateRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmTemplateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmTemplateId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmTemplateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmTemplateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmTemplateRequest is not found" - + " in the empty JSON string", - DeleteVmTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmTemplateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVmTemplateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmTemplateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmTemplateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmTemplateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmTemplateRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmTemplateRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVmTemplateRequest - */ - public static DeleteVmTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmTemplateRequest.class); - } - - /** - * Convert an instance of DeleteVmTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponse.java deleted file mode 100644 index 8a247f00..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmTemplateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmTemplateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVmTemplateResponse() {} - - public DeleteVmTemplateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmTemplateResponse deleteVmTemplateResponse = (DeleteVmTemplateResponse) o; - return Objects.equals(this.responseContext, deleteVmTemplateResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmTemplateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmTemplateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmTemplateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmTemplateResponse is not found" - + " in the empty JSON string", - DeleteVmTemplateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmTemplateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmTemplateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmTemplateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmTemplateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmTemplateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmTemplateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmTemplateResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmTemplateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmTemplateResponse - * @throws IOException if the JSON string is invalid with respect to DeleteVmTemplateResponse - */ - public static DeleteVmTemplateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmTemplateResponse.class); - } - - /** - * Convert an instance of DeleteVmTemplateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequest.java deleted file mode 100644 index 09296b5b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = new ArrayList<>(); - - public DeleteVmsRequest() {} - - public DeleteVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVmsRequest vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public DeleteVmsRequest addVmIdsItem(String vmIdsItem) { - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nonnull - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmsRequest deleteVmsRequest = (DeleteVmsRequest) o; - return Objects.equals(this.dryRun, deleteVmsRequest.dryRun) - && Objects.equals(this.vmIds, deleteVmsRequest.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmsRequest is not found in the" - + " empty JSON string", - DeleteVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVmsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("VmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmsRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVmsRequest - */ - public static DeleteVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmsRequest.class); - } - - /** - * Convert an instance of DeleteVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponse.java deleted file mode 100644 index 67b4c769..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVmsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VMS = "Vms"; - - @SerializedName(SERIALIZED_NAME_VMS) - private List vms = null; - - public DeleteVmsResponse() {} - - public DeleteVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public DeleteVmsResponse vms(List vms) { - - this.vms = vms; - return this; - } - - public DeleteVmsResponse addVmsItem(VmState vmsItem) { - if (this.vms == null) { - this.vms = new ArrayList<>(); - } - this.vms.add(vmsItem); - return this; - } - - /** - * Information about one or more terminated VMs. - * - * @return vms - */ - @javax.annotation.Nullable - public List getVms() { - return vms; - } - - public void setVms(List vms) { - this.vms = vms; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVmsResponse deleteVmsResponse = (DeleteVmsResponse) o; - return Objects.equals(this.responseContext, deleteVmsResponse.responseContext) - && Objects.equals(this.vms, deleteVmsResponse.vms); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vms); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVmsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vms: ").append(toIndentedString(vms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Vms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVmsResponse is not found in the" - + " empty JSON string", - DeleteVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Vms") != null && !jsonObj.get("Vms").isJsonNull()) { - JsonArray jsonArrayvms = jsonObj.getAsJsonArray("Vms"); - if (jsonArrayvms != null) { - // ensure the json data is an array - if (!jsonObj.get("Vms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vms` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Vms").toString())); - } - - // validate the optional field `Vms` (array) - for (int i = 0; i < jsonArrayvms.size(); i++) { - VmState.validateJsonObject(jsonArrayvms.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVmsResponse - * @throws IOException if the JSON string is invalid with respect to DeleteVmsResponse - */ - public static DeleteVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVmsResponse.class); - } - - /** - * Convert an instance of DeleteVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequest.java deleted file mode 100644 index 97ca178b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVolumeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVolumeRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public DeleteVolumeRequest() {} - - public DeleteVolumeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVolumeRequest volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume you want to delete. - * - * @return volumeId - */ - @javax.annotation.Nonnull - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVolumeRequest deleteVolumeRequest = (DeleteVolumeRequest) o; - return Objects.equals(this.dryRun, deleteVolumeRequest.dryRun) - && Objects.equals(this.volumeId, deleteVolumeRequest.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVolumeRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VolumeId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVolumeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVolumeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVolumeRequest is not found in" - + " the empty JSON string", - DeleteVolumeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVolumeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVolumeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVolumeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVolumeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVolumeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVolumeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVolumeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVolumeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVolumeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVolumeRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVolumeRequest - */ - public static DeleteVolumeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVolumeRequest.class); - } - - /** - * Convert an instance of DeleteVolumeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponse.java deleted file mode 100644 index 970f8f4e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVolumeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVolumeResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVolumeResponse() {} - - public DeleteVolumeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVolumeResponse deleteVolumeResponse = (DeleteVolumeResponse) o; - return Objects.equals(this.responseContext, deleteVolumeResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVolumeResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVolumeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVolumeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVolumeResponse is not found in" - + " the empty JSON string", - DeleteVolumeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVolumeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVolumeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVolumeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVolumeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVolumeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVolumeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVolumeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVolumeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVolumeResponse - * @throws IOException if the JSON string is invalid with respect to DeleteVolumeResponse - */ - public static DeleteVolumeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVolumeResponse.class); - } - - /** - * Convert an instance of DeleteVolumeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequest.java deleted file mode 100644 index 4e525bba..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVpnConnectionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVpnConnectionRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_ID = "VpnConnectionId"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_ID) - private String vpnConnectionId; - - public DeleteVpnConnectionRequest() {} - - public DeleteVpnConnectionRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVpnConnectionRequest vpnConnectionId(String vpnConnectionId) { - - this.vpnConnectionId = vpnConnectionId; - return this; - } - - /** - * The ID of the VPN connection you want to delete. - * - * @return vpnConnectionId - */ - @javax.annotation.Nonnull - public String getVpnConnectionId() { - return vpnConnectionId; - } - - public void setVpnConnectionId(String vpnConnectionId) { - this.vpnConnectionId = vpnConnectionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVpnConnectionRequest deleteVpnConnectionRequest = (DeleteVpnConnectionRequest) o; - return Objects.equals(this.dryRun, deleteVpnConnectionRequest.dryRun) - && Objects.equals(this.vpnConnectionId, deleteVpnConnectionRequest.vpnConnectionId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vpnConnectionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVpnConnectionRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vpnConnectionId: ").append(toIndentedString(vpnConnectionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VpnConnectionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VpnConnectionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVpnConnectionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVpnConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVpnConnectionRequest is not" - + " found in the empty JSON string", - DeleteVpnConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVpnConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVpnConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVpnConnectionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VpnConnectionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnectionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVpnConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVpnConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVpnConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVpnConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVpnConnectionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVpnConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVpnConnectionRequest - * @throws IOException if the JSON string is invalid with respect to DeleteVpnConnectionRequest - */ - public static DeleteVpnConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVpnConnectionRequest.class); - } - - /** - * Convert an instance of DeleteVpnConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponse.java deleted file mode 100644 index dcdcd9fb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVpnConnectionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVpnConnectionResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVpnConnectionResponse() {} - - public DeleteVpnConnectionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVpnConnectionResponse deleteVpnConnectionResponse = (DeleteVpnConnectionResponse) o; - return Objects.equals(this.responseContext, deleteVpnConnectionResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVpnConnectionResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteVpnConnectionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVpnConnectionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVpnConnectionResponse is not" - + " found in the empty JSON string", - DeleteVpnConnectionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVpnConnectionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVpnConnectionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVpnConnectionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVpnConnectionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteVpnConnectionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVpnConnectionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVpnConnectionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVpnConnectionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVpnConnectionResponse - * @throws IOException if the JSON string is invalid with respect to DeleteVpnConnectionResponse - */ - public static DeleteVpnConnectionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVpnConnectionResponse.class); - } - - /** - * Convert an instance of DeleteVpnConnectionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequest.java deleted file mode 100644 index efc250f2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequest.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVpnConnectionRouteRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVpnConnectionRouteRequest { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_ID = "VpnConnectionId"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_ID) - private String vpnConnectionId; - - public DeleteVpnConnectionRouteRequest() {} - - public DeleteVpnConnectionRouteRequest destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The network prefix of the route to delete, in CIDR notation (for example, - * `10.12.0.0/16`). - * - * @return destinationIpRange - */ - @javax.annotation.Nonnull - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public DeleteVpnConnectionRouteRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeleteVpnConnectionRouteRequest vpnConnectionId(String vpnConnectionId) { - - this.vpnConnectionId = vpnConnectionId; - return this; - } - - /** - * The ID of the target VPN connection of the static route to delete. - * - * @return vpnConnectionId - */ - @javax.annotation.Nonnull - public String getVpnConnectionId() { - return vpnConnectionId; - } - - public void setVpnConnectionId(String vpnConnectionId) { - this.vpnConnectionId = vpnConnectionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest = - (DeleteVpnConnectionRouteRequest) o; - return Objects.equals( - this.destinationIpRange, deleteVpnConnectionRouteRequest.destinationIpRange) - && Objects.equals(this.dryRun, deleteVpnConnectionRouteRequest.dryRun) - && Objects.equals( - this.vpnConnectionId, deleteVpnConnectionRouteRequest.vpnConnectionId); - } - - @Override - public int hashCode() { - return Objects.hash(destinationIpRange, dryRun, vpnConnectionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVpnConnectionRouteRequest {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vpnConnectionId: ").append(toIndentedString(vpnConnectionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DryRun"); - openapiFields.add("VpnConnectionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DestinationIpRange"); - openapiRequiredFields.add("VpnConnectionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteVpnConnectionRouteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVpnConnectionRouteRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVpnConnectionRouteRequest is" - + " not found in the empty JSON string", - DeleteVpnConnectionRouteRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVpnConnectionRouteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVpnConnectionRouteRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteVpnConnectionRouteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if (!jsonObj.get("VpnConnectionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnectionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVpnConnectionRouteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVpnConnectionRouteRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteVpnConnectionRouteRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVpnConnectionRouteRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVpnConnectionRouteRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVpnConnectionRouteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVpnConnectionRouteRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteVpnConnectionRouteRequest - */ - public static DeleteVpnConnectionRouteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVpnConnectionRouteRequest.class); - } - - /** - * Convert an instance of DeleteVpnConnectionRouteRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponse.java deleted file mode 100644 index f3b856ce..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeleteVpnConnectionRouteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteVpnConnectionRouteResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeleteVpnConnectionRouteResponse() {} - - public DeleteVpnConnectionRouteResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteVpnConnectionRouteResponse deleteVpnConnectionRouteResponse = - (DeleteVpnConnectionRouteResponse) o; - return Objects.equals( - this.responseContext, deleteVpnConnectionRouteResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteVpnConnectionRouteResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeleteVpnConnectionRouteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteVpnConnectionRouteResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteVpnConnectionRouteResponse is" - + " not found in the empty JSON string", - DeleteVpnConnectionRouteResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteVpnConnectionRouteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteVpnConnectionRouteResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteVpnConnectionRouteResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteVpnConnectionRouteResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteVpnConnectionRouteResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteVpnConnectionRouteResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteVpnConnectionRouteResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteVpnConnectionRouteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteVpnConnectionRouteResponse - * @throws IOException if the JSON string is invalid with respect to - * DeleteVpnConnectionRouteResponse - */ - public static DeleteVpnConnectionRouteResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteVpnConnectionRouteResponse.class); - } - - /** - * Convert an instance of DeleteVpnConnectionRouteResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequest.java deleted file mode 100644 index 05ebb666..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequest.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeregisterVmsInLoadBalancerRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeregisterVmsInLoadBalancerRequest { - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public DeregisterVmsInLoadBalancerRequest() {} - - public DeregisterVmsInLoadBalancerRequest backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public DeregisterVmsInLoadBalancerRequest addBackendVmIdsItem(String backendVmIdsItem) { - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs. - * - * @return backendVmIds - */ - @javax.annotation.Nonnull - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public DeregisterVmsInLoadBalancerRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public DeregisterVmsInLoadBalancerRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest = - (DeregisterVmsInLoadBalancerRequest) o; - return Objects.equals(this.backendVmIds, deregisterVmsInLoadBalancerRequest.backendVmIds) - && Objects.equals(this.dryRun, deregisterVmsInLoadBalancerRequest.dryRun) - && Objects.equals( - this.loadBalancerName, deregisterVmsInLoadBalancerRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(backendVmIds, dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeregisterVmsInLoadBalancerRequest {\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendVmIds"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("BackendVmIds"); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeregisterVmsInLoadBalancerRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeregisterVmsInLoadBalancerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeregisterVmsInLoadBalancerRequest is" - + " not found in the empty JSON string", - DeregisterVmsInLoadBalancerRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeregisterVmsInLoadBalancerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeregisterVmsInLoadBalancerRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeregisterVmsInLoadBalancerRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("BackendVmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeregisterVmsInLoadBalancerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeregisterVmsInLoadBalancerRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeregisterVmsInLoadBalancerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeregisterVmsInLoadBalancerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeregisterVmsInLoadBalancerRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeregisterVmsInLoadBalancerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeregisterVmsInLoadBalancerRequest - * @throws IOException if the JSON string is invalid with respect to - * DeregisterVmsInLoadBalancerRequest - */ - public static DeregisterVmsInLoadBalancerRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeregisterVmsInLoadBalancerRequest.class); - } - - /** - * Convert an instance of DeregisterVmsInLoadBalancerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponse.java deleted file mode 100644 index 5ebcb981..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponse.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** DeregisterVmsInLoadBalancerResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeregisterVmsInLoadBalancerResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public DeregisterVmsInLoadBalancerResponse() {} - - public DeregisterVmsInLoadBalancerResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeregisterVmsInLoadBalancerResponse deregisterVmsInLoadBalancerResponse = - (DeregisterVmsInLoadBalancerResponse) o; - return Objects.equals( - this.responseContext, deregisterVmsInLoadBalancerResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeregisterVmsInLoadBalancerResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * DeregisterVmsInLoadBalancerResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeregisterVmsInLoadBalancerResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeregisterVmsInLoadBalancerResponse" - + " is not found in the empty JSON string", - DeregisterVmsInLoadBalancerResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeregisterVmsInLoadBalancerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeregisterVmsInLoadBalancerResponse` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeregisterVmsInLoadBalancerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeregisterVmsInLoadBalancerResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeregisterVmsInLoadBalancerResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeregisterVmsInLoadBalancerResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeregisterVmsInLoadBalancerResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeregisterVmsInLoadBalancerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeregisterVmsInLoadBalancerResponse - * @throws IOException if the JSON string is invalid with respect to - * DeregisterVmsInLoadBalancerResponse - */ - public static DeregisterVmsInLoadBalancerResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeregisterVmsInLoadBalancerResponse.class); - } - - /** - * Convert an instance of DeregisterVmsInLoadBalancerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSet.java deleted file mode 100644 index 960f0ed0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSet.java +++ /dev/null @@ -1,462 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the DHCP options set. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DhcpOptionsSet { - public static final String SERIALIZED_NAME_DEFAULT = "Default"; - - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_ID = "DhcpOptionsSetId"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_ID) - private String dhcpOptionsSetId; - - public static final String SERIALIZED_NAME_DOMAIN_NAME = "DomainName"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) - private String domainName; - - public static final String SERIALIZED_NAME_DOMAIN_NAME_SERVERS = "DomainNameServers"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAME_SERVERS) - private List domainNameServers = null; - - public static final String SERIALIZED_NAME_LOG_SERVERS = "LogServers"; - - @SerializedName(SERIALIZED_NAME_LOG_SERVERS) - private List logServers = null; - - public static final String SERIALIZED_NAME_NTP_SERVERS = "NtpServers"; - - @SerializedName(SERIALIZED_NAME_NTP_SERVERS) - private List ntpServers = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public DhcpOptionsSet() {} - - public DhcpOptionsSet _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * If true, the DHCP options set is a default one. If false, it is not. - * - * @return _default - */ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - public void setDefault(Boolean _default) { - this._default = _default; - } - - public DhcpOptionsSet dhcpOptionsSetId(String dhcpOptionsSetId) { - - this.dhcpOptionsSetId = dhcpOptionsSetId; - return this; - } - - /** - * The ID of the DHCP options set. - * - * @return dhcpOptionsSetId - */ - @javax.annotation.Nullable - public String getDhcpOptionsSetId() { - return dhcpOptionsSetId; - } - - public void setDhcpOptionsSetId(String dhcpOptionsSetId) { - this.dhcpOptionsSetId = dhcpOptionsSetId; - } - - public DhcpOptionsSet domainName(String domainName) { - - this.domainName = domainName; - return this; - } - - /** - * The domain name. - * - * @return domainName - */ - @javax.annotation.Nullable - public String getDomainName() { - return domainName; - } - - public void setDomainName(String domainName) { - this.domainName = domainName; - } - - public DhcpOptionsSet domainNameServers(List domainNameServers) { - - this.domainNameServers = domainNameServers; - return this; - } - - public DhcpOptionsSet addDomainNameServersItem(String domainNameServersItem) { - if (this.domainNameServers == null) { - this.domainNameServers = new ArrayList<>(); - } - this.domainNameServers.add(domainNameServersItem); - return this; - } - - /** - * One or more IPs for the domain name servers. - * - * @return domainNameServers - */ - @javax.annotation.Nullable - public List getDomainNameServers() { - return domainNameServers; - } - - public void setDomainNameServers(List domainNameServers) { - this.domainNameServers = domainNameServers; - } - - public DhcpOptionsSet logServers(List logServers) { - - this.logServers = logServers; - return this; - } - - public DhcpOptionsSet addLogServersItem(String logServersItem) { - if (this.logServers == null) { - this.logServers = new ArrayList<>(); - } - this.logServers.add(logServersItem); - return this; - } - - /** - * One or more IPs for the log servers. - * - * @return logServers - */ - @javax.annotation.Nullable - public List getLogServers() { - return logServers; - } - - public void setLogServers(List logServers) { - this.logServers = logServers; - } - - public DhcpOptionsSet ntpServers(List ntpServers) { - - this.ntpServers = ntpServers; - return this; - } - - public DhcpOptionsSet addNtpServersItem(String ntpServersItem) { - if (this.ntpServers == null) { - this.ntpServers = new ArrayList<>(); - } - this.ntpServers.add(ntpServersItem); - return this; - } - - /** - * One or more IPs for the NTP servers. - * - * @return ntpServers - */ - @javax.annotation.Nullable - public List getNtpServers() { - return ntpServers; - } - - public void setNtpServers(List ntpServers) { - this.ntpServers = ntpServers; - } - - public DhcpOptionsSet tags(List tags) { - - this.tags = tags; - return this; - } - - public DhcpOptionsSet addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the DHCP options set. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DhcpOptionsSet dhcpOptionsSet = (DhcpOptionsSet) o; - return Objects.equals(this._default, dhcpOptionsSet._default) - && Objects.equals(this.dhcpOptionsSetId, dhcpOptionsSet.dhcpOptionsSetId) - && Objects.equals(this.domainName, dhcpOptionsSet.domainName) - && Objects.equals(this.domainNameServers, dhcpOptionsSet.domainNameServers) - && Objects.equals(this.logServers, dhcpOptionsSet.logServers) - && Objects.equals(this.ntpServers, dhcpOptionsSet.ntpServers) - && Objects.equals(this.tags, dhcpOptionsSet.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - _default, - dhcpOptionsSetId, - domainName, - domainNameServers, - logServers, - ntpServers, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DhcpOptionsSet {\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" dhcpOptionsSetId: ").append(toIndentedString(dhcpOptionsSetId)).append("\n"); - sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); - sb.append(" domainNameServers: ") - .append(toIndentedString(domainNameServers)) - .append("\n"); - sb.append(" logServers: ").append(toIndentedString(logServers)).append("\n"); - sb.append(" ntpServers: ").append(toIndentedString(ntpServers)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Default"); - openapiFields.add("DhcpOptionsSetId"); - openapiFields.add("DomainName"); - openapiFields.add("DomainNameServers"); - openapiFields.add("LogServers"); - openapiFields.add("NtpServers"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DhcpOptionsSet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DhcpOptionsSet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DhcpOptionsSet is not found in the" - + " empty JSON string", - DhcpOptionsSet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DhcpOptionsSet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DhcpOptionsSet` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DhcpOptionsSetId") != null - && !jsonObj.get("DhcpOptionsSetId").isJsonNull()) - && !jsonObj.get("DhcpOptionsSetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DhcpOptionsSetId").toString())); - } - if ((jsonObj.get("DomainName") != null && !jsonObj.get("DomainName").isJsonNull()) - && !jsonObj.get("DomainName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DomainName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DomainNameServers") != null - && !jsonObj.get("DomainNameServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainNameServers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DomainNameServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LogServers") != null && !jsonObj.get("LogServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LogServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LogServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NtpServers") != null && !jsonObj.get("NtpServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NtpServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NtpServers").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DhcpOptionsSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DhcpOptionsSet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DhcpOptionsSet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DhcpOptionsSet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DhcpOptionsSet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DhcpOptionsSet given an JSON string - * - * @param jsonString JSON string - * @return An instance of DhcpOptionsSet - * @throws IOException if the JSON string is invalid with respect to DhcpOptionsSet - */ - public static DhcpOptionsSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DhcpOptionsSet.class); - } - - /** - * Convert an instance of DhcpOptionsSet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLink.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLink.java deleted file mode 100644 index fe4e24cd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLink.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the DirectLink. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DirectLink { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_BANDWIDTH = "Bandwidth"; - - @SerializedName(SERIALIZED_NAME_BANDWIDTH) - private String bandwidth; - - public static final String SERIALIZED_NAME_DIRECT_LINK_ID = "DirectLinkId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_ID) - private String directLinkId; - - public static final String SERIALIZED_NAME_DIRECT_LINK_NAME = "DirectLinkName"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_NAME) - private String directLinkName; - - public static final String SERIALIZED_NAME_LOCATION = "Location"; - - @SerializedName(SERIALIZED_NAME_LOCATION) - private String location; - - public static final String SERIALIZED_NAME_REGION_NAME = "RegionName"; - - @SerializedName(SERIALIZED_NAME_REGION_NAME) - private String regionName; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public DirectLink() {} - - public DirectLink accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the DirectLink. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public DirectLink bandwidth(String bandwidth) { - - this.bandwidth = bandwidth; - return this; - } - - /** - * The physical link bandwidth (either 1 Gbps or 10 Gbps). - * - * @return bandwidth - */ - @javax.annotation.Nullable - public String getBandwidth() { - return bandwidth; - } - - public void setBandwidth(String bandwidth) { - this.bandwidth = bandwidth; - } - - public DirectLink directLinkId(String directLinkId) { - - this.directLinkId = directLinkId; - return this; - } - - /** - * The ID of the DirectLink (for example, `dxcon-xxxxxxxx`). - * - * @return directLinkId - */ - @javax.annotation.Nullable - public String getDirectLinkId() { - return directLinkId; - } - - public void setDirectLinkId(String directLinkId) { - this.directLinkId = directLinkId; - } - - public DirectLink directLinkName(String directLinkName) { - - this.directLinkName = directLinkName; - return this; - } - - /** - * The name of the DirectLink. - * - * @return directLinkName - */ - @javax.annotation.Nullable - public String getDirectLinkName() { - return directLinkName; - } - - public void setDirectLinkName(String directLinkName) { - this.directLinkName = directLinkName; - } - - public DirectLink location(String location) { - - this.location = location; - return this; - } - - /** - * The datacenter where the DirectLink is located. - * - * @return location - */ - @javax.annotation.Nullable - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public DirectLink regionName(String regionName) { - - this.regionName = regionName; - return this; - } - - /** - * The Region in which the DirectLink has been created. - * - * @return regionName - */ - @javax.annotation.Nullable - public String getRegionName() { - return regionName; - } - - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - public DirectLink state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the DirectLink.<br /> * `requested`: The DirectLink is requested - * but the request has not been validated yet.<br /> * `pending`: The DirectLink - * request has been validated. It remains in the `pending` state until you establish - * the physical link.<br /> * `available`: The physical link is established and - * the connection is ready to use.<br /> * `deleting`: The deletion process is - * in progress.<br /> * `deleted`: The DirectLink is deleted. - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectLink directLink = (DirectLink) o; - return Objects.equals(this.accountId, directLink.accountId) - && Objects.equals(this.bandwidth, directLink.bandwidth) - && Objects.equals(this.directLinkId, directLink.directLinkId) - && Objects.equals(this.directLinkName, directLink.directLinkName) - && Objects.equals(this.location, directLink.location) - && Objects.equals(this.regionName, directLink.regionName) - && Objects.equals(this.state, directLink.state); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, bandwidth, directLinkId, directLinkName, location, regionName, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectLink {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); - sb.append(" directLinkId: ").append(toIndentedString(directLinkId)).append("\n"); - sb.append(" directLinkName: ").append(toIndentedString(directLinkName)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" regionName: ").append(toIndentedString(regionName)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Bandwidth"); - openapiFields.add("DirectLinkId"); - openapiFields.add("DirectLinkName"); - openapiFields.add("Location"); - openapiFields.add("RegionName"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DirectLink - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DirectLink.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DirectLink is not found in the empty" - + " JSON string", - DirectLink.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DirectLink.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DirectLink` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Bandwidth") != null && !jsonObj.get("Bandwidth").isJsonNull()) - && !jsonObj.get("Bandwidth").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Bandwidth` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Bandwidth").toString())); - } - if ((jsonObj.get("DirectLinkId") != null && !jsonObj.get("DirectLinkId").isJsonNull()) - && !jsonObj.get("DirectLinkId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DirectLinkId").toString())); - } - if ((jsonObj.get("DirectLinkName") != null && !jsonObj.get("DirectLinkName").isJsonNull()) - && !jsonObj.get("DirectLinkName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DirectLinkName").toString())); - } - if ((jsonObj.get("Location") != null && !jsonObj.get("Location").isJsonNull()) - && !jsonObj.get("Location").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Location` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Location").toString())); - } - if ((jsonObj.get("RegionName") != null && !jsonObj.get("RegionName").isJsonNull()) - && !jsonObj.get("RegionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RegionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RegionName").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectLink.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectLink' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DirectLink.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectLink value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectLink read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DirectLink given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectLink - * @throws IOException if the JSON string is invalid with respect to DirectLink - */ - public static DirectLink fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectLink.class); - } - - /** - * Convert an instance of DirectLink to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterface.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterface.java deleted file mode 100644 index 605ce9e4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterface.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the DirectLink interface. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DirectLinkInterface { - public static final String SERIALIZED_NAME_BGP_ASN = "BgpAsn"; - - @SerializedName(SERIALIZED_NAME_BGP_ASN) - private Integer bgpAsn; - - public static final String SERIALIZED_NAME_BGP_KEY = "BgpKey"; - - @SerializedName(SERIALIZED_NAME_BGP_KEY) - private String bgpKey; - - public static final String SERIALIZED_NAME_CLIENT_PRIVATE_IP = "ClientPrivateIp"; - - @SerializedName(SERIALIZED_NAME_CLIENT_PRIVATE_IP) - private String clientPrivateIp; - - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_NAME = - "DirectLinkInterfaceName"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_NAME) - private String directLinkInterfaceName; - - public static final String SERIALIZED_NAME_OUTSCALE_PRIVATE_IP = "OutscalePrivateIp"; - - @SerializedName(SERIALIZED_NAME_OUTSCALE_PRIVATE_IP) - private String outscalePrivateIp; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public static final String SERIALIZED_NAME_VLAN = "Vlan"; - - @SerializedName(SERIALIZED_NAME_VLAN) - private Integer vlan; - - public DirectLinkInterface() {} - - public DirectLinkInterface bgpAsn(Integer bgpAsn) { - - this.bgpAsn = bgpAsn; - return this; - } - - /** - * The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side - * of the DirectLink interface. This number must be between `64512` and - * `65534`. - * - * @return bgpAsn - */ - @javax.annotation.Nonnull - public Integer getBgpAsn() { - return bgpAsn; - } - - public void setBgpAsn(Integer bgpAsn) { - this.bgpAsn = bgpAsn; - } - - public DirectLinkInterface bgpKey(String bgpKey) { - - this.bgpKey = bgpKey; - return this; - } - - /** - * The BGP authentication key. - * - * @return bgpKey - */ - @javax.annotation.Nullable - public String getBgpKey() { - return bgpKey; - } - - public void setBgpKey(String bgpKey) { - this.bgpKey = bgpKey; - } - - public DirectLinkInterface clientPrivateIp(String clientPrivateIp) { - - this.clientPrivateIp = clientPrivateIp; - return this; - } - - /** - * The IP on the customer's side of the DirectLink interface. - * - * @return clientPrivateIp - */ - @javax.annotation.Nullable - public String getClientPrivateIp() { - return clientPrivateIp; - } - - public void setClientPrivateIp(String clientPrivateIp) { - this.clientPrivateIp = clientPrivateIp; - } - - public DirectLinkInterface directLinkInterfaceName(String directLinkInterfaceName) { - - this.directLinkInterfaceName = directLinkInterfaceName; - return this; - } - - /** - * The name of the DirectLink interface. - * - * @return directLinkInterfaceName - */ - @javax.annotation.Nonnull - public String getDirectLinkInterfaceName() { - return directLinkInterfaceName; - } - - public void setDirectLinkInterfaceName(String directLinkInterfaceName) { - this.directLinkInterfaceName = directLinkInterfaceName; - } - - public DirectLinkInterface outscalePrivateIp(String outscalePrivateIp) { - - this.outscalePrivateIp = outscalePrivateIp; - return this; - } - - /** - * The IP on the OUTSCALE side of the DirectLink interface. - * - * @return outscalePrivateIp - */ - @javax.annotation.Nullable - public String getOutscalePrivateIp() { - return outscalePrivateIp; - } - - public void setOutscalePrivateIp(String outscalePrivateIp) { - this.outscalePrivateIp = outscalePrivateIp; - } - - public DirectLinkInterface virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the target virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - public DirectLinkInterface vlan(Integer vlan) { - - this.vlan = vlan; - return this; - } - - /** - * The VLAN number associated with the DirectLink interface. This number must be unique and be - * between `2` and `4094`. - * - * @return vlan - */ - @javax.annotation.Nonnull - public Integer getVlan() { - return vlan; - } - - public void setVlan(Integer vlan) { - this.vlan = vlan; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectLinkInterface directLinkInterface = (DirectLinkInterface) o; - return Objects.equals(this.bgpAsn, directLinkInterface.bgpAsn) - && Objects.equals(this.bgpKey, directLinkInterface.bgpKey) - && Objects.equals(this.clientPrivateIp, directLinkInterface.clientPrivateIp) - && Objects.equals( - this.directLinkInterfaceName, directLinkInterface.directLinkInterfaceName) - && Objects.equals(this.outscalePrivateIp, directLinkInterface.outscalePrivateIp) - && Objects.equals(this.virtualGatewayId, directLinkInterface.virtualGatewayId) - && Objects.equals(this.vlan, directLinkInterface.vlan); - } - - @Override - public int hashCode() { - return Objects.hash( - bgpAsn, - bgpKey, - clientPrivateIp, - directLinkInterfaceName, - outscalePrivateIp, - virtualGatewayId, - vlan); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectLinkInterface {\n"); - sb.append(" bgpAsn: ").append(toIndentedString(bgpAsn)).append("\n"); - sb.append(" bgpKey: ").append(toIndentedString(bgpKey)).append("\n"); - sb.append(" clientPrivateIp: ").append(toIndentedString(clientPrivateIp)).append("\n"); - sb.append(" directLinkInterfaceName: ") - .append(toIndentedString(directLinkInterfaceName)) - .append("\n"); - sb.append(" outscalePrivateIp: ") - .append(toIndentedString(outscalePrivateIp)) - .append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BgpAsn"); - openapiFields.add("BgpKey"); - openapiFields.add("ClientPrivateIp"); - openapiFields.add("DirectLinkInterfaceName"); - openapiFields.add("OutscalePrivateIp"); - openapiFields.add("VirtualGatewayId"); - openapiFields.add("Vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("BgpAsn"); - openapiRequiredFields.add("DirectLinkInterfaceName"); - openapiRequiredFields.add("VirtualGatewayId"); - openapiRequiredFields.add("Vlan"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DirectLinkInterface - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DirectLinkInterface.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DirectLinkInterface is not found in" - + " the empty JSON string", - DirectLinkInterface.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DirectLinkInterface.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DirectLinkInterface` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DirectLinkInterface.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("BgpKey") != null && !jsonObj.get("BgpKey").isJsonNull()) - && !jsonObj.get("BgpKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BgpKey` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("BgpKey").toString())); - } - if ((jsonObj.get("ClientPrivateIp") != null && !jsonObj.get("ClientPrivateIp").isJsonNull()) - && !jsonObj.get("ClientPrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientPrivateIp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientPrivateIp").toString())); - } - if (!jsonObj.get("DirectLinkInterfaceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceName` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceName").toString())); - } - if ((jsonObj.get("OutscalePrivateIp") != null - && !jsonObj.get("OutscalePrivateIp").isJsonNull()) - && !jsonObj.get("OutscalePrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutscalePrivateIp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OutscalePrivateIp").toString())); - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectLinkInterface.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectLinkInterface' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DirectLinkInterface.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectLinkInterface value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectLinkInterface read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DirectLinkInterface given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectLinkInterface - * @throws IOException if the JSON string is invalid with respect to DirectLinkInterface - */ - public static DirectLinkInterface fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectLinkInterface.class); - } - - /** - * Convert an instance of DirectLinkInterface to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaces.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaces.java deleted file mode 100644 index 6b0e8e25..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaces.java +++ /dev/null @@ -1,673 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the DirectLink interfaces. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DirectLinkInterfaces { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_BGP_ASN = "BgpAsn"; - - @SerializedName(SERIALIZED_NAME_BGP_ASN) - private Integer bgpAsn; - - public static final String SERIALIZED_NAME_BGP_KEY = "BgpKey"; - - @SerializedName(SERIALIZED_NAME_BGP_KEY) - private String bgpKey; - - public static final String SERIALIZED_NAME_CLIENT_PRIVATE_IP = "ClientPrivateIp"; - - @SerializedName(SERIALIZED_NAME_CLIENT_PRIVATE_IP) - private String clientPrivateIp; - - public static final String SERIALIZED_NAME_DIRECT_LINK_ID = "DirectLinkId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_ID) - private String directLinkId; - - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID = "DirectLinkInterfaceId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID) - private String directLinkInterfaceId; - - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_NAME = - "DirectLinkInterfaceName"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_NAME) - private String directLinkInterfaceName; - - public static final String SERIALIZED_NAME_INTERFACE_TYPE = "InterfaceType"; - - @SerializedName(SERIALIZED_NAME_INTERFACE_TYPE) - private String interfaceType; - - public static final String SERIALIZED_NAME_LOCATION = "Location"; - - @SerializedName(SERIALIZED_NAME_LOCATION) - private String location; - - public static final String SERIALIZED_NAME_MTU = "Mtu"; - - @SerializedName(SERIALIZED_NAME_MTU) - private Integer mtu; - - public static final String SERIALIZED_NAME_OUTSCALE_PRIVATE_IP = "OutscalePrivateIp"; - - @SerializedName(SERIALIZED_NAME_OUTSCALE_PRIVATE_IP) - private String outscalePrivateIp; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public static final String SERIALIZED_NAME_VLAN = "Vlan"; - - @SerializedName(SERIALIZED_NAME_VLAN) - private Integer vlan; - - public DirectLinkInterfaces() {} - - public DirectLinkInterfaces accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the DirectLink interface. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public DirectLinkInterfaces bgpAsn(Integer bgpAsn) { - - this.bgpAsn = bgpAsn; - return this; - } - - /** - * The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side - * of the DirectLink interface. - * - * @return bgpAsn - */ - @javax.annotation.Nullable - public Integer getBgpAsn() { - return bgpAsn; - } - - public void setBgpAsn(Integer bgpAsn) { - this.bgpAsn = bgpAsn; - } - - public DirectLinkInterfaces bgpKey(String bgpKey) { - - this.bgpKey = bgpKey; - return this; - } - - /** - * The BGP authentication key. - * - * @return bgpKey - */ - @javax.annotation.Nullable - public String getBgpKey() { - return bgpKey; - } - - public void setBgpKey(String bgpKey) { - this.bgpKey = bgpKey; - } - - public DirectLinkInterfaces clientPrivateIp(String clientPrivateIp) { - - this.clientPrivateIp = clientPrivateIp; - return this; - } - - /** - * The IP on the customer's side of the DirectLink interface. - * - * @return clientPrivateIp - */ - @javax.annotation.Nullable - public String getClientPrivateIp() { - return clientPrivateIp; - } - - public void setClientPrivateIp(String clientPrivateIp) { - this.clientPrivateIp = clientPrivateIp; - } - - public DirectLinkInterfaces directLinkId(String directLinkId) { - - this.directLinkId = directLinkId; - return this; - } - - /** - * The ID of the DirectLink. - * - * @return directLinkId - */ - @javax.annotation.Nullable - public String getDirectLinkId() { - return directLinkId; - } - - public void setDirectLinkId(String directLinkId) { - this.directLinkId = directLinkId; - } - - public DirectLinkInterfaces directLinkInterfaceId(String directLinkInterfaceId) { - - this.directLinkInterfaceId = directLinkInterfaceId; - return this; - } - - /** - * The ID of the DirectLink interface. - * - * @return directLinkInterfaceId - */ - @javax.annotation.Nullable - public String getDirectLinkInterfaceId() { - return directLinkInterfaceId; - } - - public void setDirectLinkInterfaceId(String directLinkInterfaceId) { - this.directLinkInterfaceId = directLinkInterfaceId; - } - - public DirectLinkInterfaces directLinkInterfaceName(String directLinkInterfaceName) { - - this.directLinkInterfaceName = directLinkInterfaceName; - return this; - } - - /** - * The name of the DirectLink interface. - * - * @return directLinkInterfaceName - */ - @javax.annotation.Nullable - public String getDirectLinkInterfaceName() { - return directLinkInterfaceName; - } - - public void setDirectLinkInterfaceName(String directLinkInterfaceName) { - this.directLinkInterfaceName = directLinkInterfaceName; - } - - public DirectLinkInterfaces interfaceType(String interfaceType) { - - this.interfaceType = interfaceType; - return this; - } - - /** - * The type of the DirectLink interface (always `private`). - * - * @return interfaceType - */ - @javax.annotation.Nullable - public String getInterfaceType() { - return interfaceType; - } - - public void setInterfaceType(String interfaceType) { - this.interfaceType = interfaceType; - } - - public DirectLinkInterfaces location(String location) { - - this.location = location; - return this; - } - - /** - * The datacenter where the DirectLink interface is located. - * - * @return location - */ - @javax.annotation.Nullable - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public DirectLinkInterfaces mtu(Integer mtu) { - - this.mtu = mtu; - return this; - } - - /** - * The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always - * `1500`). - * - * @return mtu - */ - @javax.annotation.Nullable - public Integer getMtu() { - return mtu; - } - - public void setMtu(Integer mtu) { - this.mtu = mtu; - } - - public DirectLinkInterfaces outscalePrivateIp(String outscalePrivateIp) { - - this.outscalePrivateIp = outscalePrivateIp; - return this; - } - - /** - * The IP on the OUTSCALE side of the DirectLink interface. - * - * @return outscalePrivateIp - */ - @javax.annotation.Nullable - public String getOutscalePrivateIp() { - return outscalePrivateIp; - } - - public void setOutscalePrivateIp(String outscalePrivateIp) { - this.outscalePrivateIp = outscalePrivateIp; - } - - public DirectLinkInterfaces state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the DirectLink interface (`pending` \\| `available` \\| - * `deleting` \\| `deleted` \\| `confirming` \\| - * `rejected` \\| `expired`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public DirectLinkInterfaces virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the target virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nullable - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - public DirectLinkInterfaces vlan(Integer vlan) { - - this.vlan = vlan; - return this; - } - - /** - * The VLAN number associated with the DirectLink interface. - * - * @return vlan - */ - @javax.annotation.Nullable - public Integer getVlan() { - return vlan; - } - - public void setVlan(Integer vlan) { - this.vlan = vlan; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectLinkInterfaces directLinkInterfaces = (DirectLinkInterfaces) o; - return Objects.equals(this.accountId, directLinkInterfaces.accountId) - && Objects.equals(this.bgpAsn, directLinkInterfaces.bgpAsn) - && Objects.equals(this.bgpKey, directLinkInterfaces.bgpKey) - && Objects.equals(this.clientPrivateIp, directLinkInterfaces.clientPrivateIp) - && Objects.equals(this.directLinkId, directLinkInterfaces.directLinkId) - && Objects.equals( - this.directLinkInterfaceId, directLinkInterfaces.directLinkInterfaceId) - && Objects.equals( - this.directLinkInterfaceName, directLinkInterfaces.directLinkInterfaceName) - && Objects.equals(this.interfaceType, directLinkInterfaces.interfaceType) - && Objects.equals(this.location, directLinkInterfaces.location) - && Objects.equals(this.mtu, directLinkInterfaces.mtu) - && Objects.equals(this.outscalePrivateIp, directLinkInterfaces.outscalePrivateIp) - && Objects.equals(this.state, directLinkInterfaces.state) - && Objects.equals(this.virtualGatewayId, directLinkInterfaces.virtualGatewayId) - && Objects.equals(this.vlan, directLinkInterfaces.vlan); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - bgpAsn, - bgpKey, - clientPrivateIp, - directLinkId, - directLinkInterfaceId, - directLinkInterfaceName, - interfaceType, - location, - mtu, - outscalePrivateIp, - state, - virtualGatewayId, - vlan); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectLinkInterfaces {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" bgpAsn: ").append(toIndentedString(bgpAsn)).append("\n"); - sb.append(" bgpKey: ").append(toIndentedString(bgpKey)).append("\n"); - sb.append(" clientPrivateIp: ").append(toIndentedString(clientPrivateIp)).append("\n"); - sb.append(" directLinkId: ").append(toIndentedString(directLinkId)).append("\n"); - sb.append(" directLinkInterfaceId: ") - .append(toIndentedString(directLinkInterfaceId)) - .append("\n"); - sb.append(" directLinkInterfaceName: ") - .append(toIndentedString(directLinkInterfaceName)) - .append("\n"); - sb.append(" interfaceType: ").append(toIndentedString(interfaceType)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" mtu: ").append(toIndentedString(mtu)).append("\n"); - sb.append(" outscalePrivateIp: ") - .append(toIndentedString(outscalePrivateIp)) - .append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("BgpAsn"); - openapiFields.add("BgpKey"); - openapiFields.add("ClientPrivateIp"); - openapiFields.add("DirectLinkId"); - openapiFields.add("DirectLinkInterfaceId"); - openapiFields.add("DirectLinkInterfaceName"); - openapiFields.add("InterfaceType"); - openapiFields.add("Location"); - openapiFields.add("Mtu"); - openapiFields.add("OutscalePrivateIp"); - openapiFields.add("State"); - openapiFields.add("VirtualGatewayId"); - openapiFields.add("Vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DirectLinkInterfaces - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DirectLinkInterfaces.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DirectLinkInterfaces is not found in" - + " the empty JSON string", - DirectLinkInterfaces.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DirectLinkInterfaces.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DirectLinkInterfaces` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("BgpKey") != null && !jsonObj.get("BgpKey").isJsonNull()) - && !jsonObj.get("BgpKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BgpKey` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("BgpKey").toString())); - } - if ((jsonObj.get("ClientPrivateIp") != null && !jsonObj.get("ClientPrivateIp").isJsonNull()) - && !jsonObj.get("ClientPrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientPrivateIp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientPrivateIp").toString())); - } - if ((jsonObj.get("DirectLinkId") != null && !jsonObj.get("DirectLinkId").isJsonNull()) - && !jsonObj.get("DirectLinkId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DirectLinkId").toString())); - } - if ((jsonObj.get("DirectLinkInterfaceId") != null - && !jsonObj.get("DirectLinkInterfaceId").isJsonNull()) - && !jsonObj.get("DirectLinkInterfaceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceId").toString())); - } - if ((jsonObj.get("DirectLinkInterfaceName") != null - && !jsonObj.get("DirectLinkInterfaceName").isJsonNull()) - && !jsonObj.get("DirectLinkInterfaceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceName` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceName").toString())); - } - if ((jsonObj.get("InterfaceType") != null && !jsonObj.get("InterfaceType").isJsonNull()) - && !jsonObj.get("InterfaceType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InterfaceType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("InterfaceType").toString())); - } - if ((jsonObj.get("Location") != null && !jsonObj.get("Location").isJsonNull()) - && !jsonObj.get("Location").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Location` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Location").toString())); - } - if ((jsonObj.get("OutscalePrivateIp") != null - && !jsonObj.get("OutscalePrivateIp").isJsonNull()) - && !jsonObj.get("OutscalePrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutscalePrivateIp` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OutscalePrivateIp").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("VirtualGatewayId") != null - && !jsonObj.get("VirtualGatewayId").isJsonNull()) - && !jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectLinkInterfaces.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectLinkInterfaces' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DirectLinkInterfaces.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectLinkInterfaces value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectLinkInterfaces read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DirectLinkInterfaces given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectLinkInterfaces - * @throws IOException if the JSON string is invalid with respect to DirectLinkInterfaces - */ - public static DirectLinkInterfaces fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectLinkInterfaces.class); - } - - /** - * Convert an instance of DirectLinkInterfaces to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponse.java deleted file mode 100644 index 90857560..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ErrorResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ErrorResponse { - public static final String SERIALIZED_NAME_ERRORS = "Errors"; - - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ErrorResponse() {} - - public ErrorResponse errors(List errors) { - - this.errors = errors; - return this; - } - - public ErrorResponse addErrorsItem(Errors errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * One or more errors. - * - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - public ErrorResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorResponse errorResponse = (ErrorResponse) o; - return Objects.equals(this.errors, errorResponse.errors) - && Objects.equals(this.responseContext, errorResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(errors, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorResponse {\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Errors"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ErrorResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ErrorResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ErrorResponse is not found in the" - + " empty JSON string", - ErrorResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ErrorResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ErrorResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Errors") != null && !jsonObj.get("Errors").isJsonNull()) { - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("Errors"); - if (jsonArrayerrors != null) { - // ensure the json data is an array - if (!jsonObj.get("Errors").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Errors` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Errors").toString())); - } - - // validate the optional field `Errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - Errors.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ErrorResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ErrorResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ErrorResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ErrorResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ErrorResponse - * @throws IOException if the JSON string is invalid with respect to ErrorResponse - */ - public static ErrorResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ErrorResponse.class); - } - - /** - * Convert an instance of ErrorResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Errors.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Errors.java deleted file mode 100644 index 50c929ef..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Errors.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the errors. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Errors { - public static final String SERIALIZED_NAME_CODE = "Code"; - - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_DETAILS = "Details"; - - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_TYPE = "Type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public Errors() {} - - public Errors code(String code) { - - this.code = code; - return this; - } - - /** - * The code of the error (for example, `4078`). You can search for this returned code - * in the [errors page](api-errors.html) to find more details about the error. - * - * @return code - */ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public Errors details(String details) { - - this.details = details; - return this; - } - - /** - * A description providing more details about the error. - * - * @return details - */ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - public void setDetails(String details) { - this.details = details; - } - - public Errors type(String type) { - - this.type = type; - return this; - } - - /** - * The type of the error (for example, `InvalidParameterValue`). - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Errors errors = (Errors) o; - return Objects.equals(this.code, errors.code) - && Objects.equals(this.details, errors.details) - && Objects.equals(this.type, errors.type); - } - - @Override - public int hashCode() { - return Objects.hash(code, details, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Errors {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Code"); - openapiFields.add("Details"); - openapiFields.add("Type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Errors - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Errors.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Errors is not found in the empty JSON" - + " string", - Errors.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Errors.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Errors`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Code") != null && !jsonObj.get("Code").isJsonNull()) - && !jsonObj.get("Code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Code` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Code").toString())); - } - if ((jsonObj.get("Details") != null && !jsonObj.get("Details").isJsonNull()) - && !jsonObj.get("Details").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Details` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Details").toString())); - } - if ((jsonObj.get("Type") != null && !jsonObj.get("Type").isJsonNull()) - && !jsonObj.get("Type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Errors.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Errors' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Errors.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Errors value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Errors read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Errors given an JSON string - * - * @param jsonString JSON string - * @return An instance of Errors - * @throws IOException if the JSON string is invalid with respect to Errors - */ - public static Errors fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Errors.class); - } - - /** - * Convert an instance of Errors to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeys.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeys.java deleted file mode 100644 index d051dd3f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeys.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersAccessKeys { - public static final String SERIALIZED_NAME_ACCESS_KEY_IDS = "AccessKeyIds"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_IDS) - private List accessKeyIds = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public FiltersAccessKeys() {} - - public FiltersAccessKeys accessKeyIds(List accessKeyIds) { - - this.accessKeyIds = accessKeyIds; - return this; - } - - public FiltersAccessKeys addAccessKeyIdsItem(String accessKeyIdsItem) { - if (this.accessKeyIds == null) { - this.accessKeyIds = new ArrayList<>(); - } - this.accessKeyIds.add(accessKeyIdsItem); - return this; - } - - /** - * The IDs of the access keys. - * - * @return accessKeyIds - */ - @javax.annotation.Nullable - public List getAccessKeyIds() { - return accessKeyIds; - } - - public void setAccessKeyIds(List accessKeyIds) { - this.accessKeyIds = accessKeyIds; - } - - public FiltersAccessKeys states(List states) { - - this.states = states; - return this; - } - - public FiltersAccessKeys addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the access keys (`ACTIVE` \\| `INACTIVE`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersAccessKeys filtersAccessKeys = (FiltersAccessKeys) o; - return Objects.equals(this.accessKeyIds, filtersAccessKeys.accessKeyIds) - && Objects.equals(this.states, filtersAccessKeys.states); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeyIds, states); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersAccessKeys {\n"); - sb.append(" accessKeyIds: ").append(toIndentedString(accessKeyIds)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyIds"); - openapiFields.add("States"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersAccessKeys - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersAccessKeys.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersAccessKeys is not found in the" - + " empty JSON string", - FiltersAccessKeys.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersAccessKeys.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersAccessKeys` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccessKeyIds") != null && !jsonObj.get("AccessKeyIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("AccessKeyIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersAccessKeys.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersAccessKeys' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersAccessKeys.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersAccessKeys value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersAccessKeys read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersAccessKeys given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersAccessKeys - * @throws IOException if the JSON string is invalid with respect to FiltersAccessKeys - */ - public static FiltersAccessKeys fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersAccessKeys.class); - } - - /** - * Convert an instance of FiltersAccessKeys to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRule.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRule.java deleted file mode 100644 index 7e8f990b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRule.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersApiAccessRule { - public static final String SERIALIZED_NAME_API_ACCESS_RULE_IDS = "ApiAccessRuleIds"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE_IDS) - private List apiAccessRuleIds = null; - - public static final String SERIALIZED_NAME_CA_IDS = "CaIds"; - - @SerializedName(SERIALIZED_NAME_CA_IDS) - private List caIds = null; - - public static final String SERIALIZED_NAME_CNS = "Cns"; - - @SerializedName(SERIALIZED_NAME_CNS) - private List cns = null; - - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public FiltersApiAccessRule() {} - - public FiltersApiAccessRule apiAccessRuleIds(List apiAccessRuleIds) { - - this.apiAccessRuleIds = apiAccessRuleIds; - return this; - } - - public FiltersApiAccessRule addApiAccessRuleIdsItem(String apiAccessRuleIdsItem) { - if (this.apiAccessRuleIds == null) { - this.apiAccessRuleIds = new ArrayList<>(); - } - this.apiAccessRuleIds.add(apiAccessRuleIdsItem); - return this; - } - - /** - * One or more IDs of API access rules. - * - * @return apiAccessRuleIds - */ - @javax.annotation.Nullable - public List getApiAccessRuleIds() { - return apiAccessRuleIds; - } - - public void setApiAccessRuleIds(List apiAccessRuleIds) { - this.apiAccessRuleIds = apiAccessRuleIds; - } - - public FiltersApiAccessRule caIds(List caIds) { - - this.caIds = caIds; - return this; - } - - public FiltersApiAccessRule addCaIdsItem(String caIdsItem) { - if (this.caIds == null) { - this.caIds = new ArrayList<>(); - } - this.caIds.add(caIdsItem); - return this; - } - - /** - * One or more IDs of Client Certificate Authorities (CAs). - * - * @return caIds - */ - @javax.annotation.Nullable - public List getCaIds() { - return caIds; - } - - public void setCaIds(List caIds) { - this.caIds = caIds; - } - - public FiltersApiAccessRule cns(List cns) { - - this.cns = cns; - return this; - } - - public FiltersApiAccessRule addCnsItem(String cnsItem) { - if (this.cns == null) { - this.cns = new ArrayList<>(); - } - this.cns.add(cnsItem); - return this; - } - - /** - * One or more Client Certificate Common Names (CNs). - * - * @return cns - */ - @javax.annotation.Nullable - public List getCns() { - return cns; - } - - public void setCns(List cns) { - this.cns = cns; - } - - public FiltersApiAccessRule descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersApiAccessRule addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * One or more descriptions of API access rules. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersApiAccessRule ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public FiltersApiAccessRule addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersApiAccessRule filtersApiAccessRule = (FiltersApiAccessRule) o; - return Objects.equals(this.apiAccessRuleIds, filtersApiAccessRule.apiAccessRuleIds) - && Objects.equals(this.caIds, filtersApiAccessRule.caIds) - && Objects.equals(this.cns, filtersApiAccessRule.cns) - && Objects.equals(this.descriptions, filtersApiAccessRule.descriptions) - && Objects.equals(this.ipRanges, filtersApiAccessRule.ipRanges); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRuleIds, caIds, cns, descriptions, ipRanges); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersApiAccessRule {\n"); - sb.append(" apiAccessRuleIds: ").append(toIndentedString(apiAccessRuleIds)).append("\n"); - sb.append(" caIds: ").append(toIndentedString(caIds)).append("\n"); - sb.append(" cns: ").append(toIndentedString(cns)).append("\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRuleIds"); - openapiFields.add("CaIds"); - openapiFields.add("Cns"); - openapiFields.add("Descriptions"); - openapiFields.add("IpRanges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersApiAccessRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersApiAccessRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersApiAccessRule is not found in" - + " the empty JSON string", - FiltersApiAccessRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersApiAccessRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersApiAccessRule` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ApiAccessRuleIds") != null - && !jsonObj.get("ApiAccessRuleIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiAccessRuleIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ApiAccessRuleIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaIds") != null && !jsonObj.get("CaIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("CaIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Cns") != null && !jsonObj.get("Cns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cns` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Cns").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersApiAccessRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersApiAccessRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersApiAccessRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersApiAccessRule value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersApiAccessRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersApiAccessRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersApiAccessRule - * @throws IOException if the JSON string is invalid with respect to FiltersApiAccessRule - */ - public static FiltersApiAccessRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersApiAccessRule.class); - } - - /** - * Convert an instance of FiltersApiAccessRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLog.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLog.java deleted file mode 100644 index 49b44fa6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLog.java +++ /dev/null @@ -1,548 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersApiLog { - public static final String SERIALIZED_NAME_QUERY_ACCESS_KEYS = "QueryAccessKeys"; - - @SerializedName(SERIALIZED_NAME_QUERY_ACCESS_KEYS) - private List queryAccessKeys = null; - - public static final String SERIALIZED_NAME_QUERY_API_NAMES = "QueryApiNames"; - - @SerializedName(SERIALIZED_NAME_QUERY_API_NAMES) - private List queryApiNames = null; - - public static final String SERIALIZED_NAME_QUERY_CALL_NAMES = "QueryCallNames"; - - @SerializedName(SERIALIZED_NAME_QUERY_CALL_NAMES) - private List queryCallNames = null; - - public static final String SERIALIZED_NAME_QUERY_DATE_AFTER = "QueryDateAfter"; - - @SerializedName(SERIALIZED_NAME_QUERY_DATE_AFTER) - private OffsetDateTime queryDateAfter; - - public static final String SERIALIZED_NAME_QUERY_DATE_BEFORE = "QueryDateBefore"; - - @SerializedName(SERIALIZED_NAME_QUERY_DATE_BEFORE) - private OffsetDateTime queryDateBefore; - - public static final String SERIALIZED_NAME_QUERY_IP_ADDRESSES = "QueryIpAddresses"; - - @SerializedName(SERIALIZED_NAME_QUERY_IP_ADDRESSES) - private List queryIpAddresses = null; - - public static final String SERIALIZED_NAME_QUERY_USER_AGENTS = "QueryUserAgents"; - - @SerializedName(SERIALIZED_NAME_QUERY_USER_AGENTS) - private List queryUserAgents = null; - - public static final String SERIALIZED_NAME_REQUEST_IDS = "RequestIds"; - - @SerializedName(SERIALIZED_NAME_REQUEST_IDS) - private List requestIds = null; - - public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODES = "ResponseStatusCodes"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODES) - private List responseStatusCodes = null; - - public FiltersApiLog() {} - - public FiltersApiLog queryAccessKeys(List queryAccessKeys) { - - this.queryAccessKeys = queryAccessKeys; - return this; - } - - public FiltersApiLog addQueryAccessKeysItem(String queryAccessKeysItem) { - if (this.queryAccessKeys == null) { - this.queryAccessKeys = new ArrayList<>(); - } - this.queryAccessKeys.add(queryAccessKeysItem); - return this; - } - - /** - * The access keys used for the logged calls. - * - * @return queryAccessKeys - */ - @javax.annotation.Nullable - public List getQueryAccessKeys() { - return queryAccessKeys; - } - - public void setQueryAccessKeys(List queryAccessKeys) { - this.queryAccessKeys = queryAccessKeys; - } - - public FiltersApiLog queryApiNames(List queryApiNames) { - - this.queryApiNames = queryApiNames; - return this; - } - - public FiltersApiLog addQueryApiNamesItem(String queryApiNamesItem) { - if (this.queryApiNames == null) { - this.queryApiNames = new ArrayList<>(); - } - this.queryApiNames.add(queryApiNamesItem); - return this; - } - - /** - * The names of the APIs of the logged calls (always `oapi` for the OUTSCALE API). - * - * @return queryApiNames - */ - @javax.annotation.Nullable - public List getQueryApiNames() { - return queryApiNames; - } - - public void setQueryApiNames(List queryApiNames) { - this.queryApiNames = queryApiNames; - } - - public FiltersApiLog queryCallNames(List queryCallNames) { - - this.queryCallNames = queryCallNames; - return this; - } - - public FiltersApiLog addQueryCallNamesItem(String queryCallNamesItem) { - if (this.queryCallNames == null) { - this.queryCallNames = new ArrayList<>(); - } - this.queryCallNames.add(queryCallNamesItem); - return this; - } - - /** - * The names of the logged calls. - * - * @return queryCallNames - */ - @javax.annotation.Nullable - public List getQueryCallNames() { - return queryCallNames; - } - - public void setQueryCallNames(List queryCallNames) { - this.queryCallNames = queryCallNames; - } - - public FiltersApiLog queryDateAfter(OffsetDateTime queryDateAfter) { - - this.queryDateAfter = queryDateAfter; - return this; - } - - /** - * The date and time, or the date, after which you want to retrieve logged calls, in ISO 8601 - * format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). By - * default, this date is set to 48 hours before the `QueryDateBefore` parameter value. - * - * @return queryDateAfter - */ - @javax.annotation.Nullable - public OffsetDateTime getQueryDateAfter() { - return queryDateAfter; - } - - public void setQueryDateAfter(OffsetDateTime queryDateAfter) { - this.queryDateAfter = queryDateAfter; - } - - public FiltersApiLog queryDateBefore(OffsetDateTime queryDateBefore) { - - this.queryDateBefore = queryDateBefore; - return this; - } - - /** - * The date and time, or the date, before which you want to retrieve logged calls, in ISO 8601 - * format (for example, `2020-06-30T00:00:00.000Z` or `2020-06-14`). By - * default, this date is set to now, or 48 hours after the `QueryDateAfter` parameter - * value. - * - * @return queryDateBefore - */ - @javax.annotation.Nullable - public OffsetDateTime getQueryDateBefore() { - return queryDateBefore; - } - - public void setQueryDateBefore(OffsetDateTime queryDateBefore) { - this.queryDateBefore = queryDateBefore; - } - - public FiltersApiLog queryIpAddresses(List queryIpAddresses) { - - this.queryIpAddresses = queryIpAddresses; - return this; - } - - public FiltersApiLog addQueryIpAddressesItem(String queryIpAddressesItem) { - if (this.queryIpAddresses == null) { - this.queryIpAddresses = new ArrayList<>(); - } - this.queryIpAddresses.add(queryIpAddressesItem); - return this; - } - - /** - * The IPs used for the logged calls. - * - * @return queryIpAddresses - */ - @javax.annotation.Nullable - public List getQueryIpAddresses() { - return queryIpAddresses; - } - - public void setQueryIpAddresses(List queryIpAddresses) { - this.queryIpAddresses = queryIpAddresses; - } - - public FiltersApiLog queryUserAgents(List queryUserAgents) { - - this.queryUserAgents = queryUserAgents; - return this; - } - - public FiltersApiLog addQueryUserAgentsItem(String queryUserAgentsItem) { - if (this.queryUserAgents == null) { - this.queryUserAgents = new ArrayList<>(); - } - this.queryUserAgents.add(queryUserAgentsItem); - return this; - } - - /** - * The user agents of the HTTP requests of the logged calls. - * - * @return queryUserAgents - */ - @javax.annotation.Nullable - public List getQueryUserAgents() { - return queryUserAgents; - } - - public void setQueryUserAgents(List queryUserAgents) { - this.queryUserAgents = queryUserAgents; - } - - public FiltersApiLog requestIds(List requestIds) { - - this.requestIds = requestIds; - return this; - } - - public FiltersApiLog addRequestIdsItem(String requestIdsItem) { - if (this.requestIds == null) { - this.requestIds = new ArrayList<>(); - } - this.requestIds.add(requestIdsItem); - return this; - } - - /** - * The request IDs provided in the responses of the logged calls. - * - * @return requestIds - */ - @javax.annotation.Nullable - public List getRequestIds() { - return requestIds; - } - - public void setRequestIds(List requestIds) { - this.requestIds = requestIds; - } - - public FiltersApiLog responseStatusCodes(List responseStatusCodes) { - - this.responseStatusCodes = responseStatusCodes; - return this; - } - - public FiltersApiLog addResponseStatusCodesItem(Integer responseStatusCodesItem) { - if (this.responseStatusCodes == null) { - this.responseStatusCodes = new ArrayList<>(); - } - this.responseStatusCodes.add(responseStatusCodesItem); - return this; - } - - /** - * The HTTP status codes of the logged calls. - * - * @return responseStatusCodes - */ - @javax.annotation.Nullable - public List getResponseStatusCodes() { - return responseStatusCodes; - } - - public void setResponseStatusCodes(List responseStatusCodes) { - this.responseStatusCodes = responseStatusCodes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersApiLog filtersApiLog = (FiltersApiLog) o; - return Objects.equals(this.queryAccessKeys, filtersApiLog.queryAccessKeys) - && Objects.equals(this.queryApiNames, filtersApiLog.queryApiNames) - && Objects.equals(this.queryCallNames, filtersApiLog.queryCallNames) - && Objects.equals(this.queryDateAfter, filtersApiLog.queryDateAfter) - && Objects.equals(this.queryDateBefore, filtersApiLog.queryDateBefore) - && Objects.equals(this.queryIpAddresses, filtersApiLog.queryIpAddresses) - && Objects.equals(this.queryUserAgents, filtersApiLog.queryUserAgents) - && Objects.equals(this.requestIds, filtersApiLog.requestIds) - && Objects.equals(this.responseStatusCodes, filtersApiLog.responseStatusCodes); - } - - @Override - public int hashCode() { - return Objects.hash( - queryAccessKeys, - queryApiNames, - queryCallNames, - queryDateAfter, - queryDateBefore, - queryIpAddresses, - queryUserAgents, - requestIds, - responseStatusCodes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersApiLog {\n"); - sb.append(" queryAccessKeys: ").append(toIndentedString(queryAccessKeys)).append("\n"); - sb.append(" queryApiNames: ").append(toIndentedString(queryApiNames)).append("\n"); - sb.append(" queryCallNames: ").append(toIndentedString(queryCallNames)).append("\n"); - sb.append(" queryDateAfter: ").append(toIndentedString(queryDateAfter)).append("\n"); - sb.append(" queryDateBefore: ").append(toIndentedString(queryDateBefore)).append("\n"); - sb.append(" queryIpAddresses: ").append(toIndentedString(queryIpAddresses)).append("\n"); - sb.append(" queryUserAgents: ").append(toIndentedString(queryUserAgents)).append("\n"); - sb.append(" requestIds: ").append(toIndentedString(requestIds)).append("\n"); - sb.append(" responseStatusCodes: ") - .append(toIndentedString(responseStatusCodes)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("QueryAccessKeys"); - openapiFields.add("QueryApiNames"); - openapiFields.add("QueryCallNames"); - openapiFields.add("QueryDateAfter"); - openapiFields.add("QueryDateBefore"); - openapiFields.add("QueryIpAddresses"); - openapiFields.add("QueryUserAgents"); - openapiFields.add("RequestIds"); - openapiFields.add("ResponseStatusCodes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersApiLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersApiLog.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersApiLog is not found in the" - + " empty JSON string", - FiltersApiLog.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersApiLog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersApiLog` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("QueryAccessKeys") != null - && !jsonObj.get("QueryAccessKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryAccessKeys` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("QueryAccessKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QueryApiNames") != null && !jsonObj.get("QueryApiNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryApiNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("QueryApiNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QueryCallNames") != null && !jsonObj.get("QueryCallNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryCallNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("QueryCallNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QueryIpAddresses") != null - && !jsonObj.get("QueryIpAddresses").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryIpAddresses` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("QueryIpAddresses").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QueryUserAgents") != null - && !jsonObj.get("QueryUserAgents").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryUserAgents` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("QueryUserAgents").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RequestIds") != null && !jsonObj.get("RequestIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RequestIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("RequestIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ResponseStatusCodes") != null - && !jsonObj.get("ResponseStatusCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResponseStatusCodes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ResponseStatusCodes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersApiLog.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersApiLog' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersApiLog.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersApiLog value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersApiLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersApiLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersApiLog - * @throws IOException if the JSON string is invalid with respect to FiltersApiLog - */ - public static FiltersApiLog fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersApiLog.class); - } - - /** - * Convert an instance of FiltersApiLog to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCa.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCa.java deleted file mode 100644 index b4176ebd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCa.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersCa { - public static final String SERIALIZED_NAME_CA_FINGERPRINTS = "CaFingerprints"; - - @SerializedName(SERIALIZED_NAME_CA_FINGERPRINTS) - private List caFingerprints = null; - - public static final String SERIALIZED_NAME_CA_IDS = "CaIds"; - - @SerializedName(SERIALIZED_NAME_CA_IDS) - private List caIds = null; - - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public FiltersCa() {} - - public FiltersCa caFingerprints(List caFingerprints) { - - this.caFingerprints = caFingerprints; - return this; - } - - public FiltersCa addCaFingerprintsItem(String caFingerprintsItem) { - if (this.caFingerprints == null) { - this.caFingerprints = new ArrayList<>(); - } - this.caFingerprints.add(caFingerprintsItem); - return this; - } - - /** - * The fingerprints of the CAs. - * - * @return caFingerprints - */ - @javax.annotation.Nullable - public List getCaFingerprints() { - return caFingerprints; - } - - public void setCaFingerprints(List caFingerprints) { - this.caFingerprints = caFingerprints; - } - - public FiltersCa caIds(List caIds) { - - this.caIds = caIds; - return this; - } - - public FiltersCa addCaIdsItem(String caIdsItem) { - if (this.caIds == null) { - this.caIds = new ArrayList<>(); - } - this.caIds.add(caIdsItem); - return this; - } - - /** - * The IDs of the CAs. - * - * @return caIds - */ - @javax.annotation.Nullable - public List getCaIds() { - return caIds; - } - - public void setCaIds(List caIds) { - this.caIds = caIds; - } - - public FiltersCa descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersCa addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the CAs. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersCa filtersCa = (FiltersCa) o; - return Objects.equals(this.caFingerprints, filtersCa.caFingerprints) - && Objects.equals(this.caIds, filtersCa.caIds) - && Objects.equals(this.descriptions, filtersCa.descriptions); - } - - @Override - public int hashCode() { - return Objects.hash(caFingerprints, caIds, descriptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersCa {\n"); - sb.append(" caFingerprints: ").append(toIndentedString(caFingerprints)).append("\n"); - sb.append(" caIds: ").append(toIndentedString(caIds)).append("\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaFingerprints"); - openapiFields.add("CaIds"); - openapiFields.add("Descriptions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersCa - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersCa.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersCa is not found in the empty" - + " JSON string", - FiltersCa.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersCa.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersCa` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaFingerprints") != null && !jsonObj.get("CaFingerprints").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaFingerprints` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("CaFingerprints").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaIds") != null && !jsonObj.get("CaIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("CaIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersCa.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersCa' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersCa.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersCa value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersCa read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersCa given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersCa - * @throws IOException if the JSON string is invalid with respect to FiltersCa - */ - public static FiltersCa fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersCa.class); - } - - /** - * Convert an instance of FiltersCa to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogs.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogs.java deleted file mode 100644 index 353328be..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogs.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersCatalogs { - public static final String SERIALIZED_NAME_CURRENT_CATALOG_ONLY = "CurrentCatalogOnly"; - - @SerializedName(SERIALIZED_NAME_CURRENT_CATALOG_ONLY) - private Boolean currentCatalogOnly; - - public static final String SERIALIZED_NAME_FROM_DATE = "FromDate"; - - @SerializedName(SERIALIZED_NAME_FROM_DATE) - private LocalDate fromDate; - - public static final String SERIALIZED_NAME_TO_DATE = "ToDate"; - - @SerializedName(SERIALIZED_NAME_TO_DATE) - private LocalDate toDate; - - public FiltersCatalogs() {} - - public FiltersCatalogs currentCatalogOnly(Boolean currentCatalogOnly) { - - this.currentCatalogOnly = currentCatalogOnly; - return this; - } - - /** - * By default or if set to true, only returns the current catalog. If false, returns the current - * catalog and past catalogs. - * - * @return currentCatalogOnly - */ - @javax.annotation.Nullable - public Boolean getCurrentCatalogOnly() { - return currentCatalogOnly; - } - - public void setCurrentCatalogOnly(Boolean currentCatalogOnly) { - this.currentCatalogOnly = currentCatalogOnly; - } - - public FiltersCatalogs fromDate(LocalDate fromDate) { - - this.fromDate = fromDate; - return this; - } - - /** - * The beginning of the time period, in ISO 8601 date format (for example, - * `2020-06-14`). This date cannot be older than 3 years. You must specify the - * parameters `FromDate` and `ToDate` together. - * - * @return fromDate - */ - @javax.annotation.Nullable - public LocalDate getFromDate() { - return fromDate; - } - - public void setFromDate(LocalDate fromDate) { - this.fromDate = fromDate; - } - - public FiltersCatalogs toDate(LocalDate toDate) { - - this.toDate = toDate; - return this; - } - - /** - * The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). - * You must specify the parameters `FromDate` and `ToDate` together. - * - * @return toDate - */ - @javax.annotation.Nullable - public LocalDate getToDate() { - return toDate; - } - - public void setToDate(LocalDate toDate) { - this.toDate = toDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersCatalogs filtersCatalogs = (FiltersCatalogs) o; - return Objects.equals(this.currentCatalogOnly, filtersCatalogs.currentCatalogOnly) - && Objects.equals(this.fromDate, filtersCatalogs.fromDate) - && Objects.equals(this.toDate, filtersCatalogs.toDate); - } - - @Override - public int hashCode() { - return Objects.hash(currentCatalogOnly, fromDate, toDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersCatalogs {\n"); - sb.append(" currentCatalogOnly: ") - .append(toIndentedString(currentCatalogOnly)) - .append("\n"); - sb.append(" fromDate: ").append(toIndentedString(fromDate)).append("\n"); - sb.append(" toDate: ").append(toIndentedString(toDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CurrentCatalogOnly"); - openapiFields.add("FromDate"); - openapiFields.add("ToDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersCatalogs - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersCatalogs.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersCatalogs is not found in the" - + " empty JSON string", - FiltersCatalogs.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersCatalogs.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersCatalogs` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersCatalogs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersCatalogs' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersCatalogs.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersCatalogs value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersCatalogs read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersCatalogs given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersCatalogs - * @throws IOException if the JSON string is invalid with respect to FiltersCatalogs - */ - public static FiltersCatalogs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersCatalogs.class); - } - - /** - * Convert an instance of FiltersCatalogs to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGateway.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGateway.java deleted file mode 100644 index dbc503a1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGateway.java +++ /dev/null @@ -1,529 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersClientGateway { - public static final String SERIALIZED_NAME_BGP_ASNS = "BgpAsns"; - - @SerializedName(SERIALIZED_NAME_BGP_ASNS) - private List bgpAsns = null; - - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_IDS = "ClientGatewayIds"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_IDS) - private List clientGatewayIds = null; - - public static final String SERIALIZED_NAME_CONNECTION_TYPES = "ConnectionTypes"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPES) - private List connectionTypes = null; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersClientGateway() {} - - public FiltersClientGateway bgpAsns(List bgpAsns) { - - this.bgpAsns = bgpAsns; - return this; - } - - public FiltersClientGateway addBgpAsnsItem(Integer bgpAsnsItem) { - if (this.bgpAsns == null) { - this.bgpAsns = new ArrayList<>(); - } - this.bgpAsns.add(bgpAsnsItem); - return this; - } - - /** - * The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections. - * - * @return bgpAsns - */ - @javax.annotation.Nullable - public List getBgpAsns() { - return bgpAsns; - } - - public void setBgpAsns(List bgpAsns) { - this.bgpAsns = bgpAsns; - } - - public FiltersClientGateway clientGatewayIds(List clientGatewayIds) { - - this.clientGatewayIds = clientGatewayIds; - return this; - } - - public FiltersClientGateway addClientGatewayIdsItem(String clientGatewayIdsItem) { - if (this.clientGatewayIds == null) { - this.clientGatewayIds = new ArrayList<>(); - } - this.clientGatewayIds.add(clientGatewayIdsItem); - return this; - } - - /** - * The IDs of the client gateways. - * - * @return clientGatewayIds - */ - @javax.annotation.Nullable - public List getClientGatewayIds() { - return clientGatewayIds; - } - - public void setClientGatewayIds(List clientGatewayIds) { - this.clientGatewayIds = clientGatewayIds; - } - - public FiltersClientGateway connectionTypes(List connectionTypes) { - - this.connectionTypes = connectionTypes; - return this; - } - - public FiltersClientGateway addConnectionTypesItem(String connectionTypesItem) { - if (this.connectionTypes == null) { - this.connectionTypes = new ArrayList<>(); - } - this.connectionTypes.add(connectionTypesItem); - return this; - } - - /** - * The types of communication tunnels used by the client gateways (always `ipsec.1`). - * - * @return connectionTypes - */ - @javax.annotation.Nullable - public List getConnectionTypes() { - return connectionTypes; - } - - public void setConnectionTypes(List connectionTypes) { - this.connectionTypes = connectionTypes; - } - - public FiltersClientGateway publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public FiltersClientGateway addPublicIpsItem(String publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * The public IPv4 addresses of the client gateways. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public FiltersClientGateway states(List states) { - - this.states = states; - return this; - } - - public FiltersClientGateway addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the client gateways (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersClientGateway tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersClientGateway addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the client gateways. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersClientGateway tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersClientGateway addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the client gateways. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersClientGateway tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersClientGateway addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the client gateways, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersClientGateway filtersClientGateway = (FiltersClientGateway) o; - return Objects.equals(this.bgpAsns, filtersClientGateway.bgpAsns) - && Objects.equals(this.clientGatewayIds, filtersClientGateway.clientGatewayIds) - && Objects.equals(this.connectionTypes, filtersClientGateway.connectionTypes) - && Objects.equals(this.publicIps, filtersClientGateway.publicIps) - && Objects.equals(this.states, filtersClientGateway.states) - && Objects.equals(this.tagKeys, filtersClientGateway.tagKeys) - && Objects.equals(this.tagValues, filtersClientGateway.tagValues) - && Objects.equals(this.tags, filtersClientGateway.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - bgpAsns, - clientGatewayIds, - connectionTypes, - publicIps, - states, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersClientGateway {\n"); - sb.append(" bgpAsns: ").append(toIndentedString(bgpAsns)).append("\n"); - sb.append(" clientGatewayIds: ").append(toIndentedString(clientGatewayIds)).append("\n"); - sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BgpAsns"); - openapiFields.add("ClientGatewayIds"); - openapiFields.add("ConnectionTypes"); - openapiFields.add("PublicIps"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersClientGateway - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersClientGateway.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersClientGateway is not found in" - + " the empty JSON string", - FiltersClientGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersClientGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersClientGateway` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BgpAsns") != null && !jsonObj.get("BgpAsns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BgpAsns` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("BgpAsns").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ClientGatewayIds") != null - && !jsonObj.get("ClientGatewayIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ClientGatewayIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ConnectionTypes") != null - && !jsonObj.get("ConnectionTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ConnectionTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersClientGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersClientGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersClientGateway.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersClientGateway value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersClientGateway read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersClientGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersClientGateway - * @throws IOException if the JSON string is invalid with respect to FiltersClientGateway - */ - public static FiltersClientGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersClientGateway.class); - } - - /** - * Convert an instance of FiltersClientGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroup.java deleted file mode 100644 index 8d304344..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroup.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersDedicatedGroup { - public static final String SERIALIZED_NAME_CPU_GENERATIONS = "CpuGenerations"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATIONS) - private List cpuGenerations = null; - - public static final String SERIALIZED_NAME_DEDICATED_GROUP_IDS = "DedicatedGroupIds"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP_IDS) - private List dedicatedGroupIds = null; - - public static final String SERIALIZED_NAME_NAMES = "Names"; - - @SerializedName(SERIALIZED_NAME_NAMES) - private List names = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public FiltersDedicatedGroup() {} - - public FiltersDedicatedGroup cpuGenerations(List cpuGenerations) { - - this.cpuGenerations = cpuGenerations; - return this; - } - - public FiltersDedicatedGroup addCpuGenerationsItem(Integer cpuGenerationsItem) { - if (this.cpuGenerations == null) { - this.cpuGenerations = new ArrayList<>(); - } - this.cpuGenerations.add(cpuGenerationsItem); - return this; - } - - /** - * The processor generation for the VMs in the dedicated group (for example, `4`). - * - * @return cpuGenerations - */ - @javax.annotation.Nullable - public List getCpuGenerations() { - return cpuGenerations; - } - - public void setCpuGenerations(List cpuGenerations) { - this.cpuGenerations = cpuGenerations; - } - - public FiltersDedicatedGroup dedicatedGroupIds(List dedicatedGroupIds) { - - this.dedicatedGroupIds = dedicatedGroupIds; - return this; - } - - public FiltersDedicatedGroup addDedicatedGroupIdsItem(String dedicatedGroupIdsItem) { - if (this.dedicatedGroupIds == null) { - this.dedicatedGroupIds = new ArrayList<>(); - } - this.dedicatedGroupIds.add(dedicatedGroupIdsItem); - return this; - } - - /** - * The IDs of the dedicated groups. - * - * @return dedicatedGroupIds - */ - @javax.annotation.Nullable - public List getDedicatedGroupIds() { - return dedicatedGroupIds; - } - - public void setDedicatedGroupIds(List dedicatedGroupIds) { - this.dedicatedGroupIds = dedicatedGroupIds; - } - - public FiltersDedicatedGroup names(List names) { - - this.names = names; - return this; - } - - public FiltersDedicatedGroup addNamesItem(String namesItem) { - if (this.names == null) { - this.names = new ArrayList<>(); - } - this.names.add(namesItem); - return this; - } - - /** - * The names of the dedicated groups. - * - * @return names - */ - @javax.annotation.Nullable - public List getNames() { - return names; - } - - public void setNames(List names) { - this.names = names; - } - - public FiltersDedicatedGroup subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersDedicatedGroup addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions in which the dedicated groups are located. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersDedicatedGroup filtersDedicatedGroup = (FiltersDedicatedGroup) o; - return Objects.equals(this.cpuGenerations, filtersDedicatedGroup.cpuGenerations) - && Objects.equals(this.dedicatedGroupIds, filtersDedicatedGroup.dedicatedGroupIds) - && Objects.equals(this.names, filtersDedicatedGroup.names) - && Objects.equals(this.subregionNames, filtersDedicatedGroup.subregionNames); - } - - @Override - public int hashCode() { - return Objects.hash(cpuGenerations, dedicatedGroupIds, names, subregionNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersDedicatedGroup {\n"); - sb.append(" cpuGenerations: ").append(toIndentedString(cpuGenerations)).append("\n"); - sb.append(" dedicatedGroupIds: ") - .append(toIndentedString(dedicatedGroupIds)) - .append("\n"); - sb.append(" names: ").append(toIndentedString(names)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CpuGenerations"); - openapiFields.add("DedicatedGroupIds"); - openapiFields.add("Names"); - openapiFields.add("SubregionNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersDedicatedGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersDedicatedGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersDedicatedGroup is not found in" - + " the empty JSON string", - FiltersDedicatedGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersDedicatedGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersDedicatedGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("CpuGenerations") != null && !jsonObj.get("CpuGenerations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuGenerations` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("CpuGenerations").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DedicatedGroupIds") != null - && !jsonObj.get("DedicatedGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DedicatedGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DedicatedGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Names") != null && !jsonObj.get("Names").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Names` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Names").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersDedicatedGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersDedicatedGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersDedicatedGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersDedicatedGroup value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersDedicatedGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersDedicatedGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersDedicatedGroup - * @throws IOException if the JSON string is invalid with respect to FiltersDedicatedGroup - */ - public static FiltersDedicatedGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersDedicatedGroup.class); - } - - /** - * Convert an instance of FiltersDedicatedGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptions.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptions.java deleted file mode 100644 index 46e89c64..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptions.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersDhcpOptions { - public static final String SERIALIZED_NAME_DEFAULT = "Default"; - - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_IDS = "DhcpOptionsSetIds"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_IDS) - private List dhcpOptionsSetIds = null; - - public static final String SERIALIZED_NAME_DOMAIN_NAME_SERVERS = "DomainNameServers"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAME_SERVERS) - private List domainNameServers = null; - - public static final String SERIALIZED_NAME_DOMAIN_NAMES = "DomainNames"; - - @SerializedName(SERIALIZED_NAME_DOMAIN_NAMES) - private List domainNames = null; - - public static final String SERIALIZED_NAME_LOG_SERVERS = "LogServers"; - - @SerializedName(SERIALIZED_NAME_LOG_SERVERS) - private List logServers = null; - - public static final String SERIALIZED_NAME_NTP_SERVERS = "NtpServers"; - - @SerializedName(SERIALIZED_NAME_NTP_SERVERS) - private List ntpServers = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersDhcpOptions() {} - - public FiltersDhcpOptions _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * If true, lists all default DHCP options set. If false, lists all non-default DHCP options - * set. - * - * @return _default - */ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - public void setDefault(Boolean _default) { - this._default = _default; - } - - public FiltersDhcpOptions dhcpOptionsSetIds(List dhcpOptionsSetIds) { - - this.dhcpOptionsSetIds = dhcpOptionsSetIds; - return this; - } - - public FiltersDhcpOptions addDhcpOptionsSetIdsItem(String dhcpOptionsSetIdsItem) { - if (this.dhcpOptionsSetIds == null) { - this.dhcpOptionsSetIds = new ArrayList<>(); - } - this.dhcpOptionsSetIds.add(dhcpOptionsSetIdsItem); - return this; - } - - /** - * The IDs of the DHCP options sets. - * - * @return dhcpOptionsSetIds - */ - @javax.annotation.Nullable - public List getDhcpOptionsSetIds() { - return dhcpOptionsSetIds; - } - - public void setDhcpOptionsSetIds(List dhcpOptionsSetIds) { - this.dhcpOptionsSetIds = dhcpOptionsSetIds; - } - - public FiltersDhcpOptions domainNameServers(List domainNameServers) { - - this.domainNameServers = domainNameServers; - return this; - } - - public FiltersDhcpOptions addDomainNameServersItem(String domainNameServersItem) { - if (this.domainNameServers == null) { - this.domainNameServers = new ArrayList<>(); - } - this.domainNameServers.add(domainNameServersItem); - return this; - } - - /** - * The IPs of the domain name servers used for the DHCP options sets. - * - * @return domainNameServers - */ - @javax.annotation.Nullable - public List getDomainNameServers() { - return domainNameServers; - } - - public void setDomainNameServers(List domainNameServers) { - this.domainNameServers = domainNameServers; - } - - public FiltersDhcpOptions domainNames(List domainNames) { - - this.domainNames = domainNames; - return this; - } - - public FiltersDhcpOptions addDomainNamesItem(String domainNamesItem) { - if (this.domainNames == null) { - this.domainNames = new ArrayList<>(); - } - this.domainNames.add(domainNamesItem); - return this; - } - - /** - * The domain names used for the DHCP options sets. - * - * @return domainNames - */ - @javax.annotation.Nullable - public List getDomainNames() { - return domainNames; - } - - public void setDomainNames(List domainNames) { - this.domainNames = domainNames; - } - - public FiltersDhcpOptions logServers(List logServers) { - - this.logServers = logServers; - return this; - } - - public FiltersDhcpOptions addLogServersItem(String logServersItem) { - if (this.logServers == null) { - this.logServers = new ArrayList<>(); - } - this.logServers.add(logServersItem); - return this; - } - - /** - * The IPs of the log servers used for the DHCP options sets. - * - * @return logServers - */ - @javax.annotation.Nullable - public List getLogServers() { - return logServers; - } - - public void setLogServers(List logServers) { - this.logServers = logServers; - } - - public FiltersDhcpOptions ntpServers(List ntpServers) { - - this.ntpServers = ntpServers; - return this; - } - - public FiltersDhcpOptions addNtpServersItem(String ntpServersItem) { - if (this.ntpServers == null) { - this.ntpServers = new ArrayList<>(); - } - this.ntpServers.add(ntpServersItem); - return this; - } - - /** - * The IPs of the Network Time Protocol (NTP) servers used for the DHCP options sets. - * - * @return ntpServers - */ - @javax.annotation.Nullable - public List getNtpServers() { - return ntpServers; - } - - public void setNtpServers(List ntpServers) { - this.ntpServers = ntpServers; - } - - public FiltersDhcpOptions tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersDhcpOptions addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the DHCP options sets. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersDhcpOptions tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersDhcpOptions addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the DHCP options sets. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersDhcpOptions tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersDhcpOptions addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the DHCP options sets, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersDhcpOptions filtersDhcpOptions = (FiltersDhcpOptions) o; - return Objects.equals(this._default, filtersDhcpOptions._default) - && Objects.equals(this.dhcpOptionsSetIds, filtersDhcpOptions.dhcpOptionsSetIds) - && Objects.equals(this.domainNameServers, filtersDhcpOptions.domainNameServers) - && Objects.equals(this.domainNames, filtersDhcpOptions.domainNames) - && Objects.equals(this.logServers, filtersDhcpOptions.logServers) - && Objects.equals(this.ntpServers, filtersDhcpOptions.ntpServers) - && Objects.equals(this.tagKeys, filtersDhcpOptions.tagKeys) - && Objects.equals(this.tagValues, filtersDhcpOptions.tagValues) - && Objects.equals(this.tags, filtersDhcpOptions.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - _default, - dhcpOptionsSetIds, - domainNameServers, - domainNames, - logServers, - ntpServers, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersDhcpOptions {\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" dhcpOptionsSetIds: ") - .append(toIndentedString(dhcpOptionsSetIds)) - .append("\n"); - sb.append(" domainNameServers: ") - .append(toIndentedString(domainNameServers)) - .append("\n"); - sb.append(" domainNames: ").append(toIndentedString(domainNames)).append("\n"); - sb.append(" logServers: ").append(toIndentedString(logServers)).append("\n"); - sb.append(" ntpServers: ").append(toIndentedString(ntpServers)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Default"); - openapiFields.add("DhcpOptionsSetIds"); - openapiFields.add("DomainNameServers"); - openapiFields.add("DomainNames"); - openapiFields.add("LogServers"); - openapiFields.add("NtpServers"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersDhcpOptions - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersDhcpOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersDhcpOptions is not found in" - + " the empty JSON string", - FiltersDhcpOptions.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersDhcpOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersDhcpOptions` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("DhcpOptionsSetIds") != null - && !jsonObj.get("DhcpOptionsSetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DhcpOptionsSetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DomainNameServers") != null - && !jsonObj.get("DomainNameServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainNameServers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DomainNameServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DomainNames") != null && !jsonObj.get("DomainNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DomainNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("DomainNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LogServers") != null && !jsonObj.get("LogServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LogServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LogServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NtpServers") != null && !jsonObj.get("NtpServers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NtpServers` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NtpServers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersDhcpOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersDhcpOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersDhcpOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersDhcpOptions value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersDhcpOptions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersDhcpOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersDhcpOptions - * @throws IOException if the JSON string is invalid with respect to FiltersDhcpOptions - */ - public static FiltersDhcpOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersDhcpOptions.class); - } - - /** - * Convert an instance of FiltersDhcpOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLink.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLink.java deleted file mode 100644 index 921ce69c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLink.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersDirectLink { - public static final String SERIALIZED_NAME_DIRECT_LINK_IDS = "DirectLinkIds"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_IDS) - private List directLinkIds = null; - - public FiltersDirectLink() {} - - public FiltersDirectLink directLinkIds(List directLinkIds) { - - this.directLinkIds = directLinkIds; - return this; - } - - public FiltersDirectLink addDirectLinkIdsItem(String directLinkIdsItem) { - if (this.directLinkIds == null) { - this.directLinkIds = new ArrayList<>(); - } - this.directLinkIds.add(directLinkIdsItem); - return this; - } - - /** - * The IDs of the DirectLinks. - * - * @return directLinkIds - */ - @javax.annotation.Nullable - public List getDirectLinkIds() { - return directLinkIds; - } - - public void setDirectLinkIds(List directLinkIds) { - this.directLinkIds = directLinkIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersDirectLink filtersDirectLink = (FiltersDirectLink) o; - return Objects.equals(this.directLinkIds, filtersDirectLink.directLinkIds); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersDirectLink {\n"); - sb.append(" directLinkIds: ").append(toIndentedString(directLinkIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersDirectLink - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersDirectLink.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersDirectLink is not found in the" - + " empty JSON string", - FiltersDirectLink.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersDirectLink.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersDirectLink` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("DirectLinkIds") != null && !jsonObj.get("DirectLinkIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("DirectLinkIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersDirectLink.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersDirectLink' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersDirectLink.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersDirectLink value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersDirectLink read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersDirectLink given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersDirectLink - * @throws IOException if the JSON string is invalid with respect to FiltersDirectLink - */ - public static FiltersDirectLink fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersDirectLink.class); - } - - /** - * Convert an instance of FiltersDirectLink to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterface.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterface.java deleted file mode 100644 index 37db53cf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterface.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersDirectLinkInterface { - public static final String SERIALIZED_NAME_DIRECT_LINK_IDS = "DirectLinkIds"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_IDS) - private List directLinkIds = null; - - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_IDS = "DirectLinkInterfaceIds"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_IDS) - private List directLinkInterfaceIds = null; - - public FiltersDirectLinkInterface() {} - - public FiltersDirectLinkInterface directLinkIds(List directLinkIds) { - - this.directLinkIds = directLinkIds; - return this; - } - - public FiltersDirectLinkInterface addDirectLinkIdsItem(String directLinkIdsItem) { - if (this.directLinkIds == null) { - this.directLinkIds = new ArrayList<>(); - } - this.directLinkIds.add(directLinkIdsItem); - return this; - } - - /** - * The IDs of the DirectLinks. - * - * @return directLinkIds - */ - @javax.annotation.Nullable - public List getDirectLinkIds() { - return directLinkIds; - } - - public void setDirectLinkIds(List directLinkIds) { - this.directLinkIds = directLinkIds; - } - - public FiltersDirectLinkInterface directLinkInterfaceIds(List directLinkInterfaceIds) { - - this.directLinkInterfaceIds = directLinkInterfaceIds; - return this; - } - - public FiltersDirectLinkInterface addDirectLinkInterfaceIdsItem( - String directLinkInterfaceIdsItem) { - if (this.directLinkInterfaceIds == null) { - this.directLinkInterfaceIds = new ArrayList<>(); - } - this.directLinkInterfaceIds.add(directLinkInterfaceIdsItem); - return this; - } - - /** - * The IDs of the DirectLink interfaces. - * - * @return directLinkInterfaceIds - */ - @javax.annotation.Nullable - public List getDirectLinkInterfaceIds() { - return directLinkInterfaceIds; - } - - public void setDirectLinkInterfaceIds(List directLinkInterfaceIds) { - this.directLinkInterfaceIds = directLinkInterfaceIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersDirectLinkInterface filtersDirectLinkInterface = (FiltersDirectLinkInterface) o; - return Objects.equals(this.directLinkIds, filtersDirectLinkInterface.directLinkIds) - && Objects.equals( - this.directLinkInterfaceIds, - filtersDirectLinkInterface.directLinkInterfaceIds); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkIds, directLinkInterfaceIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersDirectLinkInterface {\n"); - sb.append(" directLinkIds: ").append(toIndentedString(directLinkIds)).append("\n"); - sb.append(" directLinkInterfaceIds: ") - .append(toIndentedString(directLinkInterfaceIds)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkIds"); - openapiFields.add("DirectLinkInterfaceIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersDirectLinkInterface - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersDirectLinkInterface.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersDirectLinkInterface is not" - + " found in the empty JSON string", - FiltersDirectLinkInterface.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersDirectLinkInterface.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersDirectLinkInterface` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("DirectLinkIds") != null && !jsonObj.get("DirectLinkIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("DirectLinkIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("DirectLinkInterfaceIds") != null - && !jsonObj.get("DirectLinkInterfaceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersDirectLinkInterface.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersDirectLinkInterface' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersDirectLinkInterface.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersDirectLinkInterface value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersDirectLinkInterface read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersDirectLinkInterface given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersDirectLinkInterface - * @throws IOException if the JSON string is invalid with respect to FiltersDirectLinkInterface - */ - public static FiltersDirectLinkInterface fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersDirectLinkInterface.class); - } - - /** - * Convert an instance of FiltersDirectLinkInterface to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTask.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTask.java deleted file mode 100644 index 225571c6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTask.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersExportTask { - public static final String SERIALIZED_NAME_TASK_IDS = "TaskIds"; - - @SerializedName(SERIALIZED_NAME_TASK_IDS) - private List taskIds = null; - - public FiltersExportTask() {} - - public FiltersExportTask taskIds(List taskIds) { - - this.taskIds = taskIds; - return this; - } - - public FiltersExportTask addTaskIdsItem(String taskIdsItem) { - if (this.taskIds == null) { - this.taskIds = new ArrayList<>(); - } - this.taskIds.add(taskIdsItem); - return this; - } - - /** - * The IDs of the export tasks. - * - * @return taskIds - */ - @javax.annotation.Nullable - public List getTaskIds() { - return taskIds; - } - - public void setTaskIds(List taskIds) { - this.taskIds = taskIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersExportTask filtersExportTask = (FiltersExportTask) o; - return Objects.equals(this.taskIds, filtersExportTask.taskIds); - } - - @Override - public int hashCode() { - return Objects.hash(taskIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersExportTask {\n"); - sb.append(" taskIds: ").append(toIndentedString(taskIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("TaskIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersExportTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersExportTask.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersExportTask is not found in the" - + " empty JSON string", - FiltersExportTask.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersExportTask.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersExportTask` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("TaskIds") != null && !jsonObj.get("TaskIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TaskIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TaskIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersExportTask.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersExportTask' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersExportTask.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersExportTask value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersExportTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersExportTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersExportTask - * @throws IOException if the JSON string is invalid with respect to FiltersExportTask - */ - public static FiltersExportTask fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersExportTask.class); - } - - /** - * Convert an instance of FiltersExportTask to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpu.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpu.java deleted file mode 100644 index e355592c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpu.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersFlexibleGpu { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_IDS = "FlexibleGpuIds"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_IDS) - private List flexibleGpuIds = null; - - public static final String SERIALIZED_NAME_GENERATIONS = "Generations"; - - @SerializedName(SERIALIZED_NAME_GENERATIONS) - private List generations = null; - - public static final String SERIALIZED_NAME_MODEL_NAMES = "ModelNames"; - - @SerializedName(SERIALIZED_NAME_MODEL_NAMES) - private List modelNames = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public FiltersFlexibleGpu() {} - - public FiltersFlexibleGpu deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * Indicates whether the fGPU is deleted when terminating the VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public FiltersFlexibleGpu flexibleGpuIds(List flexibleGpuIds) { - - this.flexibleGpuIds = flexibleGpuIds; - return this; - } - - public FiltersFlexibleGpu addFlexibleGpuIdsItem(String flexibleGpuIdsItem) { - if (this.flexibleGpuIds == null) { - this.flexibleGpuIds = new ArrayList<>(); - } - this.flexibleGpuIds.add(flexibleGpuIdsItem); - return this; - } - - /** - * One or more IDs of fGPUs. - * - * @return flexibleGpuIds - */ - @javax.annotation.Nullable - public List getFlexibleGpuIds() { - return flexibleGpuIds; - } - - public void setFlexibleGpuIds(List flexibleGpuIds) { - this.flexibleGpuIds = flexibleGpuIds; - } - - public FiltersFlexibleGpu generations(List generations) { - - this.generations = generations; - return this; - } - - public FiltersFlexibleGpu addGenerationsItem(String generationsItem) { - if (this.generations == null) { - this.generations = new ArrayList<>(); - } - this.generations.add(generationsItem); - return this; - } - - /** - * The processor generations that the fGPUs are compatible with. - * - * @return generations - */ - @javax.annotation.Nullable - public List getGenerations() { - return generations; - } - - public void setGenerations(List generations) { - this.generations = generations; - } - - public FiltersFlexibleGpu modelNames(List modelNames) { - - this.modelNames = modelNames; - return this; - } - - public FiltersFlexibleGpu addModelNamesItem(String modelNamesItem) { - if (this.modelNames == null) { - this.modelNames = new ArrayList<>(); - } - this.modelNames.add(modelNamesItem); - return this; - } - - /** - * One or more models of fGPUs. For more information, see [About Flexible - * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). - * - * @return modelNames - */ - @javax.annotation.Nullable - public List getModelNames() { - return modelNames; - } - - public void setModelNames(List modelNames) { - this.modelNames = modelNames; - } - - public FiltersFlexibleGpu states(List states) { - - this.states = states; - return this; - } - - public FiltersFlexibleGpu addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the fGPUs (`allocated` \\| `attaching` \\| - * `attached` \\| `detaching`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersFlexibleGpu subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersFlexibleGpu addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The Subregions where the fGPUs are located. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersFlexibleGpu vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public FiltersFlexibleGpu addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersFlexibleGpu filtersFlexibleGpu = (FiltersFlexibleGpu) o; - return Objects.equals(this.deleteOnVmDeletion, filtersFlexibleGpu.deleteOnVmDeletion) - && Objects.equals(this.flexibleGpuIds, filtersFlexibleGpu.flexibleGpuIds) - && Objects.equals(this.generations, filtersFlexibleGpu.generations) - && Objects.equals(this.modelNames, filtersFlexibleGpu.modelNames) - && Objects.equals(this.states, filtersFlexibleGpu.states) - && Objects.equals(this.subregionNames, filtersFlexibleGpu.subregionNames) - && Objects.equals(this.vmIds, filtersFlexibleGpu.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash( - deleteOnVmDeletion, - flexibleGpuIds, - generations, - modelNames, - states, - subregionNames, - vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersFlexibleGpu {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" flexibleGpuIds: ").append(toIndentedString(flexibleGpuIds)).append("\n"); - sb.append(" generations: ").append(toIndentedString(generations)).append("\n"); - sb.append(" modelNames: ").append(toIndentedString(modelNames)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("FlexibleGpuIds"); - openapiFields.add("Generations"); - openapiFields.add("ModelNames"); - openapiFields.add("States"); - openapiFields.add("SubregionNames"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersFlexibleGpu - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersFlexibleGpu.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersFlexibleGpu is not found in" - + " the empty JSON string", - FiltersFlexibleGpu.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersFlexibleGpu.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersFlexibleGpu` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("FlexibleGpuIds") != null && !jsonObj.get("FlexibleGpuIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("FlexibleGpuIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Generations") != null && !jsonObj.get("Generations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Generations` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Generations").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ModelNames") != null && !jsonObj.get("ModelNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ModelNames` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ModelNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersFlexibleGpu.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersFlexibleGpu' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersFlexibleGpu.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersFlexibleGpu value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersFlexibleGpu read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersFlexibleGpu given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersFlexibleGpu - * @throws IOException if the JSON string is invalid with respect to FiltersFlexibleGpu - */ - public static FiltersFlexibleGpu fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersFlexibleGpu.class); - } - - /** - * Convert an instance of FiltersFlexibleGpu to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersImage.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersImage.java deleted file mode 100644 index 9538b75d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersImage.java +++ /dev/null @@ -1,1269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersImage { - public static final String SERIALIZED_NAME_ACCOUNT_ALIASES = "AccountAliases"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIASES) - private List accountAliases = null; - - public static final String SERIALIZED_NAME_ACCOUNT_IDS = "AccountIds"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_IDS) - private List accountIds = null; - - public static final String SERIALIZED_NAME_ARCHITECTURES = "Architectures"; - - @SerializedName(SERIALIZED_NAME_ARCHITECTURES) - private List architectures = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DELETE_ON_VM_DELETION = - "BlockDeviceMappingDeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DELETE_ON_VM_DELETION) - private Boolean blockDeviceMappingDeleteOnVmDeletion; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DEVICE_NAMES = - "BlockDeviceMappingDeviceNames"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DEVICE_NAMES) - private List blockDeviceMappingDeviceNames = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_SNAPSHOT_IDS = - "BlockDeviceMappingSnapshotIds"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_SNAPSHOT_IDS) - private List blockDeviceMappingSnapshotIds = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_SIZES = - "BlockDeviceMappingVolumeSizes"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_SIZES) - private List blockDeviceMappingVolumeSizes = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_TYPES = - "BlockDeviceMappingVolumeTypes"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_TYPES) - private List blockDeviceMappingVolumeTypes = null; - - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_FILE_LOCATIONS = "FileLocations"; - - @SerializedName(SERIALIZED_NAME_FILE_LOCATIONS) - private List fileLocations = null; - - public static final String SERIALIZED_NAME_HYPERVISORS = "Hypervisors"; - - @SerializedName(SERIALIZED_NAME_HYPERVISORS) - private List hypervisors = null; - - public static final String SERIALIZED_NAME_IMAGE_IDS = "ImageIds"; - - @SerializedName(SERIALIZED_NAME_IMAGE_IDS) - private List imageIds = null; - - public static final String SERIALIZED_NAME_IMAGE_NAMES = "ImageNames"; - - @SerializedName(SERIALIZED_NAME_IMAGE_NAMES) - private List imageNames = null; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH_ACCOUNT_IDS = - "PermissionsToLaunchAccountIds"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH_ACCOUNT_IDS) - private List permissionsToLaunchAccountIds = null; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH_GLOBAL_PERMISSION = - "PermissionsToLaunchGlobalPermission"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH_GLOBAL_PERMISSION) - private Boolean permissionsToLaunchGlobalPermission; - - public static final String SERIALIZED_NAME_PRODUCT_CODE_NAMES = "ProductCodeNames"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODE_NAMES) - private List productCodeNames = null; - - public static final String SERIALIZED_NAME_PRODUCT_CODES = "ProductCodes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODES) - private List productCodes = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_NAMES = "RootDeviceNames"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_NAMES) - private List rootDeviceNames = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_TYPES = "RootDeviceTypes"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_TYPES) - private List rootDeviceTypes = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VIRTUALIZATION_TYPES = "VirtualizationTypes"; - - @SerializedName(SERIALIZED_NAME_VIRTUALIZATION_TYPES) - private List virtualizationTypes = null; - - public FiltersImage() {} - - public FiltersImage accountAliases(List accountAliases) { - - this.accountAliases = accountAliases; - return this; - } - - public FiltersImage addAccountAliasesItem(String accountAliasesItem) { - if (this.accountAliases == null) { - this.accountAliases = new ArrayList<>(); - } - this.accountAliases.add(accountAliasesItem); - return this; - } - - /** - * The account aliases of the owners of the OMIs. - * - * @return accountAliases - */ - @javax.annotation.Nullable - public List getAccountAliases() { - return accountAliases; - } - - public void setAccountAliases(List accountAliases) { - this.accountAliases = accountAliases; - } - - public FiltersImage accountIds(List accountIds) { - - this.accountIds = accountIds; - return this; - } - - public FiltersImage addAccountIdsItem(String accountIdsItem) { - if (this.accountIds == null) { - this.accountIds = new ArrayList<>(); - } - this.accountIds.add(accountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch - * permissions are described. - * - * @return accountIds - */ - @javax.annotation.Nullable - public List getAccountIds() { - return accountIds; - } - - public void setAccountIds(List accountIds) { - this.accountIds = accountIds; - } - - public FiltersImage architectures(List architectures) { - - this.architectures = architectures; - return this; - } - - public FiltersImage addArchitecturesItem(String architecturesItem) { - if (this.architectures == null) { - this.architectures = new ArrayList<>(); - } - this.architectures.add(architecturesItem); - return this; - } - - /** - * The architectures of the OMIs (`i386` \\| `x86_64`). - * - * @return architectures - */ - @javax.annotation.Nullable - public List getArchitectures() { - return architectures; - } - - public void setArchitectures(List architectures) { - this.architectures = architectures; - } - - public FiltersImage blockDeviceMappingDeleteOnVmDeletion( - Boolean blockDeviceMappingDeleteOnVmDeletion) { - - this.blockDeviceMappingDeleteOnVmDeletion = blockDeviceMappingDeleteOnVmDeletion; - return this; - } - - /** - * Whether the volumes are deleted or not when terminating the VM. - * - * @return blockDeviceMappingDeleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getBlockDeviceMappingDeleteOnVmDeletion() { - return blockDeviceMappingDeleteOnVmDeletion; - } - - public void setBlockDeviceMappingDeleteOnVmDeletion( - Boolean blockDeviceMappingDeleteOnVmDeletion) { - this.blockDeviceMappingDeleteOnVmDeletion = blockDeviceMappingDeleteOnVmDeletion; - } - - public FiltersImage blockDeviceMappingDeviceNames(List blockDeviceMappingDeviceNames) { - - this.blockDeviceMappingDeviceNames = blockDeviceMappingDeviceNames; - return this; - } - - public FiltersImage addBlockDeviceMappingDeviceNamesItem( - String blockDeviceMappingDeviceNamesItem) { - if (this.blockDeviceMappingDeviceNames == null) { - this.blockDeviceMappingDeviceNames = new ArrayList<>(); - } - this.blockDeviceMappingDeviceNames.add(blockDeviceMappingDeviceNamesItem); - return this; - } - - /** - * The device names for the volumes. - * - * @return blockDeviceMappingDeviceNames - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingDeviceNames() { - return blockDeviceMappingDeviceNames; - } - - public void setBlockDeviceMappingDeviceNames(List blockDeviceMappingDeviceNames) { - this.blockDeviceMappingDeviceNames = blockDeviceMappingDeviceNames; - } - - public FiltersImage blockDeviceMappingSnapshotIds(List blockDeviceMappingSnapshotIds) { - - this.blockDeviceMappingSnapshotIds = blockDeviceMappingSnapshotIds; - return this; - } - - public FiltersImage addBlockDeviceMappingSnapshotIdsItem( - String blockDeviceMappingSnapshotIdsItem) { - if (this.blockDeviceMappingSnapshotIds == null) { - this.blockDeviceMappingSnapshotIds = new ArrayList<>(); - } - this.blockDeviceMappingSnapshotIds.add(blockDeviceMappingSnapshotIdsItem); - return this; - } - - /** - * The IDs of the snapshots used to create the volumes. - * - * @return blockDeviceMappingSnapshotIds - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingSnapshotIds() { - return blockDeviceMappingSnapshotIds; - } - - public void setBlockDeviceMappingSnapshotIds(List blockDeviceMappingSnapshotIds) { - this.blockDeviceMappingSnapshotIds = blockDeviceMappingSnapshotIds; - } - - public FiltersImage blockDeviceMappingVolumeSizes(List blockDeviceMappingVolumeSizes) { - - this.blockDeviceMappingVolumeSizes = blockDeviceMappingVolumeSizes; - return this; - } - - public FiltersImage addBlockDeviceMappingVolumeSizesItem( - Integer blockDeviceMappingVolumeSizesItem) { - if (this.blockDeviceMappingVolumeSizes == null) { - this.blockDeviceMappingVolumeSizes = new ArrayList<>(); - } - this.blockDeviceMappingVolumeSizes.add(blockDeviceMappingVolumeSizesItem); - return this; - } - - /** - * The sizes of the volumes, in gibibytes (GiB). - * - * @return blockDeviceMappingVolumeSizes - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingVolumeSizes() { - return blockDeviceMappingVolumeSizes; - } - - public void setBlockDeviceMappingVolumeSizes(List blockDeviceMappingVolumeSizes) { - this.blockDeviceMappingVolumeSizes = blockDeviceMappingVolumeSizes; - } - - public FiltersImage blockDeviceMappingVolumeTypes(List blockDeviceMappingVolumeTypes) { - - this.blockDeviceMappingVolumeTypes = blockDeviceMappingVolumeTypes; - return this; - } - - public FiltersImage addBlockDeviceMappingVolumeTypesItem( - String blockDeviceMappingVolumeTypesItem) { - if (this.blockDeviceMappingVolumeTypes == null) { - this.blockDeviceMappingVolumeTypes = new ArrayList<>(); - } - this.blockDeviceMappingVolumeTypes.add(blockDeviceMappingVolumeTypesItem); - return this; - } - - /** - * The types of volumes (`standard` \\| `gp2` \\| `io1`). - * - * @return blockDeviceMappingVolumeTypes - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingVolumeTypes() { - return blockDeviceMappingVolumeTypes; - } - - public void setBlockDeviceMappingVolumeTypes(List blockDeviceMappingVolumeTypes) { - this.blockDeviceMappingVolumeTypes = blockDeviceMappingVolumeTypes; - } - - public FiltersImage descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersImage addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the OMIs, provided when they were created. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersImage fileLocations(List fileLocations) { - - this.fileLocations = fileLocations; - return this; - } - - public FiltersImage addFileLocationsItem(String fileLocationsItem) { - if (this.fileLocations == null) { - this.fileLocations = new ArrayList<>(); - } - this.fileLocations.add(fileLocationsItem); - return this; - } - - /** - * The locations of the buckets where the OMI files are stored. - * - * @return fileLocations - */ - @javax.annotation.Nullable - public List getFileLocations() { - return fileLocations; - } - - public void setFileLocations(List fileLocations) { - this.fileLocations = fileLocations; - } - - public FiltersImage hypervisors(List hypervisors) { - - this.hypervisors = hypervisors; - return this; - } - - public FiltersImage addHypervisorsItem(String hypervisorsItem) { - if (this.hypervisors == null) { - this.hypervisors = new ArrayList<>(); - } - this.hypervisors.add(hypervisorsItem); - return this; - } - - /** - * The hypervisor type of the OMI (always `xen`). - * - * @return hypervisors - */ - @javax.annotation.Nullable - public List getHypervisors() { - return hypervisors; - } - - public void setHypervisors(List hypervisors) { - this.hypervisors = hypervisors; - } - - public FiltersImage imageIds(List imageIds) { - - this.imageIds = imageIds; - return this; - } - - public FiltersImage addImageIdsItem(String imageIdsItem) { - if (this.imageIds == null) { - this.imageIds = new ArrayList<>(); - } - this.imageIds.add(imageIdsItem); - return this; - } - - /** - * The IDs of the OMIs. - * - * @return imageIds - */ - @javax.annotation.Nullable - public List getImageIds() { - return imageIds; - } - - public void setImageIds(List imageIds) { - this.imageIds = imageIds; - } - - public FiltersImage imageNames(List imageNames) { - - this.imageNames = imageNames; - return this; - } - - public FiltersImage addImageNamesItem(String imageNamesItem) { - if (this.imageNames == null) { - this.imageNames = new ArrayList<>(); - } - this.imageNames.add(imageNamesItem); - return this; - } - - /** - * The names of the OMIs, provided when they were created. - * - * @return imageNames - */ - @javax.annotation.Nullable - public List getImageNames() { - return imageNames; - } - - public void setImageNames(List imageNames) { - this.imageNames = imageNames; - } - - public FiltersImage permissionsToLaunchAccountIds(List permissionsToLaunchAccountIds) { - - this.permissionsToLaunchAccountIds = permissionsToLaunchAccountIds; - return this; - } - - public FiltersImage addPermissionsToLaunchAccountIdsItem( - String permissionsToLaunchAccountIdsItem) { - if (this.permissionsToLaunchAccountIds == null) { - this.permissionsToLaunchAccountIds = new ArrayList<>(); - } - this.permissionsToLaunchAccountIds.add(permissionsToLaunchAccountIdsItem); - return this; - } - - /** - * The account IDs which have launch permissions for the OMIs. - * - * @return permissionsToLaunchAccountIds - */ - @javax.annotation.Nullable - public List getPermissionsToLaunchAccountIds() { - return permissionsToLaunchAccountIds; - } - - public void setPermissionsToLaunchAccountIds(List permissionsToLaunchAccountIds) { - this.permissionsToLaunchAccountIds = permissionsToLaunchAccountIds; - } - - public FiltersImage permissionsToLaunchGlobalPermission( - Boolean permissionsToLaunchGlobalPermission) { - - this.permissionsToLaunchGlobalPermission = permissionsToLaunchGlobalPermission; - return this; - } - - /** - * If true, lists all public OMIs. If false, lists all private OMIs. - * - * @return permissionsToLaunchGlobalPermission - */ - @javax.annotation.Nullable - public Boolean getPermissionsToLaunchGlobalPermission() { - return permissionsToLaunchGlobalPermission; - } - - public void setPermissionsToLaunchGlobalPermission( - Boolean permissionsToLaunchGlobalPermission) { - this.permissionsToLaunchGlobalPermission = permissionsToLaunchGlobalPermission; - } - - public FiltersImage productCodeNames(List productCodeNames) { - - this.productCodeNames = productCodeNames; - return this; - } - - public FiltersImage addProductCodeNamesItem(String productCodeNamesItem) { - if (this.productCodeNames == null) { - this.productCodeNames = new ArrayList<>(); - } - this.productCodeNames.add(productCodeNamesItem); - return this; - } - - /** - * The names of the product codes associated with the OMI. - * - * @return productCodeNames - */ - @javax.annotation.Nullable - public List getProductCodeNames() { - return productCodeNames; - } - - public void setProductCodeNames(List productCodeNames) { - this.productCodeNames = productCodeNames; - } - - public FiltersImage productCodes(List productCodes) { - - this.productCodes = productCodes; - return this; - } - - public FiltersImage addProductCodesItem(String productCodesItem) { - if (this.productCodes == null) { - this.productCodes = new ArrayList<>(); - } - this.productCodes.add(productCodesItem); - return this; - } - - /** - * The product codes associated with the OMI. - * - * @return productCodes - */ - @javax.annotation.Nullable - public List getProductCodes() { - return productCodes; - } - - public void setProductCodes(List productCodes) { - this.productCodes = productCodes; - } - - public FiltersImage rootDeviceNames(List rootDeviceNames) { - - this.rootDeviceNames = rootDeviceNames; - return this; - } - - public FiltersImage addRootDeviceNamesItem(String rootDeviceNamesItem) { - if (this.rootDeviceNames == null) { - this.rootDeviceNames = new ArrayList<>(); - } - this.rootDeviceNames.add(rootDeviceNamesItem); - return this; - } - - /** - * The name of the root device. This value must be /dev/sda1. - * - * @return rootDeviceNames - */ - @javax.annotation.Nullable - public List getRootDeviceNames() { - return rootDeviceNames; - } - - public void setRootDeviceNames(List rootDeviceNames) { - this.rootDeviceNames = rootDeviceNames; - } - - public FiltersImage rootDeviceTypes(List rootDeviceTypes) { - - this.rootDeviceTypes = rootDeviceTypes; - return this; - } - - public FiltersImage addRootDeviceTypesItem(String rootDeviceTypesItem) { - if (this.rootDeviceTypes == null) { - this.rootDeviceTypes = new ArrayList<>(); - } - this.rootDeviceTypes.add(rootDeviceTypesItem); - return this; - } - - /** - * The types of root device used by the OMIs (`bsu` or `ebs`). - * - * @return rootDeviceTypes - */ - @javax.annotation.Nullable - public List getRootDeviceTypes() { - return rootDeviceTypes; - } - - public void setRootDeviceTypes(List rootDeviceTypes) { - this.rootDeviceTypes = rootDeviceTypes; - } - - public FiltersImage states(List states) { - - this.states = states; - return this; - } - - public FiltersImage addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the OMIs (`pending` \\| `available` \\| - * `failed`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersImage tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersImage addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the OMIs. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersImage tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersImage addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the OMIs. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersImage tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersImage addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the OMIs, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersImage virtualizationTypes(List virtualizationTypes) { - - this.virtualizationTypes = virtualizationTypes; - return this; - } - - public FiltersImage addVirtualizationTypesItem(String virtualizationTypesItem) { - if (this.virtualizationTypes == null) { - this.virtualizationTypes = new ArrayList<>(); - } - this.virtualizationTypes.add(virtualizationTypesItem); - return this; - } - - /** - * The virtualization types (always `hvm`). - * - * @return virtualizationTypes - */ - @javax.annotation.Nullable - public List getVirtualizationTypes() { - return virtualizationTypes; - } - - public void setVirtualizationTypes(List virtualizationTypes) { - this.virtualizationTypes = virtualizationTypes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersImage filtersImage = (FiltersImage) o; - return Objects.equals(this.accountAliases, filtersImage.accountAliases) - && Objects.equals(this.accountIds, filtersImage.accountIds) - && Objects.equals(this.architectures, filtersImage.architectures) - && Objects.equals( - this.blockDeviceMappingDeleteOnVmDeletion, - filtersImage.blockDeviceMappingDeleteOnVmDeletion) - && Objects.equals( - this.blockDeviceMappingDeviceNames, - filtersImage.blockDeviceMappingDeviceNames) - && Objects.equals( - this.blockDeviceMappingSnapshotIds, - filtersImage.blockDeviceMappingSnapshotIds) - && Objects.equals( - this.blockDeviceMappingVolumeSizes, - filtersImage.blockDeviceMappingVolumeSizes) - && Objects.equals( - this.blockDeviceMappingVolumeTypes, - filtersImage.blockDeviceMappingVolumeTypes) - && Objects.equals(this.descriptions, filtersImage.descriptions) - && Objects.equals(this.fileLocations, filtersImage.fileLocations) - && Objects.equals(this.hypervisors, filtersImage.hypervisors) - && Objects.equals(this.imageIds, filtersImage.imageIds) - && Objects.equals(this.imageNames, filtersImage.imageNames) - && Objects.equals( - this.permissionsToLaunchAccountIds, - filtersImage.permissionsToLaunchAccountIds) - && Objects.equals( - this.permissionsToLaunchGlobalPermission, - filtersImage.permissionsToLaunchGlobalPermission) - && Objects.equals(this.productCodeNames, filtersImage.productCodeNames) - && Objects.equals(this.productCodes, filtersImage.productCodes) - && Objects.equals(this.rootDeviceNames, filtersImage.rootDeviceNames) - && Objects.equals(this.rootDeviceTypes, filtersImage.rootDeviceTypes) - && Objects.equals(this.states, filtersImage.states) - && Objects.equals(this.tagKeys, filtersImage.tagKeys) - && Objects.equals(this.tagValues, filtersImage.tagValues) - && Objects.equals(this.tags, filtersImage.tags) - && Objects.equals(this.virtualizationTypes, filtersImage.virtualizationTypes); - } - - @Override - public int hashCode() { - return Objects.hash( - accountAliases, - accountIds, - architectures, - blockDeviceMappingDeleteOnVmDeletion, - blockDeviceMappingDeviceNames, - blockDeviceMappingSnapshotIds, - blockDeviceMappingVolumeSizes, - blockDeviceMappingVolumeTypes, - descriptions, - fileLocations, - hypervisors, - imageIds, - imageNames, - permissionsToLaunchAccountIds, - permissionsToLaunchGlobalPermission, - productCodeNames, - productCodes, - rootDeviceNames, - rootDeviceTypes, - states, - tagKeys, - tagValues, - tags, - virtualizationTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersImage {\n"); - sb.append(" accountAliases: ").append(toIndentedString(accountAliases)).append("\n"); - sb.append(" accountIds: ").append(toIndentedString(accountIds)).append("\n"); - sb.append(" architectures: ").append(toIndentedString(architectures)).append("\n"); - sb.append(" blockDeviceMappingDeleteOnVmDeletion: ") - .append(toIndentedString(blockDeviceMappingDeleteOnVmDeletion)) - .append("\n"); - sb.append(" blockDeviceMappingDeviceNames: ") - .append(toIndentedString(blockDeviceMappingDeviceNames)) - .append("\n"); - sb.append(" blockDeviceMappingSnapshotIds: ") - .append(toIndentedString(blockDeviceMappingSnapshotIds)) - .append("\n"); - sb.append(" blockDeviceMappingVolumeSizes: ") - .append(toIndentedString(blockDeviceMappingVolumeSizes)) - .append("\n"); - sb.append(" blockDeviceMappingVolumeTypes: ") - .append(toIndentedString(blockDeviceMappingVolumeTypes)) - .append("\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" fileLocations: ").append(toIndentedString(fileLocations)).append("\n"); - sb.append(" hypervisors: ").append(toIndentedString(hypervisors)).append("\n"); - sb.append(" imageIds: ").append(toIndentedString(imageIds)).append("\n"); - sb.append(" imageNames: ").append(toIndentedString(imageNames)).append("\n"); - sb.append(" permissionsToLaunchAccountIds: ") - .append(toIndentedString(permissionsToLaunchAccountIds)) - .append("\n"); - sb.append(" permissionsToLaunchGlobalPermission: ") - .append(toIndentedString(permissionsToLaunchGlobalPermission)) - .append("\n"); - sb.append(" productCodeNames: ").append(toIndentedString(productCodeNames)).append("\n"); - sb.append(" productCodes: ").append(toIndentedString(productCodes)).append("\n"); - sb.append(" rootDeviceNames: ").append(toIndentedString(rootDeviceNames)).append("\n"); - sb.append(" rootDeviceTypes: ").append(toIndentedString(rootDeviceTypes)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" virtualizationTypes: ") - .append(toIndentedString(virtualizationTypes)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountAliases"); - openapiFields.add("AccountIds"); - openapiFields.add("Architectures"); - openapiFields.add("BlockDeviceMappingDeleteOnVmDeletion"); - openapiFields.add("BlockDeviceMappingDeviceNames"); - openapiFields.add("BlockDeviceMappingSnapshotIds"); - openapiFields.add("BlockDeviceMappingVolumeSizes"); - openapiFields.add("BlockDeviceMappingVolumeTypes"); - openapiFields.add("Descriptions"); - openapiFields.add("FileLocations"); - openapiFields.add("Hypervisors"); - openapiFields.add("ImageIds"); - openapiFields.add("ImageNames"); - openapiFields.add("PermissionsToLaunchAccountIds"); - openapiFields.add("PermissionsToLaunchGlobalPermission"); - openapiFields.add("ProductCodeNames"); - openapiFields.add("ProductCodes"); - openapiFields.add("RootDeviceNames"); - openapiFields.add("RootDeviceTypes"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VirtualizationTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersImage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersImage.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersImage is not found in the" - + " empty JSON string", - FiltersImage.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersImage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersImage` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccountAliases") != null && !jsonObj.get("AccountAliases").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountAliases` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("AccountAliases").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccountIds") != null && !jsonObj.get("AccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("AccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Architectures") != null && !jsonObj.get("Architectures").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Architectures` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Architectures").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingDeviceNames") != null - && !jsonObj.get("BlockDeviceMappingDeviceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingDeviceNames` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingDeviceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingSnapshotIds") != null - && !jsonObj.get("BlockDeviceMappingSnapshotIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingSnapshotIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingSnapshotIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingVolumeSizes") != null - && !jsonObj.get("BlockDeviceMappingVolumeSizes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingVolumeSizes` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingVolumeSizes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingVolumeTypes") != null - && !jsonObj.get("BlockDeviceMappingVolumeTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingVolumeTypes` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingVolumeTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("FileLocations") != null && !jsonObj.get("FileLocations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FileLocations` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("FileLocations").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Hypervisors") != null && !jsonObj.get("Hypervisors").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Hypervisors` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Hypervisors").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ImageIds") != null && !jsonObj.get("ImageIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ImageIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ImageNames") != null && !jsonObj.get("ImageNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageNames` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ImageNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PermissionsToLaunchAccountIds") != null - && !jsonObj.get("PermissionsToLaunchAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PermissionsToLaunchAccountIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("PermissionsToLaunchAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodeNames") != null - && !jsonObj.get("ProductCodeNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodeNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ProductCodeNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodes") != null && !jsonObj.get("ProductCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductCodes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RootDeviceNames") != null - && !jsonObj.get("RootDeviceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RootDeviceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RootDeviceTypes") != null - && !jsonObj.get("RootDeviceTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RootDeviceTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VirtualizationTypes") != null - && !jsonObj.get("VirtualizationTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualizationTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VirtualizationTypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersImage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersImage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersImage.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersImage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersImage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersImage given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersImage - * @throws IOException if the JSON string is invalid with respect to FiltersImage - */ - public static FiltersImage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersImage.class); - } - - /** - * Convert an instance of FiltersImage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetService.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetService.java deleted file mode 100644 index 56d54a80..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetService.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersInternetService { - public static final String SERIALIZED_NAME_INTERNET_SERVICE_IDS = "InternetServiceIds"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE_IDS) - private List internetServiceIds = null; - - public static final String SERIALIZED_NAME_LINK_NET_IDS = "LinkNetIds"; - - @SerializedName(SERIALIZED_NAME_LINK_NET_IDS) - private List linkNetIds = null; - - public static final String SERIALIZED_NAME_LINK_STATES = "LinkStates"; - - @SerializedName(SERIALIZED_NAME_LINK_STATES) - private List linkStates = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersInternetService() {} - - public FiltersInternetService internetServiceIds(List internetServiceIds) { - - this.internetServiceIds = internetServiceIds; - return this; - } - - public FiltersInternetService addInternetServiceIdsItem(String internetServiceIdsItem) { - if (this.internetServiceIds == null) { - this.internetServiceIds = new ArrayList<>(); - } - this.internetServiceIds.add(internetServiceIdsItem); - return this; - } - - /** - * The IDs of the Internet services. - * - * @return internetServiceIds - */ - @javax.annotation.Nullable - public List getInternetServiceIds() { - return internetServiceIds; - } - - public void setInternetServiceIds(List internetServiceIds) { - this.internetServiceIds = internetServiceIds; - } - - public FiltersInternetService linkNetIds(List linkNetIds) { - - this.linkNetIds = linkNetIds; - return this; - } - - public FiltersInternetService addLinkNetIdsItem(String linkNetIdsItem) { - if (this.linkNetIds == null) { - this.linkNetIds = new ArrayList<>(); - } - this.linkNetIds.add(linkNetIdsItem); - return this; - } - - /** - * The IDs of the Nets the Internet services are attached to. - * - * @return linkNetIds - */ - @javax.annotation.Nullable - public List getLinkNetIds() { - return linkNetIds; - } - - public void setLinkNetIds(List linkNetIds) { - this.linkNetIds = linkNetIds; - } - - public FiltersInternetService linkStates(List linkStates) { - - this.linkStates = linkStates; - return this; - } - - public FiltersInternetService addLinkStatesItem(String linkStatesItem) { - if (this.linkStates == null) { - this.linkStates = new ArrayList<>(); - } - this.linkStates.add(linkStatesItem); - return this; - } - - /** - * The current states of the attachments between the Internet services and the Nets (only - * `available`, if the Internet gateway is attached to a Net). - * - * @return linkStates - */ - @javax.annotation.Nullable - public List getLinkStates() { - return linkStates; - } - - public void setLinkStates(List linkStates) { - this.linkStates = linkStates; - } - - public FiltersInternetService tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersInternetService addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the Internet services. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersInternetService tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersInternetService addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the Internet services. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersInternetService tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersInternetService addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the Internet services, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersInternetService filtersInternetService = (FiltersInternetService) o; - return Objects.equals(this.internetServiceIds, filtersInternetService.internetServiceIds) - && Objects.equals(this.linkNetIds, filtersInternetService.linkNetIds) - && Objects.equals(this.linkStates, filtersInternetService.linkStates) - && Objects.equals(this.tagKeys, filtersInternetService.tagKeys) - && Objects.equals(this.tagValues, filtersInternetService.tagValues) - && Objects.equals(this.tags, filtersInternetService.tags); - } - - @Override - public int hashCode() { - return Objects.hash(internetServiceIds, linkNetIds, linkStates, tagKeys, tagValues, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersInternetService {\n"); - sb.append(" internetServiceIds: ") - .append(toIndentedString(internetServiceIds)) - .append("\n"); - sb.append(" linkNetIds: ").append(toIndentedString(linkNetIds)).append("\n"); - sb.append(" linkStates: ").append(toIndentedString(linkStates)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("InternetServiceIds"); - openapiFields.add("LinkNetIds"); - openapiFields.add("LinkStates"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersInternetService - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersInternetService.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersInternetService is not found" - + " in the empty JSON string", - FiltersInternetService.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersInternetService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersInternetService` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("InternetServiceIds") != null - && !jsonObj.get("InternetServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServiceIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("InternetServiceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNetIds") != null && !jsonObj.get("LinkNetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LinkNetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkStates") != null && !jsonObj.get("LinkStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkStates` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LinkStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersInternetService.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersInternetService' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersInternetService.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersInternetService value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersInternetService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersInternetService given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersInternetService - * @throws IOException if the JSON string is invalid with respect to FiltersInternetService - */ - public static FiltersInternetService fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersInternetService.class); - } - - /** - * Convert an instance of FiltersInternetService to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypair.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypair.java deleted file mode 100644 index 07c0be3b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypair.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersKeypair { - public static final String SERIALIZED_NAME_KEYPAIR_FINGERPRINTS = "KeypairFingerprints"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_FINGERPRINTS) - private List keypairFingerprints = null; - - public static final String SERIALIZED_NAME_KEYPAIR_NAMES = "KeypairNames"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAMES) - private List keypairNames = null; - - public static final String SERIALIZED_NAME_KEYPAIR_TYPES = "KeypairTypes"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_TYPES) - private List keypairTypes = null; - - public FiltersKeypair() {} - - public FiltersKeypair keypairFingerprints(List keypairFingerprints) { - - this.keypairFingerprints = keypairFingerprints; - return this; - } - - public FiltersKeypair addKeypairFingerprintsItem(String keypairFingerprintsItem) { - if (this.keypairFingerprints == null) { - this.keypairFingerprints = new ArrayList<>(); - } - this.keypairFingerprints.add(keypairFingerprintsItem); - return this; - } - - /** - * The fingerprints of the keypairs. - * - * @return keypairFingerprints - */ - @javax.annotation.Nullable - public List getKeypairFingerprints() { - return keypairFingerprints; - } - - public void setKeypairFingerprints(List keypairFingerprints) { - this.keypairFingerprints = keypairFingerprints; - } - - public FiltersKeypair keypairNames(List keypairNames) { - - this.keypairNames = keypairNames; - return this; - } - - public FiltersKeypair addKeypairNamesItem(String keypairNamesItem) { - if (this.keypairNames == null) { - this.keypairNames = new ArrayList<>(); - } - this.keypairNames.add(keypairNamesItem); - return this; - } - - /** - * The names of the keypairs. - * - * @return keypairNames - */ - @javax.annotation.Nullable - public List getKeypairNames() { - return keypairNames; - } - - public void setKeypairNames(List keypairNames) { - this.keypairNames = keypairNames; - } - - public FiltersKeypair keypairTypes(List keypairTypes) { - - this.keypairTypes = keypairTypes; - return this; - } - - public FiltersKeypair addKeypairTypesItem(String keypairTypesItem) { - if (this.keypairTypes == null) { - this.keypairTypes = new ArrayList<>(); - } - this.keypairTypes.add(keypairTypesItem); - return this; - } - - /** - * The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, - * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or - * `ecdsa-sha2-nistp521`). - * - * @return keypairTypes - */ - @javax.annotation.Nullable - public List getKeypairTypes() { - return keypairTypes; - } - - public void setKeypairTypes(List keypairTypes) { - this.keypairTypes = keypairTypes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersKeypair filtersKeypair = (FiltersKeypair) o; - return Objects.equals(this.keypairFingerprints, filtersKeypair.keypairFingerprints) - && Objects.equals(this.keypairNames, filtersKeypair.keypairNames) - && Objects.equals(this.keypairTypes, filtersKeypair.keypairTypes); - } - - @Override - public int hashCode() { - return Objects.hash(keypairFingerprints, keypairNames, keypairTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersKeypair {\n"); - sb.append(" keypairFingerprints: ") - .append(toIndentedString(keypairFingerprints)) - .append("\n"); - sb.append(" keypairNames: ").append(toIndentedString(keypairNames)).append("\n"); - sb.append(" keypairTypes: ").append(toIndentedString(keypairTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("KeypairFingerprints"); - openapiFields.add("KeypairNames"); - openapiFields.add("KeypairTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersKeypair - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersKeypair.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersKeypair is not found in the" - + " empty JSON string", - FiltersKeypair.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersKeypair.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersKeypair` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("KeypairFingerprints") != null - && !jsonObj.get("KeypairFingerprints").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairFingerprints` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairFingerprints").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("KeypairNames") != null && !jsonObj.get("KeypairNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("KeypairNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("KeypairTypes") != null && !jsonObj.get("KeypairTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairTypes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("KeypairTypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersKeypair.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersKeypair' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersKeypair.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersKeypair value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersKeypair read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersKeypair given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersKeypair - * @throws IOException if the JSON string is invalid with respect to FiltersKeypair - */ - public static FiltersKeypair fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersKeypair.class); - } - - /** - * Convert an instance of FiltersKeypair to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRule.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRule.java deleted file mode 100644 index ebe40739..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRule.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersListenerRule { - public static final String SERIALIZED_NAME_LISTENER_RULE_NAMES = "ListenerRuleNames"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_NAMES) - private List listenerRuleNames = null; - - public FiltersListenerRule() {} - - public FiltersListenerRule listenerRuleNames(List listenerRuleNames) { - - this.listenerRuleNames = listenerRuleNames; - return this; - } - - public FiltersListenerRule addListenerRuleNamesItem(String listenerRuleNamesItem) { - if (this.listenerRuleNames == null) { - this.listenerRuleNames = new ArrayList<>(); - } - this.listenerRuleNames.add(listenerRuleNamesItem); - return this; - } - - /** - * The names of the listener rules. - * - * @return listenerRuleNames - */ - @javax.annotation.Nullable - public List getListenerRuleNames() { - return listenerRuleNames; - } - - public void setListenerRuleNames(List listenerRuleNames) { - this.listenerRuleNames = listenerRuleNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersListenerRule filtersListenerRule = (FiltersListenerRule) o; - return Objects.equals(this.listenerRuleNames, filtersListenerRule.listenerRuleNames); - } - - @Override - public int hashCode() { - return Objects.hash(listenerRuleNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersListenerRule {\n"); - sb.append(" listenerRuleNames: ") - .append(toIndentedString(listenerRuleNames)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ListenerRuleNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersListenerRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersListenerRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersListenerRule is not found in" - + " the empty JSON string", - FiltersListenerRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersListenerRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersListenerRule` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ListenerRuleNames") != null - && !jsonObj.get("ListenerRuleNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRuleNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ListenerRuleNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersListenerRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersListenerRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersListenerRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersListenerRule value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersListenerRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersListenerRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersListenerRule - * @throws IOException if the JSON string is invalid with respect to FiltersListenerRule - */ - public static FiltersListenerRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersListenerRule.class); - } - - /** - * Convert an instance of FiltersListenerRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancer.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancer.java deleted file mode 100644 index aca18b63..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancer.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersLoadBalancer { - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAMES = "LoadBalancerNames"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAMES) - private List loadBalancerNames = null; - - public FiltersLoadBalancer() {} - - public FiltersLoadBalancer loadBalancerNames(List loadBalancerNames) { - - this.loadBalancerNames = loadBalancerNames; - return this; - } - - public FiltersLoadBalancer addLoadBalancerNamesItem(String loadBalancerNamesItem) { - if (this.loadBalancerNames == null) { - this.loadBalancerNames = new ArrayList<>(); - } - this.loadBalancerNames.add(loadBalancerNamesItem); - return this; - } - - /** - * The names of the load balancers. - * - * @return loadBalancerNames - */ - @javax.annotation.Nullable - public List getLoadBalancerNames() { - return loadBalancerNames; - } - - public void setLoadBalancerNames(List loadBalancerNames) { - this.loadBalancerNames = loadBalancerNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersLoadBalancer filtersLoadBalancer = (FiltersLoadBalancer) o; - return Objects.equals(this.loadBalancerNames, filtersLoadBalancer.loadBalancerNames); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancerNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersLoadBalancer {\n"); - sb.append(" loadBalancerNames: ") - .append(toIndentedString(loadBalancerNames)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancerNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersLoadBalancer - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersLoadBalancer.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersLoadBalancer is not found in" - + " the empty JSON string", - FiltersLoadBalancer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersLoadBalancer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersLoadBalancer` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("LoadBalancerNames") != null - && !jsonObj.get("LoadBalancerNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancerNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersLoadBalancer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersLoadBalancer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersLoadBalancer.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersLoadBalancer value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersLoadBalancer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersLoadBalancer given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersLoadBalancer - * @throws IOException if the JSON string is invalid with respect to FiltersLoadBalancer - */ - public static FiltersLoadBalancer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersLoadBalancer.class); - } - - /** - * Convert an instance of FiltersLoadBalancer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatService.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatService.java deleted file mode 100644 index bb0dcc74..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatService.java +++ /dev/null @@ -1,520 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersNatService { - public static final String SERIALIZED_NAME_CLIENT_TOKENS = "ClientTokens"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKENS) - private List clientTokens = null; - - public static final String SERIALIZED_NAME_NAT_SERVICE_IDS = "NatServiceIds"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_IDS) - private List natServiceIds = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_SUBNET_IDS = "SubnetIds"; - - @SerializedName(SERIALIZED_NAME_SUBNET_IDS) - private List subnetIds = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersNatService() {} - - public FiltersNatService clientTokens(List clientTokens) { - - this.clientTokens = clientTokens; - return this; - } - - public FiltersNatService addClientTokensItem(String clientTokensItem) { - if (this.clientTokens == null) { - this.clientTokens = new ArrayList<>(); - } - this.clientTokens.add(clientTokensItem); - return this; - } - - /** - * The idempotency tokens provided when creating the NAT services. - * - * @return clientTokens - */ - @javax.annotation.Nullable - public List getClientTokens() { - return clientTokens; - } - - public void setClientTokens(List clientTokens) { - this.clientTokens = clientTokens; - } - - public FiltersNatService natServiceIds(List natServiceIds) { - - this.natServiceIds = natServiceIds; - return this; - } - - public FiltersNatService addNatServiceIdsItem(String natServiceIdsItem) { - if (this.natServiceIds == null) { - this.natServiceIds = new ArrayList<>(); - } - this.natServiceIds.add(natServiceIdsItem); - return this; - } - - /** - * The IDs of the NAT services. - * - * @return natServiceIds - */ - @javax.annotation.Nullable - public List getNatServiceIds() { - return natServiceIds; - } - - public void setNatServiceIds(List natServiceIds) { - this.natServiceIds = natServiceIds; - } - - public FiltersNatService netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersNatService addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets in which the NAT services are. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersNatService states(List states) { - - this.states = states; - return this; - } - - public FiltersNatService addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the NAT services (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersNatService subnetIds(List subnetIds) { - - this.subnetIds = subnetIds; - return this; - } - - public FiltersNatService addSubnetIdsItem(String subnetIdsItem) { - if (this.subnetIds == null) { - this.subnetIds = new ArrayList<>(); - } - this.subnetIds.add(subnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets in which the NAT services are. - * - * @return subnetIds - */ - @javax.annotation.Nullable - public List getSubnetIds() { - return subnetIds; - } - - public void setSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - } - - public FiltersNatService tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersNatService addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the NAT services. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersNatService tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersNatService addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the NAT services. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersNatService tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersNatService addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the NAT services, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersNatService filtersNatService = (FiltersNatService) o; - return Objects.equals(this.clientTokens, filtersNatService.clientTokens) - && Objects.equals(this.natServiceIds, filtersNatService.natServiceIds) - && Objects.equals(this.netIds, filtersNatService.netIds) - && Objects.equals(this.states, filtersNatService.states) - && Objects.equals(this.subnetIds, filtersNatService.subnetIds) - && Objects.equals(this.tagKeys, filtersNatService.tagKeys) - && Objects.equals(this.tagValues, filtersNatService.tagValues) - && Objects.equals(this.tags, filtersNatService.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - clientTokens, natServiceIds, netIds, states, subnetIds, tagKeys, tagValues, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersNatService {\n"); - sb.append(" clientTokens: ").append(toIndentedString(clientTokens)).append("\n"); - sb.append(" natServiceIds: ").append(toIndentedString(natServiceIds)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" subnetIds: ").append(toIndentedString(subnetIds)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientTokens"); - openapiFields.add("NatServiceIds"); - openapiFields.add("NetIds"); - openapiFields.add("States"); - openapiFields.add("SubnetIds"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersNatService - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersNatService.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersNatService is not found in the" - + " empty JSON string", - FiltersNatService.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersNatService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersNatService` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ClientTokens") != null && !jsonObj.get("ClientTokens").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientTokens` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ClientTokens").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NatServiceIds") != null && !jsonObj.get("NatServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("NatServiceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubnetIds") != null && !jsonObj.get("SubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("SubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersNatService.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersNatService' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersNatService.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersNatService value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersNatService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersNatService given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersNatService - * @throws IOException if the JSON string is invalid with respect to FiltersNatService - */ - public static FiltersNatService fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersNatService.class); - } - - /** - * Convert an instance of FiltersNatService to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNet.java deleted file mode 100644 index d3f52991..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNet.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersNet { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_IDS = "DhcpOptionsSetIds"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_IDS) - private List dhcpOptionsSetIds = null; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public static final String SERIALIZED_NAME_IS_DEFAULT = "IsDefault"; - - @SerializedName(SERIALIZED_NAME_IS_DEFAULT) - private Boolean isDefault; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersNet() {} - - public FiltersNet dhcpOptionsSetIds(List dhcpOptionsSetIds) { - - this.dhcpOptionsSetIds = dhcpOptionsSetIds; - return this; - } - - public FiltersNet addDhcpOptionsSetIdsItem(String dhcpOptionsSetIdsItem) { - if (this.dhcpOptionsSetIds == null) { - this.dhcpOptionsSetIds = new ArrayList<>(); - } - this.dhcpOptionsSetIds.add(dhcpOptionsSetIdsItem); - return this; - } - - /** - * The IDs of the DHCP options sets. - * - * @return dhcpOptionsSetIds - */ - @javax.annotation.Nullable - public List getDhcpOptionsSetIds() { - return dhcpOptionsSetIds; - } - - public void setDhcpOptionsSetIds(List dhcpOptionsSetIds) { - this.dhcpOptionsSetIds = dhcpOptionsSetIds; - } - - public FiltersNet ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public FiltersNet addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * The IP ranges for the Nets, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - public FiltersNet isDefault(Boolean isDefault) { - - this.isDefault = isDefault; - return this; - } - - /** - * If true, the Net used is the default one. - * - * @return isDefault - */ - @javax.annotation.Nullable - public Boolean getIsDefault() { - return isDefault; - } - - public void setIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - } - - public FiltersNet netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersNet addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersNet states(List states) { - - this.states = states; - return this; - } - - public FiltersNet addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the Nets (`pending` \\| `available` \\| - * `deleting`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersNet tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersNet addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the Nets. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersNet tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersNet addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the Nets. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersNet tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersNet addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the Nets, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersNet filtersNet = (FiltersNet) o; - return Objects.equals(this.dhcpOptionsSetIds, filtersNet.dhcpOptionsSetIds) - && Objects.equals(this.ipRanges, filtersNet.ipRanges) - && Objects.equals(this.isDefault, filtersNet.isDefault) - && Objects.equals(this.netIds, filtersNet.netIds) - && Objects.equals(this.states, filtersNet.states) - && Objects.equals(this.tagKeys, filtersNet.tagKeys) - && Objects.equals(this.tagValues, filtersNet.tagValues) - && Objects.equals(this.tags, filtersNet.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - dhcpOptionsSetIds, ipRanges, isDefault, netIds, states, tagKeys, tagValues, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersNet {\n"); - sb.append(" dhcpOptionsSetIds: ") - .append(toIndentedString(dhcpOptionsSetIds)) - .append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSetIds"); - openapiFields.add("IpRanges"); - openapiFields.add("IsDefault"); - openapiFields.add("NetIds"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersNet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersNet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersNet is not found in the empty" - + " JSON string", - FiltersNet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersNet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersNet` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("DhcpOptionsSetIds") != null - && !jsonObj.get("DhcpOptionsSetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DhcpOptionsSetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersNet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersNet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersNet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersNet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersNet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersNet given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersNet - * @throws IOException if the JSON string is invalid with respect to FiltersNet - */ - public static FiltersNet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersNet.class); - } - - /** - * Convert an instance of FiltersNet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPoint.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPoint.java deleted file mode 100644 index 919c4583..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPoint.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersNetAccessPoint { - public static final String SERIALIZED_NAME_NET_ACCESS_POINT_IDS = "NetAccessPointIds"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT_IDS) - private List netAccessPointIds = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_SERVICE_NAMES = "ServiceNames"; - - @SerializedName(SERIALIZED_NAME_SERVICE_NAMES) - private List serviceNames = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersNetAccessPoint() {} - - public FiltersNetAccessPoint netAccessPointIds(List netAccessPointIds) { - - this.netAccessPointIds = netAccessPointIds; - return this; - } - - public FiltersNetAccessPoint addNetAccessPointIdsItem(String netAccessPointIdsItem) { - if (this.netAccessPointIds == null) { - this.netAccessPointIds = new ArrayList<>(); - } - this.netAccessPointIds.add(netAccessPointIdsItem); - return this; - } - - /** - * The IDs of the Net access points. - * - * @return netAccessPointIds - */ - @javax.annotation.Nullable - public List getNetAccessPointIds() { - return netAccessPointIds; - } - - public void setNetAccessPointIds(List netAccessPointIds) { - this.netAccessPointIds = netAccessPointIds; - } - - public FiltersNetAccessPoint netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersNetAccessPoint addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersNetAccessPoint serviceNames(List serviceNames) { - - this.serviceNames = serviceNames; - return this; - } - - public FiltersNetAccessPoint addServiceNamesItem(String serviceNamesItem) { - if (this.serviceNames == null) { - this.serviceNames = new ArrayList<>(); - } - this.serviceNames.add(serviceNamesItem); - return this; - } - - /** - * The names of the services. For more information, see - * [ReadNetAccessPointServices](#readnetaccesspointservices). - * - * @return serviceNames - */ - @javax.annotation.Nullable - public List getServiceNames() { - return serviceNames; - } - - public void setServiceNames(List serviceNames) { - this.serviceNames = serviceNames; - } - - public FiltersNetAccessPoint states(List states) { - - this.states = states; - return this; - } - - public FiltersNetAccessPoint addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the Net access points (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersNetAccessPoint tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersNetAccessPoint addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the Net access points. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersNetAccessPoint tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersNetAccessPoint addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the Net access points. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersNetAccessPoint tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersNetAccessPoint addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the Net access points, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersNetAccessPoint filtersNetAccessPoint = (FiltersNetAccessPoint) o; - return Objects.equals(this.netAccessPointIds, filtersNetAccessPoint.netAccessPointIds) - && Objects.equals(this.netIds, filtersNetAccessPoint.netIds) - && Objects.equals(this.serviceNames, filtersNetAccessPoint.serviceNames) - && Objects.equals(this.states, filtersNetAccessPoint.states) - && Objects.equals(this.tagKeys, filtersNetAccessPoint.tagKeys) - && Objects.equals(this.tagValues, filtersNetAccessPoint.tagValues) - && Objects.equals(this.tags, filtersNetAccessPoint.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - netAccessPointIds, netIds, serviceNames, states, tagKeys, tagValues, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersNetAccessPoint {\n"); - sb.append(" netAccessPointIds: ") - .append(toIndentedString(netAccessPointIds)) - .append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" serviceNames: ").append(toIndentedString(serviceNames)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetAccessPointIds"); - openapiFields.add("NetIds"); - openapiFields.add("ServiceNames"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersNetAccessPoint - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersNetAccessPoint.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersNetAccessPoint is not found in" - + " the empty JSON string", - FiltersNetAccessPoint.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersNetAccessPoint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersNetAccessPoint` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetAccessPointIds") != null - && !jsonObj.get("NetAccessPointIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPointIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NetAccessPointIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ServiceNames") != null && !jsonObj.get("ServiceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ServiceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersNetAccessPoint.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersNetAccessPoint' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersNetAccessPoint.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersNetAccessPoint value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersNetAccessPoint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersNetAccessPoint given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersNetAccessPoint - * @throws IOException if the JSON string is invalid with respect to FiltersNetAccessPoint - */ - public static FiltersNetAccessPoint fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersNetAccessPoint.class); - } - - /** - * Convert an instance of FiltersNetAccessPoint to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeering.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeering.java deleted file mode 100644 index 328218d2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeering.java +++ /dev/null @@ -1,771 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersNetPeering { - public static final String SERIALIZED_NAME_ACCEPTER_NET_ACCOUNT_IDS = "AccepterNetAccountIds"; - - @SerializedName(SERIALIZED_NAME_ACCEPTER_NET_ACCOUNT_IDS) - private List accepterNetAccountIds = null; - - public static final String SERIALIZED_NAME_ACCEPTER_NET_IP_RANGES = "AccepterNetIpRanges"; - - @SerializedName(SERIALIZED_NAME_ACCEPTER_NET_IP_RANGES) - private List accepterNetIpRanges = null; - - public static final String SERIALIZED_NAME_ACCEPTER_NET_NET_IDS = "AccepterNetNetIds"; - - @SerializedName(SERIALIZED_NAME_ACCEPTER_NET_NET_IDS) - private List accepterNetNetIds = null; - - public static final String SERIALIZED_NAME_EXPIRATION_DATES = "ExpirationDates"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATES) - private List expirationDates = null; - - public static final String SERIALIZED_NAME_NET_PEERING_IDS = "NetPeeringIds"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_IDS) - private List netPeeringIds = null; - - public static final String SERIALIZED_NAME_SOURCE_NET_ACCOUNT_IDS = "SourceNetAccountIds"; - - @SerializedName(SERIALIZED_NAME_SOURCE_NET_ACCOUNT_IDS) - private List sourceNetAccountIds = null; - - public static final String SERIALIZED_NAME_SOURCE_NET_IP_RANGES = "SourceNetIpRanges"; - - @SerializedName(SERIALIZED_NAME_SOURCE_NET_IP_RANGES) - private List sourceNetIpRanges = null; - - public static final String SERIALIZED_NAME_SOURCE_NET_NET_IDS = "SourceNetNetIds"; - - @SerializedName(SERIALIZED_NAME_SOURCE_NET_NET_IDS) - private List sourceNetNetIds = null; - - public static final String SERIALIZED_NAME_STATE_MESSAGES = "StateMessages"; - - @SerializedName(SERIALIZED_NAME_STATE_MESSAGES) - private List stateMessages = null; - - public static final String SERIALIZED_NAME_STATE_NAMES = "StateNames"; - - @SerializedName(SERIALIZED_NAME_STATE_NAMES) - private List stateNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersNetPeering() {} - - public FiltersNetPeering accepterNetAccountIds(List accepterNetAccountIds) { - - this.accepterNetAccountIds = accepterNetAccountIds; - return this; - } - - public FiltersNetPeering addAccepterNetAccountIdsItem(String accepterNetAccountIdsItem) { - if (this.accepterNetAccountIds == null) { - this.accepterNetAccountIds = new ArrayList<>(); - } - this.accepterNetAccountIds.add(accepterNetAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the peer Nets. - * - * @return accepterNetAccountIds - */ - @javax.annotation.Nullable - public List getAccepterNetAccountIds() { - return accepterNetAccountIds; - } - - public void setAccepterNetAccountIds(List accepterNetAccountIds) { - this.accepterNetAccountIds = accepterNetAccountIds; - } - - public FiltersNetPeering accepterNetIpRanges(List accepterNetIpRanges) { - - this.accepterNetIpRanges = accepterNetIpRanges; - return this; - } - - public FiltersNetPeering addAccepterNetIpRangesItem(String accepterNetIpRangesItem) { - if (this.accepterNetIpRanges == null) { - this.accepterNetIpRanges = new ArrayList<>(); - } - this.accepterNetIpRanges.add(accepterNetIpRangesItem); - return this; - } - - /** - * The IP ranges of the peer Nets, in CIDR notation (for example, `10.0.0.0/24`). - * - * @return accepterNetIpRanges - */ - @javax.annotation.Nullable - public List getAccepterNetIpRanges() { - return accepterNetIpRanges; - } - - public void setAccepterNetIpRanges(List accepterNetIpRanges) { - this.accepterNetIpRanges = accepterNetIpRanges; - } - - public FiltersNetPeering accepterNetNetIds(List accepterNetNetIds) { - - this.accepterNetNetIds = accepterNetNetIds; - return this; - } - - public FiltersNetPeering addAccepterNetNetIdsItem(String accepterNetNetIdsItem) { - if (this.accepterNetNetIds == null) { - this.accepterNetNetIds = new ArrayList<>(); - } - this.accepterNetNetIds.add(accepterNetNetIdsItem); - return this; - } - - /** - * The IDs of the peer Nets. - * - * @return accepterNetNetIds - */ - @javax.annotation.Nullable - public List getAccepterNetNetIds() { - return accepterNetNetIds; - } - - public void setAccepterNetNetIds(List accepterNetNetIds) { - this.accepterNetNetIds = accepterNetNetIds; - } - - public FiltersNetPeering expirationDates(List expirationDates) { - - this.expirationDates = expirationDates; - return this; - } - - public FiltersNetPeering addExpirationDatesItem(OffsetDateTime expirationDatesItem) { - if (this.expirationDates == null) { - this.expirationDates = new ArrayList<>(); - } - this.expirationDates.add(expirationDatesItem); - return this; - } - - /** - * The dates and times at which the Net peerings expire, in ISO 8601 date-time format (for - * example, `2020-06-14T00:00:00.000Z`). - * - * @return expirationDates - */ - @javax.annotation.Nullable - public List getExpirationDates() { - return expirationDates; - } - - public void setExpirationDates(List expirationDates) { - this.expirationDates = expirationDates; - } - - public FiltersNetPeering netPeeringIds(List netPeeringIds) { - - this.netPeeringIds = netPeeringIds; - return this; - } - - public FiltersNetPeering addNetPeeringIdsItem(String netPeeringIdsItem) { - if (this.netPeeringIds == null) { - this.netPeeringIds = new ArrayList<>(); - } - this.netPeeringIds.add(netPeeringIdsItem); - return this; - } - - /** - * The IDs of the Net peerings. - * - * @return netPeeringIds - */ - @javax.annotation.Nullable - public List getNetPeeringIds() { - return netPeeringIds; - } - - public void setNetPeeringIds(List netPeeringIds) { - this.netPeeringIds = netPeeringIds; - } - - public FiltersNetPeering sourceNetAccountIds(List sourceNetAccountIds) { - - this.sourceNetAccountIds = sourceNetAccountIds; - return this; - } - - public FiltersNetPeering addSourceNetAccountIdsItem(String sourceNetAccountIdsItem) { - if (this.sourceNetAccountIds == null) { - this.sourceNetAccountIds = new ArrayList<>(); - } - this.sourceNetAccountIds.add(sourceNetAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the peer Nets. - * - * @return sourceNetAccountIds - */ - @javax.annotation.Nullable - public List getSourceNetAccountIds() { - return sourceNetAccountIds; - } - - public void setSourceNetAccountIds(List sourceNetAccountIds) { - this.sourceNetAccountIds = sourceNetAccountIds; - } - - public FiltersNetPeering sourceNetIpRanges(List sourceNetIpRanges) { - - this.sourceNetIpRanges = sourceNetIpRanges; - return this; - } - - public FiltersNetPeering addSourceNetIpRangesItem(String sourceNetIpRangesItem) { - if (this.sourceNetIpRanges == null) { - this.sourceNetIpRanges = new ArrayList<>(); - } - this.sourceNetIpRanges.add(sourceNetIpRangesItem); - return this; - } - - /** - * The IP ranges of the peer Nets. - * - * @return sourceNetIpRanges - */ - @javax.annotation.Nullable - public List getSourceNetIpRanges() { - return sourceNetIpRanges; - } - - public void setSourceNetIpRanges(List sourceNetIpRanges) { - this.sourceNetIpRanges = sourceNetIpRanges; - } - - public FiltersNetPeering sourceNetNetIds(List sourceNetNetIds) { - - this.sourceNetNetIds = sourceNetNetIds; - return this; - } - - public FiltersNetPeering addSourceNetNetIdsItem(String sourceNetNetIdsItem) { - if (this.sourceNetNetIds == null) { - this.sourceNetNetIds = new ArrayList<>(); - } - this.sourceNetNetIds.add(sourceNetNetIdsItem); - return this; - } - - /** - * The IDs of the peer Nets. - * - * @return sourceNetNetIds - */ - @javax.annotation.Nullable - public List getSourceNetNetIds() { - return sourceNetNetIds; - } - - public void setSourceNetNetIds(List sourceNetNetIds) { - this.sourceNetNetIds = sourceNetNetIds; - } - - public FiltersNetPeering stateMessages(List stateMessages) { - - this.stateMessages = stateMessages; - return this; - } - - public FiltersNetPeering addStateMessagesItem(String stateMessagesItem) { - if (this.stateMessages == null) { - this.stateMessages = new ArrayList<>(); - } - this.stateMessages.add(stateMessagesItem); - return this; - } - - /** - * Additional information about the states of the Net peerings. - * - * @return stateMessages - */ - @javax.annotation.Nullable - public List getStateMessages() { - return stateMessages; - } - - public void setStateMessages(List stateMessages) { - this.stateMessages = stateMessages; - } - - public FiltersNetPeering stateNames(List stateNames) { - - this.stateNames = stateNames; - return this; - } - - public FiltersNetPeering addStateNamesItem(String stateNamesItem) { - if (this.stateNames == null) { - this.stateNames = new ArrayList<>(); - } - this.stateNames.add(stateNamesItem); - return this; - } - - /** - * The states of the Net peerings (`pending-acceptance` \\| `active` \\| - * `rejected` \\| `failed` \\| `expired` \\| `deleted`). - * - * @return stateNames - */ - @javax.annotation.Nullable - public List getStateNames() { - return stateNames; - } - - public void setStateNames(List stateNames) { - this.stateNames = stateNames; - } - - public FiltersNetPeering tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersNetPeering addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the Net peerings. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersNetPeering tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersNetPeering addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the Net peerings. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersNetPeering tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersNetPeering addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the Net peerings, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersNetPeering filtersNetPeering = (FiltersNetPeering) o; - return Objects.equals(this.accepterNetAccountIds, filtersNetPeering.accepterNetAccountIds) - && Objects.equals(this.accepterNetIpRanges, filtersNetPeering.accepterNetIpRanges) - && Objects.equals(this.accepterNetNetIds, filtersNetPeering.accepterNetNetIds) - && Objects.equals(this.expirationDates, filtersNetPeering.expirationDates) - && Objects.equals(this.netPeeringIds, filtersNetPeering.netPeeringIds) - && Objects.equals(this.sourceNetAccountIds, filtersNetPeering.sourceNetAccountIds) - && Objects.equals(this.sourceNetIpRanges, filtersNetPeering.sourceNetIpRanges) - && Objects.equals(this.sourceNetNetIds, filtersNetPeering.sourceNetNetIds) - && Objects.equals(this.stateMessages, filtersNetPeering.stateMessages) - && Objects.equals(this.stateNames, filtersNetPeering.stateNames) - && Objects.equals(this.tagKeys, filtersNetPeering.tagKeys) - && Objects.equals(this.tagValues, filtersNetPeering.tagValues) - && Objects.equals(this.tags, filtersNetPeering.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - accepterNetAccountIds, - accepterNetIpRanges, - accepterNetNetIds, - expirationDates, - netPeeringIds, - sourceNetAccountIds, - sourceNetIpRanges, - sourceNetNetIds, - stateMessages, - stateNames, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersNetPeering {\n"); - sb.append(" accepterNetAccountIds: ") - .append(toIndentedString(accepterNetAccountIds)) - .append("\n"); - sb.append(" accepterNetIpRanges: ") - .append(toIndentedString(accepterNetIpRanges)) - .append("\n"); - sb.append(" accepterNetNetIds: ") - .append(toIndentedString(accepterNetNetIds)) - .append("\n"); - sb.append(" expirationDates: ").append(toIndentedString(expirationDates)).append("\n"); - sb.append(" netPeeringIds: ").append(toIndentedString(netPeeringIds)).append("\n"); - sb.append(" sourceNetAccountIds: ") - .append(toIndentedString(sourceNetAccountIds)) - .append("\n"); - sb.append(" sourceNetIpRanges: ") - .append(toIndentedString(sourceNetIpRanges)) - .append("\n"); - sb.append(" sourceNetNetIds: ").append(toIndentedString(sourceNetNetIds)).append("\n"); - sb.append(" stateMessages: ").append(toIndentedString(stateMessages)).append("\n"); - sb.append(" stateNames: ").append(toIndentedString(stateNames)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccepterNetAccountIds"); - openapiFields.add("AccepterNetIpRanges"); - openapiFields.add("AccepterNetNetIds"); - openapiFields.add("ExpirationDates"); - openapiFields.add("NetPeeringIds"); - openapiFields.add("SourceNetAccountIds"); - openapiFields.add("SourceNetIpRanges"); - openapiFields.add("SourceNetNetIds"); - openapiFields.add("StateMessages"); - openapiFields.add("StateNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersNetPeering - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersNetPeering.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersNetPeering is not found in the" - + " empty JSON string", - FiltersNetPeering.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersNetPeering.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersNetPeering` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccepterNetAccountIds") != null - && !jsonObj.get("AccepterNetAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccepterNetAccountIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AccepterNetAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccepterNetIpRanges") != null - && !jsonObj.get("AccepterNetIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccepterNetIpRanges` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AccepterNetIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccepterNetNetIds") != null - && !jsonObj.get("AccepterNetNetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccepterNetNetIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AccepterNetNetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ExpirationDates") != null - && !jsonObj.get("ExpirationDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ExpirationDates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ExpirationDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetPeeringIds") != null && !jsonObj.get("NetPeeringIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("NetPeeringIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SourceNetAccountIds") != null - && !jsonObj.get("SourceNetAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceNetAccountIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SourceNetAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SourceNetIpRanges") != null - && !jsonObj.get("SourceNetIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceNetIpRanges` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SourceNetIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SourceNetNetIds") != null - && !jsonObj.get("SourceNetNetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SourceNetNetIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SourceNetNetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("StateMessages") != null && !jsonObj.get("StateMessages").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateMessages` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("StateMessages").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("StateNames") != null && !jsonObj.get("StateNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateNames` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("StateNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersNetPeering.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersNetPeering' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersNetPeering.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersNetPeering value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersNetPeering read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersNetPeering given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersNetPeering - * @throws IOException if the JSON string is invalid with respect to FiltersNetPeering - */ - public static FiltersNetPeering fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersNetPeering.class); - } - - /** - * Convert an instance of FiltersNetPeering to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNic.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNic.java deleted file mode 100644 index 8dd94546..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersNic.java +++ /dev/null @@ -1,1483 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersNic { - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECK = "IsSourceDestCheck"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECK) - private Boolean isSourceDestCheck; - - public static final String SERIALIZED_NAME_LINK_NIC_DELETE_ON_VM_DELETION = - "LinkNicDeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_DELETE_ON_VM_DELETION) - private Boolean linkNicDeleteOnVmDeletion; - - public static final String SERIALIZED_NAME_LINK_NIC_DEVICE_NUMBERS = "LinkNicDeviceNumbers"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_DEVICE_NUMBERS) - private List linkNicDeviceNumbers = null; - - public static final String SERIALIZED_NAME_LINK_NIC_LINK_NIC_IDS = "LinkNicLinkNicIds"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_LINK_NIC_IDS) - private List linkNicLinkNicIds = null; - - public static final String SERIALIZED_NAME_LINK_NIC_STATES = "LinkNicStates"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_STATES) - private List linkNicStates = null; - - public static final String SERIALIZED_NAME_LINK_NIC_VM_ACCOUNT_IDS = "LinkNicVmAccountIds"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_VM_ACCOUNT_IDS) - private List linkNicVmAccountIds = null; - - public static final String SERIALIZED_NAME_LINK_NIC_VM_IDS = "LinkNicVmIds"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_VM_IDS) - private List linkNicVmIds = null; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_ACCOUNT_IDS = - "LinkPublicIpAccountIds"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_ACCOUNT_IDS) - private List linkPublicIpAccountIds = null; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_LINK_PUBLIC_IP_IDS = - "LinkPublicIpLinkPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_LINK_PUBLIC_IP_IDS) - private List linkPublicIpLinkPublicIpIds = null; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_DNS_NAMES = - "LinkPublicIpPublicDnsNames"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_DNS_NAMES) - private List linkPublicIpPublicDnsNames = null; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_IP_IDS = - "LinkPublicIpPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_IP_IDS) - private List linkPublicIpPublicIpIds = null; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_IPS = "LinkPublicIpPublicIps"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_PUBLIC_IPS) - private List linkPublicIpPublicIps = null; - - public static final String SERIALIZED_NAME_MAC_ADDRESSES = "MacAddresses"; - - @SerializedName(SERIALIZED_NAME_MAC_ADDRESSES) - private List macAddresses = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_NIC_IDS = "NicIds"; - - @SerializedName(SERIALIZED_NAME_NIC_IDS) - private List nicIds = null; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAMES = "PrivateDnsNames"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAMES) - private List privateDnsNames = null; - - public static final String SERIALIZED_NAME_PRIVATE_IPS_LINK_PUBLIC_IP_ACCOUNT_IDS = - "PrivateIpsLinkPublicIpAccountIds"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS_LINK_PUBLIC_IP_ACCOUNT_IDS) - private List privateIpsLinkPublicIpAccountIds = null; - - public static final String SERIALIZED_NAME_PRIVATE_IPS_LINK_PUBLIC_IP_PUBLIC_IPS = - "PrivateIpsLinkPublicIpPublicIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS_LINK_PUBLIC_IP_PUBLIC_IPS) - private List privateIpsLinkPublicIpPublicIps = null; - - public static final String SERIALIZED_NAME_PRIVATE_IPS_PRIMARY_IP = "PrivateIpsPrimaryIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS_PRIMARY_IP) - private Boolean privateIpsPrimaryIp; - - public static final String SERIALIZED_NAME_PRIVATE_IPS_PRIVATE_IPS = "PrivateIpsPrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS_PRIVATE_IPS) - private List privateIpsPrivateIps = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAMES = "SecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAMES) - private List securityGroupNames = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_SUBNET_IDS = "SubnetIds"; - - @SerializedName(SERIALIZED_NAME_SUBNET_IDS) - private List subnetIds = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersNic() {} - - public FiltersNic descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersNic addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the NICs. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersNic isSourceDestCheck(Boolean isSourceDestCheck) { - - this.isSourceDestCheck = isSourceDestCheck; - return this; - } - - /** - * Whether the source/destination checking is enabled (true) or disabled (false). - * - * @return isSourceDestCheck - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestCheck() { - return isSourceDestCheck; - } - - public void setIsSourceDestCheck(Boolean isSourceDestCheck) { - this.isSourceDestCheck = isSourceDestCheck; - } - - public FiltersNic linkNicDeleteOnVmDeletion(Boolean linkNicDeleteOnVmDeletion) { - - this.linkNicDeleteOnVmDeletion = linkNicDeleteOnVmDeletion; - return this; - } - - /** - * Whether the NICs are deleted when the VMs they are attached to are terminated. - * - * @return linkNicDeleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getLinkNicDeleteOnVmDeletion() { - return linkNicDeleteOnVmDeletion; - } - - public void setLinkNicDeleteOnVmDeletion(Boolean linkNicDeleteOnVmDeletion) { - this.linkNicDeleteOnVmDeletion = linkNicDeleteOnVmDeletion; - } - - public FiltersNic linkNicDeviceNumbers(List linkNicDeviceNumbers) { - - this.linkNicDeviceNumbers = linkNicDeviceNumbers; - return this; - } - - public FiltersNic addLinkNicDeviceNumbersItem(Integer linkNicDeviceNumbersItem) { - if (this.linkNicDeviceNumbers == null) { - this.linkNicDeviceNumbers = new ArrayList<>(); - } - this.linkNicDeviceNumbers.add(linkNicDeviceNumbersItem); - return this; - } - - /** - * The device numbers the NICs are attached to. - * - * @return linkNicDeviceNumbers - */ - @javax.annotation.Nullable - public List getLinkNicDeviceNumbers() { - return linkNicDeviceNumbers; - } - - public void setLinkNicDeviceNumbers(List linkNicDeviceNumbers) { - this.linkNicDeviceNumbers = linkNicDeviceNumbers; - } - - public FiltersNic linkNicLinkNicIds(List linkNicLinkNicIds) { - - this.linkNicLinkNicIds = linkNicLinkNicIds; - return this; - } - - public FiltersNic addLinkNicLinkNicIdsItem(String linkNicLinkNicIdsItem) { - if (this.linkNicLinkNicIds == null) { - this.linkNicLinkNicIds = new ArrayList<>(); - } - this.linkNicLinkNicIds.add(linkNicLinkNicIdsItem); - return this; - } - - /** - * The attachment IDs of the NICs. - * - * @return linkNicLinkNicIds - */ - @javax.annotation.Nullable - public List getLinkNicLinkNicIds() { - return linkNicLinkNicIds; - } - - public void setLinkNicLinkNicIds(List linkNicLinkNicIds) { - this.linkNicLinkNicIds = linkNicLinkNicIds; - } - - public FiltersNic linkNicStates(List linkNicStates) { - - this.linkNicStates = linkNicStates; - return this; - } - - public FiltersNic addLinkNicStatesItem(String linkNicStatesItem) { - if (this.linkNicStates == null) { - this.linkNicStates = new ArrayList<>(); - } - this.linkNicStates.add(linkNicStatesItem); - return this; - } - - /** - * The states of the attachments. - * - * @return linkNicStates - */ - @javax.annotation.Nullable - public List getLinkNicStates() { - return linkNicStates; - } - - public void setLinkNicStates(List linkNicStates) { - this.linkNicStates = linkNicStates; - } - - public FiltersNic linkNicVmAccountIds(List linkNicVmAccountIds) { - - this.linkNicVmAccountIds = linkNicVmAccountIds; - return this; - } - - public FiltersNic addLinkNicVmAccountIdsItem(String linkNicVmAccountIdsItem) { - if (this.linkNicVmAccountIds == null) { - this.linkNicVmAccountIds = new ArrayList<>(); - } - this.linkNicVmAccountIds.add(linkNicVmAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the VMs the NICs are attached to. - * - * @return linkNicVmAccountIds - */ - @javax.annotation.Nullable - public List getLinkNicVmAccountIds() { - return linkNicVmAccountIds; - } - - public void setLinkNicVmAccountIds(List linkNicVmAccountIds) { - this.linkNicVmAccountIds = linkNicVmAccountIds; - } - - public FiltersNic linkNicVmIds(List linkNicVmIds) { - - this.linkNicVmIds = linkNicVmIds; - return this; - } - - public FiltersNic addLinkNicVmIdsItem(String linkNicVmIdsItem) { - if (this.linkNicVmIds == null) { - this.linkNicVmIds = new ArrayList<>(); - } - this.linkNicVmIds.add(linkNicVmIdsItem); - return this; - } - - /** - * The IDs of the VMs the NICs are attached to. - * - * @return linkNicVmIds - */ - @javax.annotation.Nullable - public List getLinkNicVmIds() { - return linkNicVmIds; - } - - public void setLinkNicVmIds(List linkNicVmIds) { - this.linkNicVmIds = linkNicVmIds; - } - - public FiltersNic linkPublicIpAccountIds(List linkPublicIpAccountIds) { - - this.linkPublicIpAccountIds = linkPublicIpAccountIds; - return this; - } - - public FiltersNic addLinkPublicIpAccountIdsItem(String linkPublicIpAccountIdsItem) { - if (this.linkPublicIpAccountIds == null) { - this.linkPublicIpAccountIds = new ArrayList<>(); - } - this.linkPublicIpAccountIds.add(linkPublicIpAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the public IPs associated with the NICs. - * - * @return linkPublicIpAccountIds - */ - @javax.annotation.Nullable - public List getLinkPublicIpAccountIds() { - return linkPublicIpAccountIds; - } - - public void setLinkPublicIpAccountIds(List linkPublicIpAccountIds) { - this.linkPublicIpAccountIds = linkPublicIpAccountIds; - } - - public FiltersNic linkPublicIpLinkPublicIpIds(List linkPublicIpLinkPublicIpIds) { - - this.linkPublicIpLinkPublicIpIds = linkPublicIpLinkPublicIpIds; - return this; - } - - public FiltersNic addLinkPublicIpLinkPublicIpIdsItem(String linkPublicIpLinkPublicIpIdsItem) { - if (this.linkPublicIpLinkPublicIpIds == null) { - this.linkPublicIpLinkPublicIpIds = new ArrayList<>(); - } - this.linkPublicIpLinkPublicIpIds.add(linkPublicIpLinkPublicIpIdsItem); - return this; - } - - /** - * The association IDs returned when the public IPs were associated with the NICs. - * - * @return linkPublicIpLinkPublicIpIds - */ - @javax.annotation.Nullable - public List getLinkPublicIpLinkPublicIpIds() { - return linkPublicIpLinkPublicIpIds; - } - - public void setLinkPublicIpLinkPublicIpIds(List linkPublicIpLinkPublicIpIds) { - this.linkPublicIpLinkPublicIpIds = linkPublicIpLinkPublicIpIds; - } - - public FiltersNic linkPublicIpPublicDnsNames(List linkPublicIpPublicDnsNames) { - - this.linkPublicIpPublicDnsNames = linkPublicIpPublicDnsNames; - return this; - } - - public FiltersNic addLinkPublicIpPublicDnsNamesItem(String linkPublicIpPublicDnsNamesItem) { - if (this.linkPublicIpPublicDnsNames == null) { - this.linkPublicIpPublicDnsNames = new ArrayList<>(); - } - this.linkPublicIpPublicDnsNames.add(linkPublicIpPublicDnsNamesItem); - return this; - } - - /** - * The public DNS names associated with the public IPs. - * - * @return linkPublicIpPublicDnsNames - */ - @javax.annotation.Nullable - public List getLinkPublicIpPublicDnsNames() { - return linkPublicIpPublicDnsNames; - } - - public void setLinkPublicIpPublicDnsNames(List linkPublicIpPublicDnsNames) { - this.linkPublicIpPublicDnsNames = linkPublicIpPublicDnsNames; - } - - public FiltersNic linkPublicIpPublicIpIds(List linkPublicIpPublicIpIds) { - - this.linkPublicIpPublicIpIds = linkPublicIpPublicIpIds; - return this; - } - - public FiltersNic addLinkPublicIpPublicIpIdsItem(String linkPublicIpPublicIpIdsItem) { - if (this.linkPublicIpPublicIpIds == null) { - this.linkPublicIpPublicIpIds = new ArrayList<>(); - } - this.linkPublicIpPublicIpIds.add(linkPublicIpPublicIpIdsItem); - return this; - } - - /** - * The allocation IDs returned when the public IPs were allocated to their accounts. - * - * @return linkPublicIpPublicIpIds - */ - @javax.annotation.Nullable - public List getLinkPublicIpPublicIpIds() { - return linkPublicIpPublicIpIds; - } - - public void setLinkPublicIpPublicIpIds(List linkPublicIpPublicIpIds) { - this.linkPublicIpPublicIpIds = linkPublicIpPublicIpIds; - } - - public FiltersNic linkPublicIpPublicIps(List linkPublicIpPublicIps) { - - this.linkPublicIpPublicIps = linkPublicIpPublicIps; - return this; - } - - public FiltersNic addLinkPublicIpPublicIpsItem(String linkPublicIpPublicIpsItem) { - if (this.linkPublicIpPublicIps == null) { - this.linkPublicIpPublicIps = new ArrayList<>(); - } - this.linkPublicIpPublicIps.add(linkPublicIpPublicIpsItem); - return this; - } - - /** - * The public IPs associated with the NICs. - * - * @return linkPublicIpPublicIps - */ - @javax.annotation.Nullable - public List getLinkPublicIpPublicIps() { - return linkPublicIpPublicIps; - } - - public void setLinkPublicIpPublicIps(List linkPublicIpPublicIps) { - this.linkPublicIpPublicIps = linkPublicIpPublicIps; - } - - public FiltersNic macAddresses(List macAddresses) { - - this.macAddresses = macAddresses; - return this; - } - - public FiltersNic addMacAddressesItem(String macAddressesItem) { - if (this.macAddresses == null) { - this.macAddresses = new ArrayList<>(); - } - this.macAddresses.add(macAddressesItem); - return this; - } - - /** - * The Media Access Control (MAC) addresses of the NICs. - * - * @return macAddresses - */ - @javax.annotation.Nullable - public List getMacAddresses() { - return macAddresses; - } - - public void setMacAddresses(List macAddresses) { - this.macAddresses = macAddresses; - } - - public FiltersNic netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersNic addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets where the NICs are located. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersNic nicIds(List nicIds) { - - this.nicIds = nicIds; - return this; - } - - public FiltersNic addNicIdsItem(String nicIdsItem) { - if (this.nicIds == null) { - this.nicIds = new ArrayList<>(); - } - this.nicIds.add(nicIdsItem); - return this; - } - - /** - * The IDs of the NICs. - * - * @return nicIds - */ - @javax.annotation.Nullable - public List getNicIds() { - return nicIds; - } - - public void setNicIds(List nicIds) { - this.nicIds = nicIds; - } - - public FiltersNic privateDnsNames(List privateDnsNames) { - - this.privateDnsNames = privateDnsNames; - return this; - } - - public FiltersNic addPrivateDnsNamesItem(String privateDnsNamesItem) { - if (this.privateDnsNames == null) { - this.privateDnsNames = new ArrayList<>(); - } - this.privateDnsNames.add(privateDnsNamesItem); - return this; - } - - /** - * The private DNS names associated with the primary private IPs. - * - * @return privateDnsNames - */ - @javax.annotation.Nullable - public List getPrivateDnsNames() { - return privateDnsNames; - } - - public void setPrivateDnsNames(List privateDnsNames) { - this.privateDnsNames = privateDnsNames; - } - - public FiltersNic privateIpsLinkPublicIpAccountIds( - List privateIpsLinkPublicIpAccountIds) { - - this.privateIpsLinkPublicIpAccountIds = privateIpsLinkPublicIpAccountIds; - return this; - } - - public FiltersNic addPrivateIpsLinkPublicIpAccountIdsItem( - String privateIpsLinkPublicIpAccountIdsItem) { - if (this.privateIpsLinkPublicIpAccountIds == null) { - this.privateIpsLinkPublicIpAccountIds = new ArrayList<>(); - } - this.privateIpsLinkPublicIpAccountIds.add(privateIpsLinkPublicIpAccountIdsItem); - return this; - } - - /** - * The account IDs of the owner of the public IPs associated with the private IPs. - * - * @return privateIpsLinkPublicIpAccountIds - */ - @javax.annotation.Nullable - public List getPrivateIpsLinkPublicIpAccountIds() { - return privateIpsLinkPublicIpAccountIds; - } - - public void setPrivateIpsLinkPublicIpAccountIds(List privateIpsLinkPublicIpAccountIds) { - this.privateIpsLinkPublicIpAccountIds = privateIpsLinkPublicIpAccountIds; - } - - public FiltersNic privateIpsLinkPublicIpPublicIps( - List privateIpsLinkPublicIpPublicIps) { - - this.privateIpsLinkPublicIpPublicIps = privateIpsLinkPublicIpPublicIps; - return this; - } - - public FiltersNic addPrivateIpsLinkPublicIpPublicIpsItem( - String privateIpsLinkPublicIpPublicIpsItem) { - if (this.privateIpsLinkPublicIpPublicIps == null) { - this.privateIpsLinkPublicIpPublicIps = new ArrayList<>(); - } - this.privateIpsLinkPublicIpPublicIps.add(privateIpsLinkPublicIpPublicIpsItem); - return this; - } - - /** - * The public IPs associated with the private IPs. - * - * @return privateIpsLinkPublicIpPublicIps - */ - @javax.annotation.Nullable - public List getPrivateIpsLinkPublicIpPublicIps() { - return privateIpsLinkPublicIpPublicIps; - } - - public void setPrivateIpsLinkPublicIpPublicIps(List privateIpsLinkPublicIpPublicIps) { - this.privateIpsLinkPublicIpPublicIps = privateIpsLinkPublicIpPublicIps; - } - - public FiltersNic privateIpsPrimaryIp(Boolean privateIpsPrimaryIp) { - - this.privateIpsPrimaryIp = privateIpsPrimaryIp; - return this; - } - - /** - * Whether the private IP is the primary IP associated with the NIC. - * - * @return privateIpsPrimaryIp - */ - @javax.annotation.Nullable - public Boolean getPrivateIpsPrimaryIp() { - return privateIpsPrimaryIp; - } - - public void setPrivateIpsPrimaryIp(Boolean privateIpsPrimaryIp) { - this.privateIpsPrimaryIp = privateIpsPrimaryIp; - } - - public FiltersNic privateIpsPrivateIps(List privateIpsPrivateIps) { - - this.privateIpsPrivateIps = privateIpsPrivateIps; - return this; - } - - public FiltersNic addPrivateIpsPrivateIpsItem(String privateIpsPrivateIpsItem) { - if (this.privateIpsPrivateIps == null) { - this.privateIpsPrivateIps = new ArrayList<>(); - } - this.privateIpsPrivateIps.add(privateIpsPrivateIpsItem); - return this; - } - - /** - * The private IPs of the NICs. - * - * @return privateIpsPrivateIps - */ - @javax.annotation.Nullable - public List getPrivateIpsPrivateIps() { - return privateIpsPrivateIps; - } - - public void setPrivateIpsPrivateIps(List privateIpsPrivateIps) { - this.privateIpsPrivateIps = privateIpsPrivateIps; - } - - public FiltersNic securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public FiltersNic addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups associated with the NICs. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public FiltersNic securityGroupNames(List securityGroupNames) { - - this.securityGroupNames = securityGroupNames; - return this; - } - - public FiltersNic addSecurityGroupNamesItem(String securityGroupNamesItem) { - if (this.securityGroupNames == null) { - this.securityGroupNames = new ArrayList<>(); - } - this.securityGroupNames.add(securityGroupNamesItem); - return this; - } - - /** - * The names of the security groups associated with the NICs. - * - * @return securityGroupNames - */ - @javax.annotation.Nullable - public List getSecurityGroupNames() { - return securityGroupNames; - } - - public void setSecurityGroupNames(List securityGroupNames) { - this.securityGroupNames = securityGroupNames; - } - - public FiltersNic states(List states) { - - this.states = states; - return this; - } - - public FiltersNic addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the NICs. - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersNic subnetIds(List subnetIds) { - - this.subnetIds = subnetIds; - return this; - } - - public FiltersNic addSubnetIdsItem(String subnetIdsItem) { - if (this.subnetIds == null) { - this.subnetIds = new ArrayList<>(); - } - this.subnetIds.add(subnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets for the NICs. - * - * @return subnetIds - */ - @javax.annotation.Nullable - public List getSubnetIds() { - return subnetIds; - } - - public void setSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - } - - public FiltersNic subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersNic addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The Subregions where the NICs are located. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersNic tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersNic addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the NICs. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersNic tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersNic addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the NICs. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersNic tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersNic addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the NICs, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersNic filtersNic = (FiltersNic) o; - return Objects.equals(this.descriptions, filtersNic.descriptions) - && Objects.equals(this.isSourceDestCheck, filtersNic.isSourceDestCheck) - && Objects.equals( - this.linkNicDeleteOnVmDeletion, filtersNic.linkNicDeleteOnVmDeletion) - && Objects.equals(this.linkNicDeviceNumbers, filtersNic.linkNicDeviceNumbers) - && Objects.equals(this.linkNicLinkNicIds, filtersNic.linkNicLinkNicIds) - && Objects.equals(this.linkNicStates, filtersNic.linkNicStates) - && Objects.equals(this.linkNicVmAccountIds, filtersNic.linkNicVmAccountIds) - && Objects.equals(this.linkNicVmIds, filtersNic.linkNicVmIds) - && Objects.equals(this.linkPublicIpAccountIds, filtersNic.linkPublicIpAccountIds) - && Objects.equals( - this.linkPublicIpLinkPublicIpIds, filtersNic.linkPublicIpLinkPublicIpIds) - && Objects.equals( - this.linkPublicIpPublicDnsNames, filtersNic.linkPublicIpPublicDnsNames) - && Objects.equals(this.linkPublicIpPublicIpIds, filtersNic.linkPublicIpPublicIpIds) - && Objects.equals(this.linkPublicIpPublicIps, filtersNic.linkPublicIpPublicIps) - && Objects.equals(this.macAddresses, filtersNic.macAddresses) - && Objects.equals(this.netIds, filtersNic.netIds) - && Objects.equals(this.nicIds, filtersNic.nicIds) - && Objects.equals(this.privateDnsNames, filtersNic.privateDnsNames) - && Objects.equals( - this.privateIpsLinkPublicIpAccountIds, - filtersNic.privateIpsLinkPublicIpAccountIds) - && Objects.equals( - this.privateIpsLinkPublicIpPublicIps, - filtersNic.privateIpsLinkPublicIpPublicIps) - && Objects.equals(this.privateIpsPrimaryIp, filtersNic.privateIpsPrimaryIp) - && Objects.equals(this.privateIpsPrivateIps, filtersNic.privateIpsPrivateIps) - && Objects.equals(this.securityGroupIds, filtersNic.securityGroupIds) - && Objects.equals(this.securityGroupNames, filtersNic.securityGroupNames) - && Objects.equals(this.states, filtersNic.states) - && Objects.equals(this.subnetIds, filtersNic.subnetIds) - && Objects.equals(this.subregionNames, filtersNic.subregionNames) - && Objects.equals(this.tagKeys, filtersNic.tagKeys) - && Objects.equals(this.tagValues, filtersNic.tagValues) - && Objects.equals(this.tags, filtersNic.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - descriptions, - isSourceDestCheck, - linkNicDeleteOnVmDeletion, - linkNicDeviceNumbers, - linkNicLinkNicIds, - linkNicStates, - linkNicVmAccountIds, - linkNicVmIds, - linkPublicIpAccountIds, - linkPublicIpLinkPublicIpIds, - linkPublicIpPublicDnsNames, - linkPublicIpPublicIpIds, - linkPublicIpPublicIps, - macAddresses, - netIds, - nicIds, - privateDnsNames, - privateIpsLinkPublicIpAccountIds, - privateIpsLinkPublicIpPublicIps, - privateIpsPrimaryIp, - privateIpsPrivateIps, - securityGroupIds, - securityGroupNames, - states, - subnetIds, - subregionNames, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersNic {\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" isSourceDestCheck: ") - .append(toIndentedString(isSourceDestCheck)) - .append("\n"); - sb.append(" linkNicDeleteOnVmDeletion: ") - .append(toIndentedString(linkNicDeleteOnVmDeletion)) - .append("\n"); - sb.append(" linkNicDeviceNumbers: ") - .append(toIndentedString(linkNicDeviceNumbers)) - .append("\n"); - sb.append(" linkNicLinkNicIds: ") - .append(toIndentedString(linkNicLinkNicIds)) - .append("\n"); - sb.append(" linkNicStates: ").append(toIndentedString(linkNicStates)).append("\n"); - sb.append(" linkNicVmAccountIds: ") - .append(toIndentedString(linkNicVmAccountIds)) - .append("\n"); - sb.append(" linkNicVmIds: ").append(toIndentedString(linkNicVmIds)).append("\n"); - sb.append(" linkPublicIpAccountIds: ") - .append(toIndentedString(linkPublicIpAccountIds)) - .append("\n"); - sb.append(" linkPublicIpLinkPublicIpIds: ") - .append(toIndentedString(linkPublicIpLinkPublicIpIds)) - .append("\n"); - sb.append(" linkPublicIpPublicDnsNames: ") - .append(toIndentedString(linkPublicIpPublicDnsNames)) - .append("\n"); - sb.append(" linkPublicIpPublicIpIds: ") - .append(toIndentedString(linkPublicIpPublicIpIds)) - .append("\n"); - sb.append(" linkPublicIpPublicIps: ") - .append(toIndentedString(linkPublicIpPublicIps)) - .append("\n"); - sb.append(" macAddresses: ").append(toIndentedString(macAddresses)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" nicIds: ").append(toIndentedString(nicIds)).append("\n"); - sb.append(" privateDnsNames: ").append(toIndentedString(privateDnsNames)).append("\n"); - sb.append(" privateIpsLinkPublicIpAccountIds: ") - .append(toIndentedString(privateIpsLinkPublicIpAccountIds)) - .append("\n"); - sb.append(" privateIpsLinkPublicIpPublicIps: ") - .append(toIndentedString(privateIpsLinkPublicIpPublicIps)) - .append("\n"); - sb.append(" privateIpsPrimaryIp: ") - .append(toIndentedString(privateIpsPrimaryIp)) - .append("\n"); - sb.append(" privateIpsPrivateIps: ") - .append(toIndentedString(privateIpsPrivateIps)) - .append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" securityGroupNames: ") - .append(toIndentedString(securityGroupNames)) - .append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" subnetIds: ").append(toIndentedString(subnetIds)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Descriptions"); - openapiFields.add("IsSourceDestCheck"); - openapiFields.add("LinkNicDeleteOnVmDeletion"); - openapiFields.add("LinkNicDeviceNumbers"); - openapiFields.add("LinkNicLinkNicIds"); - openapiFields.add("LinkNicStates"); - openapiFields.add("LinkNicVmAccountIds"); - openapiFields.add("LinkNicVmIds"); - openapiFields.add("LinkPublicIpAccountIds"); - openapiFields.add("LinkPublicIpLinkPublicIpIds"); - openapiFields.add("LinkPublicIpPublicDnsNames"); - openapiFields.add("LinkPublicIpPublicIpIds"); - openapiFields.add("LinkPublicIpPublicIps"); - openapiFields.add("MacAddresses"); - openapiFields.add("NetIds"); - openapiFields.add("NicIds"); - openapiFields.add("PrivateDnsNames"); - openapiFields.add("PrivateIpsLinkPublicIpAccountIds"); - openapiFields.add("PrivateIpsLinkPublicIpPublicIps"); - openapiFields.add("PrivateIpsPrimaryIp"); - openapiFields.add("PrivateIpsPrivateIps"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SecurityGroupNames"); - openapiFields.add("States"); - openapiFields.add("SubnetIds"); - openapiFields.add("SubregionNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersNic - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersNic.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersNic is not found in the empty" - + " JSON string", - FiltersNic.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersNic.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersNic` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNicDeviceNumbers") != null - && !jsonObj.get("LinkNicDeviceNumbers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicDeviceNumbers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicDeviceNumbers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNicLinkNicIds") != null - && !jsonObj.get("LinkNicLinkNicIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicLinkNicIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicLinkNicIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNicStates") != null && !jsonObj.get("LinkNicStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicStates` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("LinkNicStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNicVmAccountIds") != null - && !jsonObj.get("LinkNicVmAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicVmAccountIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicVmAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNicVmIds") != null && !jsonObj.get("LinkNicVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("LinkNicVmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpAccountIds") != null - && !jsonObj.get("LinkPublicIpAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpAccountIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpLinkPublicIpIds") != null - && !jsonObj.get("LinkPublicIpLinkPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpLinkPublicIpIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("LinkPublicIpLinkPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpPublicDnsNames") != null - && !jsonObj.get("LinkPublicIpPublicDnsNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpPublicDnsNames` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpPublicDnsNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpPublicIpIds") != null - && !jsonObj.get("LinkPublicIpPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpPublicIpIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpPublicIps") != null - && !jsonObj.get("LinkPublicIpPublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpPublicIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkPublicIpPublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("MacAddresses") != null && !jsonObj.get("MacAddresses").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MacAddresses` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("MacAddresses").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicIds") != null && !jsonObj.get("NicIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NicIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateDnsNames") != null - && !jsonObj.get("PrivateDnsNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateDnsNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIpsLinkPublicIpAccountIds") != null - && !jsonObj.get("PrivateIpsLinkPublicIpAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIpsLinkPublicIpAccountIds` to be an array" - + " in the JSON string but got `%s`", - jsonObj.get("PrivateIpsLinkPublicIpAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIpsLinkPublicIpPublicIps") != null - && !jsonObj.get("PrivateIpsLinkPublicIpPublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIpsLinkPublicIpPublicIps` to be an array" - + " in the JSON string but got `%s`", - jsonObj.get("PrivateIpsLinkPublicIpPublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIpsPrivateIps") != null - && !jsonObj.get("PrivateIpsPrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIpsPrivateIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIpsPrivateIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupNames") != null - && !jsonObj.get("SecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubnetIds") != null && !jsonObj.get("SubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("SubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersNic.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersNic' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersNic.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersNic value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersNic read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersNic given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersNic - * @throws IOException if the JSON string is invalid with respect to FiltersNic - */ - public static FiltersNic fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersNic.class); - } - - /** - * Convert an instance of FiltersNic to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductType.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductType.java deleted file mode 100644 index 7bfe34fc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductType.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersProductType { - public static final String SERIALIZED_NAME_PRODUCT_TYPE_IDS = "ProductTypeIds"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE_IDS) - private List productTypeIds = null; - - public FiltersProductType() {} - - public FiltersProductType productTypeIds(List productTypeIds) { - - this.productTypeIds = productTypeIds; - return this; - } - - public FiltersProductType addProductTypeIdsItem(String productTypeIdsItem) { - if (this.productTypeIds == null) { - this.productTypeIds = new ArrayList<>(); - } - this.productTypeIds.add(productTypeIdsItem); - return this; - } - - /** - * The IDs of the product types. - * - * @return productTypeIds - */ - @javax.annotation.Nullable - public List getProductTypeIds() { - return productTypeIds; - } - - public void setProductTypeIds(List productTypeIds) { - this.productTypeIds = productTypeIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersProductType filtersProductType = (FiltersProductType) o; - return Objects.equals(this.productTypeIds, filtersProductType.productTypeIds); - } - - @Override - public int hashCode() { - return Objects.hash(productTypeIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersProductType {\n"); - sb.append(" productTypeIds: ").append(toIndentedString(productTypeIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ProductTypeIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersProductType - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersProductType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersProductType is not found in" - + " the empty JSON string", - FiltersProductType.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersProductType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersProductType` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductTypeIds") != null && !jsonObj.get("ProductTypeIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductTypeIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductTypeIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersProductType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersProductType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersProductType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersProductType value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersProductType read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersProductType given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersProductType - * @throws IOException if the JSON string is invalid with respect to FiltersProductType - */ - public static FiltersProductType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersProductType.class); - } - - /** - * Convert an instance of FiltersProductType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIp.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIp.java deleted file mode 100644 index 183f781f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIp.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersPublicIp { - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_IDS = "LinkPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_IDS) - private List linkPublicIpIds = null; - - public static final String SERIALIZED_NAME_NIC_ACCOUNT_IDS = "NicAccountIds"; - - @SerializedName(SERIALIZED_NAME_NIC_ACCOUNT_IDS) - private List nicAccountIds = null; - - public static final String SERIALIZED_NAME_NIC_IDS = "NicIds"; - - @SerializedName(SERIALIZED_NAME_NIC_IDS) - private List nicIds = null; - - public static final String SERIALIZED_NAME_PLACEMENTS = "Placements"; - - @SerializedName(SERIALIZED_NAME_PLACEMENTS) - private List placements = null; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_PUBLIC_IP_IDS = "PublicIpIds"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_IDS) - private List publicIpIds = null; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public FiltersPublicIp() {} - - public FiltersPublicIp linkPublicIpIds(List linkPublicIpIds) { - - this.linkPublicIpIds = linkPublicIpIds; - return this; - } - - public FiltersPublicIp addLinkPublicIpIdsItem(String linkPublicIpIdsItem) { - if (this.linkPublicIpIds == null) { - this.linkPublicIpIds = new ArrayList<>(); - } - this.linkPublicIpIds.add(linkPublicIpIdsItem); - return this; - } - - /** - * The IDs representing the associations of public IPs with VMs or NICs. - * - * @return linkPublicIpIds - */ - @javax.annotation.Nullable - public List getLinkPublicIpIds() { - return linkPublicIpIds; - } - - public void setLinkPublicIpIds(List linkPublicIpIds) { - this.linkPublicIpIds = linkPublicIpIds; - } - - public FiltersPublicIp nicAccountIds(List nicAccountIds) { - - this.nicAccountIds = nicAccountIds; - return this; - } - - public FiltersPublicIp addNicAccountIdsItem(String nicAccountIdsItem) { - if (this.nicAccountIds == null) { - this.nicAccountIds = new ArrayList<>(); - } - this.nicAccountIds.add(nicAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the NICs. - * - * @return nicAccountIds - */ - @javax.annotation.Nullable - public List getNicAccountIds() { - return nicAccountIds; - } - - public void setNicAccountIds(List nicAccountIds) { - this.nicAccountIds = nicAccountIds; - } - - public FiltersPublicIp nicIds(List nicIds) { - - this.nicIds = nicIds; - return this; - } - - public FiltersPublicIp addNicIdsItem(String nicIdsItem) { - if (this.nicIds == null) { - this.nicIds = new ArrayList<>(); - } - this.nicIds.add(nicIdsItem); - return this; - } - - /** - * The IDs of the NICs. - * - * @return nicIds - */ - @javax.annotation.Nullable - public List getNicIds() { - return nicIds; - } - - public void setNicIds(List nicIds) { - this.nicIds = nicIds; - } - - public FiltersPublicIp placements(List placements) { - - this.placements = placements; - return this; - } - - public FiltersPublicIp addPlacementsItem(String placementsItem) { - if (this.placements == null) { - this.placements = new ArrayList<>(); - } - this.placements.add(placementsItem); - return this; - } - - /** - * Whether the public IPs are for use in the public Cloud or in a Net. - * - * @return placements - */ - @javax.annotation.Nullable - public List getPlacements() { - return placements; - } - - public void setPlacements(List placements) { - this.placements = placements; - } - - public FiltersPublicIp privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public FiltersPublicIp addPrivateIpsItem(String privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The private IPs associated with the public IPs. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public FiltersPublicIp publicIpIds(List publicIpIds) { - - this.publicIpIds = publicIpIds; - return this; - } - - public FiltersPublicIp addPublicIpIdsItem(String publicIpIdsItem) { - if (this.publicIpIds == null) { - this.publicIpIds = new ArrayList<>(); - } - this.publicIpIds.add(publicIpIdsItem); - return this; - } - - /** - * The IDs of the public IPs. - * - * @return publicIpIds - */ - @javax.annotation.Nullable - public List getPublicIpIds() { - return publicIpIds; - } - - public void setPublicIpIds(List publicIpIds) { - this.publicIpIds = publicIpIds; - } - - public FiltersPublicIp publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public FiltersPublicIp addPublicIpsItem(String publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * The public IPs. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public FiltersPublicIp tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersPublicIp addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the public IPs. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersPublicIp tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersPublicIp addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the public IPs. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersPublicIp tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersPublicIp addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the public IPs, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersPublicIp vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public FiltersPublicIp addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * The IDs of the VMs. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersPublicIp filtersPublicIp = (FiltersPublicIp) o; - return Objects.equals(this.linkPublicIpIds, filtersPublicIp.linkPublicIpIds) - && Objects.equals(this.nicAccountIds, filtersPublicIp.nicAccountIds) - && Objects.equals(this.nicIds, filtersPublicIp.nicIds) - && Objects.equals(this.placements, filtersPublicIp.placements) - && Objects.equals(this.privateIps, filtersPublicIp.privateIps) - && Objects.equals(this.publicIpIds, filtersPublicIp.publicIpIds) - && Objects.equals(this.publicIps, filtersPublicIp.publicIps) - && Objects.equals(this.tagKeys, filtersPublicIp.tagKeys) - && Objects.equals(this.tagValues, filtersPublicIp.tagValues) - && Objects.equals(this.tags, filtersPublicIp.tags) - && Objects.equals(this.vmIds, filtersPublicIp.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash( - linkPublicIpIds, - nicAccountIds, - nicIds, - placements, - privateIps, - publicIpIds, - publicIps, - tagKeys, - tagValues, - tags, - vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersPublicIp {\n"); - sb.append(" linkPublicIpIds: ").append(toIndentedString(linkPublicIpIds)).append("\n"); - sb.append(" nicAccountIds: ").append(toIndentedString(nicAccountIds)).append("\n"); - sb.append(" nicIds: ").append(toIndentedString(nicIds)).append("\n"); - sb.append(" placements: ").append(toIndentedString(placements)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" publicIpIds: ").append(toIndentedString(publicIpIds)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkPublicIpIds"); - openapiFields.add("NicAccountIds"); - openapiFields.add("NicIds"); - openapiFields.add("Placements"); - openapiFields.add("PrivateIps"); - openapiFields.add("PublicIpIds"); - openapiFields.add("PublicIps"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersPublicIp - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersPublicIp.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersPublicIp is not found in the" - + " empty JSON string", - FiltersPublicIp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersPublicIp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersPublicIp` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkPublicIpIds") != null - && !jsonObj.get("LinkPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicAccountIds") != null && !jsonObj.get("NicAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicAccountIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("NicAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicIds") != null && !jsonObj.get("NicIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NicIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Placements") != null && !jsonObj.get("Placements").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Placements` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Placements").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PrivateIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PublicIpIds") != null && !jsonObj.get("PublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("PublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersPublicIp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersPublicIp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersPublicIp.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersPublicIp value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersPublicIp read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersPublicIp given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersPublicIp - * @throws IOException if the JSON string is invalid with respect to FiltersPublicIp - */ - public static FiltersPublicIp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersPublicIp.class); - } - - /** - * Convert an instance of FiltersPublicIp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuota.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuota.java deleted file mode 100644 index 0bc0f43c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuota.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersQuota { - public static final String SERIALIZED_NAME_COLLECTIONS = "Collections"; - - @SerializedName(SERIALIZED_NAME_COLLECTIONS) - private List collections = null; - - public static final String SERIALIZED_NAME_QUOTA_NAMES = "QuotaNames"; - - @SerializedName(SERIALIZED_NAME_QUOTA_NAMES) - private List quotaNames = null; - - public static final String SERIALIZED_NAME_QUOTA_TYPES = "QuotaTypes"; - - @SerializedName(SERIALIZED_NAME_QUOTA_TYPES) - private List quotaTypes = null; - - public static final String SERIALIZED_NAME_SHORT_DESCRIPTIONS = "ShortDescriptions"; - - @SerializedName(SERIALIZED_NAME_SHORT_DESCRIPTIONS) - private List shortDescriptions = null; - - public FiltersQuota() {} - - public FiltersQuota collections(List collections) { - - this.collections = collections; - return this; - } - - public FiltersQuota addCollectionsItem(String collectionsItem) { - if (this.collections == null) { - this.collections = new ArrayList<>(); - } - this.collections.add(collectionsItem); - return this; - } - - /** - * The group names of the quotas. - * - * @return collections - */ - @javax.annotation.Nullable - public List getCollections() { - return collections; - } - - public void setCollections(List collections) { - this.collections = collections; - } - - public FiltersQuota quotaNames(List quotaNames) { - - this.quotaNames = quotaNames; - return this; - } - - public FiltersQuota addQuotaNamesItem(String quotaNamesItem) { - if (this.quotaNames == null) { - this.quotaNames = new ArrayList<>(); - } - this.quotaNames.add(quotaNamesItem); - return this; - } - - /** - * The names of the quotas. - * - * @return quotaNames - */ - @javax.annotation.Nullable - public List getQuotaNames() { - return quotaNames; - } - - public void setQuotaNames(List quotaNames) { - this.quotaNames = quotaNames; - } - - public FiltersQuota quotaTypes(List quotaTypes) { - - this.quotaTypes = quotaTypes; - return this; - } - - public FiltersQuota addQuotaTypesItem(String quotaTypesItem) { - if (this.quotaTypes == null) { - this.quotaTypes = new ArrayList<>(); - } - this.quotaTypes.add(quotaTypesItem); - return this; - } - - /** - * The resource IDs if these are resource-specific quotas, `global` if they are not. - * - * @return quotaTypes - */ - @javax.annotation.Nullable - public List getQuotaTypes() { - return quotaTypes; - } - - public void setQuotaTypes(List quotaTypes) { - this.quotaTypes = quotaTypes; - } - - public FiltersQuota shortDescriptions(List shortDescriptions) { - - this.shortDescriptions = shortDescriptions; - return this; - } - - public FiltersQuota addShortDescriptionsItem(String shortDescriptionsItem) { - if (this.shortDescriptions == null) { - this.shortDescriptions = new ArrayList<>(); - } - this.shortDescriptions.add(shortDescriptionsItem); - return this; - } - - /** - * The description of the quotas. - * - * @return shortDescriptions - */ - @javax.annotation.Nullable - public List getShortDescriptions() { - return shortDescriptions; - } - - public void setShortDescriptions(List shortDescriptions) { - this.shortDescriptions = shortDescriptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersQuota filtersQuota = (FiltersQuota) o; - return Objects.equals(this.collections, filtersQuota.collections) - && Objects.equals(this.quotaNames, filtersQuota.quotaNames) - && Objects.equals(this.quotaTypes, filtersQuota.quotaTypes) - && Objects.equals(this.shortDescriptions, filtersQuota.shortDescriptions); - } - - @Override - public int hashCode() { - return Objects.hash(collections, quotaNames, quotaTypes, shortDescriptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersQuota {\n"); - sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); - sb.append(" quotaNames: ").append(toIndentedString(quotaNames)).append("\n"); - sb.append(" quotaTypes: ").append(toIndentedString(quotaTypes)).append("\n"); - sb.append(" shortDescriptions: ") - .append(toIndentedString(shortDescriptions)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Collections"); - openapiFields.add("QuotaNames"); - openapiFields.add("QuotaTypes"); - openapiFields.add("ShortDescriptions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersQuota - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersQuota.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersQuota is not found in the" - + " empty JSON string", - FiltersQuota.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersQuota.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersQuota` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Collections") != null && !jsonObj.get("Collections").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Collections` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Collections").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QuotaNames") != null && !jsonObj.get("QuotaNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QuotaNames` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("QuotaNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("QuotaTypes") != null && !jsonObj.get("QuotaTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QuotaTypes` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("QuotaTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ShortDescriptions") != null - && !jsonObj.get("ShortDescriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ShortDescriptions` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ShortDescriptions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersQuota.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersQuota' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersQuota.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersQuota value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersQuota read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersQuota given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersQuota - * @throws IOException if the JSON string is invalid with respect to FiltersQuota - */ - public static FiltersQuota fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersQuota.class); - } - - /** - * Convert an instance of FiltersQuota to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTable.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTable.java deleted file mode 100644 index da7cc0b4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTable.java +++ /dev/null @@ -1,950 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersRouteTable { - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_IDS = "LinkRouteTableIds"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_IDS) - private List linkRouteTableIds = null; - - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_LINK_ROUTE_TABLE_IDS = - "LinkRouteTableLinkRouteTableIds"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_LINK_ROUTE_TABLE_IDS) - private List linkRouteTableLinkRouteTableIds = null; - - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_MAIN = "LinkRouteTableMain"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_MAIN) - private Boolean linkRouteTableMain; - - public static final String SERIALIZED_NAME_LINK_SUBNET_IDS = "LinkSubnetIds"; - - @SerializedName(SERIALIZED_NAME_LINK_SUBNET_IDS) - private List linkSubnetIds = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_ROUTE_CREATION_METHODS = "RouteCreationMethods"; - - @SerializedName(SERIALIZED_NAME_ROUTE_CREATION_METHODS) - private List routeCreationMethods = null; - - public static final String SERIALIZED_NAME_ROUTE_DESTINATION_IP_RANGES = - "RouteDestinationIpRanges"; - - @SerializedName(SERIALIZED_NAME_ROUTE_DESTINATION_IP_RANGES) - private List routeDestinationIpRanges = null; - - public static final String SERIALIZED_NAME_ROUTE_DESTINATION_SERVICE_IDS = - "RouteDestinationServiceIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_DESTINATION_SERVICE_IDS) - private List routeDestinationServiceIds = null; - - public static final String SERIALIZED_NAME_ROUTE_GATEWAY_IDS = "RouteGatewayIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_GATEWAY_IDS) - private List routeGatewayIds = null; - - public static final String SERIALIZED_NAME_ROUTE_NAT_SERVICE_IDS = "RouteNatServiceIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_NAT_SERVICE_IDS) - private List routeNatServiceIds = null; - - public static final String SERIALIZED_NAME_ROUTE_NET_PEERING_IDS = "RouteNetPeeringIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_NET_PEERING_IDS) - private List routeNetPeeringIds = null; - - public static final String SERIALIZED_NAME_ROUTE_STATES = "RouteStates"; - - @SerializedName(SERIALIZED_NAME_ROUTE_STATES) - private List routeStates = null; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_IDS = "RouteTableIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_IDS) - private List routeTableIds = null; - - public static final String SERIALIZED_NAME_ROUTE_VM_IDS = "RouteVmIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_VM_IDS) - private List routeVmIds = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersRouteTable() {} - - public FiltersRouteTable linkRouteTableIds(List linkRouteTableIds) { - - this.linkRouteTableIds = linkRouteTableIds; - return this; - } - - public FiltersRouteTable addLinkRouteTableIdsItem(String linkRouteTableIdsItem) { - if (this.linkRouteTableIds == null) { - this.linkRouteTableIds = new ArrayList<>(); - } - this.linkRouteTableIds.add(linkRouteTableIdsItem); - return this; - } - - /** - * The IDs of the route tables involved in the associations. - * - * @return linkRouteTableIds - */ - @javax.annotation.Nullable - public List getLinkRouteTableIds() { - return linkRouteTableIds; - } - - public void setLinkRouteTableIds(List linkRouteTableIds) { - this.linkRouteTableIds = linkRouteTableIds; - } - - public FiltersRouteTable linkRouteTableLinkRouteTableIds( - List linkRouteTableLinkRouteTableIds) { - - this.linkRouteTableLinkRouteTableIds = linkRouteTableLinkRouteTableIds; - return this; - } - - public FiltersRouteTable addLinkRouteTableLinkRouteTableIdsItem( - String linkRouteTableLinkRouteTableIdsItem) { - if (this.linkRouteTableLinkRouteTableIds == null) { - this.linkRouteTableLinkRouteTableIds = new ArrayList<>(); - } - this.linkRouteTableLinkRouteTableIds.add(linkRouteTableLinkRouteTableIdsItem); - return this; - } - - /** - * The IDs of the associations between the route tables and the Subnets. - * - * @return linkRouteTableLinkRouteTableIds - */ - @javax.annotation.Nullable - public List getLinkRouteTableLinkRouteTableIds() { - return linkRouteTableLinkRouteTableIds; - } - - public void setLinkRouteTableLinkRouteTableIds(List linkRouteTableLinkRouteTableIds) { - this.linkRouteTableLinkRouteTableIds = linkRouteTableLinkRouteTableIds; - } - - public FiltersRouteTable linkRouteTableMain(Boolean linkRouteTableMain) { - - this.linkRouteTableMain = linkRouteTableMain; - return this; - } - - /** - * If true, the route tables are the main ones for their Nets. - * - * @return linkRouteTableMain - */ - @javax.annotation.Nullable - public Boolean getLinkRouteTableMain() { - return linkRouteTableMain; - } - - public void setLinkRouteTableMain(Boolean linkRouteTableMain) { - this.linkRouteTableMain = linkRouteTableMain; - } - - public FiltersRouteTable linkSubnetIds(List linkSubnetIds) { - - this.linkSubnetIds = linkSubnetIds; - return this; - } - - public FiltersRouteTable addLinkSubnetIdsItem(String linkSubnetIdsItem) { - if (this.linkSubnetIds == null) { - this.linkSubnetIds = new ArrayList<>(); - } - this.linkSubnetIds.add(linkSubnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets involved in the associations. - * - * @return linkSubnetIds - */ - @javax.annotation.Nullable - public List getLinkSubnetIds() { - return linkSubnetIds; - } - - public void setLinkSubnetIds(List linkSubnetIds) { - this.linkSubnetIds = linkSubnetIds; - } - - public FiltersRouteTable netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersRouteTable addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets for the route tables. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersRouteTable routeCreationMethods(List routeCreationMethods) { - - this.routeCreationMethods = routeCreationMethods; - return this; - } - - public FiltersRouteTable addRouteCreationMethodsItem(String routeCreationMethodsItem) { - if (this.routeCreationMethods == null) { - this.routeCreationMethods = new ArrayList<>(); - } - this.routeCreationMethods.add(routeCreationMethodsItem); - return this; - } - - /** - * The methods used to create a route. - * - * @return routeCreationMethods - */ - @javax.annotation.Nullable - public List getRouteCreationMethods() { - return routeCreationMethods; - } - - public void setRouteCreationMethods(List routeCreationMethods) { - this.routeCreationMethods = routeCreationMethods; - } - - public FiltersRouteTable routeDestinationIpRanges(List routeDestinationIpRanges) { - - this.routeDestinationIpRanges = routeDestinationIpRanges; - return this; - } - - public FiltersRouteTable addRouteDestinationIpRangesItem(String routeDestinationIpRangesItem) { - if (this.routeDestinationIpRanges == null) { - this.routeDestinationIpRanges = new ArrayList<>(); - } - this.routeDestinationIpRanges.add(routeDestinationIpRangesItem); - return this; - } - - /** - * The IP ranges specified in routes in the tables. - * - * @return routeDestinationIpRanges - */ - @javax.annotation.Nullable - public List getRouteDestinationIpRanges() { - return routeDestinationIpRanges; - } - - public void setRouteDestinationIpRanges(List routeDestinationIpRanges) { - this.routeDestinationIpRanges = routeDestinationIpRanges; - } - - public FiltersRouteTable routeDestinationServiceIds(List routeDestinationServiceIds) { - - this.routeDestinationServiceIds = routeDestinationServiceIds; - return this; - } - - public FiltersRouteTable addRouteDestinationServiceIdsItem( - String routeDestinationServiceIdsItem) { - if (this.routeDestinationServiceIds == null) { - this.routeDestinationServiceIds = new ArrayList<>(); - } - this.routeDestinationServiceIds.add(routeDestinationServiceIdsItem); - return this; - } - - /** - * The service IDs specified in routes in the tables. - * - * @return routeDestinationServiceIds - */ - @javax.annotation.Nullable - public List getRouteDestinationServiceIds() { - return routeDestinationServiceIds; - } - - public void setRouteDestinationServiceIds(List routeDestinationServiceIds) { - this.routeDestinationServiceIds = routeDestinationServiceIds; - } - - public FiltersRouteTable routeGatewayIds(List routeGatewayIds) { - - this.routeGatewayIds = routeGatewayIds; - return this; - } - - public FiltersRouteTable addRouteGatewayIdsItem(String routeGatewayIdsItem) { - if (this.routeGatewayIds == null) { - this.routeGatewayIds = new ArrayList<>(); - } - this.routeGatewayIds.add(routeGatewayIdsItem); - return this; - } - - /** - * The IDs of the gateways specified in routes in the tables. - * - * @return routeGatewayIds - */ - @javax.annotation.Nullable - public List getRouteGatewayIds() { - return routeGatewayIds; - } - - public void setRouteGatewayIds(List routeGatewayIds) { - this.routeGatewayIds = routeGatewayIds; - } - - public FiltersRouteTable routeNatServiceIds(List routeNatServiceIds) { - - this.routeNatServiceIds = routeNatServiceIds; - return this; - } - - public FiltersRouteTable addRouteNatServiceIdsItem(String routeNatServiceIdsItem) { - if (this.routeNatServiceIds == null) { - this.routeNatServiceIds = new ArrayList<>(); - } - this.routeNatServiceIds.add(routeNatServiceIdsItem); - return this; - } - - /** - * The IDs of the NAT services specified in routes in the tables. - * - * @return routeNatServiceIds - */ - @javax.annotation.Nullable - public List getRouteNatServiceIds() { - return routeNatServiceIds; - } - - public void setRouteNatServiceIds(List routeNatServiceIds) { - this.routeNatServiceIds = routeNatServiceIds; - } - - public FiltersRouteTable routeNetPeeringIds(List routeNetPeeringIds) { - - this.routeNetPeeringIds = routeNetPeeringIds; - return this; - } - - public FiltersRouteTable addRouteNetPeeringIdsItem(String routeNetPeeringIdsItem) { - if (this.routeNetPeeringIds == null) { - this.routeNetPeeringIds = new ArrayList<>(); - } - this.routeNetPeeringIds.add(routeNetPeeringIdsItem); - return this; - } - - /** - * The IDs of the Net peerings specified in routes in the tables. - * - * @return routeNetPeeringIds - */ - @javax.annotation.Nullable - public List getRouteNetPeeringIds() { - return routeNetPeeringIds; - } - - public void setRouteNetPeeringIds(List routeNetPeeringIds) { - this.routeNetPeeringIds = routeNetPeeringIds; - } - - public FiltersRouteTable routeStates(List routeStates) { - - this.routeStates = routeStates; - return this; - } - - public FiltersRouteTable addRouteStatesItem(String routeStatesItem) { - if (this.routeStates == null) { - this.routeStates = new ArrayList<>(); - } - this.routeStates.add(routeStatesItem); - return this; - } - - /** - * The states of routes in the route tables (always `active`). - * - * @return routeStates - */ - @javax.annotation.Nullable - public List getRouteStates() { - return routeStates; - } - - public void setRouteStates(List routeStates) { - this.routeStates = routeStates; - } - - public FiltersRouteTable routeTableIds(List routeTableIds) { - - this.routeTableIds = routeTableIds; - return this; - } - - public FiltersRouteTable addRouteTableIdsItem(String routeTableIdsItem) { - if (this.routeTableIds == null) { - this.routeTableIds = new ArrayList<>(); - } - this.routeTableIds.add(routeTableIdsItem); - return this; - } - - /** - * The IDs of the route tables. - * - * @return routeTableIds - */ - @javax.annotation.Nullable - public List getRouteTableIds() { - return routeTableIds; - } - - public void setRouteTableIds(List routeTableIds) { - this.routeTableIds = routeTableIds; - } - - public FiltersRouteTable routeVmIds(List routeVmIds) { - - this.routeVmIds = routeVmIds; - return this; - } - - public FiltersRouteTable addRouteVmIdsItem(String routeVmIdsItem) { - if (this.routeVmIds == null) { - this.routeVmIds = new ArrayList<>(); - } - this.routeVmIds.add(routeVmIdsItem); - return this; - } - - /** - * The IDs of the VMs specified in routes in the tables. - * - * @return routeVmIds - */ - @javax.annotation.Nullable - public List getRouteVmIds() { - return routeVmIds; - } - - public void setRouteVmIds(List routeVmIds) { - this.routeVmIds = routeVmIds; - } - - public FiltersRouteTable tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersRouteTable addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the route tables. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersRouteTable tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersRouteTable addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the route tables. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersRouteTable tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersRouteTable addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the route tables, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersRouteTable filtersRouteTable = (FiltersRouteTable) o; - return Objects.equals(this.linkRouteTableIds, filtersRouteTable.linkRouteTableIds) - && Objects.equals( - this.linkRouteTableLinkRouteTableIds, - filtersRouteTable.linkRouteTableLinkRouteTableIds) - && Objects.equals(this.linkRouteTableMain, filtersRouteTable.linkRouteTableMain) - && Objects.equals(this.linkSubnetIds, filtersRouteTable.linkSubnetIds) - && Objects.equals(this.netIds, filtersRouteTable.netIds) - && Objects.equals(this.routeCreationMethods, filtersRouteTable.routeCreationMethods) - && Objects.equals( - this.routeDestinationIpRanges, filtersRouteTable.routeDestinationIpRanges) - && Objects.equals( - this.routeDestinationServiceIds, - filtersRouteTable.routeDestinationServiceIds) - && Objects.equals(this.routeGatewayIds, filtersRouteTable.routeGatewayIds) - && Objects.equals(this.routeNatServiceIds, filtersRouteTable.routeNatServiceIds) - && Objects.equals(this.routeNetPeeringIds, filtersRouteTable.routeNetPeeringIds) - && Objects.equals(this.routeStates, filtersRouteTable.routeStates) - && Objects.equals(this.routeTableIds, filtersRouteTable.routeTableIds) - && Objects.equals(this.routeVmIds, filtersRouteTable.routeVmIds) - && Objects.equals(this.tagKeys, filtersRouteTable.tagKeys) - && Objects.equals(this.tagValues, filtersRouteTable.tagValues) - && Objects.equals(this.tags, filtersRouteTable.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - linkRouteTableIds, - linkRouteTableLinkRouteTableIds, - linkRouteTableMain, - linkSubnetIds, - netIds, - routeCreationMethods, - routeDestinationIpRanges, - routeDestinationServiceIds, - routeGatewayIds, - routeNatServiceIds, - routeNetPeeringIds, - routeStates, - routeTableIds, - routeVmIds, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersRouteTable {\n"); - sb.append(" linkRouteTableIds: ") - .append(toIndentedString(linkRouteTableIds)) - .append("\n"); - sb.append(" linkRouteTableLinkRouteTableIds: ") - .append(toIndentedString(linkRouteTableLinkRouteTableIds)) - .append("\n"); - sb.append(" linkRouteTableMain: ") - .append(toIndentedString(linkRouteTableMain)) - .append("\n"); - sb.append(" linkSubnetIds: ").append(toIndentedString(linkSubnetIds)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" routeCreationMethods: ") - .append(toIndentedString(routeCreationMethods)) - .append("\n"); - sb.append(" routeDestinationIpRanges: ") - .append(toIndentedString(routeDestinationIpRanges)) - .append("\n"); - sb.append(" routeDestinationServiceIds: ") - .append(toIndentedString(routeDestinationServiceIds)) - .append("\n"); - sb.append(" routeGatewayIds: ").append(toIndentedString(routeGatewayIds)).append("\n"); - sb.append(" routeNatServiceIds: ") - .append(toIndentedString(routeNatServiceIds)) - .append("\n"); - sb.append(" routeNetPeeringIds: ") - .append(toIndentedString(routeNetPeeringIds)) - .append("\n"); - sb.append(" routeStates: ").append(toIndentedString(routeStates)).append("\n"); - sb.append(" routeTableIds: ").append(toIndentedString(routeTableIds)).append("\n"); - sb.append(" routeVmIds: ").append(toIndentedString(routeVmIds)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkRouteTableIds"); - openapiFields.add("LinkRouteTableLinkRouteTableIds"); - openapiFields.add("LinkRouteTableMain"); - openapiFields.add("LinkSubnetIds"); - openapiFields.add("NetIds"); - openapiFields.add("RouteCreationMethods"); - openapiFields.add("RouteDestinationIpRanges"); - openapiFields.add("RouteDestinationServiceIds"); - openapiFields.add("RouteGatewayIds"); - openapiFields.add("RouteNatServiceIds"); - openapiFields.add("RouteNetPeeringIds"); - openapiFields.add("RouteStates"); - openapiFields.add("RouteTableIds"); - openapiFields.add("RouteVmIds"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersRouteTable - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersRouteTable.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersRouteTable is not found in the" - + " empty JSON string", - FiltersRouteTable.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersRouteTable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersRouteTable` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkRouteTableIds") != null - && !jsonObj.get("LinkRouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkRouteTableIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkRouteTableLinkRouteTableIds") != null - && !jsonObj.get("LinkRouteTableLinkRouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableLinkRouteTableIds` to be an array" - + " in the JSON string but got `%s`", - jsonObj.get("LinkRouteTableLinkRouteTableIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkSubnetIds") != null && !jsonObj.get("LinkSubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkSubnetIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("LinkSubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteCreationMethods") != null - && !jsonObj.get("RouteCreationMethods").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteCreationMethods` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RouteCreationMethods").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteDestinationIpRanges") != null - && !jsonObj.get("RouteDestinationIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteDestinationIpRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("RouteDestinationIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteDestinationServiceIds") != null - && !jsonObj.get("RouteDestinationServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteDestinationServiceIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("RouteDestinationServiceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteGatewayIds") != null - && !jsonObj.get("RouteGatewayIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteGatewayIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RouteGatewayIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteNatServiceIds") != null - && !jsonObj.get("RouteNatServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteNatServiceIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RouteNatServiceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteNetPeeringIds") != null - && !jsonObj.get("RouteNetPeeringIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteNetPeeringIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RouteNetPeeringIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteStates") != null && !jsonObj.get("RouteStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteStates` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("RouteStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteTableIds") != null && !jsonObj.get("RouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("RouteTableIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteVmIds") != null && !jsonObj.get("RouteVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteVmIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("RouteVmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersRouteTable.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersRouteTable' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersRouteTable.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersRouteTable value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersRouteTable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersRouteTable given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersRouteTable - * @throws IOException if the JSON string is invalid with respect to FiltersRouteTable - */ - public static FiltersRouteTable fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersRouteTable.class); - } - - /** - * Convert an instance of FiltersRouteTable to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroup.java deleted file mode 100644 index 38b3137c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroup.java +++ /dev/null @@ -1,1203 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersSecurityGroup { - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_ACCOUNT_IDS = "InboundRuleAccountIds"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_ACCOUNT_IDS) - private List inboundRuleAccountIds = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_FROM_PORT_RANGES = - "InboundRuleFromPortRanges"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_FROM_PORT_RANGES) - private List inboundRuleFromPortRanges = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_IP_RANGES = "InboundRuleIpRanges"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_IP_RANGES) - private List inboundRuleIpRanges = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_PROTOCOLS = "InboundRuleProtocols"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_PROTOCOLS) - private List inboundRuleProtocols = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_SECURITY_GROUP_IDS = - "InboundRuleSecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_SECURITY_GROUP_IDS) - private List inboundRuleSecurityGroupIds = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_SECURITY_GROUP_NAMES = - "InboundRuleSecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_SECURITY_GROUP_NAMES) - private List inboundRuleSecurityGroupNames = null; - - public static final String SERIALIZED_NAME_INBOUND_RULE_TO_PORT_RANGES = - "InboundRuleToPortRanges"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULE_TO_PORT_RANGES) - private List inboundRuleToPortRanges = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_ACCOUNT_IDS = "OutboundRuleAccountIds"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_ACCOUNT_IDS) - private List outboundRuleAccountIds = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_FROM_PORT_RANGES = - "OutboundRuleFromPortRanges"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_FROM_PORT_RANGES) - private List outboundRuleFromPortRanges = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_IP_RANGES = "OutboundRuleIpRanges"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_IP_RANGES) - private List outboundRuleIpRanges = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_PROTOCOLS = "OutboundRuleProtocols"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_PROTOCOLS) - private List outboundRuleProtocols = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_SECURITY_GROUP_IDS = - "OutboundRuleSecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_SECURITY_GROUP_IDS) - private List outboundRuleSecurityGroupIds = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_SECURITY_GROUP_NAMES = - "OutboundRuleSecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_SECURITY_GROUP_NAMES) - private List outboundRuleSecurityGroupNames = null; - - public static final String SERIALIZED_NAME_OUTBOUND_RULE_TO_PORT_RANGES = - "OutboundRuleToPortRanges"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULE_TO_PORT_RANGES) - private List outboundRuleToPortRanges = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAMES = "SecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAMES) - private List securityGroupNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersSecurityGroup() {} - - public FiltersSecurityGroup descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersSecurityGroup addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the security groups. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersSecurityGroup inboundRuleAccountIds(List inboundRuleAccountIds) { - - this.inboundRuleAccountIds = inboundRuleAccountIds; - return this; - } - - public FiltersSecurityGroup addInboundRuleAccountIdsItem(String inboundRuleAccountIdsItem) { - if (this.inboundRuleAccountIds == null) { - this.inboundRuleAccountIds = new ArrayList<>(); - } - this.inboundRuleAccountIds.add(inboundRuleAccountIdsItem); - return this; - } - - /** - * The account IDs that have been granted permissions. - * - * @return inboundRuleAccountIds - */ - @javax.annotation.Nullable - public List getInboundRuleAccountIds() { - return inboundRuleAccountIds; - } - - public void setInboundRuleAccountIds(List inboundRuleAccountIds) { - this.inboundRuleAccountIds = inboundRuleAccountIds; - } - - public FiltersSecurityGroup inboundRuleFromPortRanges(List inboundRuleFromPortRanges) { - - this.inboundRuleFromPortRanges = inboundRuleFromPortRanges; - return this; - } - - public FiltersSecurityGroup addInboundRuleFromPortRangesItem( - Integer inboundRuleFromPortRangesItem) { - if (this.inboundRuleFromPortRanges == null) { - this.inboundRuleFromPortRanges = new ArrayList<>(); - } - this.inboundRuleFromPortRanges.add(inboundRuleFromPortRangesItem); - return this; - } - - /** - * The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers. - * - * @return inboundRuleFromPortRanges - */ - @javax.annotation.Nullable - public List getInboundRuleFromPortRanges() { - return inboundRuleFromPortRanges; - } - - public void setInboundRuleFromPortRanges(List inboundRuleFromPortRanges) { - this.inboundRuleFromPortRanges = inboundRuleFromPortRanges; - } - - public FiltersSecurityGroup inboundRuleIpRanges(List inboundRuleIpRanges) { - - this.inboundRuleIpRanges = inboundRuleIpRanges; - return this; - } - - public FiltersSecurityGroup addInboundRuleIpRangesItem(String inboundRuleIpRangesItem) { - if (this.inboundRuleIpRanges == null) { - this.inboundRuleIpRanges = new ArrayList<>(); - } - this.inboundRuleIpRanges.add(inboundRuleIpRangesItem); - return this; - } - - /** - * The IP ranges that have been granted permissions, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return inboundRuleIpRanges - */ - @javax.annotation.Nullable - public List getInboundRuleIpRanges() { - return inboundRuleIpRanges; - } - - public void setInboundRuleIpRanges(List inboundRuleIpRanges) { - this.inboundRuleIpRanges = inboundRuleIpRanges; - } - - public FiltersSecurityGroup inboundRuleProtocols(List inboundRuleProtocols) { - - this.inboundRuleProtocols = inboundRuleProtocols; - return this; - } - - public FiltersSecurityGroup addInboundRuleProtocolsItem(String inboundRuleProtocolsItem) { - if (this.inboundRuleProtocols == null) { - this.inboundRuleProtocols = new ArrayList<>(); - } - this.inboundRuleProtocols.add(inboundRuleProtocolsItem); - return this; - } - - /** - * The IP protocols for the permissions (`tcp` \\| `udp` \\| - * `icmp`, or a protocol number, or `-1` for all protocols). - * - * @return inboundRuleProtocols - */ - @javax.annotation.Nullable - public List getInboundRuleProtocols() { - return inboundRuleProtocols; - } - - public void setInboundRuleProtocols(List inboundRuleProtocols) { - this.inboundRuleProtocols = inboundRuleProtocols; - } - - public FiltersSecurityGroup inboundRuleSecurityGroupIds( - List inboundRuleSecurityGroupIds) { - - this.inboundRuleSecurityGroupIds = inboundRuleSecurityGroupIds; - return this; - } - - public FiltersSecurityGroup addInboundRuleSecurityGroupIdsItem( - String inboundRuleSecurityGroupIdsItem) { - if (this.inboundRuleSecurityGroupIds == null) { - this.inboundRuleSecurityGroupIds = new ArrayList<>(); - } - this.inboundRuleSecurityGroupIds.add(inboundRuleSecurityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups that have been granted permissions. - * - * @return inboundRuleSecurityGroupIds - */ - @javax.annotation.Nullable - public List getInboundRuleSecurityGroupIds() { - return inboundRuleSecurityGroupIds; - } - - public void setInboundRuleSecurityGroupIds(List inboundRuleSecurityGroupIds) { - this.inboundRuleSecurityGroupIds = inboundRuleSecurityGroupIds; - } - - public FiltersSecurityGroup inboundRuleSecurityGroupNames( - List inboundRuleSecurityGroupNames) { - - this.inboundRuleSecurityGroupNames = inboundRuleSecurityGroupNames; - return this; - } - - public FiltersSecurityGroup addInboundRuleSecurityGroupNamesItem( - String inboundRuleSecurityGroupNamesItem) { - if (this.inboundRuleSecurityGroupNames == null) { - this.inboundRuleSecurityGroupNames = new ArrayList<>(); - } - this.inboundRuleSecurityGroupNames.add(inboundRuleSecurityGroupNamesItem); - return this; - } - - /** - * The names of the security groups that have been granted permissions. - * - * @return inboundRuleSecurityGroupNames - */ - @javax.annotation.Nullable - public List getInboundRuleSecurityGroupNames() { - return inboundRuleSecurityGroupNames; - } - - public void setInboundRuleSecurityGroupNames(List inboundRuleSecurityGroupNames) { - this.inboundRuleSecurityGroupNames = inboundRuleSecurityGroupNames; - } - - public FiltersSecurityGroup inboundRuleToPortRanges(List inboundRuleToPortRanges) { - - this.inboundRuleToPortRanges = inboundRuleToPortRanges; - return this; - } - - public FiltersSecurityGroup addInboundRuleToPortRangesItem( - Integer inboundRuleToPortRangesItem) { - if (this.inboundRuleToPortRanges == null) { - this.inboundRuleToPortRanges = new ArrayList<>(); - } - this.inboundRuleToPortRanges.add(inboundRuleToPortRangesItem); - return this; - } - - /** - * The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers. - * - * @return inboundRuleToPortRanges - */ - @javax.annotation.Nullable - public List getInboundRuleToPortRanges() { - return inboundRuleToPortRanges; - } - - public void setInboundRuleToPortRanges(List inboundRuleToPortRanges) { - this.inboundRuleToPortRanges = inboundRuleToPortRanges; - } - - public FiltersSecurityGroup netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersSecurityGroup addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets specified when the security groups were created. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersSecurityGroup outboundRuleAccountIds(List outboundRuleAccountIds) { - - this.outboundRuleAccountIds = outboundRuleAccountIds; - return this; - } - - public FiltersSecurityGroup addOutboundRuleAccountIdsItem(String outboundRuleAccountIdsItem) { - if (this.outboundRuleAccountIds == null) { - this.outboundRuleAccountIds = new ArrayList<>(); - } - this.outboundRuleAccountIds.add(outboundRuleAccountIdsItem); - return this; - } - - /** - * The account IDs that have been granted permissions. - * - * @return outboundRuleAccountIds - */ - @javax.annotation.Nullable - public List getOutboundRuleAccountIds() { - return outboundRuleAccountIds; - } - - public void setOutboundRuleAccountIds(List outboundRuleAccountIds) { - this.outboundRuleAccountIds = outboundRuleAccountIds; - } - - public FiltersSecurityGroup outboundRuleFromPortRanges( - List outboundRuleFromPortRanges) { - - this.outboundRuleFromPortRanges = outboundRuleFromPortRanges; - return this; - } - - public FiltersSecurityGroup addOutboundRuleFromPortRangesItem( - Integer outboundRuleFromPortRangesItem) { - if (this.outboundRuleFromPortRanges == null) { - this.outboundRuleFromPortRanges = new ArrayList<>(); - } - this.outboundRuleFromPortRanges.add(outboundRuleFromPortRangesItem); - return this; - } - - /** - * The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers. - * - * @return outboundRuleFromPortRanges - */ - @javax.annotation.Nullable - public List getOutboundRuleFromPortRanges() { - return outboundRuleFromPortRanges; - } - - public void setOutboundRuleFromPortRanges(List outboundRuleFromPortRanges) { - this.outboundRuleFromPortRanges = outboundRuleFromPortRanges; - } - - public FiltersSecurityGroup outboundRuleIpRanges(List outboundRuleIpRanges) { - - this.outboundRuleIpRanges = outboundRuleIpRanges; - return this; - } - - public FiltersSecurityGroup addOutboundRuleIpRangesItem(String outboundRuleIpRangesItem) { - if (this.outboundRuleIpRanges == null) { - this.outboundRuleIpRanges = new ArrayList<>(); - } - this.outboundRuleIpRanges.add(outboundRuleIpRangesItem); - return this; - } - - /** - * The IP ranges that have been granted permissions, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return outboundRuleIpRanges - */ - @javax.annotation.Nullable - public List getOutboundRuleIpRanges() { - return outboundRuleIpRanges; - } - - public void setOutboundRuleIpRanges(List outboundRuleIpRanges) { - this.outboundRuleIpRanges = outboundRuleIpRanges; - } - - public FiltersSecurityGroup outboundRuleProtocols(List outboundRuleProtocols) { - - this.outboundRuleProtocols = outboundRuleProtocols; - return this; - } - - public FiltersSecurityGroup addOutboundRuleProtocolsItem(String outboundRuleProtocolsItem) { - if (this.outboundRuleProtocols == null) { - this.outboundRuleProtocols = new ArrayList<>(); - } - this.outboundRuleProtocols.add(outboundRuleProtocolsItem); - return this; - } - - /** - * The IP protocols for the permissions (`tcp` \\| `udp` \\| - * `icmp`, or a protocol number, or `-1` for all protocols). - * - * @return outboundRuleProtocols - */ - @javax.annotation.Nullable - public List getOutboundRuleProtocols() { - return outboundRuleProtocols; - } - - public void setOutboundRuleProtocols(List outboundRuleProtocols) { - this.outboundRuleProtocols = outboundRuleProtocols; - } - - public FiltersSecurityGroup outboundRuleSecurityGroupIds( - List outboundRuleSecurityGroupIds) { - - this.outboundRuleSecurityGroupIds = outboundRuleSecurityGroupIds; - return this; - } - - public FiltersSecurityGroup addOutboundRuleSecurityGroupIdsItem( - String outboundRuleSecurityGroupIdsItem) { - if (this.outboundRuleSecurityGroupIds == null) { - this.outboundRuleSecurityGroupIds = new ArrayList<>(); - } - this.outboundRuleSecurityGroupIds.add(outboundRuleSecurityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups that have been granted permissions. - * - * @return outboundRuleSecurityGroupIds - */ - @javax.annotation.Nullable - public List getOutboundRuleSecurityGroupIds() { - return outboundRuleSecurityGroupIds; - } - - public void setOutboundRuleSecurityGroupIds(List outboundRuleSecurityGroupIds) { - this.outboundRuleSecurityGroupIds = outboundRuleSecurityGroupIds; - } - - public FiltersSecurityGroup outboundRuleSecurityGroupNames( - List outboundRuleSecurityGroupNames) { - - this.outboundRuleSecurityGroupNames = outboundRuleSecurityGroupNames; - return this; - } - - public FiltersSecurityGroup addOutboundRuleSecurityGroupNamesItem( - String outboundRuleSecurityGroupNamesItem) { - if (this.outboundRuleSecurityGroupNames == null) { - this.outboundRuleSecurityGroupNames = new ArrayList<>(); - } - this.outboundRuleSecurityGroupNames.add(outboundRuleSecurityGroupNamesItem); - return this; - } - - /** - * The names of the security groups that have been granted permissions. - * - * @return outboundRuleSecurityGroupNames - */ - @javax.annotation.Nullable - public List getOutboundRuleSecurityGroupNames() { - return outboundRuleSecurityGroupNames; - } - - public void setOutboundRuleSecurityGroupNames(List outboundRuleSecurityGroupNames) { - this.outboundRuleSecurityGroupNames = outboundRuleSecurityGroupNames; - } - - public FiltersSecurityGroup outboundRuleToPortRanges(List outboundRuleToPortRanges) { - - this.outboundRuleToPortRanges = outboundRuleToPortRanges; - return this; - } - - public FiltersSecurityGroup addOutboundRuleToPortRangesItem( - Integer outboundRuleToPortRangesItem) { - if (this.outboundRuleToPortRanges == null) { - this.outboundRuleToPortRanges = new ArrayList<>(); - } - this.outboundRuleToPortRanges.add(outboundRuleToPortRangesItem); - return this; - } - - /** - * The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers. - * - * @return outboundRuleToPortRanges - */ - @javax.annotation.Nullable - public List getOutboundRuleToPortRanges() { - return outboundRuleToPortRanges; - } - - public void setOutboundRuleToPortRanges(List outboundRuleToPortRanges) { - this.outboundRuleToPortRanges = outboundRuleToPortRanges; - } - - public FiltersSecurityGroup securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public FiltersSecurityGroup addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public FiltersSecurityGroup securityGroupNames(List securityGroupNames) { - - this.securityGroupNames = securityGroupNames; - return this; - } - - public FiltersSecurityGroup addSecurityGroupNamesItem(String securityGroupNamesItem) { - if (this.securityGroupNames == null) { - this.securityGroupNames = new ArrayList<>(); - } - this.securityGroupNames.add(securityGroupNamesItem); - return this; - } - - /** - * The names of the security groups. - * - * @return securityGroupNames - */ - @javax.annotation.Nullable - public List getSecurityGroupNames() { - return securityGroupNames; - } - - public void setSecurityGroupNames(List securityGroupNames) { - this.securityGroupNames = securityGroupNames; - } - - public FiltersSecurityGroup tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersSecurityGroup addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the security groups. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersSecurityGroup tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersSecurityGroup addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the security groups. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersSecurityGroup tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersSecurityGroup addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the security groups, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersSecurityGroup filtersSecurityGroup = (FiltersSecurityGroup) o; - return Objects.equals(this.descriptions, filtersSecurityGroup.descriptions) - && Objects.equals( - this.inboundRuleAccountIds, filtersSecurityGroup.inboundRuleAccountIds) - && Objects.equals( - this.inboundRuleFromPortRanges, - filtersSecurityGroup.inboundRuleFromPortRanges) - && Objects.equals( - this.inboundRuleIpRanges, filtersSecurityGroup.inboundRuleIpRanges) - && Objects.equals( - this.inboundRuleProtocols, filtersSecurityGroup.inboundRuleProtocols) - && Objects.equals( - this.inboundRuleSecurityGroupIds, - filtersSecurityGroup.inboundRuleSecurityGroupIds) - && Objects.equals( - this.inboundRuleSecurityGroupNames, - filtersSecurityGroup.inboundRuleSecurityGroupNames) - && Objects.equals( - this.inboundRuleToPortRanges, filtersSecurityGroup.inboundRuleToPortRanges) - && Objects.equals(this.netIds, filtersSecurityGroup.netIds) - && Objects.equals( - this.outboundRuleAccountIds, filtersSecurityGroup.outboundRuleAccountIds) - && Objects.equals( - this.outboundRuleFromPortRanges, - filtersSecurityGroup.outboundRuleFromPortRanges) - && Objects.equals( - this.outboundRuleIpRanges, filtersSecurityGroup.outboundRuleIpRanges) - && Objects.equals( - this.outboundRuleProtocols, filtersSecurityGroup.outboundRuleProtocols) - && Objects.equals( - this.outboundRuleSecurityGroupIds, - filtersSecurityGroup.outboundRuleSecurityGroupIds) - && Objects.equals( - this.outboundRuleSecurityGroupNames, - filtersSecurityGroup.outboundRuleSecurityGroupNames) - && Objects.equals( - this.outboundRuleToPortRanges, - filtersSecurityGroup.outboundRuleToPortRanges) - && Objects.equals(this.securityGroupIds, filtersSecurityGroup.securityGroupIds) - && Objects.equals(this.securityGroupNames, filtersSecurityGroup.securityGroupNames) - && Objects.equals(this.tagKeys, filtersSecurityGroup.tagKeys) - && Objects.equals(this.tagValues, filtersSecurityGroup.tagValues) - && Objects.equals(this.tags, filtersSecurityGroup.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - descriptions, - inboundRuleAccountIds, - inboundRuleFromPortRanges, - inboundRuleIpRanges, - inboundRuleProtocols, - inboundRuleSecurityGroupIds, - inboundRuleSecurityGroupNames, - inboundRuleToPortRanges, - netIds, - outboundRuleAccountIds, - outboundRuleFromPortRanges, - outboundRuleIpRanges, - outboundRuleProtocols, - outboundRuleSecurityGroupIds, - outboundRuleSecurityGroupNames, - outboundRuleToPortRanges, - securityGroupIds, - securityGroupNames, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersSecurityGroup {\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" inboundRuleAccountIds: ") - .append(toIndentedString(inboundRuleAccountIds)) - .append("\n"); - sb.append(" inboundRuleFromPortRanges: ") - .append(toIndentedString(inboundRuleFromPortRanges)) - .append("\n"); - sb.append(" inboundRuleIpRanges: ") - .append(toIndentedString(inboundRuleIpRanges)) - .append("\n"); - sb.append(" inboundRuleProtocols: ") - .append(toIndentedString(inboundRuleProtocols)) - .append("\n"); - sb.append(" inboundRuleSecurityGroupIds: ") - .append(toIndentedString(inboundRuleSecurityGroupIds)) - .append("\n"); - sb.append(" inboundRuleSecurityGroupNames: ") - .append(toIndentedString(inboundRuleSecurityGroupNames)) - .append("\n"); - sb.append(" inboundRuleToPortRanges: ") - .append(toIndentedString(inboundRuleToPortRanges)) - .append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" outboundRuleAccountIds: ") - .append(toIndentedString(outboundRuleAccountIds)) - .append("\n"); - sb.append(" outboundRuleFromPortRanges: ") - .append(toIndentedString(outboundRuleFromPortRanges)) - .append("\n"); - sb.append(" outboundRuleIpRanges: ") - .append(toIndentedString(outboundRuleIpRanges)) - .append("\n"); - sb.append(" outboundRuleProtocols: ") - .append(toIndentedString(outboundRuleProtocols)) - .append("\n"); - sb.append(" outboundRuleSecurityGroupIds: ") - .append(toIndentedString(outboundRuleSecurityGroupIds)) - .append("\n"); - sb.append(" outboundRuleSecurityGroupNames: ") - .append(toIndentedString(outboundRuleSecurityGroupNames)) - .append("\n"); - sb.append(" outboundRuleToPortRanges: ") - .append(toIndentedString(outboundRuleToPortRanges)) - .append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" securityGroupNames: ") - .append(toIndentedString(securityGroupNames)) - .append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Descriptions"); - openapiFields.add("InboundRuleAccountIds"); - openapiFields.add("InboundRuleFromPortRanges"); - openapiFields.add("InboundRuleIpRanges"); - openapiFields.add("InboundRuleProtocols"); - openapiFields.add("InboundRuleSecurityGroupIds"); - openapiFields.add("InboundRuleSecurityGroupNames"); - openapiFields.add("InboundRuleToPortRanges"); - openapiFields.add("NetIds"); - openapiFields.add("OutboundRuleAccountIds"); - openapiFields.add("OutboundRuleFromPortRanges"); - openapiFields.add("OutboundRuleIpRanges"); - openapiFields.add("OutboundRuleProtocols"); - openapiFields.add("OutboundRuleSecurityGroupIds"); - openapiFields.add("OutboundRuleSecurityGroupNames"); - openapiFields.add("OutboundRuleToPortRanges"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SecurityGroupNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersSecurityGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersSecurityGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersSecurityGroup is not found in" - + " the empty JSON string", - FiltersSecurityGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersSecurityGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersSecurityGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleAccountIds") != null - && !jsonObj.get("InboundRuleAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleAccountIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("InboundRuleAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleFromPortRanges") != null - && !jsonObj.get("InboundRuleFromPortRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleFromPortRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("InboundRuleFromPortRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleIpRanges") != null - && !jsonObj.get("InboundRuleIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleIpRanges` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("InboundRuleIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleProtocols") != null - && !jsonObj.get("InboundRuleProtocols").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleProtocols` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("InboundRuleProtocols").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleSecurityGroupIds") != null - && !jsonObj.get("InboundRuleSecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleSecurityGroupIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("InboundRuleSecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleSecurityGroupNames") != null - && !jsonObj.get("InboundRuleSecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleSecurityGroupNames` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("InboundRuleSecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("InboundRuleToPortRanges") != null - && !jsonObj.get("InboundRuleToPortRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRuleToPortRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("InboundRuleToPortRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleAccountIds") != null - && !jsonObj.get("OutboundRuleAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleAccountIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("OutboundRuleAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleFromPortRanges") != null - && !jsonObj.get("OutboundRuleFromPortRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleFromPortRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("OutboundRuleFromPortRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleIpRanges") != null - && !jsonObj.get("OutboundRuleIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleIpRanges` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("OutboundRuleIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleProtocols") != null - && !jsonObj.get("OutboundRuleProtocols").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleProtocols` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("OutboundRuleProtocols").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleSecurityGroupIds") != null - && !jsonObj.get("OutboundRuleSecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleSecurityGroupIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("OutboundRuleSecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleSecurityGroupNames") != null - && !jsonObj.get("OutboundRuleSecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleSecurityGroupNames` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("OutboundRuleSecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("OutboundRuleToPortRanges") != null - && !jsonObj.get("OutboundRuleToPortRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRuleToPortRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("OutboundRuleToPortRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupNames") != null - && !jsonObj.get("SecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersSecurityGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersSecurityGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersSecurityGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersSecurityGroup value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersSecurityGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersSecurityGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersSecurityGroup - * @throws IOException if the JSON string is invalid with respect to FiltersSecurityGroup - */ - public static FiltersSecurityGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersSecurityGroup.class); - } - - /** - * Convert an instance of FiltersSecurityGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificate.java deleted file mode 100644 index 93513f14..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificate.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersServerCertificate { - public static final String SERIALIZED_NAME_PATHS = "Paths"; - - @SerializedName(SERIALIZED_NAME_PATHS) - private List paths = null; - - public FiltersServerCertificate() {} - - public FiltersServerCertificate paths(List paths) { - - this.paths = paths; - return this; - } - - public FiltersServerCertificate addPathsItem(String pathsItem) { - if (this.paths == null) { - this.paths = new ArrayList<>(); - } - this.paths.add(pathsItem); - return this; - } - - /** - * The paths to the server certificates. - * - * @return paths - */ - @javax.annotation.Nullable - public List getPaths() { - return paths; - } - - public void setPaths(List paths) { - this.paths = paths; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersServerCertificate filtersServerCertificate = (FiltersServerCertificate) o; - return Objects.equals(this.paths, filtersServerCertificate.paths); - } - - @Override - public int hashCode() { - return Objects.hash(paths); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersServerCertificate {\n"); - sb.append(" paths: ").append(toIndentedString(paths)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Paths"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersServerCertificate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersServerCertificate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersServerCertificate is not found" - + " in the empty JSON string", - FiltersServerCertificate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersServerCertificate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersServerCertificate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Paths") != null && !jsonObj.get("Paths").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Paths` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Paths").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersServerCertificate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersServerCertificate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersServerCertificate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersServerCertificate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersServerCertificate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersServerCertificate given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersServerCertificate - * @throws IOException if the JSON string is invalid with respect to FiltersServerCertificate - */ - public static FiltersServerCertificate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersServerCertificate.class); - } - - /** - * Convert an instance of FiltersServerCertificate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersService.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersService.java deleted file mode 100644 index 6e36d1cd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersService.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersService { - public static final String SERIALIZED_NAME_SERVICE_IDS = "ServiceIds"; - - @SerializedName(SERIALIZED_NAME_SERVICE_IDS) - private List serviceIds = null; - - public static final String SERIALIZED_NAME_SERVICE_NAMES = "ServiceNames"; - - @SerializedName(SERIALIZED_NAME_SERVICE_NAMES) - private List serviceNames = null; - - public FiltersService() {} - - public FiltersService serviceIds(List serviceIds) { - - this.serviceIds = serviceIds; - return this; - } - - public FiltersService addServiceIdsItem(String serviceIdsItem) { - if (this.serviceIds == null) { - this.serviceIds = new ArrayList<>(); - } - this.serviceIds.add(serviceIdsItem); - return this; - } - - /** - * The IDs of the services. - * - * @return serviceIds - */ - @javax.annotation.Nullable - public List getServiceIds() { - return serviceIds; - } - - public void setServiceIds(List serviceIds) { - this.serviceIds = serviceIds; - } - - public FiltersService serviceNames(List serviceNames) { - - this.serviceNames = serviceNames; - return this; - } - - public FiltersService addServiceNamesItem(String serviceNamesItem) { - if (this.serviceNames == null) { - this.serviceNames = new ArrayList<>(); - } - this.serviceNames.add(serviceNamesItem); - return this; - } - - /** - * The names of the services. - * - * @return serviceNames - */ - @javax.annotation.Nullable - public List getServiceNames() { - return serviceNames; - } - - public void setServiceNames(List serviceNames) { - this.serviceNames = serviceNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersService filtersService = (FiltersService) o; - return Objects.equals(this.serviceIds, filtersService.serviceIds) - && Objects.equals(this.serviceNames, filtersService.serviceNames); - } - - @Override - public int hashCode() { - return Objects.hash(serviceIds, serviceNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersService {\n"); - sb.append(" serviceIds: ").append(toIndentedString(serviceIds)).append("\n"); - sb.append(" serviceNames: ").append(toIndentedString(serviceNames)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ServiceIds"); - openapiFields.add("ServiceNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersService - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersService.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersService is not found in the" - + " empty JSON string", - FiltersService.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersService` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ServiceIds") != null && !jsonObj.get("ServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ServiceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ServiceNames") != null && !jsonObj.get("ServiceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ServiceNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersService.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersService' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersService.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersService value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersService given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersService - * @throws IOException if the JSON string is invalid with respect to FiltersService - */ - public static FiltersService fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersService.class); - } - - /** - * Convert an instance of FiltersService to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshot.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshot.java deleted file mode 100644 index bd686849..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshot.java +++ /dev/null @@ -1,812 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersSnapshot { - public static final String SERIALIZED_NAME_ACCOUNT_ALIASES = "AccountAliases"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIASES) - private List accountAliases = null; - - public static final String SERIALIZED_NAME_ACCOUNT_IDS = "AccountIds"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_IDS) - private List accountIds = null; - - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_FROM_CREATION_DATE = "FromCreationDate"; - - @SerializedName(SERIALIZED_NAME_FROM_CREATION_DATE) - private OffsetDateTime fromCreationDate; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME_ACCOUNT_IDS = - "PermissionsToCreateVolumeAccountIds"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME_ACCOUNT_IDS) - private List permissionsToCreateVolumeAccountIds = null; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME_GLOBAL_PERMISSION = - "PermissionsToCreateVolumeGlobalPermission"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME_GLOBAL_PERMISSION) - private Boolean permissionsToCreateVolumeGlobalPermission; - - public static final String SERIALIZED_NAME_PROGRESSES = "Progresses"; - - @SerializedName(SERIALIZED_NAME_PROGRESSES) - private List progresses = null; - - public static final String SERIALIZED_NAME_SNAPSHOT_IDS = "SnapshotIds"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_IDS) - private List snapshotIds = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_TO_CREATION_DATE = "ToCreationDate"; - - @SerializedName(SERIALIZED_NAME_TO_CREATION_DATE) - private OffsetDateTime toCreationDate; - - public static final String SERIALIZED_NAME_VOLUME_IDS = "VolumeIds"; - - @SerializedName(SERIALIZED_NAME_VOLUME_IDS) - private List volumeIds = null; - - public static final String SERIALIZED_NAME_VOLUME_SIZES = "VolumeSizes"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZES) - private List volumeSizes = null; - - public FiltersSnapshot() {} - - public FiltersSnapshot accountAliases(List accountAliases) { - - this.accountAliases = accountAliases; - return this; - } - - public FiltersSnapshot addAccountAliasesItem(String accountAliasesItem) { - if (this.accountAliases == null) { - this.accountAliases = new ArrayList<>(); - } - this.accountAliases.add(accountAliasesItem); - return this; - } - - /** - * The account aliases of the owners of the snapshots. - * - * @return accountAliases - */ - @javax.annotation.Nullable - public List getAccountAliases() { - return accountAliases; - } - - public void setAccountAliases(List accountAliases) { - this.accountAliases = accountAliases; - } - - public FiltersSnapshot accountIds(List accountIds) { - - this.accountIds = accountIds; - return this; - } - - public FiltersSnapshot addAccountIdsItem(String accountIdsItem) { - if (this.accountIds == null) { - this.accountIds = new ArrayList<>(); - } - this.accountIds.add(accountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the snapshots. - * - * @return accountIds - */ - @javax.annotation.Nullable - public List getAccountIds() { - return accountIds; - } - - public void setAccountIds(List accountIds) { - this.accountIds = accountIds; - } - - public FiltersSnapshot descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersSnapshot addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the snapshots. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersSnapshot fromCreationDate(OffsetDateTime fromCreationDate) { - - this.fromCreationDate = fromCreationDate; - return this; - } - - /** - * The beginning of the time period, in ISO 8601 date-time format (for example, - * `2020-06-14T00:00:00.000Z`). - * - * @return fromCreationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getFromCreationDate() { - return fromCreationDate; - } - - public void setFromCreationDate(OffsetDateTime fromCreationDate) { - this.fromCreationDate = fromCreationDate; - } - - public FiltersSnapshot permissionsToCreateVolumeAccountIds( - List permissionsToCreateVolumeAccountIds) { - - this.permissionsToCreateVolumeAccountIds = permissionsToCreateVolumeAccountIds; - return this; - } - - public FiltersSnapshot addPermissionsToCreateVolumeAccountIdsItem( - String permissionsToCreateVolumeAccountIdsItem) { - if (this.permissionsToCreateVolumeAccountIds == null) { - this.permissionsToCreateVolumeAccountIds = new ArrayList<>(); - } - this.permissionsToCreateVolumeAccountIds.add(permissionsToCreateVolumeAccountIdsItem); - return this; - } - - /** - * The account IDs which have permissions to create volumes. - * - * @return permissionsToCreateVolumeAccountIds - */ - @javax.annotation.Nullable - public List getPermissionsToCreateVolumeAccountIds() { - return permissionsToCreateVolumeAccountIds; - } - - public void setPermissionsToCreateVolumeAccountIds( - List permissionsToCreateVolumeAccountIds) { - this.permissionsToCreateVolumeAccountIds = permissionsToCreateVolumeAccountIds; - } - - public FiltersSnapshot permissionsToCreateVolumeGlobalPermission( - Boolean permissionsToCreateVolumeGlobalPermission) { - - this.permissionsToCreateVolumeGlobalPermission = permissionsToCreateVolumeGlobalPermission; - return this; - } - - /** - * If true, lists all public volumes. If false, lists all private volumes. - * - * @return permissionsToCreateVolumeGlobalPermission - */ - @javax.annotation.Nullable - public Boolean getPermissionsToCreateVolumeGlobalPermission() { - return permissionsToCreateVolumeGlobalPermission; - } - - public void setPermissionsToCreateVolumeGlobalPermission( - Boolean permissionsToCreateVolumeGlobalPermission) { - this.permissionsToCreateVolumeGlobalPermission = permissionsToCreateVolumeGlobalPermission; - } - - public FiltersSnapshot progresses(List progresses) { - - this.progresses = progresses; - return this; - } - - public FiltersSnapshot addProgressesItem(Integer progressesItem) { - if (this.progresses == null) { - this.progresses = new ArrayList<>(); - } - this.progresses.add(progressesItem); - return this; - } - - /** - * The progresses of the snapshots, as a percentage. - * - * @return progresses - */ - @javax.annotation.Nullable - public List getProgresses() { - return progresses; - } - - public void setProgresses(List progresses) { - this.progresses = progresses; - } - - public FiltersSnapshot snapshotIds(List snapshotIds) { - - this.snapshotIds = snapshotIds; - return this; - } - - public FiltersSnapshot addSnapshotIdsItem(String snapshotIdsItem) { - if (this.snapshotIds == null) { - this.snapshotIds = new ArrayList<>(); - } - this.snapshotIds.add(snapshotIdsItem); - return this; - } - - /** - * The IDs of the snapshots. - * - * @return snapshotIds - */ - @javax.annotation.Nullable - public List getSnapshotIds() { - return snapshotIds; - } - - public void setSnapshotIds(List snapshotIds) { - this.snapshotIds = snapshotIds; - } - - public FiltersSnapshot states(List states) { - - this.states = states; - return this; - } - - public FiltersSnapshot addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the snapshots (`in-queue` \\| `pending` \\| - * `completed` \\| `error` \\| `deleting`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersSnapshot tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersSnapshot addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the snapshots. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersSnapshot tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersSnapshot addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the snapshots. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersSnapshot tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersSnapshot addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the snapshots, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersSnapshot toCreationDate(OffsetDateTime toCreationDate) { - - this.toCreationDate = toCreationDate; - return this; - } - - /** - * The end of the time period, in ISO 8601 date-time format (for example, - * `2020-06-30T00:00:00.000Z`). - * - * @return toCreationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getToCreationDate() { - return toCreationDate; - } - - public void setToCreationDate(OffsetDateTime toCreationDate) { - this.toCreationDate = toCreationDate; - } - - public FiltersSnapshot volumeIds(List volumeIds) { - - this.volumeIds = volumeIds; - return this; - } - - public FiltersSnapshot addVolumeIdsItem(String volumeIdsItem) { - if (this.volumeIds == null) { - this.volumeIds = new ArrayList<>(); - } - this.volumeIds.add(volumeIdsItem); - return this; - } - - /** - * The IDs of the volumes used to create the snapshots. - * - * @return volumeIds - */ - @javax.annotation.Nullable - public List getVolumeIds() { - return volumeIds; - } - - public void setVolumeIds(List volumeIds) { - this.volumeIds = volumeIds; - } - - public FiltersSnapshot volumeSizes(List volumeSizes) { - - this.volumeSizes = volumeSizes; - return this; - } - - public FiltersSnapshot addVolumeSizesItem(Integer volumeSizesItem) { - if (this.volumeSizes == null) { - this.volumeSizes = new ArrayList<>(); - } - this.volumeSizes.add(volumeSizesItem); - return this; - } - - /** - * The sizes of the volumes used to create the snapshots, in gibibytes (GiB). - * - * @return volumeSizes - */ - @javax.annotation.Nullable - public List getVolumeSizes() { - return volumeSizes; - } - - public void setVolumeSizes(List volumeSizes) { - this.volumeSizes = volumeSizes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersSnapshot filtersSnapshot = (FiltersSnapshot) o; - return Objects.equals(this.accountAliases, filtersSnapshot.accountAliases) - && Objects.equals(this.accountIds, filtersSnapshot.accountIds) - && Objects.equals(this.descriptions, filtersSnapshot.descriptions) - && Objects.equals(this.fromCreationDate, filtersSnapshot.fromCreationDate) - && Objects.equals( - this.permissionsToCreateVolumeAccountIds, - filtersSnapshot.permissionsToCreateVolumeAccountIds) - && Objects.equals( - this.permissionsToCreateVolumeGlobalPermission, - filtersSnapshot.permissionsToCreateVolumeGlobalPermission) - && Objects.equals(this.progresses, filtersSnapshot.progresses) - && Objects.equals(this.snapshotIds, filtersSnapshot.snapshotIds) - && Objects.equals(this.states, filtersSnapshot.states) - && Objects.equals(this.tagKeys, filtersSnapshot.tagKeys) - && Objects.equals(this.tagValues, filtersSnapshot.tagValues) - && Objects.equals(this.tags, filtersSnapshot.tags) - && Objects.equals(this.toCreationDate, filtersSnapshot.toCreationDate) - && Objects.equals(this.volumeIds, filtersSnapshot.volumeIds) - && Objects.equals(this.volumeSizes, filtersSnapshot.volumeSizes); - } - - @Override - public int hashCode() { - return Objects.hash( - accountAliases, - accountIds, - descriptions, - fromCreationDate, - permissionsToCreateVolumeAccountIds, - permissionsToCreateVolumeGlobalPermission, - progresses, - snapshotIds, - states, - tagKeys, - tagValues, - tags, - toCreationDate, - volumeIds, - volumeSizes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersSnapshot {\n"); - sb.append(" accountAliases: ").append(toIndentedString(accountAliases)).append("\n"); - sb.append(" accountIds: ").append(toIndentedString(accountIds)).append("\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" fromCreationDate: ").append(toIndentedString(fromCreationDate)).append("\n"); - sb.append(" permissionsToCreateVolumeAccountIds: ") - .append(toIndentedString(permissionsToCreateVolumeAccountIds)) - .append("\n"); - sb.append(" permissionsToCreateVolumeGlobalPermission: ") - .append(toIndentedString(permissionsToCreateVolumeGlobalPermission)) - .append("\n"); - sb.append(" progresses: ").append(toIndentedString(progresses)).append("\n"); - sb.append(" snapshotIds: ").append(toIndentedString(snapshotIds)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" toCreationDate: ").append(toIndentedString(toCreationDate)).append("\n"); - sb.append(" volumeIds: ").append(toIndentedString(volumeIds)).append("\n"); - sb.append(" volumeSizes: ").append(toIndentedString(volumeSizes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountAliases"); - openapiFields.add("AccountIds"); - openapiFields.add("Descriptions"); - openapiFields.add("FromCreationDate"); - openapiFields.add("PermissionsToCreateVolumeAccountIds"); - openapiFields.add("PermissionsToCreateVolumeGlobalPermission"); - openapiFields.add("Progresses"); - openapiFields.add("SnapshotIds"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("ToCreationDate"); - openapiFields.add("VolumeIds"); - openapiFields.add("VolumeSizes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersSnapshot - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersSnapshot.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersSnapshot is not found in the" - + " empty JSON string", - FiltersSnapshot.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersSnapshot.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersSnapshot` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccountAliases") != null && !jsonObj.get("AccountAliases").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountAliases` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("AccountAliases").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccountIds") != null && !jsonObj.get("AccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("AccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PermissionsToCreateVolumeAccountIds") != null - && !jsonObj.get("PermissionsToCreateVolumeAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PermissionsToCreateVolumeAccountIds` to be an" - + " array in the JSON string but got `%s`", - jsonObj.get("PermissionsToCreateVolumeAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Progresses") != null && !jsonObj.get("Progresses").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Progresses` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Progresses").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SnapshotIds") != null && !jsonObj.get("SnapshotIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SnapshotIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeIds") != null && !jsonObj.get("VolumeIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VolumeIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeSizes") != null && !jsonObj.get("VolumeSizes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeSizes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeSizes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersSnapshot.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersSnapshot' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersSnapshot.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersSnapshot value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersSnapshot read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersSnapshot given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersSnapshot - * @throws IOException if the JSON string is invalid with respect to FiltersSnapshot - */ - public static FiltersSnapshot fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersSnapshot.class); - } - - /** - * Convert an instance of FiltersSnapshot to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnet.java deleted file mode 100644 index c6fb6f00..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnet.java +++ /dev/null @@ -1,573 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersSubnet { - public static final String SERIALIZED_NAME_AVAILABLE_IPS_COUNTS = "AvailableIpsCounts"; - - @SerializedName(SERIALIZED_NAME_AVAILABLE_IPS_COUNTS) - private List availableIpsCounts = null; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_SUBNET_IDS = "SubnetIds"; - - @SerializedName(SERIALIZED_NAME_SUBNET_IDS) - private List subnetIds = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public FiltersSubnet() {} - - public FiltersSubnet availableIpsCounts(List availableIpsCounts) { - - this.availableIpsCounts = availableIpsCounts; - return this; - } - - public FiltersSubnet addAvailableIpsCountsItem(Integer availableIpsCountsItem) { - if (this.availableIpsCounts == null) { - this.availableIpsCounts = new ArrayList<>(); - } - this.availableIpsCounts.add(availableIpsCountsItem); - return this; - } - - /** - * The number of available IPs. - * - * @return availableIpsCounts - */ - @javax.annotation.Nullable - public List getAvailableIpsCounts() { - return availableIpsCounts; - } - - public void setAvailableIpsCounts(List availableIpsCounts) { - this.availableIpsCounts = availableIpsCounts; - } - - public FiltersSubnet ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public FiltersSubnet addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * The IP ranges in the Subnets, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - public FiltersSubnet netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersSubnet addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets in which the Subnets are. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersSubnet states(List states) { - - this.states = states; - return this; - } - - public FiltersSubnet addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the Subnets (`pending` \\| `available` \\| - * `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersSubnet subnetIds(List subnetIds) { - - this.subnetIds = subnetIds; - return this; - } - - public FiltersSubnet addSubnetIdsItem(String subnetIdsItem) { - if (this.subnetIds == null) { - this.subnetIds = new ArrayList<>(); - } - this.subnetIds.add(subnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets. - * - * @return subnetIds - */ - @javax.annotation.Nullable - public List getSubnetIds() { - return subnetIds; - } - - public void setSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - } - - public FiltersSubnet subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersSubnet addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions in which the Subnets are located. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersSubnet tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersSubnet addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the Subnets. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersSubnet tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersSubnet addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the Subnets. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersSubnet tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersSubnet addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the Subnets, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersSubnet filtersSubnet = (FiltersSubnet) o; - return Objects.equals(this.availableIpsCounts, filtersSubnet.availableIpsCounts) - && Objects.equals(this.ipRanges, filtersSubnet.ipRanges) - && Objects.equals(this.netIds, filtersSubnet.netIds) - && Objects.equals(this.states, filtersSubnet.states) - && Objects.equals(this.subnetIds, filtersSubnet.subnetIds) - && Objects.equals(this.subregionNames, filtersSubnet.subregionNames) - && Objects.equals(this.tagKeys, filtersSubnet.tagKeys) - && Objects.equals(this.tagValues, filtersSubnet.tagValues) - && Objects.equals(this.tags, filtersSubnet.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - availableIpsCounts, - ipRanges, - netIds, - states, - subnetIds, - subregionNames, - tagKeys, - tagValues, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersSubnet {\n"); - sb.append(" availableIpsCounts: ") - .append(toIndentedString(availableIpsCounts)) - .append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" subnetIds: ").append(toIndentedString(subnetIds)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AvailableIpsCounts"); - openapiFields.add("IpRanges"); - openapiFields.add("NetIds"); - openapiFields.add("States"); - openapiFields.add("SubnetIds"); - openapiFields.add("SubregionNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersSubnet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersSubnet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersSubnet is not found in the" - + " empty JSON string", - FiltersSubnet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersSubnet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersSubnet` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AvailableIpsCounts") != null - && !jsonObj.get("AvailableIpsCounts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AvailableIpsCounts` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AvailableIpsCounts").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubnetIds") != null && !jsonObj.get("SubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("SubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersSubnet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersSubnet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersSubnet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersSubnet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersSubnet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersSubnet given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersSubnet - * @throws IOException if the JSON string is invalid with respect to FiltersSubnet - */ - public static FiltersSubnet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersSubnet.class); - } - - /** - * Convert an instance of FiltersSubnet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregion.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregion.java deleted file mode 100644 index f23c0c39..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregion.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersSubregion { - public static final String SERIALIZED_NAME_REGION_NAMES = "RegionNames"; - - @SerializedName(SERIALIZED_NAME_REGION_NAMES) - private List regionNames = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public FiltersSubregion() {} - - public FiltersSubregion regionNames(List regionNames) { - - this.regionNames = regionNames; - return this; - } - - public FiltersSubregion addRegionNamesItem(String regionNamesItem) { - if (this.regionNames == null) { - this.regionNames = new ArrayList<>(); - } - this.regionNames.add(regionNamesItem); - return this; - } - - /** - * The names of the Regions containing the Subregions. - * - * @return regionNames - */ - @javax.annotation.Nullable - public List getRegionNames() { - return regionNames; - } - - public void setRegionNames(List regionNames) { - this.regionNames = regionNames; - } - - public FiltersSubregion states(List states) { - - this.states = states; - return this; - } - - public FiltersSubregion addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the Subregions. - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersSubregion subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersSubregion addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersSubregion filtersSubregion = (FiltersSubregion) o; - return Objects.equals(this.regionNames, filtersSubregion.regionNames) - && Objects.equals(this.states, filtersSubregion.states) - && Objects.equals(this.subregionNames, filtersSubregion.subregionNames); - } - - @Override - public int hashCode() { - return Objects.hash(regionNames, states, subregionNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersSubregion {\n"); - sb.append(" regionNames: ").append(toIndentedString(regionNames)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("RegionNames"); - openapiFields.add("States"); - openapiFields.add("SubregionNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersSubregion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersSubregion.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersSubregion is not found in the" - + " empty JSON string", - FiltersSubregion.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersSubregion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersSubregion` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("RegionNames") != null && !jsonObj.get("RegionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RegionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("RegionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersSubregion.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersSubregion' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersSubregion.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersSubregion value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersSubregion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersSubregion given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersSubregion - * @throws IOException if the JSON string is invalid with respect to FiltersSubregion - */ - public static FiltersSubregion fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersSubregion.class); - } - - /** - * Convert an instance of FiltersSubregion to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersTag.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersTag.java deleted file mode 100644 index 66adb463..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersTag.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersTag { - public static final String SERIALIZED_NAME_KEYS = "Keys"; - - @SerializedName(SERIALIZED_NAME_KEYS) - private List keys = null; - - public static final String SERIALIZED_NAME_RESOURCE_IDS = "ResourceIds"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_IDS) - private List resourceIds = null; - - public static final String SERIALIZED_NAME_RESOURCE_TYPES = "ResourceTypes"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_TYPES) - private List resourceTypes = null; - - public static final String SERIALIZED_NAME_VALUES = "Values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - private List values = null; - - public FiltersTag() {} - - public FiltersTag keys(List keys) { - - this.keys = keys; - return this; - } - - public FiltersTag addKeysItem(String keysItem) { - if (this.keys == null) { - this.keys = new ArrayList<>(); - } - this.keys.add(keysItem); - return this; - } - - /** - * The keys of the tags that are assigned to the resources. You can use this filter alongside - * the `Values` filter. In that case, you filter the resources corresponding to each - * tag, regardless of the other filter. - * - * @return keys - */ - @javax.annotation.Nullable - public List getKeys() { - return keys; - } - - public void setKeys(List keys) { - this.keys = keys; - } - - public FiltersTag resourceIds(List resourceIds) { - - this.resourceIds = resourceIds; - return this; - } - - public FiltersTag addResourceIdsItem(String resourceIdsItem) { - if (this.resourceIds == null) { - this.resourceIds = new ArrayList<>(); - } - this.resourceIds.add(resourceIdsItem); - return this; - } - - /** - * The IDs of the resources with which the tags are associated. - * - * @return resourceIds - */ - @javax.annotation.Nullable - public List getResourceIds() { - return resourceIds; - } - - public void setResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - } - - public FiltersTag resourceTypes(List resourceTypes) { - - this.resourceTypes = resourceTypes; - return this; - } - - public FiltersTag addResourceTypesItem(String resourceTypesItem) { - if (this.resourceTypes == null) { - this.resourceTypes = new ArrayList<>(); - } - this.resourceTypes.add(resourceTypesItem); - return this; - } - - /** - * The resource type (`vm` \\| `image` \\| `volume` \\| - * `snapshot` \\| `public-ip` \\| `security-group` \\| - * `route-table` \\| `nic` \\| `net` \\| `subnet` \\| - * `net-peering` \\| `net-access-point` \\| `nat-service` \\| - * `internet-service` \\| `client-gateway` \\| `virtual-gateway` - * \\| `vpn-connection` \\| `dhcp-options` \\| `task`). - * - * @return resourceTypes - */ - @javax.annotation.Nullable - public List getResourceTypes() { - return resourceTypes; - } - - public void setResourceTypes(List resourceTypes) { - this.resourceTypes = resourceTypes; - } - - public FiltersTag values(List values) { - - this.values = values; - return this; - } - - public FiltersTag addValuesItem(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * The values of the tags that are assigned to the resources. You can use this filter alongside - * the `TagKeys` filter. In that case, you filter the resources corresponding to each - * tag, regardless of the other filter. - * - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; - } - - public void setValues(List values) { - this.values = values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersTag filtersTag = (FiltersTag) o; - return Objects.equals(this.keys, filtersTag.keys) - && Objects.equals(this.resourceIds, filtersTag.resourceIds) - && Objects.equals(this.resourceTypes, filtersTag.resourceTypes) - && Objects.equals(this.values, filtersTag.values); - } - - @Override - public int hashCode() { - return Objects.hash(keys, resourceIds, resourceTypes, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersTag {\n"); - sb.append(" keys: ").append(toIndentedString(keys)).append("\n"); - sb.append(" resourceIds: ").append(toIndentedString(resourceIds)).append("\n"); - sb.append(" resourceTypes: ").append(toIndentedString(resourceTypes)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Keys"); - openapiFields.add("ResourceIds"); - openapiFields.add("ResourceTypes"); - openapiFields.add("Values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersTag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersTag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersTag is not found in the empty" - + " JSON string", - FiltersTag.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersTag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersTag` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Keys") != null && !jsonObj.get("Keys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Keys` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Keys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ResourceIds") != null && !jsonObj.get("ResourceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ResourceIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ResourceTypes") != null && !jsonObj.get("ResourceTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceTypes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ResourceTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Values") != null && !jsonObj.get("Values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Values` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Values").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersTag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersTag' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersTag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersTag value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersTag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersTag given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersTag - * @throws IOException if the JSON string is invalid with respect to FiltersTag - */ - public static FiltersTag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersTag.class); - } - - /** - * Convert an instance of FiltersTag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroup.java deleted file mode 100644 index 00971a97..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroup.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersUserGroup { - public static final String SERIALIZED_NAME_PATH_PREFIX = "PathPrefix"; - - @SerializedName(SERIALIZED_NAME_PATH_PREFIX) - private String pathPrefix; - - public static final String SERIALIZED_NAME_USER_GROUP_IDS = "UserGroupIds"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_IDS) - private List userGroupIds = null; - - public FiltersUserGroup() {} - - public FiltersUserGroup pathPrefix(String pathPrefix) { - - this.pathPrefix = pathPrefix; - return this; - } - - /** - * The path prefix of the groups. If not specified, it is set to a slash (`/`). - * - * @return pathPrefix - */ - @javax.annotation.Nullable - public String getPathPrefix() { - return pathPrefix; - } - - public void setPathPrefix(String pathPrefix) { - this.pathPrefix = pathPrefix; - } - - public FiltersUserGroup userGroupIds(List userGroupIds) { - - this.userGroupIds = userGroupIds; - return this; - } - - public FiltersUserGroup addUserGroupIdsItem(String userGroupIdsItem) { - if (this.userGroupIds == null) { - this.userGroupIds = new ArrayList<>(); - } - this.userGroupIds.add(userGroupIdsItem); - return this; - } - - /** - * The IDs of the user groups. - * - * @return userGroupIds - */ - @javax.annotation.Nullable - public List getUserGroupIds() { - return userGroupIds; - } - - public void setUserGroupIds(List userGroupIds) { - this.userGroupIds = userGroupIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersUserGroup filtersUserGroup = (FiltersUserGroup) o; - return Objects.equals(this.pathPrefix, filtersUserGroup.pathPrefix) - && Objects.equals(this.userGroupIds, filtersUserGroup.userGroupIds); - } - - @Override - public int hashCode() { - return Objects.hash(pathPrefix, userGroupIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersUserGroup {\n"); - sb.append(" pathPrefix: ").append(toIndentedString(pathPrefix)).append("\n"); - sb.append(" userGroupIds: ").append(toIndentedString(userGroupIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PathPrefix"); - openapiFields.add("UserGroupIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersUserGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersUserGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersUserGroup is not found in the" - + " empty JSON string", - FiltersUserGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersUserGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersUserGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PathPrefix") != null && !jsonObj.get("PathPrefix").isJsonNull()) - && !jsonObj.get("PathPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPrefix").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("UserGroupIds") != null && !jsonObj.get("UserGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("UserGroupIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersUserGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersUserGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersUserGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersUserGroup value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersUserGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersUserGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersUserGroup - * @throws IOException if the JSON string is invalid with respect to FiltersUserGroup - */ - public static FiltersUserGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersUserGroup.class); - } - - /** - * Convert an instance of FiltersUserGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGateway.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGateway.java deleted file mode 100644 index c4c0d445..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGateway.java +++ /dev/null @@ -1,533 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVirtualGateway { - public static final String SERIALIZED_NAME_CONNECTION_TYPES = "ConnectionTypes"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPES) - private List connectionTypes = null; - - public static final String SERIALIZED_NAME_LINK_NET_IDS = "LinkNetIds"; - - @SerializedName(SERIALIZED_NAME_LINK_NET_IDS) - private List linkNetIds = null; - - public static final String SERIALIZED_NAME_LINK_STATES = "LinkStates"; - - @SerializedName(SERIALIZED_NAME_LINK_STATES) - private List linkStates = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_IDS = "VirtualGatewayIds"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_IDS) - private List virtualGatewayIds = null; - - public FiltersVirtualGateway() {} - - public FiltersVirtualGateway connectionTypes(List connectionTypes) { - - this.connectionTypes = connectionTypes; - return this; - } - - public FiltersVirtualGateway addConnectionTypesItem(String connectionTypesItem) { - if (this.connectionTypes == null) { - this.connectionTypes = new ArrayList<>(); - } - this.connectionTypes.add(connectionTypesItem); - return this; - } - - /** - * The types of the virtual gateways (always `ipsec.1`). - * - * @return connectionTypes - */ - @javax.annotation.Nullable - public List getConnectionTypes() { - return connectionTypes; - } - - public void setConnectionTypes(List connectionTypes) { - this.connectionTypes = connectionTypes; - } - - public FiltersVirtualGateway linkNetIds(List linkNetIds) { - - this.linkNetIds = linkNetIds; - return this; - } - - public FiltersVirtualGateway addLinkNetIdsItem(String linkNetIdsItem) { - if (this.linkNetIds == null) { - this.linkNetIds = new ArrayList<>(); - } - this.linkNetIds.add(linkNetIdsItem); - return this; - } - - /** - * The IDs of the Nets the virtual gateways are attached to. - * - * @return linkNetIds - */ - @javax.annotation.Nullable - public List getLinkNetIds() { - return linkNetIds; - } - - public void setLinkNetIds(List linkNetIds) { - this.linkNetIds = linkNetIds; - } - - public FiltersVirtualGateway linkStates(List linkStates) { - - this.linkStates = linkStates; - return this; - } - - public FiltersVirtualGateway addLinkStatesItem(String linkStatesItem) { - if (this.linkStates == null) { - this.linkStates = new ArrayList<>(); - } - this.linkStates.add(linkStatesItem); - return this; - } - - /** - * The current states of the attachments between the virtual gateways and the Nets - * (`attaching` \\| `attached` \\| `detaching` \\| - * `detached`). - * - * @return linkStates - */ - @javax.annotation.Nullable - public List getLinkStates() { - return linkStates; - } - - public void setLinkStates(List linkStates) { - this.linkStates = linkStates; - } - - public FiltersVirtualGateway states(List states) { - - this.states = states; - return this; - } - - public FiltersVirtualGateway addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the virtual gateways (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersVirtualGateway tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVirtualGateway addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the virtual gateways. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVirtualGateway tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVirtualGateway addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the virtual gateways. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVirtualGateway tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVirtualGateway addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the virtual gateways, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVirtualGateway virtualGatewayIds(List virtualGatewayIds) { - - this.virtualGatewayIds = virtualGatewayIds; - return this; - } - - public FiltersVirtualGateway addVirtualGatewayIdsItem(String virtualGatewayIdsItem) { - if (this.virtualGatewayIds == null) { - this.virtualGatewayIds = new ArrayList<>(); - } - this.virtualGatewayIds.add(virtualGatewayIdsItem); - return this; - } - - /** - * The IDs of the virtual gateways. - * - * @return virtualGatewayIds - */ - @javax.annotation.Nullable - public List getVirtualGatewayIds() { - return virtualGatewayIds; - } - - public void setVirtualGatewayIds(List virtualGatewayIds) { - this.virtualGatewayIds = virtualGatewayIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVirtualGateway filtersVirtualGateway = (FiltersVirtualGateway) o; - return Objects.equals(this.connectionTypes, filtersVirtualGateway.connectionTypes) - && Objects.equals(this.linkNetIds, filtersVirtualGateway.linkNetIds) - && Objects.equals(this.linkStates, filtersVirtualGateway.linkStates) - && Objects.equals(this.states, filtersVirtualGateway.states) - && Objects.equals(this.tagKeys, filtersVirtualGateway.tagKeys) - && Objects.equals(this.tagValues, filtersVirtualGateway.tagValues) - && Objects.equals(this.tags, filtersVirtualGateway.tags) - && Objects.equals(this.virtualGatewayIds, filtersVirtualGateway.virtualGatewayIds); - } - - @Override - public int hashCode() { - return Objects.hash( - connectionTypes, - linkNetIds, - linkStates, - states, - tagKeys, - tagValues, - tags, - virtualGatewayIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVirtualGateway {\n"); - sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n"); - sb.append(" linkNetIds: ").append(toIndentedString(linkNetIds)).append("\n"); - sb.append(" linkStates: ").append(toIndentedString(linkStates)).append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" virtualGatewayIds: ") - .append(toIndentedString(virtualGatewayIds)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ConnectionTypes"); - openapiFields.add("LinkNetIds"); - openapiFields.add("LinkStates"); - openapiFields.add("States"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VirtualGatewayIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVirtualGateway - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVirtualGateway.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVirtualGateway is not found in" - + " the empty JSON string", - FiltersVirtualGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVirtualGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVirtualGateway` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ConnectionTypes") != null - && !jsonObj.get("ConnectionTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ConnectionTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkNetIds") != null && !jsonObj.get("LinkNetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LinkNetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkStates") != null && !jsonObj.get("LinkStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkStates` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("LinkStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VirtualGatewayIds") != null - && !jsonObj.get("VirtualGatewayIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VirtualGatewayIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVirtualGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVirtualGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVirtualGateway.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVirtualGateway value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVirtualGateway read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVirtualGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVirtualGateway - * @throws IOException if the JSON string is invalid with respect to FiltersVirtualGateway - */ - public static FiltersVirtualGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVirtualGateway.class); - } - - /** - * Convert an instance of FiltersVirtualGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVm.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVm.java deleted file mode 100644 index ea43ace8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVm.java +++ /dev/null @@ -1,3100 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVm { - public static final String SERIALIZED_NAME_ARCHITECTURES = "Architectures"; - - @SerializedName(SERIALIZED_NAME_ARCHITECTURES) - private List architectures = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DELETE_ON_VM_DELETION = - "BlockDeviceMappingDeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DELETE_ON_VM_DELETION) - private Boolean blockDeviceMappingDeleteOnVmDeletion; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DEVICE_NAMES = - "BlockDeviceMappingDeviceNames"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_DEVICE_NAMES) - private List blockDeviceMappingDeviceNames = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_LINK_DATES = - "BlockDeviceMappingLinkDates"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_LINK_DATES) - private List blockDeviceMappingLinkDates = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_STATES = - "BlockDeviceMappingStates"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_STATES) - private List blockDeviceMappingStates = null; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_IDS = - "BlockDeviceMappingVolumeIds"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPING_VOLUME_IDS) - private List blockDeviceMappingVolumeIds = null; - - public static final String SERIALIZED_NAME_CLIENT_TOKENS = "ClientTokens"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKENS) - private List clientTokens = null; - - public static final String SERIALIZED_NAME_CREATION_DATES = "CreationDates"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATES) - private List creationDates = null; - - public static final String SERIALIZED_NAME_IMAGE_IDS = "ImageIds"; - - @SerializedName(SERIALIZED_NAME_IMAGE_IDS) - private List imageIds = null; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED = "IsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED) - private Boolean isSourceDestChecked; - - public static final String SERIALIZED_NAME_KEYPAIR_NAMES = "KeypairNames"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAMES) - private List keypairNames = null; - - public static final String SERIALIZED_NAME_LAUNCH_NUMBERS = "LaunchNumbers"; - - @SerializedName(SERIALIZED_NAME_LAUNCH_NUMBERS) - private List launchNumbers = null; - - public static final String SERIALIZED_NAME_LIFECYCLES = "Lifecycles"; - - @SerializedName(SERIALIZED_NAME_LIFECYCLES) - private List lifecycles = null; - - public static final String SERIALIZED_NAME_NET_IDS = "NetIds"; - - @SerializedName(SERIALIZED_NAME_NET_IDS) - private List netIds = null; - - public static final String SERIALIZED_NAME_NIC_ACCOUNT_IDS = "NicAccountIds"; - - @SerializedName(SERIALIZED_NAME_NIC_ACCOUNT_IDS) - private List nicAccountIds = null; - - public static final String SERIALIZED_NAME_NIC_DESCRIPTIONS = "NicDescriptions"; - - @SerializedName(SERIALIZED_NAME_NIC_DESCRIPTIONS) - private List nicDescriptions = null; - - public static final String SERIALIZED_NAME_NIC_IS_SOURCE_DEST_CHECKED = - "NicIsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_NIC_IS_SOURCE_DEST_CHECKED) - private Boolean nicIsSourceDestChecked; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_DELETE_ON_VM_DELETION = - "NicLinkNicDeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_DELETE_ON_VM_DELETION) - private Boolean nicLinkNicDeleteOnVmDeletion; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_DEVICE_NUMBERS = - "NicLinkNicDeviceNumbers"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_DEVICE_NUMBERS) - private List nicLinkNicDeviceNumbers = null; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_LINK_NIC_DATES = - "NicLinkNicLinkNicDates"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_LINK_NIC_DATES) - private List nicLinkNicLinkNicDates = null; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_LINK_NIC_IDS = "NicLinkNicLinkNicIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_LINK_NIC_IDS) - private List nicLinkNicLinkNicIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_STATES = "NicLinkNicStates"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_STATES) - private List nicLinkNicStates = null; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_VM_ACCOUNT_IDS = - "NicLinkNicVmAccountIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_VM_ACCOUNT_IDS) - private List nicLinkNicVmAccountIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_NIC_VM_IDS = "NicLinkNicVmIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_NIC_VM_IDS) - private List nicLinkNicVmIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_ACCOUNT_IDS = - "NicLinkPublicIpAccountIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_ACCOUNT_IDS) - private List nicLinkPublicIpAccountIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_LINK_PUBLIC_IP_IDS = - "NicLinkPublicIpLinkPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_LINK_PUBLIC_IP_IDS) - private List nicLinkPublicIpLinkPublicIpIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_PUBLIC_IP_IDS = - "NicLinkPublicIpPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_PUBLIC_IP_IDS) - private List nicLinkPublicIpPublicIpIds = null; - - public static final String SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_PUBLIC_IPS = - "NicLinkPublicIpPublicIps"; - - @SerializedName(SERIALIZED_NAME_NIC_LINK_PUBLIC_IP_PUBLIC_IPS) - private List nicLinkPublicIpPublicIps = null; - - public static final String SERIALIZED_NAME_NIC_MAC_ADDRESSES = "NicMacAddresses"; - - @SerializedName(SERIALIZED_NAME_NIC_MAC_ADDRESSES) - private List nicMacAddresses = null; - - public static final String SERIALIZED_NAME_NIC_NET_IDS = "NicNetIds"; - - @SerializedName(SERIALIZED_NAME_NIC_NET_IDS) - private List nicNetIds = null; - - public static final String SERIALIZED_NAME_NIC_NIC_IDS = "NicNicIds"; - - @SerializedName(SERIALIZED_NAME_NIC_NIC_IDS) - private List nicNicIds = null; - - public static final String SERIALIZED_NAME_NIC_PRIVATE_IPS_LINK_PUBLIC_IP_ACCOUNT_IDS = - "NicPrivateIpsLinkPublicIpAccountIds"; - - @SerializedName(SERIALIZED_NAME_NIC_PRIVATE_IPS_LINK_PUBLIC_IP_ACCOUNT_IDS) - private List nicPrivateIpsLinkPublicIpAccountIds = null; - - public static final String SERIALIZED_NAME_NIC_PRIVATE_IPS_LINK_PUBLIC_IP_IDS = - "NicPrivateIpsLinkPublicIpIds"; - - @SerializedName(SERIALIZED_NAME_NIC_PRIVATE_IPS_LINK_PUBLIC_IP_IDS) - private List nicPrivateIpsLinkPublicIpIds = null; - - public static final String SERIALIZED_NAME_NIC_PRIVATE_IPS_PRIMARY_IP = - "NicPrivateIpsPrimaryIp"; - - @SerializedName(SERIALIZED_NAME_NIC_PRIVATE_IPS_PRIMARY_IP) - private Boolean nicPrivateIpsPrimaryIp; - - public static final String SERIALIZED_NAME_NIC_PRIVATE_IPS_PRIVATE_IPS = - "NicPrivateIpsPrivateIps"; - - @SerializedName(SERIALIZED_NAME_NIC_PRIVATE_IPS_PRIVATE_IPS) - private List nicPrivateIpsPrivateIps = null; - - public static final String SERIALIZED_NAME_NIC_SECURITY_GROUP_IDS = "NicSecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_NIC_SECURITY_GROUP_IDS) - private List nicSecurityGroupIds = null; - - public static final String SERIALIZED_NAME_NIC_SECURITY_GROUP_NAMES = "NicSecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_NIC_SECURITY_GROUP_NAMES) - private List nicSecurityGroupNames = null; - - public static final String SERIALIZED_NAME_NIC_STATES = "NicStates"; - - @SerializedName(SERIALIZED_NAME_NIC_STATES) - private List nicStates = null; - - public static final String SERIALIZED_NAME_NIC_SUBNET_IDS = "NicSubnetIds"; - - @SerializedName(SERIALIZED_NAME_NIC_SUBNET_IDS) - private List nicSubnetIds = null; - - public static final String SERIALIZED_NAME_NIC_SUBREGION_NAMES = "NicSubregionNames"; - - @SerializedName(SERIALIZED_NAME_NIC_SUBREGION_NAMES) - private List nicSubregionNames = null; - - public static final String SERIALIZED_NAME_PLATFORMS = "Platforms"; - - @SerializedName(SERIALIZED_NAME_PLATFORMS) - private List platforms = null; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_PRODUCT_CODES = "ProductCodes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODES) - private List productCodes = null; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_RESERVATION_IDS = "ReservationIds"; - - @SerializedName(SERIALIZED_NAME_RESERVATION_IDS) - private List reservationIds = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_NAMES = "RootDeviceNames"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_NAMES) - private List rootDeviceNames = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_TYPES = "RootDeviceTypes"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_TYPES) - private List rootDeviceTypes = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAMES = "SecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAMES) - private List securityGroupNames = null; - - public static final String SERIALIZED_NAME_STATE_REASON_CODES = "StateReasonCodes"; - - @SerializedName(SERIALIZED_NAME_STATE_REASON_CODES) - private List stateReasonCodes = null; - - public static final String SERIALIZED_NAME_STATE_REASON_MESSAGES = "StateReasonMessages"; - - @SerializedName(SERIALIZED_NAME_STATE_REASON_MESSAGES) - private List stateReasonMessages = null; - - public static final String SERIALIZED_NAME_STATE_REASONS = "StateReasons"; - - @SerializedName(SERIALIZED_NAME_STATE_REASONS) - private List stateReasons = null; - - public static final String SERIALIZED_NAME_SUBNET_IDS = "SubnetIds"; - - @SerializedName(SERIALIZED_NAME_SUBNET_IDS) - private List subnetIds = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_TENANCIES = "Tenancies"; - - @SerializedName(SERIALIZED_NAME_TENANCIES) - private List tenancies = null; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public static final String SERIALIZED_NAME_VM_SECURITY_GROUP_IDS = "VmSecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_VM_SECURITY_GROUP_IDS) - private List vmSecurityGroupIds = null; - - public static final String SERIALIZED_NAME_VM_SECURITY_GROUP_NAMES = "VmSecurityGroupNames"; - - @SerializedName(SERIALIZED_NAME_VM_SECURITY_GROUP_NAMES) - private List vmSecurityGroupNames = null; - - public static final String SERIALIZED_NAME_VM_STATE_CODES = "VmStateCodes"; - - @SerializedName(SERIALIZED_NAME_VM_STATE_CODES) - private List vmStateCodes = null; - - public static final String SERIALIZED_NAME_VM_STATE_NAMES = "VmStateNames"; - - @SerializedName(SERIALIZED_NAME_VM_STATE_NAMES) - private List vmStateNames = null; - - public static final String SERIALIZED_NAME_VM_TYPES = "VmTypes"; - - @SerializedName(SERIALIZED_NAME_VM_TYPES) - private List vmTypes = null; - - public FiltersVm() {} - - public FiltersVm architectures(List architectures) { - - this.architectures = architectures; - return this; - } - - public FiltersVm addArchitecturesItem(String architecturesItem) { - if (this.architectures == null) { - this.architectures = new ArrayList<>(); - } - this.architectures.add(architecturesItem); - return this; - } - - /** - * The architectures of the VMs (`i386` \\| `x86_64`). - * - * @return architectures - */ - @javax.annotation.Nullable - public List getArchitectures() { - return architectures; - } - - public void setArchitectures(List architectures) { - this.architectures = architectures; - } - - public FiltersVm blockDeviceMappingDeleteOnVmDeletion( - Boolean blockDeviceMappingDeleteOnVmDeletion) { - - this.blockDeviceMappingDeleteOnVmDeletion = blockDeviceMappingDeleteOnVmDeletion; - return this; - } - - /** - * Whether the BSU volumes are deleted when terminating the VMs. - * - * @return blockDeviceMappingDeleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getBlockDeviceMappingDeleteOnVmDeletion() { - return blockDeviceMappingDeleteOnVmDeletion; - } - - public void setBlockDeviceMappingDeleteOnVmDeletion( - Boolean blockDeviceMappingDeleteOnVmDeletion) { - this.blockDeviceMappingDeleteOnVmDeletion = blockDeviceMappingDeleteOnVmDeletion; - } - - public FiltersVm blockDeviceMappingDeviceNames(List blockDeviceMappingDeviceNames) { - - this.blockDeviceMappingDeviceNames = blockDeviceMappingDeviceNames; - return this; - } - - public FiltersVm addBlockDeviceMappingDeviceNamesItem( - String blockDeviceMappingDeviceNamesItem) { - if (this.blockDeviceMappingDeviceNames == null) { - this.blockDeviceMappingDeviceNames = new ArrayList<>(); - } - this.blockDeviceMappingDeviceNames.add(blockDeviceMappingDeviceNamesItem); - return this; - } - - /** - * The device names for the BSU volumes (in the format `/dev/sdX`, - * `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). - * - * @return blockDeviceMappingDeviceNames - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingDeviceNames() { - return blockDeviceMappingDeviceNames; - } - - public void setBlockDeviceMappingDeviceNames(List blockDeviceMappingDeviceNames) { - this.blockDeviceMappingDeviceNames = blockDeviceMappingDeviceNames; - } - - public FiltersVm blockDeviceMappingLinkDates(List blockDeviceMappingLinkDates) { - - this.blockDeviceMappingLinkDates = blockDeviceMappingLinkDates; - return this; - } - - public FiltersVm addBlockDeviceMappingLinkDatesItem(LocalDate blockDeviceMappingLinkDatesItem) { - if (this.blockDeviceMappingLinkDates == null) { - this.blockDeviceMappingLinkDates = new ArrayList<>(); - } - this.blockDeviceMappingLinkDates.add(blockDeviceMappingLinkDatesItem); - return this; - } - - /** - * The link dates for the BSU volumes mapped to the VMs (for example, - * `2016-01-23T18:45:30.000Z`). - * - * @return blockDeviceMappingLinkDates - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingLinkDates() { - return blockDeviceMappingLinkDates; - } - - public void setBlockDeviceMappingLinkDates(List blockDeviceMappingLinkDates) { - this.blockDeviceMappingLinkDates = blockDeviceMappingLinkDates; - } - - public FiltersVm blockDeviceMappingStates(List blockDeviceMappingStates) { - - this.blockDeviceMappingStates = blockDeviceMappingStates; - return this; - } - - public FiltersVm addBlockDeviceMappingStatesItem(String blockDeviceMappingStatesItem) { - if (this.blockDeviceMappingStates == null) { - this.blockDeviceMappingStates = new ArrayList<>(); - } - this.blockDeviceMappingStates.add(blockDeviceMappingStatesItem); - return this; - } - - /** - * The states for the BSU volumes (`attaching` \\| `attached` \\| - * `detaching` \\| `detached`). - * - * @return blockDeviceMappingStates - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingStates() { - return blockDeviceMappingStates; - } - - public void setBlockDeviceMappingStates(List blockDeviceMappingStates) { - this.blockDeviceMappingStates = blockDeviceMappingStates; - } - - public FiltersVm blockDeviceMappingVolumeIds(List blockDeviceMappingVolumeIds) { - - this.blockDeviceMappingVolumeIds = blockDeviceMappingVolumeIds; - return this; - } - - public FiltersVm addBlockDeviceMappingVolumeIdsItem(String blockDeviceMappingVolumeIdsItem) { - if (this.blockDeviceMappingVolumeIds == null) { - this.blockDeviceMappingVolumeIds = new ArrayList<>(); - } - this.blockDeviceMappingVolumeIds.add(blockDeviceMappingVolumeIdsItem); - return this; - } - - /** - * The volume IDs of the BSU volumes. - * - * @return blockDeviceMappingVolumeIds - */ - @javax.annotation.Nullable - public List getBlockDeviceMappingVolumeIds() { - return blockDeviceMappingVolumeIds; - } - - public void setBlockDeviceMappingVolumeIds(List blockDeviceMappingVolumeIds) { - this.blockDeviceMappingVolumeIds = blockDeviceMappingVolumeIds; - } - - public FiltersVm clientTokens(List clientTokens) { - - this.clientTokens = clientTokens; - return this; - } - - public FiltersVm addClientTokensItem(String clientTokensItem) { - if (this.clientTokens == null) { - this.clientTokens = new ArrayList<>(); - } - this.clientTokens.add(clientTokensItem); - return this; - } - - /** - * The idempotency tokens provided when launching the VMs. - * - * @return clientTokens - */ - @javax.annotation.Nullable - public List getClientTokens() { - return clientTokens; - } - - public void setClientTokens(List clientTokens) { - this.clientTokens = clientTokens; - } - - public FiltersVm creationDates(List creationDates) { - - this.creationDates = creationDates; - return this; - } - - public FiltersVm addCreationDatesItem(LocalDate creationDatesItem) { - if (this.creationDates == null) { - this.creationDates = new ArrayList<>(); - } - this.creationDates.add(creationDatesItem); - return this; - } - - /** - * The dates when the VMs were launched. - * - * @return creationDates - */ - @javax.annotation.Nullable - public List getCreationDates() { - return creationDates; - } - - public void setCreationDates(List creationDates) { - this.creationDates = creationDates; - } - - public FiltersVm imageIds(List imageIds) { - - this.imageIds = imageIds; - return this; - } - - public FiltersVm addImageIdsItem(String imageIdsItem) { - if (this.imageIds == null) { - this.imageIds = new ArrayList<>(); - } - this.imageIds.add(imageIdsItem); - return this; - } - - /** - * The IDs of the OMIs used to launch the VMs. - * - * @return imageIds - */ - @javax.annotation.Nullable - public List getImageIds() { - return imageIds; - } - - public void setImageIds(List imageIds) { - this.imageIds = imageIds; - } - - public FiltersVm isSourceDestChecked(Boolean isSourceDestChecked) { - - this.isSourceDestChecked = isSourceDestChecked; - return this; - } - - /** - * Whether the source/destination checking is enabled (true) or disabled (false). - * - * @return isSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestChecked() { - return isSourceDestChecked; - } - - public void setIsSourceDestChecked(Boolean isSourceDestChecked) { - this.isSourceDestChecked = isSourceDestChecked; - } - - public FiltersVm keypairNames(List keypairNames) { - - this.keypairNames = keypairNames; - return this; - } - - public FiltersVm addKeypairNamesItem(String keypairNamesItem) { - if (this.keypairNames == null) { - this.keypairNames = new ArrayList<>(); - } - this.keypairNames.add(keypairNamesItem); - return this; - } - - /** - * The names of the keypairs used when launching the VMs. - * - * @return keypairNames - */ - @javax.annotation.Nullable - public List getKeypairNames() { - return keypairNames; - } - - public void setKeypairNames(List keypairNames) { - this.keypairNames = keypairNames; - } - - public FiltersVm launchNumbers(List launchNumbers) { - - this.launchNumbers = launchNumbers; - return this; - } - - public FiltersVm addLaunchNumbersItem(Integer launchNumbersItem) { - if (this.launchNumbers == null) { - this.launchNumbers = new ArrayList<>(); - } - this.launchNumbers.add(launchNumbersItem); - return this; - } - - /** - * The numbers for the VMs when launching a group of several VMs (for example, `0`, - * `1`, `2`, and so on). - * - * @return launchNumbers - */ - @javax.annotation.Nullable - public List getLaunchNumbers() { - return launchNumbers; - } - - public void setLaunchNumbers(List launchNumbers) { - this.launchNumbers = launchNumbers; - } - - public FiltersVm lifecycles(List lifecycles) { - - this.lifecycles = lifecycles; - return this; - } - - public FiltersVm addLifecyclesItem(String lifecyclesItem) { - if (this.lifecycles == null) { - this.lifecycles = new ArrayList<>(); - } - this.lifecycles.add(lifecyclesItem); - return this; - } - - /** - * Whether the VMs are Spot Instances (spot). - * - * @return lifecycles - */ - @javax.annotation.Nullable - public List getLifecycles() { - return lifecycles; - } - - public void setLifecycles(List lifecycles) { - this.lifecycles = lifecycles; - } - - public FiltersVm netIds(List netIds) { - - this.netIds = netIds; - return this; - } - - public FiltersVm addNetIdsItem(String netIdsItem) { - if (this.netIds == null) { - this.netIds = new ArrayList<>(); - } - this.netIds.add(netIdsItem); - return this; - } - - /** - * The IDs of the Nets in which the VMs are running. - * - * @return netIds - */ - @javax.annotation.Nullable - public List getNetIds() { - return netIds; - } - - public void setNetIds(List netIds) { - this.netIds = netIds; - } - - public FiltersVm nicAccountIds(List nicAccountIds) { - - this.nicAccountIds = nicAccountIds; - return this; - } - - public FiltersVm addNicAccountIdsItem(String nicAccountIdsItem) { - if (this.nicAccountIds == null) { - this.nicAccountIds = new ArrayList<>(); - } - this.nicAccountIds.add(nicAccountIdsItem); - return this; - } - - /** - * The IDs of the NICs. - * - * @return nicAccountIds - */ - @javax.annotation.Nullable - public List getNicAccountIds() { - return nicAccountIds; - } - - public void setNicAccountIds(List nicAccountIds) { - this.nicAccountIds = nicAccountIds; - } - - public FiltersVm nicDescriptions(List nicDescriptions) { - - this.nicDescriptions = nicDescriptions; - return this; - } - - public FiltersVm addNicDescriptionsItem(String nicDescriptionsItem) { - if (this.nicDescriptions == null) { - this.nicDescriptions = new ArrayList<>(); - } - this.nicDescriptions.add(nicDescriptionsItem); - return this; - } - - /** - * The descriptions of the NICs. - * - * @return nicDescriptions - */ - @javax.annotation.Nullable - public List getNicDescriptions() { - return nicDescriptions; - } - - public void setNicDescriptions(List nicDescriptions) { - this.nicDescriptions = nicDescriptions; - } - - public FiltersVm nicIsSourceDestChecked(Boolean nicIsSourceDestChecked) { - - this.nicIsSourceDestChecked = nicIsSourceDestChecked; - return this; - } - - /** - * Whether the source/destination checking is enabled (true) or disabled (false). - * - * @return nicIsSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getNicIsSourceDestChecked() { - return nicIsSourceDestChecked; - } - - public void setNicIsSourceDestChecked(Boolean nicIsSourceDestChecked) { - this.nicIsSourceDestChecked = nicIsSourceDestChecked; - } - - public FiltersVm nicLinkNicDeleteOnVmDeletion(Boolean nicLinkNicDeleteOnVmDeletion) { - - this.nicLinkNicDeleteOnVmDeletion = nicLinkNicDeleteOnVmDeletion; - return this; - } - - /** - * Whether the NICs are deleted when the VMs they are attached to are deleted. - * - * @return nicLinkNicDeleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getNicLinkNicDeleteOnVmDeletion() { - return nicLinkNicDeleteOnVmDeletion; - } - - public void setNicLinkNicDeleteOnVmDeletion(Boolean nicLinkNicDeleteOnVmDeletion) { - this.nicLinkNicDeleteOnVmDeletion = nicLinkNicDeleteOnVmDeletion; - } - - public FiltersVm nicLinkNicDeviceNumbers(List nicLinkNicDeviceNumbers) { - - this.nicLinkNicDeviceNumbers = nicLinkNicDeviceNumbers; - return this; - } - - public FiltersVm addNicLinkNicDeviceNumbersItem(Integer nicLinkNicDeviceNumbersItem) { - if (this.nicLinkNicDeviceNumbers == null) { - this.nicLinkNicDeviceNumbers = new ArrayList<>(); - } - this.nicLinkNicDeviceNumbers.add(nicLinkNicDeviceNumbersItem); - return this; - } - - /** - * The device numbers the NICs are attached to. - * - * @return nicLinkNicDeviceNumbers - */ - @javax.annotation.Nullable - public List getNicLinkNicDeviceNumbers() { - return nicLinkNicDeviceNumbers; - } - - public void setNicLinkNicDeviceNumbers(List nicLinkNicDeviceNumbers) { - this.nicLinkNicDeviceNumbers = nicLinkNicDeviceNumbers; - } - - public FiltersVm nicLinkNicLinkNicDates(List nicLinkNicLinkNicDates) { - - this.nicLinkNicLinkNicDates = nicLinkNicLinkNicDates; - return this; - } - - public FiltersVm addNicLinkNicLinkNicDatesItem(LocalDate nicLinkNicLinkNicDatesItem) { - if (this.nicLinkNicLinkNicDates == null) { - this.nicLinkNicLinkNicDates = new ArrayList<>(); - } - this.nicLinkNicLinkNicDates.add(nicLinkNicLinkNicDatesItem); - return this; - } - - /** - * The dates and times (UTC) when the NICs were attached to the VMs. - * - * @return nicLinkNicLinkNicDates - */ - @javax.annotation.Nullable - public List getNicLinkNicLinkNicDates() { - return nicLinkNicLinkNicDates; - } - - public void setNicLinkNicLinkNicDates(List nicLinkNicLinkNicDates) { - this.nicLinkNicLinkNicDates = nicLinkNicLinkNicDates; - } - - public FiltersVm nicLinkNicLinkNicIds(List nicLinkNicLinkNicIds) { - - this.nicLinkNicLinkNicIds = nicLinkNicLinkNicIds; - return this; - } - - public FiltersVm addNicLinkNicLinkNicIdsItem(String nicLinkNicLinkNicIdsItem) { - if (this.nicLinkNicLinkNicIds == null) { - this.nicLinkNicLinkNicIds = new ArrayList<>(); - } - this.nicLinkNicLinkNicIds.add(nicLinkNicLinkNicIdsItem); - return this; - } - - /** - * The IDs of the NIC attachments. - * - * @return nicLinkNicLinkNicIds - */ - @javax.annotation.Nullable - public List getNicLinkNicLinkNicIds() { - return nicLinkNicLinkNicIds; - } - - public void setNicLinkNicLinkNicIds(List nicLinkNicLinkNicIds) { - this.nicLinkNicLinkNicIds = nicLinkNicLinkNicIds; - } - - public FiltersVm nicLinkNicStates(List nicLinkNicStates) { - - this.nicLinkNicStates = nicLinkNicStates; - return this; - } - - public FiltersVm addNicLinkNicStatesItem(String nicLinkNicStatesItem) { - if (this.nicLinkNicStates == null) { - this.nicLinkNicStates = new ArrayList<>(); - } - this.nicLinkNicStates.add(nicLinkNicStatesItem); - return this; - } - - /** - * The states of the attachments. - * - * @return nicLinkNicStates - */ - @javax.annotation.Nullable - public List getNicLinkNicStates() { - return nicLinkNicStates; - } - - public void setNicLinkNicStates(List nicLinkNicStates) { - this.nicLinkNicStates = nicLinkNicStates; - } - - public FiltersVm nicLinkNicVmAccountIds(List nicLinkNicVmAccountIds) { - - this.nicLinkNicVmAccountIds = nicLinkNicVmAccountIds; - return this; - } - - public FiltersVm addNicLinkNicVmAccountIdsItem(String nicLinkNicVmAccountIdsItem) { - if (this.nicLinkNicVmAccountIds == null) { - this.nicLinkNicVmAccountIds = new ArrayList<>(); - } - this.nicLinkNicVmAccountIds.add(nicLinkNicVmAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the VMs the NICs are attached to. - * - * @return nicLinkNicVmAccountIds - */ - @javax.annotation.Nullable - public List getNicLinkNicVmAccountIds() { - return nicLinkNicVmAccountIds; - } - - public void setNicLinkNicVmAccountIds(List nicLinkNicVmAccountIds) { - this.nicLinkNicVmAccountIds = nicLinkNicVmAccountIds; - } - - public FiltersVm nicLinkNicVmIds(List nicLinkNicVmIds) { - - this.nicLinkNicVmIds = nicLinkNicVmIds; - return this; - } - - public FiltersVm addNicLinkNicVmIdsItem(String nicLinkNicVmIdsItem) { - if (this.nicLinkNicVmIds == null) { - this.nicLinkNicVmIds = new ArrayList<>(); - } - this.nicLinkNicVmIds.add(nicLinkNicVmIdsItem); - return this; - } - - /** - * The IDs of the VMs the NICs are attached to. - * - * @return nicLinkNicVmIds - */ - @javax.annotation.Nullable - public List getNicLinkNicVmIds() { - return nicLinkNicVmIds; - } - - public void setNicLinkNicVmIds(List nicLinkNicVmIds) { - this.nicLinkNicVmIds = nicLinkNicVmIds; - } - - public FiltersVm nicLinkPublicIpAccountIds(List nicLinkPublicIpAccountIds) { - - this.nicLinkPublicIpAccountIds = nicLinkPublicIpAccountIds; - return this; - } - - public FiltersVm addNicLinkPublicIpAccountIdsItem(String nicLinkPublicIpAccountIdsItem) { - if (this.nicLinkPublicIpAccountIds == null) { - this.nicLinkPublicIpAccountIds = new ArrayList<>(); - } - this.nicLinkPublicIpAccountIds.add(nicLinkPublicIpAccountIdsItem); - return this; - } - - /** - * The account IDs of the owners of the public IPs associated with the NICs. - * - * @return nicLinkPublicIpAccountIds - */ - @javax.annotation.Nullable - public List getNicLinkPublicIpAccountIds() { - return nicLinkPublicIpAccountIds; - } - - public void setNicLinkPublicIpAccountIds(List nicLinkPublicIpAccountIds) { - this.nicLinkPublicIpAccountIds = nicLinkPublicIpAccountIds; - } - - public FiltersVm nicLinkPublicIpLinkPublicIpIds(List nicLinkPublicIpLinkPublicIpIds) { - - this.nicLinkPublicIpLinkPublicIpIds = nicLinkPublicIpLinkPublicIpIds; - return this; - } - - public FiltersVm addNicLinkPublicIpLinkPublicIpIdsItem( - String nicLinkPublicIpLinkPublicIpIdsItem) { - if (this.nicLinkPublicIpLinkPublicIpIds == null) { - this.nicLinkPublicIpLinkPublicIpIds = new ArrayList<>(); - } - this.nicLinkPublicIpLinkPublicIpIds.add(nicLinkPublicIpLinkPublicIpIdsItem); - return this; - } - - /** - * The association IDs returned when the public IPs were associated with the NICs. - * - * @return nicLinkPublicIpLinkPublicIpIds - */ - @javax.annotation.Nullable - public List getNicLinkPublicIpLinkPublicIpIds() { - return nicLinkPublicIpLinkPublicIpIds; - } - - public void setNicLinkPublicIpLinkPublicIpIds(List nicLinkPublicIpLinkPublicIpIds) { - this.nicLinkPublicIpLinkPublicIpIds = nicLinkPublicIpLinkPublicIpIds; - } - - public FiltersVm nicLinkPublicIpPublicIpIds(List nicLinkPublicIpPublicIpIds) { - - this.nicLinkPublicIpPublicIpIds = nicLinkPublicIpPublicIpIds; - return this; - } - - public FiltersVm addNicLinkPublicIpPublicIpIdsItem(String nicLinkPublicIpPublicIpIdsItem) { - if (this.nicLinkPublicIpPublicIpIds == null) { - this.nicLinkPublicIpPublicIpIds = new ArrayList<>(); - } - this.nicLinkPublicIpPublicIpIds.add(nicLinkPublicIpPublicIpIdsItem); - return this; - } - - /** - * The allocation IDs returned when the public IPs were allocated to their accounts. - * - * @return nicLinkPublicIpPublicIpIds - */ - @javax.annotation.Nullable - public List getNicLinkPublicIpPublicIpIds() { - return nicLinkPublicIpPublicIpIds; - } - - public void setNicLinkPublicIpPublicIpIds(List nicLinkPublicIpPublicIpIds) { - this.nicLinkPublicIpPublicIpIds = nicLinkPublicIpPublicIpIds; - } - - public FiltersVm nicLinkPublicIpPublicIps(List nicLinkPublicIpPublicIps) { - - this.nicLinkPublicIpPublicIps = nicLinkPublicIpPublicIps; - return this; - } - - public FiltersVm addNicLinkPublicIpPublicIpsItem(String nicLinkPublicIpPublicIpsItem) { - if (this.nicLinkPublicIpPublicIps == null) { - this.nicLinkPublicIpPublicIps = new ArrayList<>(); - } - this.nicLinkPublicIpPublicIps.add(nicLinkPublicIpPublicIpsItem); - return this; - } - - /** - * The public IPs associated with the NICs. - * - * @return nicLinkPublicIpPublicIps - */ - @javax.annotation.Nullable - public List getNicLinkPublicIpPublicIps() { - return nicLinkPublicIpPublicIps; - } - - public void setNicLinkPublicIpPublicIps(List nicLinkPublicIpPublicIps) { - this.nicLinkPublicIpPublicIps = nicLinkPublicIpPublicIps; - } - - public FiltersVm nicMacAddresses(List nicMacAddresses) { - - this.nicMacAddresses = nicMacAddresses; - return this; - } - - public FiltersVm addNicMacAddressesItem(String nicMacAddressesItem) { - if (this.nicMacAddresses == null) { - this.nicMacAddresses = new ArrayList<>(); - } - this.nicMacAddresses.add(nicMacAddressesItem); - return this; - } - - /** - * The Media Access Control (MAC) addresses of the NICs. - * - * @return nicMacAddresses - */ - @javax.annotation.Nullable - public List getNicMacAddresses() { - return nicMacAddresses; - } - - public void setNicMacAddresses(List nicMacAddresses) { - this.nicMacAddresses = nicMacAddresses; - } - - public FiltersVm nicNetIds(List nicNetIds) { - - this.nicNetIds = nicNetIds; - return this; - } - - public FiltersVm addNicNetIdsItem(String nicNetIdsItem) { - if (this.nicNetIds == null) { - this.nicNetIds = new ArrayList<>(); - } - this.nicNetIds.add(nicNetIdsItem); - return this; - } - - /** - * The IDs of the Nets where the NICs are located. - * - * @return nicNetIds - */ - @javax.annotation.Nullable - public List getNicNetIds() { - return nicNetIds; - } - - public void setNicNetIds(List nicNetIds) { - this.nicNetIds = nicNetIds; - } - - public FiltersVm nicNicIds(List nicNicIds) { - - this.nicNicIds = nicNicIds; - return this; - } - - public FiltersVm addNicNicIdsItem(String nicNicIdsItem) { - if (this.nicNicIds == null) { - this.nicNicIds = new ArrayList<>(); - } - this.nicNicIds.add(nicNicIdsItem); - return this; - } - - /** - * The IDs of the NICs. - * - * @return nicNicIds - */ - @javax.annotation.Nullable - public List getNicNicIds() { - return nicNicIds; - } - - public void setNicNicIds(List nicNicIds) { - this.nicNicIds = nicNicIds; - } - - public FiltersVm nicPrivateIpsLinkPublicIpAccountIds( - List nicPrivateIpsLinkPublicIpAccountIds) { - - this.nicPrivateIpsLinkPublicIpAccountIds = nicPrivateIpsLinkPublicIpAccountIds; - return this; - } - - public FiltersVm addNicPrivateIpsLinkPublicIpAccountIdsItem( - String nicPrivateIpsLinkPublicIpAccountIdsItem) { - if (this.nicPrivateIpsLinkPublicIpAccountIds == null) { - this.nicPrivateIpsLinkPublicIpAccountIds = new ArrayList<>(); - } - this.nicPrivateIpsLinkPublicIpAccountIds.add(nicPrivateIpsLinkPublicIpAccountIdsItem); - return this; - } - - /** - * The account IDs of the owner of the public IPs associated with the private IPs. - * - * @return nicPrivateIpsLinkPublicIpAccountIds - */ - @javax.annotation.Nullable - public List getNicPrivateIpsLinkPublicIpAccountIds() { - return nicPrivateIpsLinkPublicIpAccountIds; - } - - public void setNicPrivateIpsLinkPublicIpAccountIds( - List nicPrivateIpsLinkPublicIpAccountIds) { - this.nicPrivateIpsLinkPublicIpAccountIds = nicPrivateIpsLinkPublicIpAccountIds; - } - - public FiltersVm nicPrivateIpsLinkPublicIpIds(List nicPrivateIpsLinkPublicIpIds) { - - this.nicPrivateIpsLinkPublicIpIds = nicPrivateIpsLinkPublicIpIds; - return this; - } - - public FiltersVm addNicPrivateIpsLinkPublicIpIdsItem(String nicPrivateIpsLinkPublicIpIdsItem) { - if (this.nicPrivateIpsLinkPublicIpIds == null) { - this.nicPrivateIpsLinkPublicIpIds = new ArrayList<>(); - } - this.nicPrivateIpsLinkPublicIpIds.add(nicPrivateIpsLinkPublicIpIdsItem); - return this; - } - - /** - * The public IPs associated with the private IPs. - * - * @return nicPrivateIpsLinkPublicIpIds - */ - @javax.annotation.Nullable - public List getNicPrivateIpsLinkPublicIpIds() { - return nicPrivateIpsLinkPublicIpIds; - } - - public void setNicPrivateIpsLinkPublicIpIds(List nicPrivateIpsLinkPublicIpIds) { - this.nicPrivateIpsLinkPublicIpIds = nicPrivateIpsLinkPublicIpIds; - } - - public FiltersVm nicPrivateIpsPrimaryIp(Boolean nicPrivateIpsPrimaryIp) { - - this.nicPrivateIpsPrimaryIp = nicPrivateIpsPrimaryIp; - return this; - } - - /** - * Whether the private IPs are the primary IPs associated with the NICs. - * - * @return nicPrivateIpsPrimaryIp - */ - @javax.annotation.Nullable - public Boolean getNicPrivateIpsPrimaryIp() { - return nicPrivateIpsPrimaryIp; - } - - public void setNicPrivateIpsPrimaryIp(Boolean nicPrivateIpsPrimaryIp) { - this.nicPrivateIpsPrimaryIp = nicPrivateIpsPrimaryIp; - } - - public FiltersVm nicPrivateIpsPrivateIps(List nicPrivateIpsPrivateIps) { - - this.nicPrivateIpsPrivateIps = nicPrivateIpsPrivateIps; - return this; - } - - public FiltersVm addNicPrivateIpsPrivateIpsItem(String nicPrivateIpsPrivateIpsItem) { - if (this.nicPrivateIpsPrivateIps == null) { - this.nicPrivateIpsPrivateIps = new ArrayList<>(); - } - this.nicPrivateIpsPrivateIps.add(nicPrivateIpsPrivateIpsItem); - return this; - } - - /** - * The private IPs of the NICs. - * - * @return nicPrivateIpsPrivateIps - */ - @javax.annotation.Nullable - public List getNicPrivateIpsPrivateIps() { - return nicPrivateIpsPrivateIps; - } - - public void setNicPrivateIpsPrivateIps(List nicPrivateIpsPrivateIps) { - this.nicPrivateIpsPrivateIps = nicPrivateIpsPrivateIps; - } - - public FiltersVm nicSecurityGroupIds(List nicSecurityGroupIds) { - - this.nicSecurityGroupIds = nicSecurityGroupIds; - return this; - } - - public FiltersVm addNicSecurityGroupIdsItem(String nicSecurityGroupIdsItem) { - if (this.nicSecurityGroupIds == null) { - this.nicSecurityGroupIds = new ArrayList<>(); - } - this.nicSecurityGroupIds.add(nicSecurityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups associated with the NICs. - * - * @return nicSecurityGroupIds - */ - @javax.annotation.Nullable - public List getNicSecurityGroupIds() { - return nicSecurityGroupIds; - } - - public void setNicSecurityGroupIds(List nicSecurityGroupIds) { - this.nicSecurityGroupIds = nicSecurityGroupIds; - } - - public FiltersVm nicSecurityGroupNames(List nicSecurityGroupNames) { - - this.nicSecurityGroupNames = nicSecurityGroupNames; - return this; - } - - public FiltersVm addNicSecurityGroupNamesItem(String nicSecurityGroupNamesItem) { - if (this.nicSecurityGroupNames == null) { - this.nicSecurityGroupNames = new ArrayList<>(); - } - this.nicSecurityGroupNames.add(nicSecurityGroupNamesItem); - return this; - } - - /** - * The names of the security groups associated with the NICs. - * - * @return nicSecurityGroupNames - */ - @javax.annotation.Nullable - public List getNicSecurityGroupNames() { - return nicSecurityGroupNames; - } - - public void setNicSecurityGroupNames(List nicSecurityGroupNames) { - this.nicSecurityGroupNames = nicSecurityGroupNames; - } - - public FiltersVm nicStates(List nicStates) { - - this.nicStates = nicStates; - return this; - } - - public FiltersVm addNicStatesItem(String nicStatesItem) { - if (this.nicStates == null) { - this.nicStates = new ArrayList<>(); - } - this.nicStates.add(nicStatesItem); - return this; - } - - /** - * The states of the NICs (`available` \\| `in-use`). - * - * @return nicStates - */ - @javax.annotation.Nullable - public List getNicStates() { - return nicStates; - } - - public void setNicStates(List nicStates) { - this.nicStates = nicStates; - } - - public FiltersVm nicSubnetIds(List nicSubnetIds) { - - this.nicSubnetIds = nicSubnetIds; - return this; - } - - public FiltersVm addNicSubnetIdsItem(String nicSubnetIdsItem) { - if (this.nicSubnetIds == null) { - this.nicSubnetIds = new ArrayList<>(); - } - this.nicSubnetIds.add(nicSubnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets for the NICs. - * - * @return nicSubnetIds - */ - @javax.annotation.Nullable - public List getNicSubnetIds() { - return nicSubnetIds; - } - - public void setNicSubnetIds(List nicSubnetIds) { - this.nicSubnetIds = nicSubnetIds; - } - - public FiltersVm nicSubregionNames(List nicSubregionNames) { - - this.nicSubregionNames = nicSubregionNames; - return this; - } - - public FiltersVm addNicSubregionNamesItem(String nicSubregionNamesItem) { - if (this.nicSubregionNames == null) { - this.nicSubregionNames = new ArrayList<>(); - } - this.nicSubregionNames.add(nicSubregionNamesItem); - return this; - } - - /** - * The Subregions where the NICs are located. - * - * @return nicSubregionNames - */ - @javax.annotation.Nullable - public List getNicSubregionNames() { - return nicSubregionNames; - } - - public void setNicSubregionNames(List nicSubregionNames) { - this.nicSubregionNames = nicSubregionNames; - } - - public FiltersVm platforms(List platforms) { - - this.platforms = platforms; - return this; - } - - public FiltersVm addPlatformsItem(String platformsItem) { - if (this.platforms == null) { - this.platforms = new ArrayList<>(); - } - this.platforms.add(platformsItem); - return this; - } - - /** - * The platforms. Use windows if you have Windows VMs. Otherwise, leave this filter blank. - * - * @return platforms - */ - @javax.annotation.Nullable - public List getPlatforms() { - return platforms; - } - - public void setPlatforms(List platforms) { - this.platforms = platforms; - } - - public FiltersVm privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public FiltersVm addPrivateIpsItem(String privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The private IPs of the VMs. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public FiltersVm productCodes(List productCodes) { - - this.productCodes = productCodes; - return this; - } - - public FiltersVm addProductCodesItem(String productCodesItem) { - if (this.productCodes == null) { - this.productCodes = new ArrayList<>(); - } - this.productCodes.add(productCodesItem); - return this; - } - - /** - * The product codes associated with the OMI used to create the VMs. - * - * @return productCodes - */ - @javax.annotation.Nullable - public List getProductCodes() { - return productCodes; - } - - public void setProductCodes(List productCodes) { - this.productCodes = productCodes; - } - - public FiltersVm publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public FiltersVm addPublicIpsItem(String publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * The public IPs of the VMs. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public FiltersVm reservationIds(List reservationIds) { - - this.reservationIds = reservationIds; - return this; - } - - public FiltersVm addReservationIdsItem(String reservationIdsItem) { - if (this.reservationIds == null) { - this.reservationIds = new ArrayList<>(); - } - this.reservationIds.add(reservationIdsItem); - return this; - } - - /** - * The IDs of the reservation of the VMs, created every time you launch VMs. These reservation - * IDs can be associated with several VMs when you lauch a group of VMs using the same launch - * request. - * - * @return reservationIds - */ - @javax.annotation.Nullable - public List getReservationIds() { - return reservationIds; - } - - public void setReservationIds(List reservationIds) { - this.reservationIds = reservationIds; - } - - public FiltersVm rootDeviceNames(List rootDeviceNames) { - - this.rootDeviceNames = rootDeviceNames; - return this; - } - - public FiltersVm addRootDeviceNamesItem(String rootDeviceNamesItem) { - if (this.rootDeviceNames == null) { - this.rootDeviceNames = new ArrayList<>(); - } - this.rootDeviceNames.add(rootDeviceNamesItem); - return this; - } - - /** - * The names of the root devices for the VMs (for example, `/dev/sda1`) - * - * @return rootDeviceNames - */ - @javax.annotation.Nullable - public List getRootDeviceNames() { - return rootDeviceNames; - } - - public void setRootDeviceNames(List rootDeviceNames) { - this.rootDeviceNames = rootDeviceNames; - } - - public FiltersVm rootDeviceTypes(List rootDeviceTypes) { - - this.rootDeviceTypes = rootDeviceTypes; - return this; - } - - public FiltersVm addRootDeviceTypesItem(String rootDeviceTypesItem) { - if (this.rootDeviceTypes == null) { - this.rootDeviceTypes = new ArrayList<>(); - } - this.rootDeviceTypes.add(rootDeviceTypesItem); - return this; - } - - /** - * The root devices types used by the VMs (always `ebs`) - * - * @return rootDeviceTypes - */ - @javax.annotation.Nullable - public List getRootDeviceTypes() { - return rootDeviceTypes; - } - - public void setRootDeviceTypes(List rootDeviceTypes) { - this.rootDeviceTypes = rootDeviceTypes; - } - - public FiltersVm securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public FiltersVm addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups for the VMs (only in the public Cloud). - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public FiltersVm securityGroupNames(List securityGroupNames) { - - this.securityGroupNames = securityGroupNames; - return this; - } - - public FiltersVm addSecurityGroupNamesItem(String securityGroupNamesItem) { - if (this.securityGroupNames == null) { - this.securityGroupNames = new ArrayList<>(); - } - this.securityGroupNames.add(securityGroupNamesItem); - return this; - } - - /** - * The names of the security groups for the VMs (only in the public Cloud). - * - * @return securityGroupNames - */ - @javax.annotation.Nullable - public List getSecurityGroupNames() { - return securityGroupNames; - } - - public void setSecurityGroupNames(List securityGroupNames) { - this.securityGroupNames = securityGroupNames; - } - - public FiltersVm stateReasonCodes(List stateReasonCodes) { - - this.stateReasonCodes = stateReasonCodes; - return this; - } - - public FiltersVm addStateReasonCodesItem(Integer stateReasonCodesItem) { - if (this.stateReasonCodes == null) { - this.stateReasonCodes = new ArrayList<>(); - } - this.stateReasonCodes.add(stateReasonCodesItem); - return this; - } - - /** - * The reason codes for the state changes. - * - * @return stateReasonCodes - */ - @javax.annotation.Nullable - public List getStateReasonCodes() { - return stateReasonCodes; - } - - public void setStateReasonCodes(List stateReasonCodes) { - this.stateReasonCodes = stateReasonCodes; - } - - public FiltersVm stateReasonMessages(List stateReasonMessages) { - - this.stateReasonMessages = stateReasonMessages; - return this; - } - - public FiltersVm addStateReasonMessagesItem(String stateReasonMessagesItem) { - if (this.stateReasonMessages == null) { - this.stateReasonMessages = new ArrayList<>(); - } - this.stateReasonMessages.add(stateReasonMessagesItem); - return this; - } - - /** - * The messages describing the state changes. - * - * @return stateReasonMessages - */ - @javax.annotation.Nullable - public List getStateReasonMessages() { - return stateReasonMessages; - } - - public void setStateReasonMessages(List stateReasonMessages) { - this.stateReasonMessages = stateReasonMessages; - } - - public FiltersVm stateReasons(List stateReasons) { - - this.stateReasons = stateReasons; - return this; - } - - public FiltersVm addStateReasonsItem(String stateReasonsItem) { - if (this.stateReasons == null) { - this.stateReasons = new ArrayList<>(); - } - this.stateReasons.add(stateReasonsItem); - return this; - } - - /** - * The reasons explaining the current states of the VMs. This filter is like the - * `StateReasonCodes` one. - * - * @return stateReasons - */ - @javax.annotation.Nullable - public List getStateReasons() { - return stateReasons; - } - - public void setStateReasons(List stateReasons) { - this.stateReasons = stateReasons; - } - - public FiltersVm subnetIds(List subnetIds) { - - this.subnetIds = subnetIds; - return this; - } - - public FiltersVm addSubnetIdsItem(String subnetIdsItem) { - if (this.subnetIds == null) { - this.subnetIds = new ArrayList<>(); - } - this.subnetIds.add(subnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets for the VMs. - * - * @return subnetIds - */ - @javax.annotation.Nullable - public List getSubnetIds() { - return subnetIds; - } - - public void setSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - } - - public FiltersVm subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersVm addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions of the VMs. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersVm tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVm addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the VMs. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVm tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVm addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the VMs. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVm tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVm addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the VMs, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVm tenancies(List tenancies) { - - this.tenancies = tenancies; - return this; - } - - public FiltersVm addTenanciesItem(String tenanciesItem) { - if (this.tenancies == null) { - this.tenancies = new ArrayList<>(); - } - this.tenancies.add(tenanciesItem); - return this; - } - - /** - * The tenancies of the VMs (`dedicated` \\| `default` \\| - * `host`). - * - * @return tenancies - */ - @javax.annotation.Nullable - public List getTenancies() { - return tenancies; - } - - public void setTenancies(List tenancies) { - this.tenancies = tenancies; - } - - public FiltersVm vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public FiltersVm addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - public FiltersVm vmSecurityGroupIds(List vmSecurityGroupIds) { - - this.vmSecurityGroupIds = vmSecurityGroupIds; - return this; - } - - public FiltersVm addVmSecurityGroupIdsItem(String vmSecurityGroupIdsItem) { - if (this.vmSecurityGroupIds == null) { - this.vmSecurityGroupIds = new ArrayList<>(); - } - this.vmSecurityGroupIds.add(vmSecurityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups for the VMs. - * - * @return vmSecurityGroupIds - */ - @javax.annotation.Nullable - public List getVmSecurityGroupIds() { - return vmSecurityGroupIds; - } - - public void setVmSecurityGroupIds(List vmSecurityGroupIds) { - this.vmSecurityGroupIds = vmSecurityGroupIds; - } - - public FiltersVm vmSecurityGroupNames(List vmSecurityGroupNames) { - - this.vmSecurityGroupNames = vmSecurityGroupNames; - return this; - } - - public FiltersVm addVmSecurityGroupNamesItem(String vmSecurityGroupNamesItem) { - if (this.vmSecurityGroupNames == null) { - this.vmSecurityGroupNames = new ArrayList<>(); - } - this.vmSecurityGroupNames.add(vmSecurityGroupNamesItem); - return this; - } - - /** - * The names of the security group for the VMs. - * - * @return vmSecurityGroupNames - */ - @javax.annotation.Nullable - public List getVmSecurityGroupNames() { - return vmSecurityGroupNames; - } - - public void setVmSecurityGroupNames(List vmSecurityGroupNames) { - this.vmSecurityGroupNames = vmSecurityGroupNames; - } - - public FiltersVm vmStateCodes(List vmStateCodes) { - - this.vmStateCodes = vmStateCodes; - return this; - } - - public FiltersVm addVmStateCodesItem(Integer vmStateCodesItem) { - if (this.vmStateCodes == null) { - this.vmStateCodes = new ArrayList<>(); - } - this.vmStateCodes.add(vmStateCodesItem); - return this; - } - - /** - * The state codes of the VMs: `-1` (quarantine), `0` (pending), - * `16` (running), `32` (shutting-down), `48` (terminated), - * `64` (stopping), and `80` (stopped). - * - * @return vmStateCodes - */ - @javax.annotation.Nullable - public List getVmStateCodes() { - return vmStateCodes; - } - - public void setVmStateCodes(List vmStateCodes) { - this.vmStateCodes = vmStateCodes; - } - - public FiltersVm vmStateNames(List vmStateNames) { - - this.vmStateNames = vmStateNames; - return this; - } - - public FiltersVm addVmStateNamesItem(String vmStateNamesItem) { - if (this.vmStateNames == null) { - this.vmStateNames = new ArrayList<>(); - } - this.vmStateNames.add(vmStateNamesItem); - return this; - } - - /** - * The state names of the VMs (`pending` \\| `running` \\| - * `stopping` \\| `stopped` \\| `shutting-down` \\| - * `terminated` \\| `quarantine`). - * - * @return vmStateNames - */ - @javax.annotation.Nullable - public List getVmStateNames() { - return vmStateNames; - } - - public void setVmStateNames(List vmStateNames) { - this.vmStateNames = vmStateNames; - } - - public FiltersVm vmTypes(List vmTypes) { - - this.vmTypes = vmTypes; - return this; - } - - public FiltersVm addVmTypesItem(String vmTypesItem) { - if (this.vmTypes == null) { - this.vmTypes = new ArrayList<>(); - } - this.vmTypes.add(vmTypesItem); - return this; - } - - /** - * The VM types (for example, t2.micro). For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * - * @return vmTypes - */ - @javax.annotation.Nullable - public List getVmTypes() { - return vmTypes; - } - - public void setVmTypes(List vmTypes) { - this.vmTypes = vmTypes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVm filtersVm = (FiltersVm) o; - return Objects.equals(this.architectures, filtersVm.architectures) - && Objects.equals( - this.blockDeviceMappingDeleteOnVmDeletion, - filtersVm.blockDeviceMappingDeleteOnVmDeletion) - && Objects.equals( - this.blockDeviceMappingDeviceNames, filtersVm.blockDeviceMappingDeviceNames) - && Objects.equals( - this.blockDeviceMappingLinkDates, filtersVm.blockDeviceMappingLinkDates) - && Objects.equals(this.blockDeviceMappingStates, filtersVm.blockDeviceMappingStates) - && Objects.equals( - this.blockDeviceMappingVolumeIds, filtersVm.blockDeviceMappingVolumeIds) - && Objects.equals(this.clientTokens, filtersVm.clientTokens) - && Objects.equals(this.creationDates, filtersVm.creationDates) - && Objects.equals(this.imageIds, filtersVm.imageIds) - && Objects.equals(this.isSourceDestChecked, filtersVm.isSourceDestChecked) - && Objects.equals(this.keypairNames, filtersVm.keypairNames) - && Objects.equals(this.launchNumbers, filtersVm.launchNumbers) - && Objects.equals(this.lifecycles, filtersVm.lifecycles) - && Objects.equals(this.netIds, filtersVm.netIds) - && Objects.equals(this.nicAccountIds, filtersVm.nicAccountIds) - && Objects.equals(this.nicDescriptions, filtersVm.nicDescriptions) - && Objects.equals(this.nicIsSourceDestChecked, filtersVm.nicIsSourceDestChecked) - && Objects.equals( - this.nicLinkNicDeleteOnVmDeletion, filtersVm.nicLinkNicDeleteOnVmDeletion) - && Objects.equals(this.nicLinkNicDeviceNumbers, filtersVm.nicLinkNicDeviceNumbers) - && Objects.equals(this.nicLinkNicLinkNicDates, filtersVm.nicLinkNicLinkNicDates) - && Objects.equals(this.nicLinkNicLinkNicIds, filtersVm.nicLinkNicLinkNicIds) - && Objects.equals(this.nicLinkNicStates, filtersVm.nicLinkNicStates) - && Objects.equals(this.nicLinkNicVmAccountIds, filtersVm.nicLinkNicVmAccountIds) - && Objects.equals(this.nicLinkNicVmIds, filtersVm.nicLinkNicVmIds) - && Objects.equals( - this.nicLinkPublicIpAccountIds, filtersVm.nicLinkPublicIpAccountIds) - && Objects.equals( - this.nicLinkPublicIpLinkPublicIpIds, - filtersVm.nicLinkPublicIpLinkPublicIpIds) - && Objects.equals( - this.nicLinkPublicIpPublicIpIds, filtersVm.nicLinkPublicIpPublicIpIds) - && Objects.equals(this.nicLinkPublicIpPublicIps, filtersVm.nicLinkPublicIpPublicIps) - && Objects.equals(this.nicMacAddresses, filtersVm.nicMacAddresses) - && Objects.equals(this.nicNetIds, filtersVm.nicNetIds) - && Objects.equals(this.nicNicIds, filtersVm.nicNicIds) - && Objects.equals( - this.nicPrivateIpsLinkPublicIpAccountIds, - filtersVm.nicPrivateIpsLinkPublicIpAccountIds) - && Objects.equals( - this.nicPrivateIpsLinkPublicIpIds, filtersVm.nicPrivateIpsLinkPublicIpIds) - && Objects.equals(this.nicPrivateIpsPrimaryIp, filtersVm.nicPrivateIpsPrimaryIp) - && Objects.equals(this.nicPrivateIpsPrivateIps, filtersVm.nicPrivateIpsPrivateIps) - && Objects.equals(this.nicSecurityGroupIds, filtersVm.nicSecurityGroupIds) - && Objects.equals(this.nicSecurityGroupNames, filtersVm.nicSecurityGroupNames) - && Objects.equals(this.nicStates, filtersVm.nicStates) - && Objects.equals(this.nicSubnetIds, filtersVm.nicSubnetIds) - && Objects.equals(this.nicSubregionNames, filtersVm.nicSubregionNames) - && Objects.equals(this.platforms, filtersVm.platforms) - && Objects.equals(this.privateIps, filtersVm.privateIps) - && Objects.equals(this.productCodes, filtersVm.productCodes) - && Objects.equals(this.publicIps, filtersVm.publicIps) - && Objects.equals(this.reservationIds, filtersVm.reservationIds) - && Objects.equals(this.rootDeviceNames, filtersVm.rootDeviceNames) - && Objects.equals(this.rootDeviceTypes, filtersVm.rootDeviceTypes) - && Objects.equals(this.securityGroupIds, filtersVm.securityGroupIds) - && Objects.equals(this.securityGroupNames, filtersVm.securityGroupNames) - && Objects.equals(this.stateReasonCodes, filtersVm.stateReasonCodes) - && Objects.equals(this.stateReasonMessages, filtersVm.stateReasonMessages) - && Objects.equals(this.stateReasons, filtersVm.stateReasons) - && Objects.equals(this.subnetIds, filtersVm.subnetIds) - && Objects.equals(this.subregionNames, filtersVm.subregionNames) - && Objects.equals(this.tagKeys, filtersVm.tagKeys) - && Objects.equals(this.tagValues, filtersVm.tagValues) - && Objects.equals(this.tags, filtersVm.tags) - && Objects.equals(this.tenancies, filtersVm.tenancies) - && Objects.equals(this.vmIds, filtersVm.vmIds) - && Objects.equals(this.vmSecurityGroupIds, filtersVm.vmSecurityGroupIds) - && Objects.equals(this.vmSecurityGroupNames, filtersVm.vmSecurityGroupNames) - && Objects.equals(this.vmStateCodes, filtersVm.vmStateCodes) - && Objects.equals(this.vmStateNames, filtersVm.vmStateNames) - && Objects.equals(this.vmTypes, filtersVm.vmTypes); - } - - @Override - public int hashCode() { - return Objects.hash( - architectures, - blockDeviceMappingDeleteOnVmDeletion, - blockDeviceMappingDeviceNames, - blockDeviceMappingLinkDates, - blockDeviceMappingStates, - blockDeviceMappingVolumeIds, - clientTokens, - creationDates, - imageIds, - isSourceDestChecked, - keypairNames, - launchNumbers, - lifecycles, - netIds, - nicAccountIds, - nicDescriptions, - nicIsSourceDestChecked, - nicLinkNicDeleteOnVmDeletion, - nicLinkNicDeviceNumbers, - nicLinkNicLinkNicDates, - nicLinkNicLinkNicIds, - nicLinkNicStates, - nicLinkNicVmAccountIds, - nicLinkNicVmIds, - nicLinkPublicIpAccountIds, - nicLinkPublicIpLinkPublicIpIds, - nicLinkPublicIpPublicIpIds, - nicLinkPublicIpPublicIps, - nicMacAddresses, - nicNetIds, - nicNicIds, - nicPrivateIpsLinkPublicIpAccountIds, - nicPrivateIpsLinkPublicIpIds, - nicPrivateIpsPrimaryIp, - nicPrivateIpsPrivateIps, - nicSecurityGroupIds, - nicSecurityGroupNames, - nicStates, - nicSubnetIds, - nicSubregionNames, - platforms, - privateIps, - productCodes, - publicIps, - reservationIds, - rootDeviceNames, - rootDeviceTypes, - securityGroupIds, - securityGroupNames, - stateReasonCodes, - stateReasonMessages, - stateReasons, - subnetIds, - subregionNames, - tagKeys, - tagValues, - tags, - tenancies, - vmIds, - vmSecurityGroupIds, - vmSecurityGroupNames, - vmStateCodes, - vmStateNames, - vmTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVm {\n"); - sb.append(" architectures: ").append(toIndentedString(architectures)).append("\n"); - sb.append(" blockDeviceMappingDeleteOnVmDeletion: ") - .append(toIndentedString(blockDeviceMappingDeleteOnVmDeletion)) - .append("\n"); - sb.append(" blockDeviceMappingDeviceNames: ") - .append(toIndentedString(blockDeviceMappingDeviceNames)) - .append("\n"); - sb.append(" blockDeviceMappingLinkDates: ") - .append(toIndentedString(blockDeviceMappingLinkDates)) - .append("\n"); - sb.append(" blockDeviceMappingStates: ") - .append(toIndentedString(blockDeviceMappingStates)) - .append("\n"); - sb.append(" blockDeviceMappingVolumeIds: ") - .append(toIndentedString(blockDeviceMappingVolumeIds)) - .append("\n"); - sb.append(" clientTokens: ").append(toIndentedString(clientTokens)).append("\n"); - sb.append(" creationDates: ").append(toIndentedString(creationDates)).append("\n"); - sb.append(" imageIds: ").append(toIndentedString(imageIds)).append("\n"); - sb.append(" isSourceDestChecked: ") - .append(toIndentedString(isSourceDestChecked)) - .append("\n"); - sb.append(" keypairNames: ").append(toIndentedString(keypairNames)).append("\n"); - sb.append(" launchNumbers: ").append(toIndentedString(launchNumbers)).append("\n"); - sb.append(" lifecycles: ").append(toIndentedString(lifecycles)).append("\n"); - sb.append(" netIds: ").append(toIndentedString(netIds)).append("\n"); - sb.append(" nicAccountIds: ").append(toIndentedString(nicAccountIds)).append("\n"); - sb.append(" nicDescriptions: ").append(toIndentedString(nicDescriptions)).append("\n"); - sb.append(" nicIsSourceDestChecked: ") - .append(toIndentedString(nicIsSourceDestChecked)) - .append("\n"); - sb.append(" nicLinkNicDeleteOnVmDeletion: ") - .append(toIndentedString(nicLinkNicDeleteOnVmDeletion)) - .append("\n"); - sb.append(" nicLinkNicDeviceNumbers: ") - .append(toIndentedString(nicLinkNicDeviceNumbers)) - .append("\n"); - sb.append(" nicLinkNicLinkNicDates: ") - .append(toIndentedString(nicLinkNicLinkNicDates)) - .append("\n"); - sb.append(" nicLinkNicLinkNicIds: ") - .append(toIndentedString(nicLinkNicLinkNicIds)) - .append("\n"); - sb.append(" nicLinkNicStates: ").append(toIndentedString(nicLinkNicStates)).append("\n"); - sb.append(" nicLinkNicVmAccountIds: ") - .append(toIndentedString(nicLinkNicVmAccountIds)) - .append("\n"); - sb.append(" nicLinkNicVmIds: ").append(toIndentedString(nicLinkNicVmIds)).append("\n"); - sb.append(" nicLinkPublicIpAccountIds: ") - .append(toIndentedString(nicLinkPublicIpAccountIds)) - .append("\n"); - sb.append(" nicLinkPublicIpLinkPublicIpIds: ") - .append(toIndentedString(nicLinkPublicIpLinkPublicIpIds)) - .append("\n"); - sb.append(" nicLinkPublicIpPublicIpIds: ") - .append(toIndentedString(nicLinkPublicIpPublicIpIds)) - .append("\n"); - sb.append(" nicLinkPublicIpPublicIps: ") - .append(toIndentedString(nicLinkPublicIpPublicIps)) - .append("\n"); - sb.append(" nicMacAddresses: ").append(toIndentedString(nicMacAddresses)).append("\n"); - sb.append(" nicNetIds: ").append(toIndentedString(nicNetIds)).append("\n"); - sb.append(" nicNicIds: ").append(toIndentedString(nicNicIds)).append("\n"); - sb.append(" nicPrivateIpsLinkPublicIpAccountIds: ") - .append(toIndentedString(nicPrivateIpsLinkPublicIpAccountIds)) - .append("\n"); - sb.append(" nicPrivateIpsLinkPublicIpIds: ") - .append(toIndentedString(nicPrivateIpsLinkPublicIpIds)) - .append("\n"); - sb.append(" nicPrivateIpsPrimaryIp: ") - .append(toIndentedString(nicPrivateIpsPrimaryIp)) - .append("\n"); - sb.append(" nicPrivateIpsPrivateIps: ") - .append(toIndentedString(nicPrivateIpsPrivateIps)) - .append("\n"); - sb.append(" nicSecurityGroupIds: ") - .append(toIndentedString(nicSecurityGroupIds)) - .append("\n"); - sb.append(" nicSecurityGroupNames: ") - .append(toIndentedString(nicSecurityGroupNames)) - .append("\n"); - sb.append(" nicStates: ").append(toIndentedString(nicStates)).append("\n"); - sb.append(" nicSubnetIds: ").append(toIndentedString(nicSubnetIds)).append("\n"); - sb.append(" nicSubregionNames: ") - .append(toIndentedString(nicSubregionNames)) - .append("\n"); - sb.append(" platforms: ").append(toIndentedString(platforms)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" productCodes: ").append(toIndentedString(productCodes)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" reservationIds: ").append(toIndentedString(reservationIds)).append("\n"); - sb.append(" rootDeviceNames: ").append(toIndentedString(rootDeviceNames)).append("\n"); - sb.append(" rootDeviceTypes: ").append(toIndentedString(rootDeviceTypes)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" securityGroupNames: ") - .append(toIndentedString(securityGroupNames)) - .append("\n"); - sb.append(" stateReasonCodes: ").append(toIndentedString(stateReasonCodes)).append("\n"); - sb.append(" stateReasonMessages: ") - .append(toIndentedString(stateReasonMessages)) - .append("\n"); - sb.append(" stateReasons: ").append(toIndentedString(stateReasons)).append("\n"); - sb.append(" subnetIds: ").append(toIndentedString(subnetIds)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" tenancies: ").append(toIndentedString(tenancies)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append(" vmSecurityGroupIds: ") - .append(toIndentedString(vmSecurityGroupIds)) - .append("\n"); - sb.append(" vmSecurityGroupNames: ") - .append(toIndentedString(vmSecurityGroupNames)) - .append("\n"); - sb.append(" vmStateCodes: ").append(toIndentedString(vmStateCodes)).append("\n"); - sb.append(" vmStateNames: ").append(toIndentedString(vmStateNames)).append("\n"); - sb.append(" vmTypes: ").append(toIndentedString(vmTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Architectures"); - openapiFields.add("BlockDeviceMappingDeleteOnVmDeletion"); - openapiFields.add("BlockDeviceMappingDeviceNames"); - openapiFields.add("BlockDeviceMappingLinkDates"); - openapiFields.add("BlockDeviceMappingStates"); - openapiFields.add("BlockDeviceMappingVolumeIds"); - openapiFields.add("ClientTokens"); - openapiFields.add("CreationDates"); - openapiFields.add("ImageIds"); - openapiFields.add("IsSourceDestChecked"); - openapiFields.add("KeypairNames"); - openapiFields.add("LaunchNumbers"); - openapiFields.add("Lifecycles"); - openapiFields.add("NetIds"); - openapiFields.add("NicAccountIds"); - openapiFields.add("NicDescriptions"); - openapiFields.add("NicIsSourceDestChecked"); - openapiFields.add("NicLinkNicDeleteOnVmDeletion"); - openapiFields.add("NicLinkNicDeviceNumbers"); - openapiFields.add("NicLinkNicLinkNicDates"); - openapiFields.add("NicLinkNicLinkNicIds"); - openapiFields.add("NicLinkNicStates"); - openapiFields.add("NicLinkNicVmAccountIds"); - openapiFields.add("NicLinkNicVmIds"); - openapiFields.add("NicLinkPublicIpAccountIds"); - openapiFields.add("NicLinkPublicIpLinkPublicIpIds"); - openapiFields.add("NicLinkPublicIpPublicIpIds"); - openapiFields.add("NicLinkPublicIpPublicIps"); - openapiFields.add("NicMacAddresses"); - openapiFields.add("NicNetIds"); - openapiFields.add("NicNicIds"); - openapiFields.add("NicPrivateIpsLinkPublicIpAccountIds"); - openapiFields.add("NicPrivateIpsLinkPublicIpIds"); - openapiFields.add("NicPrivateIpsPrimaryIp"); - openapiFields.add("NicPrivateIpsPrivateIps"); - openapiFields.add("NicSecurityGroupIds"); - openapiFields.add("NicSecurityGroupNames"); - openapiFields.add("NicStates"); - openapiFields.add("NicSubnetIds"); - openapiFields.add("NicSubregionNames"); - openapiFields.add("Platforms"); - openapiFields.add("PrivateIps"); - openapiFields.add("ProductCodes"); - openapiFields.add("PublicIps"); - openapiFields.add("ReservationIds"); - openapiFields.add("RootDeviceNames"); - openapiFields.add("RootDeviceTypes"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SecurityGroupNames"); - openapiFields.add("StateReasonCodes"); - openapiFields.add("StateReasonMessages"); - openapiFields.add("StateReasons"); - openapiFields.add("SubnetIds"); - openapiFields.add("SubregionNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("Tenancies"); - openapiFields.add("VmIds"); - openapiFields.add("VmSecurityGroupIds"); - openapiFields.add("VmSecurityGroupNames"); - openapiFields.add("VmStateCodes"); - openapiFields.add("VmStateNames"); - openapiFields.add("VmTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVm - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVm.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVm is not found in the empty" - + " JSON string", - FiltersVm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVm` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Architectures") != null && !jsonObj.get("Architectures").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Architectures` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Architectures").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingDeviceNames") != null - && !jsonObj.get("BlockDeviceMappingDeviceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingDeviceNames` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingDeviceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingLinkDates") != null - && !jsonObj.get("BlockDeviceMappingLinkDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingLinkDates` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingLinkDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingStates") != null - && !jsonObj.get("BlockDeviceMappingStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingStates` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BlockDeviceMappingVolumeIds") != null - && !jsonObj.get("BlockDeviceMappingVolumeIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappingVolumeIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappingVolumeIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ClientTokens") != null && !jsonObj.get("ClientTokens").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientTokens` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ClientTokens").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CreationDates") != null && !jsonObj.get("CreationDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CreationDates` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("CreationDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ImageIds") != null && !jsonObj.get("ImageIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ImageIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("KeypairNames") != null && !jsonObj.get("KeypairNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("KeypairNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LaunchNumbers") != null && !jsonObj.get("LaunchNumbers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LaunchNumbers` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("LaunchNumbers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Lifecycles") != null && !jsonObj.get("Lifecycles").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Lifecycles` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Lifecycles").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NetIds") != null && !jsonObj.get("NetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("NetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicAccountIds") != null && !jsonObj.get("NicAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicAccountIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("NicAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicDescriptions") != null - && !jsonObj.get("NicDescriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicDescriptions` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicDescriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicDeviceNumbers") != null - && !jsonObj.get("NicLinkNicDeviceNumbers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicDeviceNumbers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkNicDeviceNumbers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicLinkNicDates") != null - && !jsonObj.get("NicLinkNicLinkNicDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicLinkNicDates` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkNicLinkNicDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicLinkNicIds") != null - && !jsonObj.get("NicLinkNicLinkNicIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicLinkNicIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicLinkNicLinkNicIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicStates") != null - && !jsonObj.get("NicLinkNicStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicStates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicLinkNicStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicVmAccountIds") != null - && !jsonObj.get("NicLinkNicVmAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicVmAccountIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkNicVmAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkNicVmIds") != null - && !jsonObj.get("NicLinkNicVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkNicVmIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicLinkNicVmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkPublicIpAccountIds") != null - && !jsonObj.get("NicLinkPublicIpAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkPublicIpAccountIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkPublicIpAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkPublicIpLinkPublicIpIds") != null - && !jsonObj.get("NicLinkPublicIpLinkPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkPublicIpLinkPublicIpIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("NicLinkPublicIpLinkPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkPublicIpPublicIpIds") != null - && !jsonObj.get("NicLinkPublicIpPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkPublicIpPublicIpIds` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkPublicIpPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicLinkPublicIpPublicIps") != null - && !jsonObj.get("NicLinkPublicIpPublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicLinkPublicIpPublicIps` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicLinkPublicIpPublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicMacAddresses") != null - && !jsonObj.get("NicMacAddresses").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicMacAddresses` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicMacAddresses").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicNetIds") != null && !jsonObj.get("NicNetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicNetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NicNetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicNicIds") != null && !jsonObj.get("NicNicIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicNicIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NicNicIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicPrivateIpsLinkPublicIpAccountIds") != null - && !jsonObj.get("NicPrivateIpsLinkPublicIpAccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicPrivateIpsLinkPublicIpAccountIds` to be an" - + " array in the JSON string but got `%s`", - jsonObj.get("NicPrivateIpsLinkPublicIpAccountIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicPrivateIpsLinkPublicIpIds") != null - && !jsonObj.get("NicPrivateIpsLinkPublicIpIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicPrivateIpsLinkPublicIpIds` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("NicPrivateIpsLinkPublicIpIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicPrivateIpsPrivateIps") != null - && !jsonObj.get("NicPrivateIpsPrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicPrivateIpsPrivateIps` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NicPrivateIpsPrivateIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicSecurityGroupIds") != null - && !jsonObj.get("NicSecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicSecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicSecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicSecurityGroupNames") != null - && !jsonObj.get("NicSecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicSecurityGroupNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicSecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicStates") != null && !jsonObj.get("NicStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicStates` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("NicStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicSubnetIds") != null && !jsonObj.get("NicSubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicSubnetIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("NicSubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("NicSubregionNames") != null - && !jsonObj.get("NicSubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicSubregionNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NicSubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Platforms") != null && !jsonObj.get("Platforms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Platforms` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Platforms").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PrivateIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodes") != null && !jsonObj.get("ProductCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductCodes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PublicIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ReservationIds") != null && !jsonObj.get("ReservationIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ReservationIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ReservationIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RootDeviceNames") != null - && !jsonObj.get("RootDeviceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RootDeviceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RootDeviceTypes") != null - && !jsonObj.get("RootDeviceTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RootDeviceTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupNames") != null - && !jsonObj.get("SecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("StateReasonCodes") != null - && !jsonObj.get("StateReasonCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateReasonCodes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("StateReasonCodes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("StateReasonMessages") != null - && !jsonObj.get("StateReasonMessages").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateReasonMessages` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("StateReasonMessages").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("StateReasons") != null && !jsonObj.get("StateReasons").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateReasons` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("StateReasons").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubnetIds") != null && !jsonObj.get("SubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("SubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tenancies") != null && !jsonObj.get("Tenancies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tenancies` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Tenancies").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmSecurityGroupIds") != null - && !jsonObj.get("VmSecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmSecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmSecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmSecurityGroupNames") != null - && !jsonObj.get("VmSecurityGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmSecurityGroupNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmSecurityGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmStateCodes") != null && !jsonObj.get("VmStateCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmStateCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmStateCodes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmStateNames") != null && !jsonObj.get("VmStateNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmStateNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmStateNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmTypes") != null && !jsonObj.get("VmTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTypes` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VmTypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVm.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVm value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVm given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVm - * @throws IOException if the JSON string is invalid with respect to FiltersVm - */ - public static FiltersVm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVm.class); - } - - /** - * Convert an instance of FiltersVm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroup.java deleted file mode 100644 index 3d09d3df..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroup.java +++ /dev/null @@ -1,615 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVmGroup { - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SUBNET_IDS = "SubnetIds"; - - @SerializedName(SERIALIZED_NAME_SUBNET_IDS) - private List subnetIds = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_COUNTS = "VmCounts"; - - @SerializedName(SERIALIZED_NAME_VM_COUNTS) - private List vmCounts = null; - - public static final String SERIALIZED_NAME_VM_GROUP_IDS = "VmGroupIds"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_IDS) - private List vmGroupIds = null; - - public static final String SERIALIZED_NAME_VM_GROUP_NAMES = "VmGroupNames"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_NAMES) - private List vmGroupNames = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_IDS = "VmTemplateIds"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_IDS) - private List vmTemplateIds = null; - - public FiltersVmGroup() {} - - public FiltersVmGroup descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersVmGroup addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the VM groups. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersVmGroup securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public FiltersVmGroup addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * The IDs of the security groups. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public FiltersVmGroup subnetIds(List subnetIds) { - - this.subnetIds = subnetIds; - return this; - } - - public FiltersVmGroup addSubnetIdsItem(String subnetIdsItem) { - if (this.subnetIds == null) { - this.subnetIds = new ArrayList<>(); - } - this.subnetIds.add(subnetIdsItem); - return this; - } - - /** - * The IDs of the Subnets. - * - * @return subnetIds - */ - @javax.annotation.Nullable - public List getSubnetIds() { - return subnetIds; - } - - public void setSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - } - - public FiltersVmGroup tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVmGroup addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the VM groups. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVmGroup tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVmGroup addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the VM groups. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVmGroup tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVmGroup addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the VMs, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVmGroup vmCounts(List vmCounts) { - - this.vmCounts = vmCounts; - return this; - } - - public FiltersVmGroup addVmCountsItem(Integer vmCountsItem) { - if (this.vmCounts == null) { - this.vmCounts = new ArrayList<>(); - } - this.vmCounts.add(vmCountsItem); - return this; - } - - /** - * The number of VMs in the VM group. - * - * @return vmCounts - */ - @javax.annotation.Nullable - public List getVmCounts() { - return vmCounts; - } - - public void setVmCounts(List vmCounts) { - this.vmCounts = vmCounts; - } - - public FiltersVmGroup vmGroupIds(List vmGroupIds) { - - this.vmGroupIds = vmGroupIds; - return this; - } - - public FiltersVmGroup addVmGroupIdsItem(String vmGroupIdsItem) { - if (this.vmGroupIds == null) { - this.vmGroupIds = new ArrayList<>(); - } - this.vmGroupIds.add(vmGroupIdsItem); - return this; - } - - /** - * The IDs of the VM groups. - * - * @return vmGroupIds - */ - @javax.annotation.Nullable - public List getVmGroupIds() { - return vmGroupIds; - } - - public void setVmGroupIds(List vmGroupIds) { - this.vmGroupIds = vmGroupIds; - } - - public FiltersVmGroup vmGroupNames(List vmGroupNames) { - - this.vmGroupNames = vmGroupNames; - return this; - } - - public FiltersVmGroup addVmGroupNamesItem(String vmGroupNamesItem) { - if (this.vmGroupNames == null) { - this.vmGroupNames = new ArrayList<>(); - } - this.vmGroupNames.add(vmGroupNamesItem); - return this; - } - - /** - * The names of the VM groups. - * - * @return vmGroupNames - */ - @javax.annotation.Nullable - public List getVmGroupNames() { - return vmGroupNames; - } - - public void setVmGroupNames(List vmGroupNames) { - this.vmGroupNames = vmGroupNames; - } - - public FiltersVmGroup vmTemplateIds(List vmTemplateIds) { - - this.vmTemplateIds = vmTemplateIds; - return this; - } - - public FiltersVmGroup addVmTemplateIdsItem(String vmTemplateIdsItem) { - if (this.vmTemplateIds == null) { - this.vmTemplateIds = new ArrayList<>(); - } - this.vmTemplateIds.add(vmTemplateIdsItem); - return this; - } - - /** - * The IDs of the VM templates. - * - * @return vmTemplateIds - */ - @javax.annotation.Nullable - public List getVmTemplateIds() { - return vmTemplateIds; - } - - public void setVmTemplateIds(List vmTemplateIds) { - this.vmTemplateIds = vmTemplateIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVmGroup filtersVmGroup = (FiltersVmGroup) o; - return Objects.equals(this.descriptions, filtersVmGroup.descriptions) - && Objects.equals(this.securityGroupIds, filtersVmGroup.securityGroupIds) - && Objects.equals(this.subnetIds, filtersVmGroup.subnetIds) - && Objects.equals(this.tagKeys, filtersVmGroup.tagKeys) - && Objects.equals(this.tagValues, filtersVmGroup.tagValues) - && Objects.equals(this.tags, filtersVmGroup.tags) - && Objects.equals(this.vmCounts, filtersVmGroup.vmCounts) - && Objects.equals(this.vmGroupIds, filtersVmGroup.vmGroupIds) - && Objects.equals(this.vmGroupNames, filtersVmGroup.vmGroupNames) - && Objects.equals(this.vmTemplateIds, filtersVmGroup.vmTemplateIds); - } - - @Override - public int hashCode() { - return Objects.hash( - descriptions, - securityGroupIds, - subnetIds, - tagKeys, - tagValues, - tags, - vmCounts, - vmGroupIds, - vmGroupNames, - vmTemplateIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVmGroup {\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" subnetIds: ").append(toIndentedString(subnetIds)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmCounts: ").append(toIndentedString(vmCounts)).append("\n"); - sb.append(" vmGroupIds: ").append(toIndentedString(vmGroupIds)).append("\n"); - sb.append(" vmGroupNames: ").append(toIndentedString(vmGroupNames)).append("\n"); - sb.append(" vmTemplateIds: ").append(toIndentedString(vmTemplateIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Descriptions"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SubnetIds"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VmCounts"); - openapiFields.add("VmGroupIds"); - openapiFields.add("VmGroupNames"); - openapiFields.add("VmTemplateIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVmGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVmGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVmGroup is not found in the" - + " empty JSON string", - FiltersVmGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVmGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVmGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubnetIds") != null && !jsonObj.get("SubnetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("SubnetIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmCounts") != null && !jsonObj.get("VmCounts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmCounts` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VmCounts").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmGroupIds") != null && !jsonObj.get("VmGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VmGroupIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmGroupNames") != null && !jsonObj.get("VmGroupNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmGroupNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmTemplateIds") != null && !jsonObj.get("VmTemplateIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmTemplateIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVmGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVmGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVmGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVmGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVmGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVmGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVmGroup - * @throws IOException if the JSON string is invalid with respect to FiltersVmGroup - */ - public static FiltersVmGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVmGroup.class); - } - - /** - * Convert an instance of FiltersVmGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplate.java deleted file mode 100644 index 25dafbe0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplate.java +++ /dev/null @@ -1,708 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVmTemplate { - public static final String SERIALIZED_NAME_CPU_CORES = "CpuCores"; - - @SerializedName(SERIALIZED_NAME_CPU_CORES) - private List cpuCores = null; - - public static final String SERIALIZED_NAME_CPU_GENERATIONS = "CpuGenerations"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATIONS) - private List cpuGenerations = null; - - public static final String SERIALIZED_NAME_CPU_PERFORMANCES = "CpuPerformances"; - - @SerializedName(SERIALIZED_NAME_CPU_PERFORMANCES) - private List cpuPerformances = null; - - public static final String SERIALIZED_NAME_DESCRIPTIONS = "Descriptions"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTIONS) - private List descriptions = null; - - public static final String SERIALIZED_NAME_IMAGE_IDS = "ImageIds"; - - @SerializedName(SERIALIZED_NAME_IMAGE_IDS) - private List imageIds = null; - - public static final String SERIALIZED_NAME_KEYPAIR_NAMES = "KeypairNames"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAMES) - private List keypairNames = null; - - public static final String SERIALIZED_NAME_RAMS = "Rams"; - - @SerializedName(SERIALIZED_NAME_RAMS) - private List rams = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_IDS = "VmTemplateIds"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_IDS) - private List vmTemplateIds = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_NAMES = "VmTemplateNames"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_NAMES) - private List vmTemplateNames = null; - - public FiltersVmTemplate() {} - - public FiltersVmTemplate cpuCores(List cpuCores) { - - this.cpuCores = cpuCores; - return this; - } - - public FiltersVmTemplate addCpuCoresItem(Integer cpuCoresItem) { - if (this.cpuCores == null) { - this.cpuCores = new ArrayList<>(); - } - this.cpuCores.add(cpuCoresItem); - return this; - } - - /** - * The number of vCores. - * - * @return cpuCores - */ - @javax.annotation.Nullable - public List getCpuCores() { - return cpuCores; - } - - public void setCpuCores(List cpuCores) { - this.cpuCores = cpuCores; - } - - public FiltersVmTemplate cpuGenerations(List cpuGenerations) { - - this.cpuGenerations = cpuGenerations; - return this; - } - - public FiltersVmTemplate addCpuGenerationsItem(String cpuGenerationsItem) { - if (this.cpuGenerations == null) { - this.cpuGenerations = new ArrayList<>(); - } - this.cpuGenerations.add(cpuGenerationsItem); - return this; - } - - /** - * The processor generations (for example, `v4`). - * - * @return cpuGenerations - */ - @javax.annotation.Nullable - public List getCpuGenerations() { - return cpuGenerations; - } - - public void setCpuGenerations(List cpuGenerations) { - this.cpuGenerations = cpuGenerations; - } - - public FiltersVmTemplate cpuPerformances(List cpuPerformances) { - - this.cpuPerformances = cpuPerformances; - return this; - } - - public FiltersVmTemplate addCpuPerformancesItem(String cpuPerformancesItem) { - if (this.cpuPerformances == null) { - this.cpuPerformances = new ArrayList<>(); - } - this.cpuPerformances.add(cpuPerformancesItem); - return this; - } - - /** - * The performances of the VMs. - * - * @return cpuPerformances - */ - @javax.annotation.Nullable - public List getCpuPerformances() { - return cpuPerformances; - } - - public void setCpuPerformances(List cpuPerformances) { - this.cpuPerformances = cpuPerformances; - } - - public FiltersVmTemplate descriptions(List descriptions) { - - this.descriptions = descriptions; - return this; - } - - public FiltersVmTemplate addDescriptionsItem(String descriptionsItem) { - if (this.descriptions == null) { - this.descriptions = new ArrayList<>(); - } - this.descriptions.add(descriptionsItem); - return this; - } - - /** - * The descriptions of the VM templates. - * - * @return descriptions - */ - @javax.annotation.Nullable - public List getDescriptions() { - return descriptions; - } - - public void setDescriptions(List descriptions) { - this.descriptions = descriptions; - } - - public FiltersVmTemplate imageIds(List imageIds) { - - this.imageIds = imageIds; - return this; - } - - public FiltersVmTemplate addImageIdsItem(String imageIdsItem) { - if (this.imageIds == null) { - this.imageIds = new ArrayList<>(); - } - this.imageIds.add(imageIdsItem); - return this; - } - - /** - * The IDs of the OMIs. - * - * @return imageIds - */ - @javax.annotation.Nullable - public List getImageIds() { - return imageIds; - } - - public void setImageIds(List imageIds) { - this.imageIds = imageIds; - } - - public FiltersVmTemplate keypairNames(List keypairNames) { - - this.keypairNames = keypairNames; - return this; - } - - public FiltersVmTemplate addKeypairNamesItem(String keypairNamesItem) { - if (this.keypairNames == null) { - this.keypairNames = new ArrayList<>(); - } - this.keypairNames.add(keypairNamesItem); - return this; - } - - /** - * The names of the keypairs. - * - * @return keypairNames - */ - @javax.annotation.Nullable - public List getKeypairNames() { - return keypairNames; - } - - public void setKeypairNames(List keypairNames) { - this.keypairNames = keypairNames; - } - - public FiltersVmTemplate rams(List rams) { - - this.rams = rams; - return this; - } - - public FiltersVmTemplate addRamsItem(Integer ramsItem) { - if (this.rams == null) { - this.rams = new ArrayList<>(); - } - this.rams.add(ramsItem); - return this; - } - - /** - * The amount of RAM. - * - * @return rams - */ - @javax.annotation.Nullable - public List getRams() { - return rams; - } - - public void setRams(List rams) { - this.rams = rams; - } - - public FiltersVmTemplate tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVmTemplate addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the VM templates. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVmTemplate tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVmTemplate addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the VM templates. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVmTemplate tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVmTemplate addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the VM templates, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVmTemplate vmTemplateIds(List vmTemplateIds) { - - this.vmTemplateIds = vmTemplateIds; - return this; - } - - public FiltersVmTemplate addVmTemplateIdsItem(String vmTemplateIdsItem) { - if (this.vmTemplateIds == null) { - this.vmTemplateIds = new ArrayList<>(); - } - this.vmTemplateIds.add(vmTemplateIdsItem); - return this; - } - - /** - * The IDs of the VM templates. - * - * @return vmTemplateIds - */ - @javax.annotation.Nullable - public List getVmTemplateIds() { - return vmTemplateIds; - } - - public void setVmTemplateIds(List vmTemplateIds) { - this.vmTemplateIds = vmTemplateIds; - } - - public FiltersVmTemplate vmTemplateNames(List vmTemplateNames) { - - this.vmTemplateNames = vmTemplateNames; - return this; - } - - public FiltersVmTemplate addVmTemplateNamesItem(String vmTemplateNamesItem) { - if (this.vmTemplateNames == null) { - this.vmTemplateNames = new ArrayList<>(); - } - this.vmTemplateNames.add(vmTemplateNamesItem); - return this; - } - - /** - * The names of the VM templates. - * - * @return vmTemplateNames - */ - @javax.annotation.Nullable - public List getVmTemplateNames() { - return vmTemplateNames; - } - - public void setVmTemplateNames(List vmTemplateNames) { - this.vmTemplateNames = vmTemplateNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVmTemplate filtersVmTemplate = (FiltersVmTemplate) o; - return Objects.equals(this.cpuCores, filtersVmTemplate.cpuCores) - && Objects.equals(this.cpuGenerations, filtersVmTemplate.cpuGenerations) - && Objects.equals(this.cpuPerformances, filtersVmTemplate.cpuPerformances) - && Objects.equals(this.descriptions, filtersVmTemplate.descriptions) - && Objects.equals(this.imageIds, filtersVmTemplate.imageIds) - && Objects.equals(this.keypairNames, filtersVmTemplate.keypairNames) - && Objects.equals(this.rams, filtersVmTemplate.rams) - && Objects.equals(this.tagKeys, filtersVmTemplate.tagKeys) - && Objects.equals(this.tagValues, filtersVmTemplate.tagValues) - && Objects.equals(this.tags, filtersVmTemplate.tags) - && Objects.equals(this.vmTemplateIds, filtersVmTemplate.vmTemplateIds) - && Objects.equals(this.vmTemplateNames, filtersVmTemplate.vmTemplateNames); - } - - @Override - public int hashCode() { - return Objects.hash( - cpuCores, - cpuGenerations, - cpuPerformances, - descriptions, - imageIds, - keypairNames, - rams, - tagKeys, - tagValues, - tags, - vmTemplateIds, - vmTemplateNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVmTemplate {\n"); - sb.append(" cpuCores: ").append(toIndentedString(cpuCores)).append("\n"); - sb.append(" cpuGenerations: ").append(toIndentedString(cpuGenerations)).append("\n"); - sb.append(" cpuPerformances: ").append(toIndentedString(cpuPerformances)).append("\n"); - sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); - sb.append(" imageIds: ").append(toIndentedString(imageIds)).append("\n"); - sb.append(" keypairNames: ").append(toIndentedString(keypairNames)).append("\n"); - sb.append(" rams: ").append(toIndentedString(rams)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmTemplateIds: ").append(toIndentedString(vmTemplateIds)).append("\n"); - sb.append(" vmTemplateNames: ").append(toIndentedString(vmTemplateNames)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CpuCores"); - openapiFields.add("CpuGenerations"); - openapiFields.add("CpuPerformances"); - openapiFields.add("Descriptions"); - openapiFields.add("ImageIds"); - openapiFields.add("KeypairNames"); - openapiFields.add("Rams"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VmTemplateIds"); - openapiFields.add("VmTemplateNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVmTemplate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVmTemplate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVmTemplate is not found in the" - + " empty JSON string", - FiltersVmTemplate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVmTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVmTemplate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("CpuCores") != null && !jsonObj.get("CpuCores").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuCores` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("CpuCores").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CpuGenerations") != null && !jsonObj.get("CpuGenerations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuGenerations` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("CpuGenerations").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CpuPerformances") != null - && !jsonObj.get("CpuPerformances").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuPerformances` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("CpuPerformances").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Descriptions") != null && !jsonObj.get("Descriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Descriptions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Descriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ImageIds") != null && !jsonObj.get("ImageIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ImageIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("KeypairNames") != null && !jsonObj.get("KeypairNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("KeypairNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Rams") != null && !jsonObj.get("Rams").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Rams` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Rams").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmTemplateIds") != null && !jsonObj.get("VmTemplateIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmTemplateIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmTemplateNames") != null - && !jsonObj.get("VmTemplateNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVmTemplate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVmTemplate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVmTemplate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVmTemplate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVmTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVmTemplate given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVmTemplate - * @throws IOException if the JSON string is invalid with respect to FiltersVmTemplate - */ - public static FiltersVmTemplate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVmTemplate.class); - } - - /** - * Convert an instance of FiltersVmTemplate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmType.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmType.java deleted file mode 100644 index be838ecf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmType.java +++ /dev/null @@ -1,555 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVmType { - public static final String SERIALIZED_NAME_BSU_OPTIMIZED = "BsuOptimized"; - - @SerializedName(SERIALIZED_NAME_BSU_OPTIMIZED) - private Boolean bsuOptimized; - - public static final String SERIALIZED_NAME_EPHEMERALS_TYPES = "EphemeralsTypes"; - - @SerializedName(SERIALIZED_NAME_EPHEMERALS_TYPES) - private List ephemeralsTypes = null; - - public static final String SERIALIZED_NAME_ETHS = "Eths"; - - @SerializedName(SERIALIZED_NAME_ETHS) - private List eths = null; - - public static final String SERIALIZED_NAME_GPUS = "Gpus"; - - @SerializedName(SERIALIZED_NAME_GPUS) - private List gpus = null; - - public static final String SERIALIZED_NAME_MEMORY_SIZES = "MemorySizes"; - - @SerializedName(SERIALIZED_NAME_MEMORY_SIZES) - private List memorySizes = null; - - public static final String SERIALIZED_NAME_VCORE_COUNTS = "VcoreCounts"; - - @SerializedName(SERIALIZED_NAME_VCORE_COUNTS) - private List vcoreCounts = null; - - public static final String SERIALIZED_NAME_VM_TYPE_NAMES = "VmTypeNames"; - - @SerializedName(SERIALIZED_NAME_VM_TYPE_NAMES) - private List vmTypeNames = null; - - public static final String SERIALIZED_NAME_VOLUME_COUNTS = "VolumeCounts"; - - @SerializedName(SERIALIZED_NAME_VOLUME_COUNTS) - private List volumeCounts = null; - - public static final String SERIALIZED_NAME_VOLUME_SIZES = "VolumeSizes"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZES) - private List volumeSizes = null; - - public FiltersVmType() {} - - public FiltersVmType bsuOptimized(Boolean bsuOptimized) { - - this.bsuOptimized = bsuOptimized; - return this; - } - - /** - * This parameter is not available. It is present in our API for the sake of historical - * compatibility with AWS. - * - * @return bsuOptimized - */ - @javax.annotation.Nullable - public Boolean getBsuOptimized() { - return bsuOptimized; - } - - public void setBsuOptimized(Boolean bsuOptimized) { - this.bsuOptimized = bsuOptimized; - } - - public FiltersVmType ephemeralsTypes(List ephemeralsTypes) { - - this.ephemeralsTypes = ephemeralsTypes; - return this; - } - - public FiltersVmType addEphemeralsTypesItem(String ephemeralsTypesItem) { - if (this.ephemeralsTypes == null) { - this.ephemeralsTypes = new ArrayList<>(); - } - this.ephemeralsTypes.add(ephemeralsTypesItem); - return this; - } - - /** - * The types of ephemeral storage disk. - * - * @return ephemeralsTypes - */ - @javax.annotation.Nullable - public List getEphemeralsTypes() { - return ephemeralsTypes; - } - - public void setEphemeralsTypes(List ephemeralsTypes) { - this.ephemeralsTypes = ephemeralsTypes; - } - - public FiltersVmType eths(List eths) { - - this.eths = eths; - return this; - } - - public FiltersVmType addEthsItem(Integer ethsItem) { - if (this.eths == null) { - this.eths = new ArrayList<>(); - } - this.eths.add(ethsItem); - return this; - } - - /** - * The number of Ethernet interfaces available. - * - * @return eths - */ - @javax.annotation.Nullable - public List getEths() { - return eths; - } - - public void setEths(List eths) { - this.eths = eths; - } - - public FiltersVmType gpus(List gpus) { - - this.gpus = gpus; - return this; - } - - public FiltersVmType addGpusItem(Integer gpusItem) { - if (this.gpus == null) { - this.gpus = new ArrayList<>(); - } - this.gpus.add(gpusItem); - return this; - } - - /** - * The number of GPUs available. - * - * @return gpus - */ - @javax.annotation.Nullable - public List getGpus() { - return gpus; - } - - public void setGpus(List gpus) { - this.gpus = gpus; - } - - public FiltersVmType memorySizes(List memorySizes) { - - this.memorySizes = memorySizes; - return this; - } - - public FiltersVmType addMemorySizesItem(Float memorySizesItem) { - if (this.memorySizes == null) { - this.memorySizes = new ArrayList<>(); - } - this.memorySizes.add(memorySizesItem); - return this; - } - - /** - * The amounts of memory, in gibibytes (GiB). - * - * @return memorySizes - */ - @javax.annotation.Nullable - public List getMemorySizes() { - return memorySizes; - } - - public void setMemorySizes(List memorySizes) { - this.memorySizes = memorySizes; - } - - public FiltersVmType vcoreCounts(List vcoreCounts) { - - this.vcoreCounts = vcoreCounts; - return this; - } - - public FiltersVmType addVcoreCountsItem(Integer vcoreCountsItem) { - if (this.vcoreCounts == null) { - this.vcoreCounts = new ArrayList<>(); - } - this.vcoreCounts.add(vcoreCountsItem); - return this; - } - - /** - * The numbers of vCores. - * - * @return vcoreCounts - */ - @javax.annotation.Nullable - public List getVcoreCounts() { - return vcoreCounts; - } - - public void setVcoreCounts(List vcoreCounts) { - this.vcoreCounts = vcoreCounts; - } - - public FiltersVmType vmTypeNames(List vmTypeNames) { - - this.vmTypeNames = vmTypeNames; - return this; - } - - public FiltersVmType addVmTypeNamesItem(String vmTypeNamesItem) { - if (this.vmTypeNames == null) { - this.vmTypeNames = new ArrayList<>(); - } - this.vmTypeNames.add(vmTypeNamesItem); - return this; - } - - /** - * The names of the VM types. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * - * @return vmTypeNames - */ - @javax.annotation.Nullable - public List getVmTypeNames() { - return vmTypeNames; - } - - public void setVmTypeNames(List vmTypeNames) { - this.vmTypeNames = vmTypeNames; - } - - public FiltersVmType volumeCounts(List volumeCounts) { - - this.volumeCounts = volumeCounts; - return this; - } - - public FiltersVmType addVolumeCountsItem(Integer volumeCountsItem) { - if (this.volumeCounts == null) { - this.volumeCounts = new ArrayList<>(); - } - this.volumeCounts.add(volumeCountsItem); - return this; - } - - /** - * The maximum number of ephemeral storage disks. - * - * @return volumeCounts - */ - @javax.annotation.Nullable - public List getVolumeCounts() { - return volumeCounts; - } - - public void setVolumeCounts(List volumeCounts) { - this.volumeCounts = volumeCounts; - } - - public FiltersVmType volumeSizes(List volumeSizes) { - - this.volumeSizes = volumeSizes; - return this; - } - - public FiltersVmType addVolumeSizesItem(Integer volumeSizesItem) { - if (this.volumeSizes == null) { - this.volumeSizes = new ArrayList<>(); - } - this.volumeSizes.add(volumeSizesItem); - return this; - } - - /** - * The size of one ephemeral storage disk, in gibibytes (GiB). - * - * @return volumeSizes - */ - @javax.annotation.Nullable - public List getVolumeSizes() { - return volumeSizes; - } - - public void setVolumeSizes(List volumeSizes) { - this.volumeSizes = volumeSizes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVmType filtersVmType = (FiltersVmType) o; - return Objects.equals(this.bsuOptimized, filtersVmType.bsuOptimized) - && Objects.equals(this.ephemeralsTypes, filtersVmType.ephemeralsTypes) - && Objects.equals(this.eths, filtersVmType.eths) - && Objects.equals(this.gpus, filtersVmType.gpus) - && Objects.equals(this.memorySizes, filtersVmType.memorySizes) - && Objects.equals(this.vcoreCounts, filtersVmType.vcoreCounts) - && Objects.equals(this.vmTypeNames, filtersVmType.vmTypeNames) - && Objects.equals(this.volumeCounts, filtersVmType.volumeCounts) - && Objects.equals(this.volumeSizes, filtersVmType.volumeSizes); - } - - @Override - public int hashCode() { - return Objects.hash( - bsuOptimized, - ephemeralsTypes, - eths, - gpus, - memorySizes, - vcoreCounts, - vmTypeNames, - volumeCounts, - volumeSizes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVmType {\n"); - sb.append(" bsuOptimized: ").append(toIndentedString(bsuOptimized)).append("\n"); - sb.append(" ephemeralsTypes: ").append(toIndentedString(ephemeralsTypes)).append("\n"); - sb.append(" eths: ").append(toIndentedString(eths)).append("\n"); - sb.append(" gpus: ").append(toIndentedString(gpus)).append("\n"); - sb.append(" memorySizes: ").append(toIndentedString(memorySizes)).append("\n"); - sb.append(" vcoreCounts: ").append(toIndentedString(vcoreCounts)).append("\n"); - sb.append(" vmTypeNames: ").append(toIndentedString(vmTypeNames)).append("\n"); - sb.append(" volumeCounts: ").append(toIndentedString(volumeCounts)).append("\n"); - sb.append(" volumeSizes: ").append(toIndentedString(volumeSizes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BsuOptimized"); - openapiFields.add("EphemeralsTypes"); - openapiFields.add("Eths"); - openapiFields.add("Gpus"); - openapiFields.add("MemorySizes"); - openapiFields.add("VcoreCounts"); - openapiFields.add("VmTypeNames"); - openapiFields.add("VolumeCounts"); - openapiFields.add("VolumeSizes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVmType - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVmType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVmType is not found in the" - + " empty JSON string", - FiltersVmType.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVmType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVmType` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("EphemeralsTypes") != null - && !jsonObj.get("EphemeralsTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `EphemeralsTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("EphemeralsTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Eths") != null && !jsonObj.get("Eths").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Eths` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Eths").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Gpus") != null && !jsonObj.get("Gpus").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Gpus` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Gpus").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("MemorySizes") != null && !jsonObj.get("MemorySizes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MemorySizes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("MemorySizes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VcoreCounts") != null && !jsonObj.get("VcoreCounts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VcoreCounts` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VcoreCounts").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmTypeNames") != null && !jsonObj.get("VmTypeNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTypeNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VmTypeNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeCounts") != null && !jsonObj.get("VolumeCounts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeCounts` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeCounts").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeSizes") != null && !jsonObj.get("VolumeSizes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeSizes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeSizes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVmType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVmType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVmType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVmType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVmType read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVmType given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVmType - * @throws IOException if the JSON string is invalid with respect to FiltersVmType - */ - public static FiltersVmType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVmType.class); - } - - /** - * Convert an instance of FiltersVmType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsState.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsState.java deleted file mode 100644 index b20aad8d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsState.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVmsState { - public static final String SERIALIZED_NAME_MAINTENANCE_EVENT_CODES = "MaintenanceEventCodes"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_EVENT_CODES) - private List maintenanceEventCodes = null; - - public static final String SERIALIZED_NAME_MAINTENANCE_EVENT_DESCRIPTIONS = - "MaintenanceEventDescriptions"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_EVENT_DESCRIPTIONS) - private List maintenanceEventDescriptions = null; - - public static final String SERIALIZED_NAME_MAINTENANCE_EVENTS_NOT_AFTER = - "MaintenanceEventsNotAfter"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_EVENTS_NOT_AFTER) - private List maintenanceEventsNotAfter = null; - - public static final String SERIALIZED_NAME_MAINTENANCE_EVENTS_NOT_BEFORE = - "MaintenanceEventsNotBefore"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_EVENTS_NOT_BEFORE) - private List maintenanceEventsNotBefore = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public static final String SERIALIZED_NAME_VM_STATES = "VmStates"; - - @SerializedName(SERIALIZED_NAME_VM_STATES) - private List vmStates = null; - - public FiltersVmsState() {} - - public FiltersVmsState maintenanceEventCodes(List maintenanceEventCodes) { - - this.maintenanceEventCodes = maintenanceEventCodes; - return this; - } - - public FiltersVmsState addMaintenanceEventCodesItem(String maintenanceEventCodesItem) { - if (this.maintenanceEventCodes == null) { - this.maintenanceEventCodes = new ArrayList<>(); - } - this.maintenanceEventCodes.add(maintenanceEventCodesItem); - return this; - } - - /** - * The code for the scheduled event (`system-reboot` \\| - * `system-maintenance`). - * - * @return maintenanceEventCodes - */ - @javax.annotation.Nullable - public List getMaintenanceEventCodes() { - return maintenanceEventCodes; - } - - public void setMaintenanceEventCodes(List maintenanceEventCodes) { - this.maintenanceEventCodes = maintenanceEventCodes; - } - - public FiltersVmsState maintenanceEventDescriptions(List maintenanceEventDescriptions) { - - this.maintenanceEventDescriptions = maintenanceEventDescriptions; - return this; - } - - public FiltersVmsState addMaintenanceEventDescriptionsItem( - String maintenanceEventDescriptionsItem) { - if (this.maintenanceEventDescriptions == null) { - this.maintenanceEventDescriptions = new ArrayList<>(); - } - this.maintenanceEventDescriptions.add(maintenanceEventDescriptionsItem); - return this; - } - - /** - * The description of the scheduled event. - * - * @return maintenanceEventDescriptions - */ - @javax.annotation.Nullable - public List getMaintenanceEventDescriptions() { - return maintenanceEventDescriptions; - } - - public void setMaintenanceEventDescriptions(List maintenanceEventDescriptions) { - this.maintenanceEventDescriptions = maintenanceEventDescriptions; - } - - public FiltersVmsState maintenanceEventsNotAfter(List maintenanceEventsNotAfter) { - - this.maintenanceEventsNotAfter = maintenanceEventsNotAfter; - return this; - } - - public FiltersVmsState addMaintenanceEventsNotAfterItem( - LocalDate maintenanceEventsNotAfterItem) { - if (this.maintenanceEventsNotAfter == null) { - this.maintenanceEventsNotAfter = new ArrayList<>(); - } - this.maintenanceEventsNotAfter.add(maintenanceEventsNotAfterItem); - return this; - } - - /** - * The latest date and time (UTC) the event can end. - * - * @return maintenanceEventsNotAfter - */ - @javax.annotation.Nullable - public List getMaintenanceEventsNotAfter() { - return maintenanceEventsNotAfter; - } - - public void setMaintenanceEventsNotAfter(List maintenanceEventsNotAfter) { - this.maintenanceEventsNotAfter = maintenanceEventsNotAfter; - } - - public FiltersVmsState maintenanceEventsNotBefore(List maintenanceEventsNotBefore) { - - this.maintenanceEventsNotBefore = maintenanceEventsNotBefore; - return this; - } - - public FiltersVmsState addMaintenanceEventsNotBeforeItem( - LocalDate maintenanceEventsNotBeforeItem) { - if (this.maintenanceEventsNotBefore == null) { - this.maintenanceEventsNotBefore = new ArrayList<>(); - } - this.maintenanceEventsNotBefore.add(maintenanceEventsNotBeforeItem); - return this; - } - - /** - * The earliest date and time (UTC) the event can start. - * - * @return maintenanceEventsNotBefore - */ - @javax.annotation.Nullable - public List getMaintenanceEventsNotBefore() { - return maintenanceEventsNotBefore; - } - - public void setMaintenanceEventsNotBefore(List maintenanceEventsNotBefore) { - this.maintenanceEventsNotBefore = maintenanceEventsNotBefore; - } - - public FiltersVmsState subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersVmsState addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions of the VMs. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersVmsState vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public FiltersVmsState addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - public FiltersVmsState vmStates(List vmStates) { - - this.vmStates = vmStates; - return this; - } - - public FiltersVmsState addVmStatesItem(String vmStatesItem) { - if (this.vmStates == null) { - this.vmStates = new ArrayList<>(); - } - this.vmStates.add(vmStatesItem); - return this; - } - - /** - * The states of the VMs (`pending` \\| `running` \\| `stopping` - * \\| `stopped` \\| `shutting-down` \\| `terminated` \\| - * `quarantine`). - * - * @return vmStates - */ - @javax.annotation.Nullable - public List getVmStates() { - return vmStates; - } - - public void setVmStates(List vmStates) { - this.vmStates = vmStates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVmsState filtersVmsState = (FiltersVmsState) o; - return Objects.equals(this.maintenanceEventCodes, filtersVmsState.maintenanceEventCodes) - && Objects.equals( - this.maintenanceEventDescriptions, - filtersVmsState.maintenanceEventDescriptions) - && Objects.equals( - this.maintenanceEventsNotAfter, filtersVmsState.maintenanceEventsNotAfter) - && Objects.equals( - this.maintenanceEventsNotBefore, filtersVmsState.maintenanceEventsNotBefore) - && Objects.equals(this.subregionNames, filtersVmsState.subregionNames) - && Objects.equals(this.vmIds, filtersVmsState.vmIds) - && Objects.equals(this.vmStates, filtersVmsState.vmStates); - } - - @Override - public int hashCode() { - return Objects.hash( - maintenanceEventCodes, - maintenanceEventDescriptions, - maintenanceEventsNotAfter, - maintenanceEventsNotBefore, - subregionNames, - vmIds, - vmStates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVmsState {\n"); - sb.append(" maintenanceEventCodes: ") - .append(toIndentedString(maintenanceEventCodes)) - .append("\n"); - sb.append(" maintenanceEventDescriptions: ") - .append(toIndentedString(maintenanceEventDescriptions)) - .append("\n"); - sb.append(" maintenanceEventsNotAfter: ") - .append(toIndentedString(maintenanceEventsNotAfter)) - .append("\n"); - sb.append(" maintenanceEventsNotBefore: ") - .append(toIndentedString(maintenanceEventsNotBefore)) - .append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append(" vmStates: ").append(toIndentedString(vmStates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("MaintenanceEventCodes"); - openapiFields.add("MaintenanceEventDescriptions"); - openapiFields.add("MaintenanceEventsNotAfter"); - openapiFields.add("MaintenanceEventsNotBefore"); - openapiFields.add("SubregionNames"); - openapiFields.add("VmIds"); - openapiFields.add("VmStates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVmsState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVmsState.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVmsState is not found in the" - + " empty JSON string", - FiltersVmsState.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVmsState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVmsState` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("MaintenanceEventCodes") != null - && !jsonObj.get("MaintenanceEventCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MaintenanceEventCodes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("MaintenanceEventCodes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("MaintenanceEventDescriptions") != null - && !jsonObj.get("MaintenanceEventDescriptions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MaintenanceEventDescriptions` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("MaintenanceEventDescriptions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("MaintenanceEventsNotAfter") != null - && !jsonObj.get("MaintenanceEventsNotAfter").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MaintenanceEventsNotAfter` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("MaintenanceEventsNotAfter").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("MaintenanceEventsNotBefore") != null - && !jsonObj.get("MaintenanceEventsNotBefore").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MaintenanceEventsNotBefore` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("MaintenanceEventsNotBefore").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmStates") != null && !jsonObj.get("VmStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmStates` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VmStates").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVmsState.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVmsState' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVmsState.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVmsState value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVmsState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVmsState given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVmsState - * @throws IOException if the JSON string is invalid with respect to FiltersVmsState - */ - public static FiltersVmsState fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVmsState.class); - } - - /** - * Convert an instance of FiltersVmsState to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolume.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolume.java deleted file mode 100644 index e49838e6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolume.java +++ /dev/null @@ -1,843 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVolume { - public static final String SERIALIZED_NAME_CREATION_DATES = "CreationDates"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATES) - private List creationDates = null; - - public static final String SERIALIZED_NAME_LINK_VOLUME_DELETE_ON_VM_DELETION = - "LinkVolumeDeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_LINK_VOLUME_DELETE_ON_VM_DELETION) - private Boolean linkVolumeDeleteOnVmDeletion; - - public static final String SERIALIZED_NAME_LINK_VOLUME_DEVICE_NAMES = "LinkVolumeDeviceNames"; - - @SerializedName(SERIALIZED_NAME_LINK_VOLUME_DEVICE_NAMES) - private List linkVolumeDeviceNames = null; - - public static final String SERIALIZED_NAME_LINK_VOLUME_LINK_DATES = "LinkVolumeLinkDates"; - - @SerializedName(SERIALIZED_NAME_LINK_VOLUME_LINK_DATES) - private List linkVolumeLinkDates = null; - - public static final String SERIALIZED_NAME_LINK_VOLUME_LINK_STATES = "LinkVolumeLinkStates"; - - @SerializedName(SERIALIZED_NAME_LINK_VOLUME_LINK_STATES) - private List linkVolumeLinkStates = null; - - public static final String SERIALIZED_NAME_LINK_VOLUME_VM_IDS = "LinkVolumeVmIds"; - - @SerializedName(SERIALIZED_NAME_LINK_VOLUME_VM_IDS) - private List linkVolumeVmIds = null; - - public static final String SERIALIZED_NAME_SNAPSHOT_IDS = "SnapshotIds"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_IDS) - private List snapshotIds = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VOLUME_IDS = "VolumeIds"; - - @SerializedName(SERIALIZED_NAME_VOLUME_IDS) - private List volumeIds = null; - - public static final String SERIALIZED_NAME_VOLUME_SIZES = "VolumeSizes"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZES) - private List volumeSizes = null; - - public static final String SERIALIZED_NAME_VOLUME_STATES = "VolumeStates"; - - @SerializedName(SERIALIZED_NAME_VOLUME_STATES) - private List volumeStates = null; - - public static final String SERIALIZED_NAME_VOLUME_TYPES = "VolumeTypes"; - - @SerializedName(SERIALIZED_NAME_VOLUME_TYPES) - private List volumeTypes = null; - - public FiltersVolume() {} - - public FiltersVolume creationDates(List creationDates) { - - this.creationDates = creationDates; - return this; - } - - public FiltersVolume addCreationDatesItem(OffsetDateTime creationDatesItem) { - if (this.creationDates == null) { - this.creationDates = new ArrayList<>(); - } - this.creationDates.add(creationDatesItem); - return this; - } - - /** - * The dates and times at which the volumes were created, in ISO 8601 date-time format (for - * example, `2020-06-30T00:00:00.000Z`). - * - * @return creationDates - */ - @javax.annotation.Nullable - public List getCreationDates() { - return creationDates; - } - - public void setCreationDates(List creationDates) { - this.creationDates = creationDates; - } - - public FiltersVolume linkVolumeDeleteOnVmDeletion(Boolean linkVolumeDeleteOnVmDeletion) { - - this.linkVolumeDeleteOnVmDeletion = linkVolumeDeleteOnVmDeletion; - return this; - } - - /** - * Whether the volumes are deleted or not when terminating the VMs. - * - * @return linkVolumeDeleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getLinkVolumeDeleteOnVmDeletion() { - return linkVolumeDeleteOnVmDeletion; - } - - public void setLinkVolumeDeleteOnVmDeletion(Boolean linkVolumeDeleteOnVmDeletion) { - this.linkVolumeDeleteOnVmDeletion = linkVolumeDeleteOnVmDeletion; - } - - public FiltersVolume linkVolumeDeviceNames(List linkVolumeDeviceNames) { - - this.linkVolumeDeviceNames = linkVolumeDeviceNames; - return this; - } - - public FiltersVolume addLinkVolumeDeviceNamesItem(String linkVolumeDeviceNamesItem) { - if (this.linkVolumeDeviceNames == null) { - this.linkVolumeDeviceNames = new ArrayList<>(); - } - this.linkVolumeDeviceNames.add(linkVolumeDeviceNamesItem); - return this; - } - - /** - * The VM device names. - * - * @return linkVolumeDeviceNames - */ - @javax.annotation.Nullable - public List getLinkVolumeDeviceNames() { - return linkVolumeDeviceNames; - } - - public void setLinkVolumeDeviceNames(List linkVolumeDeviceNames) { - this.linkVolumeDeviceNames = linkVolumeDeviceNames; - } - - public FiltersVolume linkVolumeLinkDates(List linkVolumeLinkDates) { - - this.linkVolumeLinkDates = linkVolumeLinkDates; - return this; - } - - public FiltersVolume addLinkVolumeLinkDatesItem(OffsetDateTime linkVolumeLinkDatesItem) { - if (this.linkVolumeLinkDates == null) { - this.linkVolumeLinkDates = new ArrayList<>(); - } - this.linkVolumeLinkDates.add(linkVolumeLinkDatesItem); - return this; - } - - /** - * The dates and times at which the volumes were attached, in ISO 8601 date-time format (for - * example, `2020-06-30T00:00:00.000Z`). - * - * @return linkVolumeLinkDates - */ - @javax.annotation.Nullable - public List getLinkVolumeLinkDates() { - return linkVolumeLinkDates; - } - - public void setLinkVolumeLinkDates(List linkVolumeLinkDates) { - this.linkVolumeLinkDates = linkVolumeLinkDates; - } - - public FiltersVolume linkVolumeLinkStates(List linkVolumeLinkStates) { - - this.linkVolumeLinkStates = linkVolumeLinkStates; - return this; - } - - public FiltersVolume addLinkVolumeLinkStatesItem(String linkVolumeLinkStatesItem) { - if (this.linkVolumeLinkStates == null) { - this.linkVolumeLinkStates = new ArrayList<>(); - } - this.linkVolumeLinkStates.add(linkVolumeLinkStatesItem); - return this; - } - - /** - * The attachment states of the volumes (`attaching` \\| `detaching` \\| - * `attached` \\| `detached`). - * - * @return linkVolumeLinkStates - */ - @javax.annotation.Nullable - public List getLinkVolumeLinkStates() { - return linkVolumeLinkStates; - } - - public void setLinkVolumeLinkStates(List linkVolumeLinkStates) { - this.linkVolumeLinkStates = linkVolumeLinkStates; - } - - public FiltersVolume linkVolumeVmIds(List linkVolumeVmIds) { - - this.linkVolumeVmIds = linkVolumeVmIds; - return this; - } - - public FiltersVolume addLinkVolumeVmIdsItem(String linkVolumeVmIdsItem) { - if (this.linkVolumeVmIds == null) { - this.linkVolumeVmIds = new ArrayList<>(); - } - this.linkVolumeVmIds.add(linkVolumeVmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return linkVolumeVmIds - */ - @javax.annotation.Nullable - public List getLinkVolumeVmIds() { - return linkVolumeVmIds; - } - - public void setLinkVolumeVmIds(List linkVolumeVmIds) { - this.linkVolumeVmIds = linkVolumeVmIds; - } - - public FiltersVolume snapshotIds(List snapshotIds) { - - this.snapshotIds = snapshotIds; - return this; - } - - public FiltersVolume addSnapshotIdsItem(String snapshotIdsItem) { - if (this.snapshotIds == null) { - this.snapshotIds = new ArrayList<>(); - } - this.snapshotIds.add(snapshotIdsItem); - return this; - } - - /** - * The snapshots from which the volumes were created. - * - * @return snapshotIds - */ - @javax.annotation.Nullable - public List getSnapshotIds() { - return snapshotIds; - } - - public void setSnapshotIds(List snapshotIds) { - this.snapshotIds = snapshotIds; - } - - public FiltersVolume subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public FiltersVolume addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The names of the Subregions in which the volumes were created. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public FiltersVolume tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVolume addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the volumes. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVolume tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVolume addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the volumes. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVolume tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVolume addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the volumes, in the following format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVolume volumeIds(List volumeIds) { - - this.volumeIds = volumeIds; - return this; - } - - public FiltersVolume addVolumeIdsItem(String volumeIdsItem) { - if (this.volumeIds == null) { - this.volumeIds = new ArrayList<>(); - } - this.volumeIds.add(volumeIdsItem); - return this; - } - - /** - * The IDs of the volumes. - * - * @return volumeIds - */ - @javax.annotation.Nullable - public List getVolumeIds() { - return volumeIds; - } - - public void setVolumeIds(List volumeIds) { - this.volumeIds = volumeIds; - } - - public FiltersVolume volumeSizes(List volumeSizes) { - - this.volumeSizes = volumeSizes; - return this; - } - - public FiltersVolume addVolumeSizesItem(Integer volumeSizesItem) { - if (this.volumeSizes == null) { - this.volumeSizes = new ArrayList<>(); - } - this.volumeSizes.add(volumeSizesItem); - return this; - } - - /** - * The sizes of the volumes, in gibibytes (GiB). - * - * @return volumeSizes - */ - @javax.annotation.Nullable - public List getVolumeSizes() { - return volumeSizes; - } - - public void setVolumeSizes(List volumeSizes) { - this.volumeSizes = volumeSizes; - } - - public FiltersVolume volumeStates(List volumeStates) { - - this.volumeStates = volumeStates; - return this; - } - - public FiltersVolume addVolumeStatesItem(String volumeStatesItem) { - if (this.volumeStates == null) { - this.volumeStates = new ArrayList<>(); - } - this.volumeStates.add(volumeStatesItem); - return this; - } - - /** - * The states of the volumes (`creating` \\| `available` \\| - * `in-use` \\| `updating` \\| `deleting` \\| `error`). - * - * @return volumeStates - */ - @javax.annotation.Nullable - public List getVolumeStates() { - return volumeStates; - } - - public void setVolumeStates(List volumeStates) { - this.volumeStates = volumeStates; - } - - public FiltersVolume volumeTypes(List volumeTypes) { - - this.volumeTypes = volumeTypes; - return this; - } - - public FiltersVolume addVolumeTypesItem(String volumeTypesItem) { - if (this.volumeTypes == null) { - this.volumeTypes = new ArrayList<>(); - } - this.volumeTypes.add(volumeTypesItem); - return this; - } - - /** - * The types of the volumes (`standard` \\| `gp2` \\| `io1`). - * - * @return volumeTypes - */ - @javax.annotation.Nullable - public List getVolumeTypes() { - return volumeTypes; - } - - public void setVolumeTypes(List volumeTypes) { - this.volumeTypes = volumeTypes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVolume filtersVolume = (FiltersVolume) o; - return Objects.equals(this.creationDates, filtersVolume.creationDates) - && Objects.equals( - this.linkVolumeDeleteOnVmDeletion, - filtersVolume.linkVolumeDeleteOnVmDeletion) - && Objects.equals(this.linkVolumeDeviceNames, filtersVolume.linkVolumeDeviceNames) - && Objects.equals(this.linkVolumeLinkDates, filtersVolume.linkVolumeLinkDates) - && Objects.equals(this.linkVolumeLinkStates, filtersVolume.linkVolumeLinkStates) - && Objects.equals(this.linkVolumeVmIds, filtersVolume.linkVolumeVmIds) - && Objects.equals(this.snapshotIds, filtersVolume.snapshotIds) - && Objects.equals(this.subregionNames, filtersVolume.subregionNames) - && Objects.equals(this.tagKeys, filtersVolume.tagKeys) - && Objects.equals(this.tagValues, filtersVolume.tagValues) - && Objects.equals(this.tags, filtersVolume.tags) - && Objects.equals(this.volumeIds, filtersVolume.volumeIds) - && Objects.equals(this.volumeSizes, filtersVolume.volumeSizes) - && Objects.equals(this.volumeStates, filtersVolume.volumeStates) - && Objects.equals(this.volumeTypes, filtersVolume.volumeTypes); - } - - @Override - public int hashCode() { - return Objects.hash( - creationDates, - linkVolumeDeleteOnVmDeletion, - linkVolumeDeviceNames, - linkVolumeLinkDates, - linkVolumeLinkStates, - linkVolumeVmIds, - snapshotIds, - subregionNames, - tagKeys, - tagValues, - tags, - volumeIds, - volumeSizes, - volumeStates, - volumeTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVolume {\n"); - sb.append(" creationDates: ").append(toIndentedString(creationDates)).append("\n"); - sb.append(" linkVolumeDeleteOnVmDeletion: ") - .append(toIndentedString(linkVolumeDeleteOnVmDeletion)) - .append("\n"); - sb.append(" linkVolumeDeviceNames: ") - .append(toIndentedString(linkVolumeDeviceNames)) - .append("\n"); - sb.append(" linkVolumeLinkDates: ") - .append(toIndentedString(linkVolumeLinkDates)) - .append("\n"); - sb.append(" linkVolumeLinkStates: ") - .append(toIndentedString(linkVolumeLinkStates)) - .append("\n"); - sb.append(" linkVolumeVmIds: ").append(toIndentedString(linkVolumeVmIds)).append("\n"); - sb.append(" snapshotIds: ").append(toIndentedString(snapshotIds)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" volumeIds: ").append(toIndentedString(volumeIds)).append("\n"); - sb.append(" volumeSizes: ").append(toIndentedString(volumeSizes)).append("\n"); - sb.append(" volumeStates: ").append(toIndentedString(volumeStates)).append("\n"); - sb.append(" volumeTypes: ").append(toIndentedString(volumeTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDates"); - openapiFields.add("LinkVolumeDeleteOnVmDeletion"); - openapiFields.add("LinkVolumeDeviceNames"); - openapiFields.add("LinkVolumeLinkDates"); - openapiFields.add("LinkVolumeLinkStates"); - openapiFields.add("LinkVolumeVmIds"); - openapiFields.add("SnapshotIds"); - openapiFields.add("SubregionNames"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VolumeIds"); - openapiFields.add("VolumeSizes"); - openapiFields.add("VolumeStates"); - openapiFields.add("VolumeTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVolume - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVolume.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVolume is not found in the" - + " empty JSON string", - FiltersVolume.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVolume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVolume` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("CreationDates") != null && !jsonObj.get("CreationDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CreationDates` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("CreationDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkVolumeDeviceNames") != null - && !jsonObj.get("LinkVolumeDeviceNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkVolumeDeviceNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkVolumeDeviceNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkVolumeLinkDates") != null - && !jsonObj.get("LinkVolumeLinkDates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkVolumeLinkDates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkVolumeLinkDates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkVolumeLinkStates") != null - && !jsonObj.get("LinkVolumeLinkStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkVolumeLinkStates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkVolumeLinkStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("LinkVolumeVmIds") != null - && !jsonObj.get("LinkVolumeVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkVolumeVmIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkVolumeVmIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SnapshotIds") != null && !jsonObj.get("SnapshotIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SnapshotIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeIds") != null && !jsonObj.get("VolumeIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("VolumeIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeSizes") != null && !jsonObj.get("VolumeSizes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeSizes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeSizes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeStates") != null && !jsonObj.get("VolumeStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeStates` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeStates").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VolumeTypes") != null && !jsonObj.get("VolumeTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeTypes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("VolumeTypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVolume.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVolume' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVolume.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVolume value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVolume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVolume given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVolume - * @throws IOException if the JSON string is invalid with respect to FiltersVolume - */ - public static FiltersVolume fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVolume.class); - } - - /** - * Convert an instance of FiltersVolume to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnection.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnection.java deleted file mode 100644 index 6a146800..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnection.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FiltersVpnConnection { - public static final String SERIALIZED_NAME_BGP_ASNS = "BgpAsns"; - - @SerializedName(SERIALIZED_NAME_BGP_ASNS) - private List bgpAsns = null; - - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_IDS = "ClientGatewayIds"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_IDS) - private List clientGatewayIds = null; - - public static final String SERIALIZED_NAME_CONNECTION_TYPES = "ConnectionTypes"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPES) - private List connectionTypes = null; - - public static final String SERIALIZED_NAME_ROUTE_DESTINATION_IP_RANGES = - "RouteDestinationIpRanges"; - - @SerializedName(SERIALIZED_NAME_ROUTE_DESTINATION_IP_RANGES) - private List routeDestinationIpRanges = null; - - public static final String SERIALIZED_NAME_STATES = "States"; - - @SerializedName(SERIALIZED_NAME_STATES) - private List states = null; - - public static final String SERIALIZED_NAME_STATIC_ROUTES_ONLY = "StaticRoutesOnly"; - - @SerializedName(SERIALIZED_NAME_STATIC_ROUTES_ONLY) - private Boolean staticRoutesOnly; - - public static final String SERIALIZED_NAME_TAG_KEYS = "TagKeys"; - - @SerializedName(SERIALIZED_NAME_TAG_KEYS) - private List tagKeys = null; - - public static final String SERIALIZED_NAME_TAG_VALUES = "TagValues"; - - @SerializedName(SERIALIZED_NAME_TAG_VALUES) - private List tagValues = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_IDS = "VirtualGatewayIds"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_IDS) - private List virtualGatewayIds = null; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_IDS = "VpnConnectionIds"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_IDS) - private List vpnConnectionIds = null; - - public FiltersVpnConnection() {} - - public FiltersVpnConnection bgpAsns(List bgpAsns) { - - this.bgpAsns = bgpAsns; - return this; - } - - public FiltersVpnConnection addBgpAsnsItem(Integer bgpAsnsItem) { - if (this.bgpAsns == null) { - this.bgpAsns = new ArrayList<>(); - } - this.bgpAsns.add(bgpAsnsItem); - return this; - } - - /** - * The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections. - * - * @return bgpAsns - */ - @javax.annotation.Nullable - public List getBgpAsns() { - return bgpAsns; - } - - public void setBgpAsns(List bgpAsns) { - this.bgpAsns = bgpAsns; - } - - public FiltersVpnConnection clientGatewayIds(List clientGatewayIds) { - - this.clientGatewayIds = clientGatewayIds; - return this; - } - - public FiltersVpnConnection addClientGatewayIdsItem(String clientGatewayIdsItem) { - if (this.clientGatewayIds == null) { - this.clientGatewayIds = new ArrayList<>(); - } - this.clientGatewayIds.add(clientGatewayIdsItem); - return this; - } - - /** - * The IDs of the client gateways. - * - * @return clientGatewayIds - */ - @javax.annotation.Nullable - public List getClientGatewayIds() { - return clientGatewayIds; - } - - public void setClientGatewayIds(List clientGatewayIds) { - this.clientGatewayIds = clientGatewayIds; - } - - public FiltersVpnConnection connectionTypes(List connectionTypes) { - - this.connectionTypes = connectionTypes; - return this; - } - - public FiltersVpnConnection addConnectionTypesItem(String connectionTypesItem) { - if (this.connectionTypes == null) { - this.connectionTypes = new ArrayList<>(); - } - this.connectionTypes.add(connectionTypesItem); - return this; - } - - /** - * The types of the VPN connections (always `ipsec.1`). - * - * @return connectionTypes - */ - @javax.annotation.Nullable - public List getConnectionTypes() { - return connectionTypes; - } - - public void setConnectionTypes(List connectionTypes) { - this.connectionTypes = connectionTypes; - } - - public FiltersVpnConnection routeDestinationIpRanges(List routeDestinationIpRanges) { - - this.routeDestinationIpRanges = routeDestinationIpRanges; - return this; - } - - public FiltersVpnConnection addRouteDestinationIpRangesItem( - String routeDestinationIpRangesItem) { - if (this.routeDestinationIpRanges == null) { - this.routeDestinationIpRanges = new ArrayList<>(); - } - this.routeDestinationIpRanges.add(routeDestinationIpRangesItem); - return this; - } - - /** - * The destination IP ranges. - * - * @return routeDestinationIpRanges - */ - @javax.annotation.Nullable - public List getRouteDestinationIpRanges() { - return routeDestinationIpRanges; - } - - public void setRouteDestinationIpRanges(List routeDestinationIpRanges) { - this.routeDestinationIpRanges = routeDestinationIpRanges; - } - - public FiltersVpnConnection states(List states) { - - this.states = states; - return this; - } - - public FiltersVpnConnection addStatesItem(String statesItem) { - if (this.states == null) { - this.states = new ArrayList<>(); - } - this.states.add(statesItem); - return this; - } - - /** - * The states of the VPN connections (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return states - */ - @javax.annotation.Nullable - public List getStates() { - return states; - } - - public void setStates(List states) { - this.states = states; - } - - public FiltersVpnConnection staticRoutesOnly(Boolean staticRoutesOnly) { - - this.staticRoutesOnly = staticRoutesOnly; - return this; - } - - /** - * If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If - * true, routing is controlled using static routes. For more information about how to create and - * delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) and - * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). - * - * @return staticRoutesOnly - */ - @javax.annotation.Nullable - public Boolean getStaticRoutesOnly() { - return staticRoutesOnly; - } - - public void setStaticRoutesOnly(Boolean staticRoutesOnly) { - this.staticRoutesOnly = staticRoutesOnly; - } - - public FiltersVpnConnection tagKeys(List tagKeys) { - - this.tagKeys = tagKeys; - return this; - } - - public FiltersVpnConnection addTagKeysItem(String tagKeysItem) { - if (this.tagKeys == null) { - this.tagKeys = new ArrayList<>(); - } - this.tagKeys.add(tagKeysItem); - return this; - } - - /** - * The keys of the tags associated with the VPN connections. - * - * @return tagKeys - */ - @javax.annotation.Nullable - public List getTagKeys() { - return tagKeys; - } - - public void setTagKeys(List tagKeys) { - this.tagKeys = tagKeys; - } - - public FiltersVpnConnection tagValues(List tagValues) { - - this.tagValues = tagValues; - return this; - } - - public FiltersVpnConnection addTagValuesItem(String tagValuesItem) { - if (this.tagValues == null) { - this.tagValues = new ArrayList<>(); - } - this.tagValues.add(tagValuesItem); - return this; - } - - /** - * The values of the tags associated with the VPN connections. - * - * @return tagValues - */ - @javax.annotation.Nullable - public List getTagValues() { - return tagValues; - } - - public void setTagValues(List tagValues) { - this.tagValues = tagValues; - } - - public FiltersVpnConnection tags(List tags) { - - this.tags = tags; - return this; - } - - public FiltersVpnConnection addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * The key/value combination of the tags associated with the VPN connections, in the following - * format: - * &quot;Filters&quot;:{&quot;Tags&quot;:[&quot;TAGKEY=TAGVALUE&quot;]}. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public FiltersVpnConnection virtualGatewayIds(List virtualGatewayIds) { - - this.virtualGatewayIds = virtualGatewayIds; - return this; - } - - public FiltersVpnConnection addVirtualGatewayIdsItem(String virtualGatewayIdsItem) { - if (this.virtualGatewayIds == null) { - this.virtualGatewayIds = new ArrayList<>(); - } - this.virtualGatewayIds.add(virtualGatewayIdsItem); - return this; - } - - /** - * The IDs of the virtual gateways. - * - * @return virtualGatewayIds - */ - @javax.annotation.Nullable - public List getVirtualGatewayIds() { - return virtualGatewayIds; - } - - public void setVirtualGatewayIds(List virtualGatewayIds) { - this.virtualGatewayIds = virtualGatewayIds; - } - - public FiltersVpnConnection vpnConnectionIds(List vpnConnectionIds) { - - this.vpnConnectionIds = vpnConnectionIds; - return this; - } - - public FiltersVpnConnection addVpnConnectionIdsItem(String vpnConnectionIdsItem) { - if (this.vpnConnectionIds == null) { - this.vpnConnectionIds = new ArrayList<>(); - } - this.vpnConnectionIds.add(vpnConnectionIdsItem); - return this; - } - - /** - * The IDs of the VPN connections. - * - * @return vpnConnectionIds - */ - @javax.annotation.Nullable - public List getVpnConnectionIds() { - return vpnConnectionIds; - } - - public void setVpnConnectionIds(List vpnConnectionIds) { - this.vpnConnectionIds = vpnConnectionIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FiltersVpnConnection filtersVpnConnection = (FiltersVpnConnection) o; - return Objects.equals(this.bgpAsns, filtersVpnConnection.bgpAsns) - && Objects.equals(this.clientGatewayIds, filtersVpnConnection.clientGatewayIds) - && Objects.equals(this.connectionTypes, filtersVpnConnection.connectionTypes) - && Objects.equals( - this.routeDestinationIpRanges, - filtersVpnConnection.routeDestinationIpRanges) - && Objects.equals(this.states, filtersVpnConnection.states) - && Objects.equals(this.staticRoutesOnly, filtersVpnConnection.staticRoutesOnly) - && Objects.equals(this.tagKeys, filtersVpnConnection.tagKeys) - && Objects.equals(this.tagValues, filtersVpnConnection.tagValues) - && Objects.equals(this.tags, filtersVpnConnection.tags) - && Objects.equals(this.virtualGatewayIds, filtersVpnConnection.virtualGatewayIds) - && Objects.equals(this.vpnConnectionIds, filtersVpnConnection.vpnConnectionIds); - } - - @Override - public int hashCode() { - return Objects.hash( - bgpAsns, - clientGatewayIds, - connectionTypes, - routeDestinationIpRanges, - states, - staticRoutesOnly, - tagKeys, - tagValues, - tags, - virtualGatewayIds, - vpnConnectionIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FiltersVpnConnection {\n"); - sb.append(" bgpAsns: ").append(toIndentedString(bgpAsns)).append("\n"); - sb.append(" clientGatewayIds: ").append(toIndentedString(clientGatewayIds)).append("\n"); - sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n"); - sb.append(" routeDestinationIpRanges: ") - .append(toIndentedString(routeDestinationIpRanges)) - .append("\n"); - sb.append(" states: ").append(toIndentedString(states)).append("\n"); - sb.append(" staticRoutesOnly: ").append(toIndentedString(staticRoutesOnly)).append("\n"); - sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).append("\n"); - sb.append(" tagValues: ").append(toIndentedString(tagValues)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" virtualGatewayIds: ") - .append(toIndentedString(virtualGatewayIds)) - .append("\n"); - sb.append(" vpnConnectionIds: ").append(toIndentedString(vpnConnectionIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BgpAsns"); - openapiFields.add("ClientGatewayIds"); - openapiFields.add("ConnectionTypes"); - openapiFields.add("RouteDestinationIpRanges"); - openapiFields.add("States"); - openapiFields.add("StaticRoutesOnly"); - openapiFields.add("TagKeys"); - openapiFields.add("TagValues"); - openapiFields.add("Tags"); - openapiFields.add("VirtualGatewayIds"); - openapiFields.add("VpnConnectionIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FiltersVpnConnection - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FiltersVpnConnection.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FiltersVpnConnection is not found in" - + " the empty JSON string", - FiltersVpnConnection.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FiltersVpnConnection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FiltersVpnConnection` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BgpAsns") != null && !jsonObj.get("BgpAsns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BgpAsns` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("BgpAsns").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ClientGatewayIds") != null - && !jsonObj.get("ClientGatewayIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ClientGatewayIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ConnectionTypes") != null - && !jsonObj.get("ConnectionTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ConnectionTypes").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteDestinationIpRanges") != null - && !jsonObj.get("RouteDestinationIpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteDestinationIpRanges` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("RouteDestinationIpRanges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("States") != null && !jsonObj.get("States").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `States` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("States").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagKeys") != null && !jsonObj.get("TagKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagKeys` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagKeys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("TagValues") != null && !jsonObj.get("TagValues").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TagValues` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("TagValues").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VirtualGatewayIds") != null - && !jsonObj.get("VirtualGatewayIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VirtualGatewayIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VpnConnectionIds") != null - && !jsonObj.get("VpnConnectionIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VpnConnectionIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FiltersVpnConnection.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FiltersVpnConnection' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FiltersVpnConnection.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FiltersVpnConnection value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FiltersVpnConnection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FiltersVpnConnection given an JSON string - * - * @param jsonString JSON string - * @return An instance of FiltersVpnConnection - * @throws IOException if the JSON string is invalid with respect to FiltersVpnConnection - */ - public static FiltersVpnConnection fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FiltersVpnConnection.class); - } - - /** - * Convert an instance of FiltersVpnConnection to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpu.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpu.java deleted file mode 100644 index 38e0ae13..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpu.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the flexible GPU (fGPU). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FlexibleGpu { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_ID = "FlexibleGpuId"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_ID) - private String flexibleGpuId; - - public static final String SERIALIZED_NAME_GENERATION = "Generation"; - - @SerializedName(SERIALIZED_NAME_GENERATION) - private String generation; - - public static final String SERIALIZED_NAME_MODEL_NAME = "ModelName"; - - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - private String modelName; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public FlexibleGpu() {} - - public FlexibleGpu deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the fGPU is deleted when the VM is terminated. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public FlexibleGpu flexibleGpuId(String flexibleGpuId) { - - this.flexibleGpuId = flexibleGpuId; - return this; - } - - /** - * The ID of the fGPU. - * - * @return flexibleGpuId - */ - @javax.annotation.Nullable - public String getFlexibleGpuId() { - return flexibleGpuId; - } - - public void setFlexibleGpuId(String flexibleGpuId) { - this.flexibleGpuId = flexibleGpuId; - } - - public FlexibleGpu generation(String generation) { - - this.generation = generation; - return this; - } - - /** - * The compatible processor generation. - * - * @return generation - */ - @javax.annotation.Nullable - public String getGeneration() { - return generation; - } - - public void setGeneration(String generation) { - this.generation = generation; - } - - public FlexibleGpu modelName(String modelName) { - - this.modelName = modelName; - return this; - } - - /** - * The model of fGPU. For more information, see [About Flexible - * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html). - * - * @return modelName - */ - @javax.annotation.Nullable - public String getModelName() { - return modelName; - } - - public void setModelName(String modelName) { - this.modelName = modelName; - } - - public FlexibleGpu state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the fGPU (`allocated` \\| `attaching` \\| - * `attached` \\| `detaching`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public FlexibleGpu subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion where the fGPU is located. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public FlexibleGpu vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM the fGPU is attached to, if any. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FlexibleGpu flexibleGpu = (FlexibleGpu) o; - return Objects.equals(this.deleteOnVmDeletion, flexibleGpu.deleteOnVmDeletion) - && Objects.equals(this.flexibleGpuId, flexibleGpu.flexibleGpuId) - && Objects.equals(this.generation, flexibleGpu.generation) - && Objects.equals(this.modelName, flexibleGpu.modelName) - && Objects.equals(this.state, flexibleGpu.state) - && Objects.equals(this.subregionName, flexibleGpu.subregionName) - && Objects.equals(this.vmId, flexibleGpu.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - deleteOnVmDeletion, - flexibleGpuId, - generation, - modelName, - state, - subregionName, - vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FlexibleGpu {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" flexibleGpuId: ").append(toIndentedString(flexibleGpuId)).append("\n"); - sb.append(" generation: ").append(toIndentedString(generation)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("FlexibleGpuId"); - openapiFields.add("Generation"); - openapiFields.add("ModelName"); - openapiFields.add("State"); - openapiFields.add("SubregionName"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FlexibleGpu - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FlexibleGpu.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FlexibleGpu is not found in the empty" - + " JSON string", - FlexibleGpu.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FlexibleGpu.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FlexibleGpu` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("FlexibleGpuId") != null && !jsonObj.get("FlexibleGpuId").isJsonNull()) - && !jsonObj.get("FlexibleGpuId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpuId").toString())); - } - if ((jsonObj.get("Generation") != null && !jsonObj.get("Generation").isJsonNull()) - && !jsonObj.get("Generation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Generation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Generation").toString())); - } - if ((jsonObj.get("ModelName") != null && !jsonObj.get("ModelName").isJsonNull()) - && !jsonObj.get("ModelName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ModelName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ModelName").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FlexibleGpu.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FlexibleGpu' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FlexibleGpu.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FlexibleGpu value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FlexibleGpu read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FlexibleGpu given an JSON string - * - * @param jsonString JSON string - * @return An instance of FlexibleGpu - * @throws IOException if the JSON string is invalid with respect to FlexibleGpu - */ - public static FlexibleGpu fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FlexibleGpu.class); - } - - /** - * Convert an instance of FlexibleGpu to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalog.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalog.java deleted file mode 100644 index c3932027..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalog.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the flexible GPU (fGPU) that is available in the public catalog. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FlexibleGpuCatalog { - public static final String SERIALIZED_NAME_GENERATIONS = "Generations"; - - @SerializedName(SERIALIZED_NAME_GENERATIONS) - private List generations = null; - - public static final String SERIALIZED_NAME_MAX_CPU = "MaxCpu"; - - @SerializedName(SERIALIZED_NAME_MAX_CPU) - private Integer maxCpu; - - public static final String SERIALIZED_NAME_MAX_RAM = "MaxRam"; - - @SerializedName(SERIALIZED_NAME_MAX_RAM) - private Integer maxRam; - - public static final String SERIALIZED_NAME_MODEL_NAME = "ModelName"; - - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - private String modelName; - - public static final String SERIALIZED_NAME_VRAM = "VRam"; - - @SerializedName(SERIALIZED_NAME_VRAM) - private Integer vram; - - public FlexibleGpuCatalog() {} - - public FlexibleGpuCatalog generations(List generations) { - - this.generations = generations; - return this; - } - - public FlexibleGpuCatalog addGenerationsItem(String generationsItem) { - if (this.generations == null) { - this.generations = new ArrayList<>(); - } - this.generations.add(generationsItem); - return this; - } - - /** - * The processor generations that the fGPUs are compatible with. - * - * @return generations - */ - @javax.annotation.Nullable - public List getGenerations() { - return generations; - } - - public void setGenerations(List generations) { - this.generations = generations; - } - - public FlexibleGpuCatalog maxCpu(Integer maxCpu) { - - this.maxCpu = maxCpu; - return this; - } - - /** - * The maximum number of VM vCores that the fGPU is compatible with. - * - * @return maxCpu - */ - @javax.annotation.Nullable - public Integer getMaxCpu() { - return maxCpu; - } - - public void setMaxCpu(Integer maxCpu) { - this.maxCpu = maxCpu; - } - - public FlexibleGpuCatalog maxRam(Integer maxRam) { - - this.maxRam = maxRam; - return this; - } - - /** - * The maximum amount of VM memory that the fGPU is compatible with. - * - * @return maxRam - */ - @javax.annotation.Nullable - public Integer getMaxRam() { - return maxRam; - } - - public void setMaxRam(Integer maxRam) { - this.maxRam = maxRam; - } - - public FlexibleGpuCatalog modelName(String modelName) { - - this.modelName = modelName; - return this; - } - - /** - * The model of fGPU. - * - * @return modelName - */ - @javax.annotation.Nullable - public String getModelName() { - return modelName; - } - - public void setModelName(String modelName) { - this.modelName = modelName; - } - - public FlexibleGpuCatalog vram(Integer vram) { - - this.vram = vram; - return this; - } - - /** - * The amount of video RAM (VRAM) of the fGPU. - * - * @return vram - */ - @javax.annotation.Nullable - public Integer getVram() { - return vram; - } - - public void setVram(Integer vram) { - this.vram = vram; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FlexibleGpuCatalog flexibleGpuCatalog = (FlexibleGpuCatalog) o; - return Objects.equals(this.generations, flexibleGpuCatalog.generations) - && Objects.equals(this.maxCpu, flexibleGpuCatalog.maxCpu) - && Objects.equals(this.maxRam, flexibleGpuCatalog.maxRam) - && Objects.equals(this.modelName, flexibleGpuCatalog.modelName) - && Objects.equals(this.vram, flexibleGpuCatalog.vram); - } - - @Override - public int hashCode() { - return Objects.hash(generations, maxCpu, maxRam, modelName, vram); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FlexibleGpuCatalog {\n"); - sb.append(" generations: ").append(toIndentedString(generations)).append("\n"); - sb.append(" maxCpu: ").append(toIndentedString(maxCpu)).append("\n"); - sb.append(" maxRam: ").append(toIndentedString(maxRam)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); - sb.append(" vram: ").append(toIndentedString(vram)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Generations"); - openapiFields.add("MaxCpu"); - openapiFields.add("MaxRam"); - openapiFields.add("ModelName"); - openapiFields.add("VRam"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FlexibleGpuCatalog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FlexibleGpuCatalog.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FlexibleGpuCatalog is not found in" - + " the empty JSON string", - FlexibleGpuCatalog.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FlexibleGpuCatalog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FlexibleGpuCatalog` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Generations") != null && !jsonObj.get("Generations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Generations` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Generations").toString())); - } - if ((jsonObj.get("ModelName") != null && !jsonObj.get("ModelName").isJsonNull()) - && !jsonObj.get("ModelName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ModelName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ModelName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FlexibleGpuCatalog.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FlexibleGpuCatalog' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FlexibleGpuCatalog.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FlexibleGpuCatalog value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FlexibleGpuCatalog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FlexibleGpuCatalog given an JSON string - * - * @param jsonString JSON string - * @return An instance of FlexibleGpuCatalog - * @throws IOException if the JSON string is invalid with respect to FlexibleGpuCatalog - */ - public static FlexibleGpuCatalog fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FlexibleGpuCatalog.class); - } - - /** - * Convert an instance of FlexibleGpuCatalog to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/HealthCheck.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/HealthCheck.java deleted file mode 100644 index 31a38b89..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/HealthCheck.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the health check configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HealthCheck { - public static final String SERIALIZED_NAME_CHECK_INTERVAL = "CheckInterval"; - - @SerializedName(SERIALIZED_NAME_CHECK_INTERVAL) - private Integer checkInterval; - - public static final String SERIALIZED_NAME_HEALTHY_THRESHOLD = "HealthyThreshold"; - - @SerializedName(SERIALIZED_NAME_HEALTHY_THRESHOLD) - private Integer healthyThreshold; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_PORT = "Port"; - - @SerializedName(SERIALIZED_NAME_PORT) - private Integer port; - - public static final String SERIALIZED_NAME_PROTOCOL = "Protocol"; - - @SerializedName(SERIALIZED_NAME_PROTOCOL) - private String protocol; - - public static final String SERIALIZED_NAME_TIMEOUT = "Timeout"; - - @SerializedName(SERIALIZED_NAME_TIMEOUT) - private Integer timeout; - - public static final String SERIALIZED_NAME_UNHEALTHY_THRESHOLD = "UnhealthyThreshold"; - - @SerializedName(SERIALIZED_NAME_UNHEALTHY_THRESHOLD) - private Integer unhealthyThreshold; - - public HealthCheck() {} - - public HealthCheck checkInterval(Integer checkInterval) { - - this.checkInterval = checkInterval; - return this; - } - - /** - * The number of seconds between two requests (between `5` and `600` both - * included). - * - * @return checkInterval - */ - @javax.annotation.Nonnull - public Integer getCheckInterval() { - return checkInterval; - } - - public void setCheckInterval(Integer checkInterval) { - this.checkInterval = checkInterval; - } - - public HealthCheck healthyThreshold(Integer healthyThreshold) { - - this.healthyThreshold = healthyThreshold; - return this; - } - - /** - * The number of consecutive successful requests before considering the VM as healthy (between - * `2` and `10` both included). - * - * @return healthyThreshold - */ - @javax.annotation.Nonnull - public Integer getHealthyThreshold() { - return healthyThreshold; - } - - public void setHealthyThreshold(Integer healthyThreshold) { - this.healthyThreshold = healthyThreshold; - } - - public HealthCheck path(String path) { - - this.path = path; - return this; - } - - /** - * If you use the HTTP or HTTPS protocols, the request URL path. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public HealthCheck port(Integer port) { - - this.port = port; - return this; - } - - /** - * The port number (between `1` and `65535`, both included). - * - * @return port - */ - @javax.annotation.Nonnull - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public HealthCheck protocol(String protocol) { - - this.protocol = protocol; - return this; - } - - /** - * The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| - * `TCP` \\| `SSL`). - * - * @return protocol - */ - @javax.annotation.Nonnull - public String getProtocol() { - return protocol; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public HealthCheck timeout(Integer timeout) { - - this.timeout = timeout; - return this; - } - - /** - * The maximum waiting time for a response before considering the VM as unhealthy, in seconds - * (between `2` and `60` both included). - * - * @return timeout - */ - @javax.annotation.Nonnull - public Integer getTimeout() { - return timeout; - } - - public void setTimeout(Integer timeout) { - this.timeout = timeout; - } - - public HealthCheck unhealthyThreshold(Integer unhealthyThreshold) { - - this.unhealthyThreshold = unhealthyThreshold; - return this; - } - - /** - * The number of consecutive failed requests before considering the VM as unhealthy (between - * `2` and `10` both included). - * - * @return unhealthyThreshold - */ - @javax.annotation.Nonnull - public Integer getUnhealthyThreshold() { - return unhealthyThreshold; - } - - public void setUnhealthyThreshold(Integer unhealthyThreshold) { - this.unhealthyThreshold = unhealthyThreshold; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthCheck healthCheck = (HealthCheck) o; - return Objects.equals(this.checkInterval, healthCheck.checkInterval) - && Objects.equals(this.healthyThreshold, healthCheck.healthyThreshold) - && Objects.equals(this.path, healthCheck.path) - && Objects.equals(this.port, healthCheck.port) - && Objects.equals(this.protocol, healthCheck.protocol) - && Objects.equals(this.timeout, healthCheck.timeout) - && Objects.equals(this.unhealthyThreshold, healthCheck.unhealthyThreshold); - } - - @Override - public int hashCode() { - return Objects.hash( - checkInterval, healthyThreshold, path, port, protocol, timeout, unhealthyThreshold); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HealthCheck {\n"); - sb.append(" checkInterval: ").append(toIndentedString(checkInterval)).append("\n"); - sb.append(" healthyThreshold: ").append(toIndentedString(healthyThreshold)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" port: ").append(toIndentedString(port)).append("\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); - sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); - sb.append(" unhealthyThreshold: ") - .append(toIndentedString(unhealthyThreshold)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CheckInterval"); - openapiFields.add("HealthyThreshold"); - openapiFields.add("Path"); - openapiFields.add("Port"); - openapiFields.add("Protocol"); - openapiFields.add("Timeout"); - openapiFields.add("UnhealthyThreshold"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CheckInterval"); - openapiRequiredFields.add("HealthyThreshold"); - openapiRequiredFields.add("Port"); - openapiRequiredFields.add("Protocol"); - openapiRequiredFields.add("Timeout"); - openapiRequiredFields.add("UnhealthyThreshold"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to HealthCheck - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!HealthCheck.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in HealthCheck is not found in the empty" - + " JSON string", - HealthCheck.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HealthCheck.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `HealthCheck` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HealthCheck.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("Protocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Protocol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Protocol").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HealthCheck.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HealthCheck' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(HealthCheck.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, HealthCheck value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HealthCheck read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of HealthCheck given an JSON string - * - * @param jsonString JSON string - * @return An instance of HealthCheck - * @throws IOException if the JSON string is invalid with respect to HealthCheck - */ - public static HealthCheck fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HealthCheck.class); - } - - /** - * Convert an instance of HealthCheck to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Image.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Image.java deleted file mode 100644 index 4859040c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Image.java +++ /dev/null @@ -1,832 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the OMI. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Image { - public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "AccountAlias"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIAS) - private String accountAlias; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_ARCHITECTURE = "Architecture"; - - @SerializedName(SERIALIZED_NAME_ARCHITECTURE) - private String architecture; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS = "BlockDeviceMappings"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS) - private List blockDeviceMappings = null; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FILE_LOCATION = "FileLocation"; - - @SerializedName(SERIALIZED_NAME_FILE_LOCATION) - private String fileLocation; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_IMAGE_NAME = "ImageName"; - - @SerializedName(SERIALIZED_NAME_IMAGE_NAME) - private String imageName; - - public static final String SERIALIZED_NAME_IMAGE_TYPE = "ImageType"; - - @SerializedName(SERIALIZED_NAME_IMAGE_TYPE) - private String imageType; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH = "PermissionsToLaunch"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH) - private PermissionsOnResource permissionsToLaunch; - - public static final String SERIALIZED_NAME_PRODUCT_CODES = "ProductCodes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODES) - private List productCodes = null; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_NAME = "RootDeviceName"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_NAME) - private String rootDeviceName; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_TYPE = "RootDeviceType"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_TYPE) - private String rootDeviceType; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_COMMENT = "StateComment"; - - @SerializedName(SERIALIZED_NAME_STATE_COMMENT) - private StateComment stateComment; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public Image() {} - - public Image accountAlias(String accountAlias) { - - this.accountAlias = accountAlias; - return this; - } - - /** - * The account alias of the owner of the OMI. - * - * @return accountAlias - */ - @javax.annotation.Nullable - public String getAccountAlias() { - return accountAlias; - } - - public void setAccountAlias(String accountAlias) { - this.accountAlias = accountAlias; - } - - public Image accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the OMI. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Image architecture(String architecture) { - - this.architecture = architecture; - return this; - } - - /** - * The architecture of the OMI. - * - * @return architecture - */ - @javax.annotation.Nullable - public String getArchitecture() { - return architecture; - } - - public void setArchitecture(String architecture) { - this.architecture = architecture; - } - - public Image blockDeviceMappings(List blockDeviceMappings) { - - this.blockDeviceMappings = blockDeviceMappings; - return this; - } - - public Image addBlockDeviceMappingsItem(BlockDeviceMappingImage blockDeviceMappingsItem) { - if (this.blockDeviceMappings == null) { - this.blockDeviceMappings = new ArrayList<>(); - } - this.blockDeviceMappings.add(blockDeviceMappingsItem); - return this; - } - - /** - * One or more block device mappings. - * - * @return blockDeviceMappings - */ - @javax.annotation.Nullable - public List getBlockDeviceMappings() { - return blockDeviceMappings; - } - - public void setBlockDeviceMappings(List blockDeviceMappings) { - this.blockDeviceMappings = blockDeviceMappings; - } - - public Image creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the OMI was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public Image description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the OMI. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Image fileLocation(String fileLocation) { - - this.fileLocation = fileLocation; - return this; - } - - /** - * The location from which the OMI files were created. - * - * @return fileLocation - */ - @javax.annotation.Nullable - public String getFileLocation() { - return fileLocation; - } - - public void setFileLocation(String fileLocation) { - this.fileLocation = fileLocation; - } - - public Image imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI. - * - * @return imageId - */ - @javax.annotation.Nullable - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public Image imageName(String imageName) { - - this.imageName = imageName; - return this; - } - - /** - * The name of the OMI. - * - * @return imageName - */ - @javax.annotation.Nullable - public String getImageName() { - return imageName; - } - - public void setImageName(String imageName) { - this.imageName = imageName; - } - - public Image imageType(String imageType) { - - this.imageType = imageType; - return this; - } - - /** - * The type of the OMI. - * - * @return imageType - */ - @javax.annotation.Nullable - public String getImageType() { - return imageType; - } - - public void setImageType(String imageType) { - this.imageType = imageType; - } - - public Image permissionsToLaunch(PermissionsOnResource permissionsToLaunch) { - - this.permissionsToLaunch = permissionsToLaunch; - return this; - } - - /** - * Get permissionsToLaunch - * - * @return permissionsToLaunch - */ - @javax.annotation.Nullable - public PermissionsOnResource getPermissionsToLaunch() { - return permissionsToLaunch; - } - - public void setPermissionsToLaunch(PermissionsOnResource permissionsToLaunch) { - this.permissionsToLaunch = permissionsToLaunch; - } - - public Image productCodes(List productCodes) { - - this.productCodes = productCodes; - return this; - } - - public Image addProductCodesItem(String productCodesItem) { - if (this.productCodes == null) { - this.productCodes = new ArrayList<>(); - } - this.productCodes.add(productCodesItem); - return this; - } - - /** - * The product codes associated with the OMI. - * - * @return productCodes - */ - @javax.annotation.Nullable - public List getProductCodes() { - return productCodes; - } - - public void setProductCodes(List productCodes) { - this.productCodes = productCodes; - } - - public Image rootDeviceName(String rootDeviceName) { - - this.rootDeviceName = rootDeviceName; - return this; - } - - /** - * The name of the root device. - * - * @return rootDeviceName - */ - @javax.annotation.Nullable - public String getRootDeviceName() { - return rootDeviceName; - } - - public void setRootDeviceName(String rootDeviceName) { - this.rootDeviceName = rootDeviceName; - } - - public Image rootDeviceType(String rootDeviceType) { - - this.rootDeviceType = rootDeviceType; - return this; - } - - /** - * The type of root device used by the OMI (always `bsu`). - * - * @return rootDeviceType - */ - @javax.annotation.Nullable - public String getRootDeviceType() { - return rootDeviceType; - } - - public void setRootDeviceType(String rootDeviceType) { - this.rootDeviceType = rootDeviceType; - } - - public Image state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the OMI (`pending` \\| `available` \\| `failed`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Image stateComment(StateComment stateComment) { - - this.stateComment = stateComment; - return this; - } - - /** - * Get stateComment - * - * @return stateComment - */ - @javax.annotation.Nullable - public StateComment getStateComment() { - return stateComment; - } - - public void setStateComment(StateComment stateComment) { - this.stateComment = stateComment; - } - - public Image tags(List tags) { - - this.tags = tags; - return this; - } - - public Image addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the OMI. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Image image = (Image) o; - return Objects.equals(this.accountAlias, image.accountAlias) - && Objects.equals(this.accountId, image.accountId) - && Objects.equals(this.architecture, image.architecture) - && Objects.equals(this.blockDeviceMappings, image.blockDeviceMappings) - && Objects.equals(this.creationDate, image.creationDate) - && Objects.equals(this.description, image.description) - && Objects.equals(this.fileLocation, image.fileLocation) - && Objects.equals(this.imageId, image.imageId) - && Objects.equals(this.imageName, image.imageName) - && Objects.equals(this.imageType, image.imageType) - && Objects.equals(this.permissionsToLaunch, image.permissionsToLaunch) - && Objects.equals(this.productCodes, image.productCodes) - && Objects.equals(this.rootDeviceName, image.rootDeviceName) - && Objects.equals(this.rootDeviceType, image.rootDeviceType) - && Objects.equals(this.state, image.state) - && Objects.equals(this.stateComment, image.stateComment) - && Objects.equals(this.tags, image.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - accountAlias, - accountId, - architecture, - blockDeviceMappings, - creationDate, - description, - fileLocation, - imageId, - imageName, - imageType, - permissionsToLaunch, - productCodes, - rootDeviceName, - rootDeviceType, - state, - stateComment, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Image {\n"); - sb.append(" accountAlias: ").append(toIndentedString(accountAlias)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" architecture: ").append(toIndentedString(architecture)).append("\n"); - sb.append(" blockDeviceMappings: ") - .append(toIndentedString(blockDeviceMappings)) - .append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" imageName: ").append(toIndentedString(imageName)).append("\n"); - sb.append(" imageType: ").append(toIndentedString(imageType)).append("\n"); - sb.append(" permissionsToLaunch: ") - .append(toIndentedString(permissionsToLaunch)) - .append("\n"); - sb.append(" productCodes: ").append(toIndentedString(productCodes)).append("\n"); - sb.append(" rootDeviceName: ").append(toIndentedString(rootDeviceName)).append("\n"); - sb.append(" rootDeviceType: ").append(toIndentedString(rootDeviceType)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateComment: ").append(toIndentedString(stateComment)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountAlias"); - openapiFields.add("AccountId"); - openapiFields.add("Architecture"); - openapiFields.add("BlockDeviceMappings"); - openapiFields.add("CreationDate"); - openapiFields.add("Description"); - openapiFields.add("FileLocation"); - openapiFields.add("ImageId"); - openapiFields.add("ImageName"); - openapiFields.add("ImageType"); - openapiFields.add("PermissionsToLaunch"); - openapiFields.add("ProductCodes"); - openapiFields.add("RootDeviceName"); - openapiFields.add("RootDeviceType"); - openapiFields.add("State"); - openapiFields.add("StateComment"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Image - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Image.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Image is not found in the empty JSON" - + " string", - Image.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Image.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Image`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountAlias") != null && !jsonObj.get("AccountAlias").isJsonNull()) - && !jsonObj.get("AccountAlias").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountAlias` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountAlias").toString())); - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Architecture") != null && !jsonObj.get("Architecture").isJsonNull()) - && !jsonObj.get("Architecture").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Architecture` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Architecture").toString())); - } - if (jsonObj.get("BlockDeviceMappings") != null - && !jsonObj.get("BlockDeviceMappings").isJsonNull()) { - JsonArray jsonArrayblockDeviceMappings = jsonObj.getAsJsonArray("BlockDeviceMappings"); - if (jsonArrayblockDeviceMappings != null) { - // ensure the json data is an array - if (!jsonObj.get("BlockDeviceMappings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappings` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappings").toString())); - } - - // validate the optional field `BlockDeviceMappings` (array) - for (int i = 0; i < jsonArrayblockDeviceMappings.size(); i++) { - BlockDeviceMappingImage.validateJsonObject( - jsonArrayblockDeviceMappings.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("FileLocation") != null && !jsonObj.get("FileLocation").isJsonNull()) - && !jsonObj.get("FileLocation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FileLocation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FileLocation").toString())); - } - if ((jsonObj.get("ImageId") != null && !jsonObj.get("ImageId").isJsonNull()) - && !jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - if ((jsonObj.get("ImageName") != null && !jsonObj.get("ImageName").isJsonNull()) - && !jsonObj.get("ImageName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageName").toString())); - } - if ((jsonObj.get("ImageType") != null && !jsonObj.get("ImageType").isJsonNull()) - && !jsonObj.get("ImageType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageType").toString())); - } - // validate the optional field `PermissionsToLaunch` - if (jsonObj.get("PermissionsToLaunch") != null - && !jsonObj.get("PermissionsToLaunch").isJsonNull()) { - PermissionsOnResource.validateJsonObject( - jsonObj.getAsJsonObject("PermissionsToLaunch")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodes") != null && !jsonObj.get("ProductCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductCodes").toString())); - } - if ((jsonObj.get("RootDeviceName") != null && !jsonObj.get("RootDeviceName").isJsonNull()) - && !jsonObj.get("RootDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("RootDeviceName").toString())); - } - if ((jsonObj.get("RootDeviceType") != null && !jsonObj.get("RootDeviceType").isJsonNull()) - && !jsonObj.get("RootDeviceType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("RootDeviceType").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - // validate the optional field `StateComment` - if (jsonObj.get("StateComment") != null && !jsonObj.get("StateComment").isJsonNull()) { - StateComment.validateJsonObject(jsonObj.getAsJsonObject("StateComment")); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Image.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Image' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Image.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Image value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Image read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Image given an JSON string - * - * @param jsonString JSON string - * @return An instance of Image - * @throws IOException if the JSON string is invalid with respect to Image - */ - public static Image fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Image.class); - } - - /** - * Convert an instance of Image to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTask.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTask.java deleted file mode 100644 index 76fef2c3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTask.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the OMI export task. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ImageExportTask { - public static final String SERIALIZED_NAME_COMMENT = "Comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_OSU_EXPORT = "OsuExport"; - - @SerializedName(SERIALIZED_NAME_OSU_EXPORT) - private OsuExportImageExportTask osuExport; - - public static final String SERIALIZED_NAME_PROGRESS = "Progress"; - - @SerializedName(SERIALIZED_NAME_PROGRESS) - private Integer progress; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_TASK_ID = "TaskId"; - - @SerializedName(SERIALIZED_NAME_TASK_ID) - private String taskId; - - public ImageExportTask() {} - - public ImageExportTask comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * If the OMI export task fails, an error message appears. - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public ImageExportTask imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI to be exported. - * - * @return imageId - */ - @javax.annotation.Nullable - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public ImageExportTask osuExport(OsuExportImageExportTask osuExport) { - - this.osuExport = osuExport; - return this; - } - - /** - * Get osuExport - * - * @return osuExport - */ - @javax.annotation.Nullable - public OsuExportImageExportTask getOsuExport() { - return osuExport; - } - - public void setOsuExport(OsuExportImageExportTask osuExport) { - this.osuExport = osuExport; - } - - public ImageExportTask progress(Integer progress) { - - this.progress = progress; - return this; - } - - /** - * The progress of the OMI export task, as a percentage. - * - * @return progress - */ - @javax.annotation.Nullable - public Integer getProgress() { - return progress; - } - - public void setProgress(Integer progress) { - this.progress = progress; - } - - public ImageExportTask state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the OMI export task (`pending/queued` \\| `pending` \\| - * `completed` \\| `failed` \\| `cancelled`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public ImageExportTask tags(List tags) { - - this.tags = tags; - return this; - } - - public ImageExportTask addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the image export task. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public ImageExportTask taskId(String taskId) { - - this.taskId = taskId; - return this; - } - - /** - * The ID of the OMI export task. - * - * @return taskId - */ - @javax.annotation.Nullable - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImageExportTask imageExportTask = (ImageExportTask) o; - return Objects.equals(this.comment, imageExportTask.comment) - && Objects.equals(this.imageId, imageExportTask.imageId) - && Objects.equals(this.osuExport, imageExportTask.osuExport) - && Objects.equals(this.progress, imageExportTask.progress) - && Objects.equals(this.state, imageExportTask.state) - && Objects.equals(this.tags, imageExportTask.tags) - && Objects.equals(this.taskId, imageExportTask.taskId); - } - - @Override - public int hashCode() { - return Objects.hash(comment, imageId, osuExport, progress, state, tags, taskId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImageExportTask {\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" osuExport: ").append(toIndentedString(osuExport)).append("\n"); - sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Comment"); - openapiFields.add("ImageId"); - openapiFields.add("OsuExport"); - openapiFields.add("Progress"); - openapiFields.add("State"); - openapiFields.add("Tags"); - openapiFields.add("TaskId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ImageExportTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ImageExportTask.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImageExportTask is not found in the" - + " empty JSON string", - ImageExportTask.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ImageExportTask.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImageExportTask` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Comment") != null && !jsonObj.get("Comment").isJsonNull()) - && !jsonObj.get("Comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Comment").toString())); - } - if ((jsonObj.get("ImageId") != null && !jsonObj.get("ImageId").isJsonNull()) - && !jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - // validate the optional field `OsuExport` - if (jsonObj.get("OsuExport") != null && !jsonObj.get("OsuExport").isJsonNull()) { - OsuExportImageExportTask.validateJsonObject(jsonObj.getAsJsonObject("OsuExport")); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("TaskId") != null && !jsonObj.get("TaskId").isJsonNull()) - && !jsonObj.get("TaskId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TaskId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("TaskId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImageExportTask.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImageExportTask' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImageExportTask.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImageExportTask value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImageExportTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImageExportTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImageExportTask - * @throws IOException if the JSON string is invalid with respect to ImageExportTask - */ - public static ImageExportTask fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImageExportTask.class); - } - - /** - * Convert an instance of ImageExportTask to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicy.java deleted file mode 100644 index 3fc662c5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicy.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about an inline policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InlinePolicy { - public static final String SERIALIZED_NAME_BODY = "Body"; - - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public InlinePolicy() {} - - public InlinePolicy body(String body) { - - this.body = body; - return this; - } - - /** - * The policy document, corresponding to a JSON string that contains the policy. For more - * information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and [EIM - * Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html). - * - * @return body - */ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - public void setBody(String body) { - this.body = body; - } - - public InlinePolicy name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the policy. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InlinePolicy inlinePolicy = (InlinePolicy) o; - return Objects.equals(this.body, inlinePolicy.body) - && Objects.equals(this.name, inlinePolicy.name); - } - - @Override - public int hashCode() { - return Objects.hash(body, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InlinePolicy {\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Body"); - openapiFields.add("Name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InlinePolicy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InlinePolicy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in InlinePolicy is not found in the" - + " empty JSON string", - InlinePolicy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!InlinePolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `InlinePolicy` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Body") != null && !jsonObj.get("Body").isJsonNull()) - && !jsonObj.get("Body").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Body` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Body").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InlinePolicy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InlinePolicy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(InlinePolicy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, InlinePolicy value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InlinePolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of InlinePolicy given an JSON string - * - * @param jsonString JSON string - * @return An instance of InlinePolicy - * @throws IOException if the JSON string is invalid with respect to InlinePolicy - */ - public static InlinePolicy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InlinePolicy.class); - } - - /** - * Convert an instance of InlinePolicy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/InternetService.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/InternetService.java deleted file mode 100644 index d51b7636..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/InternetService.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Internet service. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InternetService { - public static final String SERIALIZED_NAME_INTERNET_SERVICE_ID = "InternetServiceId"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE_ID) - private String internetServiceId; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public InternetService() {} - - public InternetService internetServiceId(String internetServiceId) { - - this.internetServiceId = internetServiceId; - return this; - } - - /** - * The ID of the Internet service. - * - * @return internetServiceId - */ - @javax.annotation.Nullable - public String getInternetServiceId() { - return internetServiceId; - } - - public void setInternetServiceId(String internetServiceId) { - this.internetServiceId = internetServiceId; - } - - public InternetService netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net attached to the Internet service. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public InternetService state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the attachment of the Internet service to the Net (always - * `available`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public InternetService tags(List tags) { - - this.tags = tags; - return this; - } - - public InternetService addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the Internet service. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InternetService internetService = (InternetService) o; - return Objects.equals(this.internetServiceId, internetService.internetServiceId) - && Objects.equals(this.netId, internetService.netId) - && Objects.equals(this.state, internetService.state) - && Objects.equals(this.tags, internetService.tags); - } - - @Override - public int hashCode() { - return Objects.hash(internetServiceId, netId, state, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InternetService {\n"); - sb.append(" internetServiceId: ") - .append(toIndentedString(internetServiceId)) - .append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("InternetServiceId"); - openapiFields.add("NetId"); - openapiFields.add("State"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InternetService - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InternetService.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in InternetService is not found in the" - + " empty JSON string", - InternetService.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!InternetService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `InternetService` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("InternetServiceId") != null - && !jsonObj.get("InternetServiceId").isJsonNull()) - && !jsonObj.get("InternetServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServiceId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("InternetServiceId").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InternetService.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InternetService' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(InternetService.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, InternetService value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InternetService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of InternetService given an JSON string - * - * @param jsonString JSON string - * @return An instance of InternetService - * @throws IOException if the JSON string is invalid with respect to InternetService - */ - public static InternetService fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InternetService.class); - } - - /** - * Convert an instance of InternetService to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Keypair.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Keypair.java deleted file mode 100644 index b3d1b855..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Keypair.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the keypair. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Keypair { - public static final String SERIALIZED_NAME_KEYPAIR_FINGERPRINT = "KeypairFingerprint"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_FINGERPRINT) - private String keypairFingerprint; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_KEYPAIR_TYPE = "KeypairType"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_TYPE) - private String keypairType; - - public Keypair() {} - - public Keypair keypairFingerprint(String keypairFingerprint) { - - this.keypairFingerprint = keypairFingerprint; - return this; - } - - /** - * The MD5 public key fingerprint as specified in section 4 of RFC 4716. - * - * @return keypairFingerprint - */ - @javax.annotation.Nullable - public String getKeypairFingerprint() { - return keypairFingerprint; - } - - public void setKeypairFingerprint(String keypairFingerprint) { - this.keypairFingerprint = keypairFingerprint; - } - - public Keypair keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public Keypair keypairType(String keypairType) { - - this.keypairType = keypairType; - return this; - } - - /** - * The type of the keypair (`ssh-rsa`, `ssh-ed25519`, - * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or - * `ecdsa-sha2-nistp521`). - * - * @return keypairType - */ - @javax.annotation.Nullable - public String getKeypairType() { - return keypairType; - } - - public void setKeypairType(String keypairType) { - this.keypairType = keypairType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Keypair keypair = (Keypair) o; - return Objects.equals(this.keypairFingerprint, keypair.keypairFingerprint) - && Objects.equals(this.keypairName, keypair.keypairName) - && Objects.equals(this.keypairType, keypair.keypairType); - } - - @Override - public int hashCode() { - return Objects.hash(keypairFingerprint, keypairName, keypairType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Keypair {\n"); - sb.append(" keypairFingerprint: ") - .append(toIndentedString(keypairFingerprint)) - .append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" keypairType: ").append(toIndentedString(keypairType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("KeypairFingerprint"); - openapiFields.add("KeypairName"); - openapiFields.add("KeypairType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Keypair - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Keypair.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Keypair is not found in the empty" - + " JSON string", - Keypair.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Keypair.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Keypair`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("KeypairFingerprint") != null - && !jsonObj.get("KeypairFingerprint").isJsonNull()) - && !jsonObj.get("KeypairFingerprint").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairFingerprint` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("KeypairFingerprint").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if ((jsonObj.get("KeypairType") != null && !jsonObj.get("KeypairType").isJsonNull()) - && !jsonObj.get("KeypairType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Keypair.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Keypair' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Keypair.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Keypair value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Keypair read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Keypair given an JSON string - * - * @param jsonString JSON string - * @return An instance of Keypair - * @throws IOException if the JSON string is invalid with respect to Keypair - */ - public static Keypair fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Keypair.class); - } - - /** - * Convert an instance of Keypair to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreated.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreated.java deleted file mode 100644 index 08f6ab34..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreated.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the created keypair. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class KeypairCreated { - public static final String SERIALIZED_NAME_KEYPAIR_FINGERPRINT = "KeypairFingerprint"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_FINGERPRINT) - private String keypairFingerprint; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_KEYPAIR_TYPE = "KeypairType"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_TYPE) - private String keypairType; - - public static final String SERIALIZED_NAME_PRIVATE_KEY = "PrivateKey"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_KEY) - private String privateKey; - - public KeypairCreated() {} - - public KeypairCreated keypairFingerprint(String keypairFingerprint) { - - this.keypairFingerprint = keypairFingerprint; - return this; - } - - /** - * The MD5 public key fingerprint, as specified in section 4 of RFC 4716. - * - * @return keypairFingerprint - */ - @javax.annotation.Nullable - public String getKeypairFingerprint() { - return keypairFingerprint; - } - - public void setKeypairFingerprint(String keypairFingerprint) { - this.keypairFingerprint = keypairFingerprint; - } - - public KeypairCreated keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public KeypairCreated keypairType(String keypairType) { - - this.keypairType = keypairType; - return this; - } - - /** - * The type of the keypair (`ssh-rsa`, `ssh-ed25519`, - * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or - * `ecdsa-sha2-nistp521`). - * - * @return keypairType - */ - @javax.annotation.Nullable - public String getKeypairType() { - return keypairType; - } - - public void setKeypairType(String keypairType) { - this.keypairType = keypairType; - } - - public KeypairCreated privateKey(String privateKey) { - - this.privateKey = privateKey; - return this; - } - - /** - * The private key, returned only if you are creating a keypair (not if you are importing). When - * you save this private key in a .rsa file, make sure you replace the `\\n` escape - * sequences with real line breaks. - * - * @return privateKey - */ - @javax.annotation.Nullable - public String getPrivateKey() { - return privateKey; - } - - public void setPrivateKey(String privateKey) { - this.privateKey = privateKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - KeypairCreated keypairCreated = (KeypairCreated) o; - return Objects.equals(this.keypairFingerprint, keypairCreated.keypairFingerprint) - && Objects.equals(this.keypairName, keypairCreated.keypairName) - && Objects.equals(this.keypairType, keypairCreated.keypairType) - && Objects.equals(this.privateKey, keypairCreated.privateKey); - } - - @Override - public int hashCode() { - return Objects.hash(keypairFingerprint, keypairName, keypairType, privateKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KeypairCreated {\n"); - sb.append(" keypairFingerprint: ") - .append(toIndentedString(keypairFingerprint)) - .append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" keypairType: ").append(toIndentedString(keypairType)).append("\n"); - sb.append(" privateKey: ").append(toIndentedString(privateKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("KeypairFingerprint"); - openapiFields.add("KeypairName"); - openapiFields.add("KeypairType"); - openapiFields.add("PrivateKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to KeypairCreated - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!KeypairCreated.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in KeypairCreated is not found in the" - + " empty JSON string", - KeypairCreated.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!KeypairCreated.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `KeypairCreated` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("KeypairFingerprint") != null - && !jsonObj.get("KeypairFingerprint").isJsonNull()) - && !jsonObj.get("KeypairFingerprint").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairFingerprint` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("KeypairFingerprint").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if ((jsonObj.get("KeypairType") != null && !jsonObj.get("KeypairType").isJsonNull()) - && !jsonObj.get("KeypairType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairType").toString())); - } - if ((jsonObj.get("PrivateKey") != null && !jsonObj.get("PrivateKey").isJsonNull()) - && !jsonObj.get("PrivateKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KeypairCreated.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KeypairCreated' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(KeypairCreated.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, KeypairCreated value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public KeypairCreated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of KeypairCreated given an JSON string - * - * @param jsonString JSON string - * @return An instance of KeypairCreated - * @throws IOException if the JSON string is invalid with respect to KeypairCreated - */ - public static KeypairCreated fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KeypairCreated.class); - } - - /** - * Convert an instance of KeypairCreated to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequest.java deleted file mode 100644 index 08ad5d79..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkFlexibleGpuRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkFlexibleGpuRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_ID = "FlexibleGpuId"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_ID) - private String flexibleGpuId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public LinkFlexibleGpuRequest() {} - - public LinkFlexibleGpuRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkFlexibleGpuRequest flexibleGpuId(String flexibleGpuId) { - - this.flexibleGpuId = flexibleGpuId; - return this; - } - - /** - * The ID of the fGPU you want to attach. - * - * @return flexibleGpuId - */ - @javax.annotation.Nonnull - public String getFlexibleGpuId() { - return flexibleGpuId; - } - - public void setFlexibleGpuId(String flexibleGpuId) { - this.flexibleGpuId = flexibleGpuId; - } - - public LinkFlexibleGpuRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM you want to attach the fGPU to. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkFlexibleGpuRequest linkFlexibleGpuRequest = (LinkFlexibleGpuRequest) o; - return Objects.equals(this.dryRun, linkFlexibleGpuRequest.dryRun) - && Objects.equals(this.flexibleGpuId, linkFlexibleGpuRequest.flexibleGpuId) - && Objects.equals(this.vmId, linkFlexibleGpuRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, flexibleGpuId, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkFlexibleGpuRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flexibleGpuId: ").append(toIndentedString(flexibleGpuId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("FlexibleGpuId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("FlexibleGpuId"); - openapiRequiredFields.add("VmId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkFlexibleGpuRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkFlexibleGpuRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkFlexibleGpuRequest is not found" - + " in the empty JSON string", - LinkFlexibleGpuRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkFlexibleGpuRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkFlexibleGpuRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkFlexibleGpuRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("FlexibleGpuId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpuId").toString())); - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkFlexibleGpuRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkFlexibleGpuRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkFlexibleGpuRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkFlexibleGpuRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkFlexibleGpuRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkFlexibleGpuRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkFlexibleGpuRequest - * @throws IOException if the JSON string is invalid with respect to LinkFlexibleGpuRequest - */ - public static LinkFlexibleGpuRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkFlexibleGpuRequest.class); - } - - /** - * Convert an instance of LinkFlexibleGpuRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponse.java deleted file mode 100644 index 7248bcb4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkFlexibleGpuResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkFlexibleGpuResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkFlexibleGpuResponse() {} - - public LinkFlexibleGpuResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkFlexibleGpuResponse linkFlexibleGpuResponse = (LinkFlexibleGpuResponse) o; - return Objects.equals(this.responseContext, linkFlexibleGpuResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkFlexibleGpuResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkFlexibleGpuResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkFlexibleGpuResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkFlexibleGpuResponse is not found" - + " in the empty JSON string", - LinkFlexibleGpuResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkFlexibleGpuResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkFlexibleGpuResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkFlexibleGpuResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkFlexibleGpuResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkFlexibleGpuResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkFlexibleGpuResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkFlexibleGpuResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkFlexibleGpuResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkFlexibleGpuResponse - * @throws IOException if the JSON string is invalid with respect to LinkFlexibleGpuResponse - */ - public static LinkFlexibleGpuResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkFlexibleGpuResponse.class); - } - - /** - * Convert an instance of LinkFlexibleGpuResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequest.java deleted file mode 100644 index 69710a75..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkInternetServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkInternetServiceRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_INTERNET_SERVICE_ID = "InternetServiceId"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE_ID) - private String internetServiceId; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public LinkInternetServiceRequest() {} - - public LinkInternetServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkInternetServiceRequest internetServiceId(String internetServiceId) { - - this.internetServiceId = internetServiceId; - return this; - } - - /** - * The ID of the Internet service you want to attach. - * - * @return internetServiceId - */ - @javax.annotation.Nonnull - public String getInternetServiceId() { - return internetServiceId; - } - - public void setInternetServiceId(String internetServiceId) { - this.internetServiceId = internetServiceId; - } - - public LinkInternetServiceRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net to which you want to attach the Internet service. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkInternetServiceRequest linkInternetServiceRequest = (LinkInternetServiceRequest) o; - return Objects.equals(this.dryRun, linkInternetServiceRequest.dryRun) - && Objects.equals( - this.internetServiceId, linkInternetServiceRequest.internetServiceId) - && Objects.equals(this.netId, linkInternetServiceRequest.netId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, internetServiceId, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkInternetServiceRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" internetServiceId: ") - .append(toIndentedString(internetServiceId)) - .append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("InternetServiceId"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("InternetServiceId"); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkInternetServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkInternetServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkInternetServiceRequest is not" - + " found in the empty JSON string", - LinkInternetServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkInternetServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkInternetServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkInternetServiceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("InternetServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServiceId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("InternetServiceId").toString())); - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkInternetServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkInternetServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkInternetServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkInternetServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkInternetServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkInternetServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkInternetServiceRequest - * @throws IOException if the JSON string is invalid with respect to LinkInternetServiceRequest - */ - public static LinkInternetServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkInternetServiceRequest.class); - } - - /** - * Convert an instance of LinkInternetServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponse.java deleted file mode 100644 index 7fcf9c6a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkInternetServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkInternetServiceResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkInternetServiceResponse() {} - - public LinkInternetServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkInternetServiceResponse linkInternetServiceResponse = (LinkInternetServiceResponse) o; - return Objects.equals(this.responseContext, linkInternetServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkInternetServiceResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkInternetServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkInternetServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkInternetServiceResponse is not" - + " found in the empty JSON string", - LinkInternetServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkInternetServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkInternetServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkInternetServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkInternetServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkInternetServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkInternetServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkInternetServiceResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkInternetServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkInternetServiceResponse - * @throws IOException if the JSON string is invalid with respect to LinkInternetServiceResponse - */ - public static LinkInternetServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkInternetServiceResponse.class); - } - - /** - * Convert an instance of LinkInternetServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequest.java deleted file mode 100644 index 4d59a5e4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequest.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkLoadBalancerBackendMachinesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkLoadBalancerBackendMachinesRequest { - public static final String SERIALIZED_NAME_BACKEND_IPS = "BackendIps"; - - @SerializedName(SERIALIZED_NAME_BACKEND_IPS) - private List backendIps = null; - - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = null; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public LinkLoadBalancerBackendMachinesRequest() {} - - public LinkLoadBalancerBackendMachinesRequest backendIps(List backendIps) { - - this.backendIps = backendIps; - return this; - } - - public LinkLoadBalancerBackendMachinesRequest addBackendIpsItem(String backendIpsItem) { - if (this.backendIps == null) { - this.backendIps = new ArrayList<>(); - } - this.backendIps.add(backendIpsItem); - return this; - } - - /** - * One or more public IPs of backend VMs. - * - * @return backendIps - */ - @javax.annotation.Nullable - public List getBackendIps() { - return backendIps; - } - - public void setBackendIps(List backendIps) { - this.backendIps = backendIps; - } - - public LinkLoadBalancerBackendMachinesRequest backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public LinkLoadBalancerBackendMachinesRequest addBackendVmIdsItem(String backendVmIdsItem) { - if (this.backendVmIds == null) { - this.backendVmIds = new ArrayList<>(); - } - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs. - * - * @return backendVmIds - */ - @javax.annotation.Nullable - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public LinkLoadBalancerBackendMachinesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkLoadBalancerBackendMachinesRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest = - (LinkLoadBalancerBackendMachinesRequest) o; - return Objects.equals(this.backendIps, linkLoadBalancerBackendMachinesRequest.backendIps) - && Objects.equals( - this.backendVmIds, linkLoadBalancerBackendMachinesRequest.backendVmIds) - && Objects.equals(this.dryRun, linkLoadBalancerBackendMachinesRequest.dryRun) - && Objects.equals( - this.loadBalancerName, - linkLoadBalancerBackendMachinesRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(backendIps, backendVmIds, dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkLoadBalancerBackendMachinesRequest {\n"); - sb.append(" backendIps: ").append(toIndentedString(backendIps)).append("\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendIps"); - openapiFields.add("BackendVmIds"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * LinkLoadBalancerBackendMachinesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkLoadBalancerBackendMachinesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " LinkLoadBalancerBackendMachinesRequest is not found in the" - + " empty JSON string", - LinkLoadBalancerBackendMachinesRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkLoadBalancerBackendMachinesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkLoadBalancerBackendMachinesRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkLoadBalancerBackendMachinesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendIps") != null && !jsonObj.get("BackendIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("BackendIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendVmIds") != null && !jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkLoadBalancerBackendMachinesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkLoadBalancerBackendMachinesRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LinkLoadBalancerBackendMachinesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, LinkLoadBalancerBackendMachinesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkLoadBalancerBackendMachinesRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkLoadBalancerBackendMachinesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkLoadBalancerBackendMachinesRequest - * @throws IOException if the JSON string is invalid with respect to - * LinkLoadBalancerBackendMachinesRequest - */ - public static LinkLoadBalancerBackendMachinesRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, LinkLoadBalancerBackendMachinesRequest.class); - } - - /** - * Convert an instance of LinkLoadBalancerBackendMachinesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponse.java deleted file mode 100644 index 80d68948..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponse.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkLoadBalancerBackendMachinesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkLoadBalancerBackendMachinesResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkLoadBalancerBackendMachinesResponse() {} - - public LinkLoadBalancerBackendMachinesResponse responseContext( - ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkLoadBalancerBackendMachinesResponse linkLoadBalancerBackendMachinesResponse = - (LinkLoadBalancerBackendMachinesResponse) o; - return Objects.equals( - this.responseContext, linkLoadBalancerBackendMachinesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkLoadBalancerBackendMachinesResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * LinkLoadBalancerBackendMachinesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkLoadBalancerBackendMachinesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " LinkLoadBalancerBackendMachinesResponse is not found in" - + " the empty JSON string", - LinkLoadBalancerBackendMachinesResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkLoadBalancerBackendMachinesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkLoadBalancerBackendMachinesResponse` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkLoadBalancerBackendMachinesResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes 'LinkLoadBalancerBackendMachinesResponse' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LinkLoadBalancerBackendMachinesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, LinkLoadBalancerBackendMachinesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkLoadBalancerBackendMachinesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkLoadBalancerBackendMachinesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkLoadBalancerBackendMachinesResponse - * @throws IOException if the JSON string is invalid with respect to - * LinkLoadBalancerBackendMachinesResponse - */ - public static LinkLoadBalancerBackendMachinesResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, LinkLoadBalancerBackendMachinesResponse.class); - } - - /** - * Convert an instance of LinkLoadBalancerBackendMachinesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequest.java deleted file mode 100644 index 3f622c2d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequest.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkManagedPolicyToUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkManagedPolicyToUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public LinkManagedPolicyToUserGroupRequest() {} - - public LinkManagedPolicyToUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkManagedPolicyToUserGroupRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public LinkManagedPolicyToUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to link the policy to. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest = - (LinkManagedPolicyToUserGroupRequest) o; - return Objects.equals(this.dryRun, linkManagedPolicyToUserGroupRequest.dryRun) - && Objects.equals(this.policyOrn, linkManagedPolicyToUserGroupRequest.policyOrn) - && Objects.equals( - this.userGroupName, linkManagedPolicyToUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyOrn, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkManagedPolicyToUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyOrn"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * LinkManagedPolicyToUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkManagedPolicyToUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkManagedPolicyToUserGroupRequest" - + " is not found in the empty JSON string", - LinkManagedPolicyToUserGroupRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkManagedPolicyToUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkManagedPolicyToUserGroupRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkManagedPolicyToUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkManagedPolicyToUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkManagedPolicyToUserGroupRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LinkManagedPolicyToUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkManagedPolicyToUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkManagedPolicyToUserGroupRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkManagedPolicyToUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkManagedPolicyToUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to - * LinkManagedPolicyToUserGroupRequest - */ - public static LinkManagedPolicyToUserGroupRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, LinkManagedPolicyToUserGroupRequest.class); - } - - /** - * Convert an instance of LinkManagedPolicyToUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponse.java deleted file mode 100644 index 89390b07..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponse.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkManagedPolicyToUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkManagedPolicyToUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkManagedPolicyToUserGroupResponse() {} - - public LinkManagedPolicyToUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkManagedPolicyToUserGroupResponse linkManagedPolicyToUserGroupResponse = - (LinkManagedPolicyToUserGroupResponse) o; - return Objects.equals( - this.responseContext, linkManagedPolicyToUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkManagedPolicyToUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * LinkManagedPolicyToUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkManagedPolicyToUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkManagedPolicyToUserGroupResponse" - + " is not found in the empty JSON string", - LinkManagedPolicyToUserGroupResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkManagedPolicyToUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkManagedPolicyToUserGroupResponse` properties. JSON:" - + " %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkManagedPolicyToUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkManagedPolicyToUserGroupResponse' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LinkManagedPolicyToUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, LinkManagedPolicyToUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkManagedPolicyToUserGroupResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkManagedPolicyToUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkManagedPolicyToUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * LinkManagedPolicyToUserGroupResponse - */ - public static LinkManagedPolicyToUserGroupResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, LinkManagedPolicyToUserGroupResponse.class); - } - - /** - * Convert an instance of LinkManagedPolicyToUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNic.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNic.java deleted file mode 100644 index 18bef7f2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNic.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the NIC attachment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkNic { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_DEVICE_NUMBER = "DeviceNumber"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NUMBER) - private Integer deviceNumber; - - public static final String SERIALIZED_NAME_LINK_NIC_ID = "LinkNicId"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_ID) - private String linkNicId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_VM_ACCOUNT_ID = "VmAccountId"; - - @SerializedName(SERIALIZED_NAME_VM_ACCOUNT_ID) - private String vmAccountId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public LinkNic() {} - - public LinkNic deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the NIC is deleted when the VM is terminated. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public LinkNic deviceNumber(Integer deviceNumber) { - - this.deviceNumber = deviceNumber; - return this; - } - - /** - * The device index for the NIC attachment (between `1` and `7`, both - * included). - * - * @return deviceNumber - */ - @javax.annotation.Nullable - public Integer getDeviceNumber() { - return deviceNumber; - } - - public void setDeviceNumber(Integer deviceNumber) { - this.deviceNumber = deviceNumber; - } - - public LinkNic linkNicId(String linkNicId) { - - this.linkNicId = linkNicId; - return this; - } - - /** - * The ID of the NIC to attach. - * - * @return linkNicId - */ - @javax.annotation.Nullable - public String getLinkNicId() { - return linkNicId; - } - - public void setLinkNicId(String linkNicId) { - this.linkNicId = linkNicId; - } - - public LinkNic state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the attachment (`attaching` \\| `attached` \\| - * `detaching` \\| `detached`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public LinkNic vmAccountId(String vmAccountId) { - - this.vmAccountId = vmAccountId; - return this; - } - - /** - * The account ID of the owner of the VM. - * - * @return vmAccountId - */ - @javax.annotation.Nullable - public String getVmAccountId() { - return vmAccountId; - } - - public void setVmAccountId(String vmAccountId) { - this.vmAccountId = vmAccountId; - } - - public LinkNic vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkNic linkNic = (LinkNic) o; - return Objects.equals(this.deleteOnVmDeletion, linkNic.deleteOnVmDeletion) - && Objects.equals(this.deviceNumber, linkNic.deviceNumber) - && Objects.equals(this.linkNicId, linkNic.linkNicId) - && Objects.equals(this.state, linkNic.state) - && Objects.equals(this.vmAccountId, linkNic.vmAccountId) - && Objects.equals(this.vmId, linkNic.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, deviceNumber, linkNicId, state, vmAccountId, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkNic {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" deviceNumber: ").append(toIndentedString(deviceNumber)).append("\n"); - sb.append(" linkNicId: ").append(toIndentedString(linkNicId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" vmAccountId: ").append(toIndentedString(vmAccountId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("DeviceNumber"); - openapiFields.add("LinkNicId"); - openapiFields.add("State"); - openapiFields.add("VmAccountId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkNic - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkNic.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkNic is not found in the empty" - + " JSON string", - LinkNic.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkNic.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `LinkNic`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkNicId") != null && !jsonObj.get("LinkNicId").isJsonNull()) - && !jsonObj.get("LinkNicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("VmAccountId") != null && !jsonObj.get("VmAccountId").isJsonNull()) - && !jsonObj.get("VmAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmAccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmAccountId").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkNic.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkNic' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkNic.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkNic value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkNic read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkNic given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkNic - * @throws IOException if the JSON string is invalid with respect to LinkNic - */ - public static LinkNic fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkNic.class); - } - - /** - * Convert an instance of LinkNic to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLight.java deleted file mode 100644 index 52635125..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLight.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the network interface card (NIC). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkNicLight { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_DEVICE_NUMBER = "DeviceNumber"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NUMBER) - private Integer deviceNumber; - - public static final String SERIALIZED_NAME_LINK_NIC_ID = "LinkNicId"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_ID) - private String linkNicId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public LinkNicLight() {} - - public LinkNicLight deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the NIC is deleted when the VM is terminated. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public LinkNicLight deviceNumber(Integer deviceNumber) { - - this.deviceNumber = deviceNumber; - return this; - } - - /** - * The device index for the NIC attachment (between `1` and `7`, both - * included). - * - * @return deviceNumber - */ - @javax.annotation.Nullable - public Integer getDeviceNumber() { - return deviceNumber; - } - - public void setDeviceNumber(Integer deviceNumber) { - this.deviceNumber = deviceNumber; - } - - public LinkNicLight linkNicId(String linkNicId) { - - this.linkNicId = linkNicId; - return this; - } - - /** - * The ID of the NIC to attach. - * - * @return linkNicId - */ - @javax.annotation.Nullable - public String getLinkNicId() { - return linkNicId; - } - - public void setLinkNicId(String linkNicId) { - this.linkNicId = linkNicId; - } - - public LinkNicLight state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the attachment (`attaching` \\| `attached` \\| - * `detaching` \\| `detached`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkNicLight linkNicLight = (LinkNicLight) o; - return Objects.equals(this.deleteOnVmDeletion, linkNicLight.deleteOnVmDeletion) - && Objects.equals(this.deviceNumber, linkNicLight.deviceNumber) - && Objects.equals(this.linkNicId, linkNicLight.linkNicId) - && Objects.equals(this.state, linkNicLight.state); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, deviceNumber, linkNicId, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkNicLight {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" deviceNumber: ").append(toIndentedString(deviceNumber)).append("\n"); - sb.append(" linkNicId: ").append(toIndentedString(linkNicId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("DeviceNumber"); - openapiFields.add("LinkNicId"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkNicLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkNicLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkNicLight is not found in the" - + " empty JSON string", - LinkNicLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkNicLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkNicLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkNicId") != null && !jsonObj.get("LinkNicId").isJsonNull()) - && !jsonObj.get("LinkNicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkNicLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkNicLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkNicLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkNicLight value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkNicLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkNicLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkNicLight - * @throws IOException if the JSON string is invalid with respect to LinkNicLight - */ - public static LinkNicLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkNicLight.class); - } - - /** - * Convert an instance of LinkNicLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequest.java deleted file mode 100644 index c958045b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequest.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkNicRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkNicRequest { - public static final String SERIALIZED_NAME_DEVICE_NUMBER = "DeviceNumber"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NUMBER) - private Integer deviceNumber; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public LinkNicRequest() {} - - public LinkNicRequest deviceNumber(Integer deviceNumber) { - - this.deviceNumber = deviceNumber; - return this; - } - - /** - * The index of the VM device for the NIC attachment (between `1` and `7`, - * both included). - * - * @return deviceNumber - */ - @javax.annotation.Nonnull - public Integer getDeviceNumber() { - return deviceNumber; - } - - public void setDeviceNumber(Integer deviceNumber) { - this.deviceNumber = deviceNumber; - } - - public LinkNicRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkNicRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC you want to attach. - * - * @return nicId - */ - @javax.annotation.Nonnull - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public LinkNicRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM to which you want to attach the NIC. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkNicRequest linkNicRequest = (LinkNicRequest) o; - return Objects.equals(this.deviceNumber, linkNicRequest.deviceNumber) - && Objects.equals(this.dryRun, linkNicRequest.dryRun) - && Objects.equals(this.nicId, linkNicRequest.nicId) - && Objects.equals(this.vmId, linkNicRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(deviceNumber, dryRun, nicId, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkNicRequest {\n"); - sb.append(" deviceNumber: ").append(toIndentedString(deviceNumber)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeviceNumber"); - openapiFields.add("DryRun"); - openapiFields.add("NicId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DeviceNumber"); - openapiRequiredFields.add("NicId"); - openapiRequiredFields.add("VmId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkNicRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkNicRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkNicRequest is not found in the" - + " empty JSON string", - LinkNicRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkNicRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkNicRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkNicRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkNicRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkNicRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkNicRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkNicRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkNicRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkNicRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkNicRequest - * @throws IOException if the JSON string is invalid with respect to LinkNicRequest - */ - public static LinkNicRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkNicRequest.class); - } - - /** - * Convert an instance of LinkNicRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponse.java deleted file mode 100644 index 7584ba83..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponse.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkNicResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkNicResponse { - public static final String SERIALIZED_NAME_LINK_NIC_ID = "LinkNicId"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_ID) - private String linkNicId; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkNicResponse() {} - - public LinkNicResponse linkNicId(String linkNicId) { - - this.linkNicId = linkNicId; - return this; - } - - /** - * The ID of the NIC attachment. - * - * @return linkNicId - */ - @javax.annotation.Nullable - public String getLinkNicId() { - return linkNicId; - } - - public void setLinkNicId(String linkNicId) { - this.linkNicId = linkNicId; - } - - public LinkNicResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkNicResponse linkNicResponse = (LinkNicResponse) o; - return Objects.equals(this.linkNicId, linkNicResponse.linkNicId) - && Objects.equals(this.responseContext, linkNicResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(linkNicId, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkNicResponse {\n"); - sb.append(" linkNicId: ").append(toIndentedString(linkNicId)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkNicId"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkNicResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkNicResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkNicResponse is not found in the" - + " empty JSON string", - LinkNicResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkNicResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkNicResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkNicId") != null && !jsonObj.get("LinkNicId").isJsonNull()) - && !jsonObj.get("LinkNicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicId").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkNicResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkNicResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkNicResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkNicResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkNicResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkNicResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkNicResponse - * @throws IOException if the JSON string is invalid with respect to LinkNicResponse - */ - public static LinkNicResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkNicResponse.class); - } - - /** - * Convert an instance of LinkNicResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdate.java deleted file mode 100644 index f2292bc2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdate.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** - * Information about the NIC attachment. If you are modifying the `DeleteOnVmDeletion` - * attribute, you must specify the ID of the NIC attachment. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkNicToUpdate { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_LINK_NIC_ID = "LinkNicId"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_ID) - private String linkNicId; - - public LinkNicToUpdate() {} - - public LinkNicToUpdate deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the NIC is deleted when the VM is terminated. If false, the NIC is detached from the - * VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public LinkNicToUpdate linkNicId(String linkNicId) { - - this.linkNicId = linkNicId; - return this; - } - - /** - * The ID of the NIC attachment. - * - * @return linkNicId - */ - @javax.annotation.Nullable - public String getLinkNicId() { - return linkNicId; - } - - public void setLinkNicId(String linkNicId) { - this.linkNicId = linkNicId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkNicToUpdate linkNicToUpdate = (LinkNicToUpdate) o; - return Objects.equals(this.deleteOnVmDeletion, linkNicToUpdate.deleteOnVmDeletion) - && Objects.equals(this.linkNicId, linkNicToUpdate.linkNicId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, linkNicId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkNicToUpdate {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" linkNicId: ").append(toIndentedString(linkNicId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("LinkNicId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkNicToUpdate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkNicToUpdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkNicToUpdate is not found in the" - + " empty JSON string", - LinkNicToUpdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkNicToUpdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkNicToUpdate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkNicId") != null && !jsonObj.get("LinkNicId").isJsonNull()) - && !jsonObj.get("LinkNicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkNicToUpdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkNicToUpdate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkNicToUpdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkNicToUpdate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkNicToUpdate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkNicToUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkNicToUpdate - * @throws IOException if the JSON string is invalid with respect to LinkNicToUpdate - */ - public static LinkNicToUpdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkNicToUpdate.class); - } - - /** - * Convert an instance of LinkNicToUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequest.java deleted file mode 100644 index c7de29e4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public LinkPolicyRequest() {} - - public LinkPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkPolicyRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public LinkPolicyRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user you want to link the policy to (between 1 and 64 characters). - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPolicyRequest linkPolicyRequest = (LinkPolicyRequest) o; - return Objects.equals(this.dryRun, linkPolicyRequest.dryRun) - && Objects.equals(this.policyOrn, linkPolicyRequest.policyOrn) - && Objects.equals(this.userName, linkPolicyRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyOrn, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyOrn"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPolicyRequest is not found in the" - + " empty JSON string", - LinkPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPolicyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPolicyRequest - * @throws IOException if the JSON string is invalid with respect to LinkPolicyRequest - */ - public static LinkPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPolicyRequest.class); - } - - /** - * Convert an instance of LinkPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponse.java deleted file mode 100644 index add9e596..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPolicyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkPolicyResponse() {} - - public LinkPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPolicyResponse linkPolicyResponse = (LinkPolicyResponse) o; - return Objects.equals(this.responseContext, linkPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPolicyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPolicyResponse is not found in" - + " the empty JSON string", - LinkPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPolicyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPolicyResponse - * @throws IOException if the JSON string is invalid with respect to LinkPolicyResponse - */ - public static LinkPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPolicyResponse.class); - } - - /** - * Convert an instance of LinkPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequest.java deleted file mode 100644 index 61c0f526..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequest.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPrivateIpsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPrivateIpsRequest { - public static final String SERIALIZED_NAME_ALLOW_RELINK = "AllowRelink"; - - @SerializedName(SERIALIZED_NAME_ALLOW_RELINK) - private Boolean allowRelink; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECONDARY_PRIVATE_IP_COUNT = - "SecondaryPrivateIpCount"; - - @SerializedName(SERIALIZED_NAME_SECONDARY_PRIVATE_IP_COUNT) - private Integer secondaryPrivateIpCount; - - public LinkPrivateIpsRequest() {} - - public LinkPrivateIpsRequest allowRelink(Boolean allowRelink) { - - this.allowRelink = allowRelink; - return this; - } - - /** - * If true, allows an IP that is already assigned to another NIC in the same Subnet to be - * assigned to the NIC you specified. - * - * @return allowRelink - */ - @javax.annotation.Nullable - public Boolean getAllowRelink() { - return allowRelink; - } - - public void setAllowRelink(Boolean allowRelink) { - this.allowRelink = allowRelink; - } - - public LinkPrivateIpsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkPrivateIpsRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC. - * - * @return nicId - */ - @javax.annotation.Nonnull - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public LinkPrivateIpsRequest privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public LinkPrivateIpsRequest addPrivateIpsItem(String privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The secondary private IP or IPs you want to assign to the NIC within the IP range of the - * Subnet. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public LinkPrivateIpsRequest secondaryPrivateIpCount(Integer secondaryPrivateIpCount) { - - this.secondaryPrivateIpCount = secondaryPrivateIpCount; - return this; - } - - /** - * The number of secondary private IPs to assign to the NIC. - * - * @return secondaryPrivateIpCount - */ - @javax.annotation.Nullable - public Integer getSecondaryPrivateIpCount() { - return secondaryPrivateIpCount; - } - - public void setSecondaryPrivateIpCount(Integer secondaryPrivateIpCount) { - this.secondaryPrivateIpCount = secondaryPrivateIpCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPrivateIpsRequest linkPrivateIpsRequest = (LinkPrivateIpsRequest) o; - return Objects.equals(this.allowRelink, linkPrivateIpsRequest.allowRelink) - && Objects.equals(this.dryRun, linkPrivateIpsRequest.dryRun) - && Objects.equals(this.nicId, linkPrivateIpsRequest.nicId) - && Objects.equals(this.privateIps, linkPrivateIpsRequest.privateIps) - && Objects.equals( - this.secondaryPrivateIpCount, - linkPrivateIpsRequest.secondaryPrivateIpCount); - } - - @Override - public int hashCode() { - return Objects.hash(allowRelink, dryRun, nicId, privateIps, secondaryPrivateIpCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPrivateIpsRequest {\n"); - sb.append(" allowRelink: ").append(toIndentedString(allowRelink)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" secondaryPrivateIpCount: ") - .append(toIndentedString(secondaryPrivateIpCount)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AllowRelink"); - openapiFields.add("DryRun"); - openapiFields.add("NicId"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecondaryPrivateIpCount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NicId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPrivateIpsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPrivateIpsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPrivateIpsRequest is not found in" - + " the empty JSON string", - LinkPrivateIpsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPrivateIpsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPrivateIpsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkPrivateIpsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PrivateIps").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPrivateIpsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPrivateIpsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPrivateIpsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPrivateIpsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPrivateIpsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPrivateIpsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPrivateIpsRequest - * @throws IOException if the JSON string is invalid with respect to LinkPrivateIpsRequest - */ - public static LinkPrivateIpsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPrivateIpsRequest.class); - } - - /** - * Convert an instance of LinkPrivateIpsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponse.java deleted file mode 100644 index 1a82fbe4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPrivateIpsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPrivateIpsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkPrivateIpsResponse() {} - - public LinkPrivateIpsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPrivateIpsResponse linkPrivateIpsResponse = (LinkPrivateIpsResponse) o; - return Objects.equals(this.responseContext, linkPrivateIpsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPrivateIpsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPrivateIpsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPrivateIpsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPrivateIpsResponse is not found" - + " in the empty JSON string", - LinkPrivateIpsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPrivateIpsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPrivateIpsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPrivateIpsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPrivateIpsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPrivateIpsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPrivateIpsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPrivateIpsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPrivateIpsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPrivateIpsResponse - * @throws IOException if the JSON string is invalid with respect to LinkPrivateIpsResponse - */ - public static LinkPrivateIpsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPrivateIpsResponse.class); - } - - /** - * Convert an instance of LinkPrivateIpsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIp.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIp.java deleted file mode 100644 index 68699d15..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIp.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the public IP association. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPublicIp { - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_ID = "LinkPublicIpId"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_ID) - private String linkPublicIpId; - - public static final String SERIALIZED_NAME_PUBLIC_DNS_NAME = "PublicDnsName"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_DNS_NAME) - private String publicDnsName; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ACCOUNT_ID = "PublicIpAccountId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ACCOUNT_ID) - private String publicIpAccountId; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public LinkPublicIp() {} - - public LinkPublicIp linkPublicIpId(String linkPublicIpId) { - - this.linkPublicIpId = linkPublicIpId; - return this; - } - - /** - * (Required in a Net) The ID representing the association of the public IP with the VM or the - * NIC. - * - * @return linkPublicIpId - */ - @javax.annotation.Nullable - public String getLinkPublicIpId() { - return linkPublicIpId; - } - - public void setLinkPublicIpId(String linkPublicIpId) { - this.linkPublicIpId = linkPublicIpId; - } - - public LinkPublicIp publicDnsName(String publicDnsName) { - - this.publicDnsName = publicDnsName; - return this; - } - - /** - * The name of the public DNS. - * - * @return publicDnsName - */ - @javax.annotation.Nullable - public String getPublicDnsName() { - return publicDnsName; - } - - public void setPublicDnsName(String publicDnsName) { - this.publicDnsName = publicDnsName; - } - - public LinkPublicIp publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP associated with the NIC. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public LinkPublicIp publicIpAccountId(String publicIpAccountId) { - - this.publicIpAccountId = publicIpAccountId; - return this; - } - - /** - * The account ID of the owner of the public IP. - * - * @return publicIpAccountId - */ - @javax.annotation.Nullable - public String getPublicIpAccountId() { - return publicIpAccountId; - } - - public void setPublicIpAccountId(String publicIpAccountId) { - this.publicIpAccountId = publicIpAccountId; - } - - public LinkPublicIp publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The allocation ID of the public IP. - * - * @return publicIpId - */ - @javax.annotation.Nullable - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPublicIp linkPublicIp = (LinkPublicIp) o; - return Objects.equals(this.linkPublicIpId, linkPublicIp.linkPublicIpId) - && Objects.equals(this.publicDnsName, linkPublicIp.publicDnsName) - && Objects.equals(this.publicIp, linkPublicIp.publicIp) - && Objects.equals(this.publicIpAccountId, linkPublicIp.publicIpAccountId) - && Objects.equals(this.publicIpId, linkPublicIp.publicIpId); - } - - @Override - public int hashCode() { - return Objects.hash(linkPublicIpId, publicDnsName, publicIp, publicIpAccountId, publicIpId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPublicIp {\n"); - sb.append(" linkPublicIpId: ").append(toIndentedString(linkPublicIpId)).append("\n"); - sb.append(" publicDnsName: ").append(toIndentedString(publicDnsName)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpAccountId: ") - .append(toIndentedString(publicIpAccountId)) - .append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkPublicIpId"); - openapiFields.add("PublicDnsName"); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpAccountId"); - openapiFields.add("PublicIpId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPublicIp - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPublicIp.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPublicIp is not found in the" - + " empty JSON string", - LinkPublicIp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPublicIp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPublicIp` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkPublicIpId") != null && !jsonObj.get("LinkPublicIpId").isJsonNull()) - && !jsonObj.get("LinkPublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpId").toString())); - } - if ((jsonObj.get("PublicDnsName") != null && !jsonObj.get("PublicDnsName").isJsonNull()) - && !jsonObj.get("PublicDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicDnsName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicDnsName").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpAccountId") != null - && !jsonObj.get("PublicIpAccountId").isJsonNull()) - && !jsonObj.get("PublicIpAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpAccountId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PublicIpAccountId").toString())); - } - if ((jsonObj.get("PublicIpId") != null && !jsonObj.get("PublicIpId").isJsonNull()) - && !jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPublicIp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPublicIp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPublicIp.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPublicIp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPublicIp read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPublicIp given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPublicIp - * @throws IOException if the JSON string is invalid with respect to LinkPublicIp - */ - public static LinkPublicIp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPublicIp.class); - } - - /** - * Convert an instance of LinkPublicIp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVm.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVm.java deleted file mode 100644 index b76c5ab0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVm.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the public IP associated with the NIC. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPublicIpLightForVm { - public static final String SERIALIZED_NAME_PUBLIC_DNS_NAME = "PublicDnsName"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_DNS_NAME) - private String publicDnsName; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ACCOUNT_ID = "PublicIpAccountId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ACCOUNT_ID) - private String publicIpAccountId; - - public LinkPublicIpLightForVm() {} - - public LinkPublicIpLightForVm publicDnsName(String publicDnsName) { - - this.publicDnsName = publicDnsName; - return this; - } - - /** - * The name of the public DNS. - * - * @return publicDnsName - */ - @javax.annotation.Nullable - public String getPublicDnsName() { - return publicDnsName; - } - - public void setPublicDnsName(String publicDnsName) { - this.publicDnsName = publicDnsName; - } - - public LinkPublicIpLightForVm publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP associated with the NIC. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public LinkPublicIpLightForVm publicIpAccountId(String publicIpAccountId) { - - this.publicIpAccountId = publicIpAccountId; - return this; - } - - /** - * The account ID of the owner of the public IP. - * - * @return publicIpAccountId - */ - @javax.annotation.Nullable - public String getPublicIpAccountId() { - return publicIpAccountId; - } - - public void setPublicIpAccountId(String publicIpAccountId) { - this.publicIpAccountId = publicIpAccountId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPublicIpLightForVm linkPublicIpLightForVm = (LinkPublicIpLightForVm) o; - return Objects.equals(this.publicDnsName, linkPublicIpLightForVm.publicDnsName) - && Objects.equals(this.publicIp, linkPublicIpLightForVm.publicIp) - && Objects.equals(this.publicIpAccountId, linkPublicIpLightForVm.publicIpAccountId); - } - - @Override - public int hashCode() { - return Objects.hash(publicDnsName, publicIp, publicIpAccountId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPublicIpLightForVm {\n"); - sb.append(" publicDnsName: ").append(toIndentedString(publicDnsName)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpAccountId: ") - .append(toIndentedString(publicIpAccountId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PublicDnsName"); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpAccountId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPublicIpLightForVm - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPublicIpLightForVm.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPublicIpLightForVm is not found" - + " in the empty JSON string", - LinkPublicIpLightForVm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPublicIpLightForVm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPublicIpLightForVm` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PublicDnsName") != null && !jsonObj.get("PublicDnsName").isJsonNull()) - && !jsonObj.get("PublicDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicDnsName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicDnsName").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpAccountId") != null - && !jsonObj.get("PublicIpAccountId").isJsonNull()) - && !jsonObj.get("PublicIpAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpAccountId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PublicIpAccountId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPublicIpLightForVm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPublicIpLightForVm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPublicIpLightForVm.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPublicIpLightForVm value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPublicIpLightForVm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPublicIpLightForVm given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPublicIpLightForVm - * @throws IOException if the JSON string is invalid with respect to LinkPublicIpLightForVm - */ - public static LinkPublicIpLightForVm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPublicIpLightForVm.class); - } - - /** - * Convert an instance of LinkPublicIpLightForVm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequest.java deleted file mode 100644 index 69737b7d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequest.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPublicIpRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPublicIpRequest { - public static final String SERIALIZED_NAME_ALLOW_RELINK = "AllowRelink"; - - @SerializedName(SERIALIZED_NAME_ALLOW_RELINK) - private Boolean allowRelink; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public LinkPublicIpRequest() {} - - public LinkPublicIpRequest allowRelink(Boolean allowRelink) { - - this.allowRelink = allowRelink; - return this; - } - - /** - * If true, allows the public IP to be associated with the VM or NIC that you specify even if it - * is already associated with another VM or NIC. If false, prevents the public IP from being - * associated with the VM or NIC that you specify if it is already associated with another VM or - * NIC. (By default, true in the public Cloud, false in a Net.) - * - * @return allowRelink - */ - @javax.annotation.Nullable - public Boolean getAllowRelink() { - return allowRelink; - } - - public void setAllowRelink(Boolean allowRelink) { - this.allowRelink = allowRelink; - } - - public LinkPublicIpRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkPublicIpRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC - * attached. Otherwise, you need to specify the `VmId` parameter instead. You cannot - * specify both parameters at the same time. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public LinkPublicIpRequest privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * (Net only) The primary or secondary private IP of the specified NIC. By default, the primary - * private IP. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - public LinkPublicIpRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP. This parameter is required unless you use the `PublicIpId` - * parameter. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public LinkPublicIpRequest publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The allocation ID of the public IP. This parameter is required unless you use the - * `PublicIp` parameter. - * - * @return publicIpId - */ - @javax.annotation.Nullable - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - public LinkPublicIpRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM.<br /> - In the public Cloud, this parameter is required.<br /> - * - In a Net, this parameter is required if the VM has only one NIC. Otherwise, you need to - * specify the `NicId` parameter instead. You cannot specify both parameters at the - * same time. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPublicIpRequest linkPublicIpRequest = (LinkPublicIpRequest) o; - return Objects.equals(this.allowRelink, linkPublicIpRequest.allowRelink) - && Objects.equals(this.dryRun, linkPublicIpRequest.dryRun) - && Objects.equals(this.nicId, linkPublicIpRequest.nicId) - && Objects.equals(this.privateIp, linkPublicIpRequest.privateIp) - && Objects.equals(this.publicIp, linkPublicIpRequest.publicIp) - && Objects.equals(this.publicIpId, linkPublicIpRequest.publicIpId) - && Objects.equals(this.vmId, linkPublicIpRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(allowRelink, dryRun, nicId, privateIp, publicIp, publicIpId, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPublicIpRequest {\n"); - sb.append(" allowRelink: ").append(toIndentedString(allowRelink)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AllowRelink"); - openapiFields.add("DryRun"); - openapiFields.add("NicId"); - openapiFields.add("PrivateIp"); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPublicIpRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPublicIpRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPublicIpRequest is not found in" - + " the empty JSON string", - LinkPublicIpRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPublicIpRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPublicIpRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpId") != null && !jsonObj.get("PublicIpId").isJsonNull()) - && !jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPublicIpRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPublicIpRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPublicIpRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPublicIpRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPublicIpRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPublicIpRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPublicIpRequest - * @throws IOException if the JSON string is invalid with respect to LinkPublicIpRequest - */ - public static LinkPublicIpRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPublicIpRequest.class); - } - - /** - * Convert an instance of LinkPublicIpRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponse.java deleted file mode 100644 index 42e529a1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponse.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkPublicIpResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkPublicIpResponse { - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_ID = "LinkPublicIpId"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_ID) - private String linkPublicIpId; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkPublicIpResponse() {} - - public LinkPublicIpResponse linkPublicIpId(String linkPublicIpId) { - - this.linkPublicIpId = linkPublicIpId; - return this; - } - - /** - * (Net only) The ID representing the association of the public IP with the VM or the NIC. - * - * @return linkPublicIpId - */ - @javax.annotation.Nullable - public String getLinkPublicIpId() { - return linkPublicIpId; - } - - public void setLinkPublicIpId(String linkPublicIpId) { - this.linkPublicIpId = linkPublicIpId; - } - - public LinkPublicIpResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkPublicIpResponse linkPublicIpResponse = (LinkPublicIpResponse) o; - return Objects.equals(this.linkPublicIpId, linkPublicIpResponse.linkPublicIpId) - && Objects.equals(this.responseContext, linkPublicIpResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(linkPublicIpId, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkPublicIpResponse {\n"); - sb.append(" linkPublicIpId: ").append(toIndentedString(linkPublicIpId)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkPublicIpId"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkPublicIpResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkPublicIpResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkPublicIpResponse is not found in" - + " the empty JSON string", - LinkPublicIpResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkPublicIpResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkPublicIpResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkPublicIpId") != null && !jsonObj.get("LinkPublicIpId").isJsonNull()) - && !jsonObj.get("LinkPublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpId").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkPublicIpResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkPublicIpResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkPublicIpResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkPublicIpResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkPublicIpResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkPublicIpResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkPublicIpResponse - * @throws IOException if the JSON string is invalid with respect to LinkPublicIpResponse - */ - public static LinkPublicIpResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkPublicIpResponse.class); - } - - /** - * Convert an instance of LinkPublicIpResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTable.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTable.java deleted file mode 100644 index cf111b1e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTable.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more associations between the route table and the Subnets. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkRouteTable { - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_ID = "LinkRouteTableId"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_ID) - private String linkRouteTableId; - - public static final String SERIALIZED_NAME_MAIN = "Main"; - - @SerializedName(SERIALIZED_NAME_MAIN) - private Boolean main; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public LinkRouteTable() {} - - public LinkRouteTable linkRouteTableId(String linkRouteTableId) { - - this.linkRouteTableId = linkRouteTableId; - return this; - } - - /** - * The ID of the association between the route table and the Net or Subnet. - * - * @return linkRouteTableId - */ - @javax.annotation.Nullable - public String getLinkRouteTableId() { - return linkRouteTableId; - } - - public void setLinkRouteTableId(String linkRouteTableId) { - this.linkRouteTableId = linkRouteTableId; - } - - public LinkRouteTable main(Boolean main) { - - this.main = main; - return this; - } - - /** - * If true, the route table is the main one. - * - * @return main - */ - @javax.annotation.Nullable - public Boolean getMain() { - return main; - } - - public void setMain(Boolean main) { - this.main = main; - } - - public LinkRouteTable netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net, if the route table is not explicitly linked to a Subnet. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public LinkRouteTable routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table. - * - * @return routeTableId - */ - @javax.annotation.Nullable - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public LinkRouteTable subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet, if the route table is explicitly linked to a Subnet. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkRouteTable linkRouteTable = (LinkRouteTable) o; - return Objects.equals(this.linkRouteTableId, linkRouteTable.linkRouteTableId) - && Objects.equals(this.main, linkRouteTable.main) - && Objects.equals(this.netId, linkRouteTable.netId) - && Objects.equals(this.routeTableId, linkRouteTable.routeTableId) - && Objects.equals(this.subnetId, linkRouteTable.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(linkRouteTableId, main, netId, routeTableId, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkRouteTable {\n"); - sb.append(" linkRouteTableId: ").append(toIndentedString(linkRouteTableId)).append("\n"); - sb.append(" main: ").append(toIndentedString(main)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkRouteTableId"); - openapiFields.add("Main"); - openapiFields.add("NetId"); - openapiFields.add("RouteTableId"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkRouteTable - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkRouteTable.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkRouteTable is not found in the" - + " empty JSON string", - LinkRouteTable.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkRouteTable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkRouteTable` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkRouteTableId") != null - && !jsonObj.get("LinkRouteTableId").isJsonNull()) - && !jsonObj.get("LinkRouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTableId").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("RouteTableId") != null && !jsonObj.get("RouteTableId").isJsonNull()) - && !jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkRouteTable.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkRouteTable' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkRouteTable.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkRouteTable value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkRouteTable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkRouteTable given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkRouteTable - * @throws IOException if the JSON string is invalid with respect to LinkRouteTable - */ - public static LinkRouteTable fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkRouteTable.class); - } - - /** - * Convert an instance of LinkRouteTable to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequest.java deleted file mode 100644 index abc64085..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkRouteTableRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkRouteTableRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public LinkRouteTableRequest() {} - - public LinkRouteTableRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkRouteTableRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public LinkRouteTableRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkRouteTableRequest linkRouteTableRequest = (LinkRouteTableRequest) o; - return Objects.equals(this.dryRun, linkRouteTableRequest.dryRun) - && Objects.equals(this.routeTableId, linkRouteTableRequest.routeTableId) - && Objects.equals(this.subnetId, linkRouteTableRequest.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, routeTableId, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkRouteTableRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("RouteTableId"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("RouteTableId"); - openapiRequiredFields.add("SubnetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkRouteTableRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkRouteTableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkRouteTableRequest is not found in" - + " the empty JSON string", - LinkRouteTableRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkRouteTableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkRouteTableRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkRouteTableRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkRouteTableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkRouteTableRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkRouteTableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkRouteTableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkRouteTableRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkRouteTableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkRouteTableRequest - * @throws IOException if the JSON string is invalid with respect to LinkRouteTableRequest - */ - public static LinkRouteTableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkRouteTableRequest.class); - } - - /** - * Convert an instance of LinkRouteTableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponse.java deleted file mode 100644 index 1e199638..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponse.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkRouteTableResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkRouteTableResponse { - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_ID = "LinkRouteTableId"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_ID) - private String linkRouteTableId; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkRouteTableResponse() {} - - public LinkRouteTableResponse linkRouteTableId(String linkRouteTableId) { - - this.linkRouteTableId = linkRouteTableId; - return this; - } - - /** - * The ID of the association between the route table and the Subnet. - * - * @return linkRouteTableId - */ - @javax.annotation.Nullable - public String getLinkRouteTableId() { - return linkRouteTableId; - } - - public void setLinkRouteTableId(String linkRouteTableId) { - this.linkRouteTableId = linkRouteTableId; - } - - public LinkRouteTableResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkRouteTableResponse linkRouteTableResponse = (LinkRouteTableResponse) o; - return Objects.equals(this.linkRouteTableId, linkRouteTableResponse.linkRouteTableId) - && Objects.equals(this.responseContext, linkRouteTableResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(linkRouteTableId, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkRouteTableResponse {\n"); - sb.append(" linkRouteTableId: ").append(toIndentedString(linkRouteTableId)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkRouteTableId"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkRouteTableResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkRouteTableResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkRouteTableResponse is not found" - + " in the empty JSON string", - LinkRouteTableResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkRouteTableResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkRouteTableResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkRouteTableId") != null - && !jsonObj.get("LinkRouteTableId").isJsonNull()) - && !jsonObj.get("LinkRouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTableId").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkRouteTableResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkRouteTableResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkRouteTableResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkRouteTableResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkRouteTableResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkRouteTableResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkRouteTableResponse - * @throws IOException if the JSON string is invalid with respect to LinkRouteTableResponse - */ - public static LinkRouteTableResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkRouteTableResponse.class); - } - - /** - * Convert an instance of LinkRouteTableResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequest.java deleted file mode 100644 index 5956f458..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequest.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkVirtualGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkVirtualGatewayRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public LinkVirtualGatewayRequest() {} - - public LinkVirtualGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkVirtualGatewayRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net to which you want to attach the virtual gateway. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public LinkVirtualGatewayRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkVirtualGatewayRequest linkVirtualGatewayRequest = (LinkVirtualGatewayRequest) o; - return Objects.equals(this.dryRun, linkVirtualGatewayRequest.dryRun) - && Objects.equals(this.netId, linkVirtualGatewayRequest.netId) - && Objects.equals( - this.virtualGatewayId, linkVirtualGatewayRequest.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netId, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkVirtualGatewayRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetId"); - openapiRequiredFields.add("VirtualGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkVirtualGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkVirtualGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkVirtualGatewayRequest is not" - + " found in the empty JSON string", - LinkVirtualGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkVirtualGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkVirtualGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkVirtualGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkVirtualGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkVirtualGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkVirtualGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkVirtualGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkVirtualGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkVirtualGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkVirtualGatewayRequest - * @throws IOException if the JSON string is invalid with respect to LinkVirtualGatewayRequest - */ - public static LinkVirtualGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkVirtualGatewayRequest.class); - } - - /** - * Convert an instance of LinkVirtualGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponse.java deleted file mode 100644 index f176adbe..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponse.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkVirtualGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkVirtualGatewayResponse { - public static final String SERIALIZED_NAME_NET_TO_VIRTUAL_GATEWAY_LINK = - "NetToVirtualGatewayLink"; - - @SerializedName(SERIALIZED_NAME_NET_TO_VIRTUAL_GATEWAY_LINK) - private NetToVirtualGatewayLink netToVirtualGatewayLink; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkVirtualGatewayResponse() {} - - public LinkVirtualGatewayResponse netToVirtualGatewayLink( - NetToVirtualGatewayLink netToVirtualGatewayLink) { - - this.netToVirtualGatewayLink = netToVirtualGatewayLink; - return this; - } - - /** - * Get netToVirtualGatewayLink - * - * @return netToVirtualGatewayLink - */ - @javax.annotation.Nullable - public NetToVirtualGatewayLink getNetToVirtualGatewayLink() { - return netToVirtualGatewayLink; - } - - public void setNetToVirtualGatewayLink(NetToVirtualGatewayLink netToVirtualGatewayLink) { - this.netToVirtualGatewayLink = netToVirtualGatewayLink; - } - - public LinkVirtualGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkVirtualGatewayResponse linkVirtualGatewayResponse = (LinkVirtualGatewayResponse) o; - return Objects.equals( - this.netToVirtualGatewayLink, - linkVirtualGatewayResponse.netToVirtualGatewayLink) - && Objects.equals(this.responseContext, linkVirtualGatewayResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netToVirtualGatewayLink, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkVirtualGatewayResponse {\n"); - sb.append(" netToVirtualGatewayLink: ") - .append(toIndentedString(netToVirtualGatewayLink)) - .append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetToVirtualGatewayLink"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkVirtualGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkVirtualGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkVirtualGatewayResponse is not" - + " found in the empty JSON string", - LinkVirtualGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkVirtualGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkVirtualGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NetToVirtualGatewayLink` - if (jsonObj.get("NetToVirtualGatewayLink") != null - && !jsonObj.get("NetToVirtualGatewayLink").isJsonNull()) { - NetToVirtualGatewayLink.validateJsonObject( - jsonObj.getAsJsonObject("NetToVirtualGatewayLink")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkVirtualGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkVirtualGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkVirtualGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkVirtualGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkVirtualGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkVirtualGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkVirtualGatewayResponse - * @throws IOException if the JSON string is invalid with respect to LinkVirtualGatewayResponse - */ - public static LinkVirtualGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkVirtualGatewayResponse.class); - } - - /** - * Convert an instance of LinkVirtualGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequest.java deleted file mode 100644 index 146d715d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequest.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkVolumeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkVolumeRequest { - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public LinkVolumeRequest() {} - - public LinkVolumeRequest deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The name of the device. For a root device, you must use `/dev/sda1`. For other - * volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or - * `/dev/xvdXX` (where the first `X` is a letter between `b` and - * `z`, and the second `X` is a letter between `a` and - * `z`). - * - * @return deviceName - */ - @javax.annotation.Nonnull - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public LinkVolumeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public LinkVolumeRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM you want to attach the volume to. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - public LinkVolumeRequest volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume you want to attach. - * - * @return volumeId - */ - @javax.annotation.Nonnull - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkVolumeRequest linkVolumeRequest = (LinkVolumeRequest) o; - return Objects.equals(this.deviceName, linkVolumeRequest.deviceName) - && Objects.equals(this.dryRun, linkVolumeRequest.dryRun) - && Objects.equals(this.vmId, linkVolumeRequest.vmId) - && Objects.equals(this.volumeId, linkVolumeRequest.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(deviceName, dryRun, vmId, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkVolumeRequest {\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeviceName"); - openapiFields.add("DryRun"); - openapiFields.add("VmId"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DeviceName"); - openapiRequiredFields.add("VmId"); - openapiRequiredFields.add("VolumeId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkVolumeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkVolumeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkVolumeRequest is not found in the" - + " empty JSON string", - LinkVolumeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkVolumeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkVolumeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LinkVolumeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - if (!jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkVolumeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkVolumeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkVolumeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkVolumeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkVolumeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkVolumeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkVolumeRequest - * @throws IOException if the JSON string is invalid with respect to LinkVolumeRequest - */ - public static LinkVolumeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkVolumeRequest.class); - } - - /** - * Convert an instance of LinkVolumeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponse.java deleted file mode 100644 index c7d31077..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** LinkVolumeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkVolumeResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public LinkVolumeResponse() {} - - public LinkVolumeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkVolumeResponse linkVolumeResponse = (LinkVolumeResponse) o; - return Objects.equals(this.responseContext, linkVolumeResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkVolumeResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkVolumeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkVolumeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkVolumeResponse is not found in" - + " the empty JSON string", - LinkVolumeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkVolumeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkVolumeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkVolumeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkVolumeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkVolumeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkVolumeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkVolumeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkVolumeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkVolumeResponse - * @throws IOException if the JSON string is invalid with respect to LinkVolumeResponse - */ - public static LinkVolumeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkVolumeResponse.class); - } - - /** - * Convert an instance of LinkVolumeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicy.java deleted file mode 100644 index 44435b90..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicy.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the linked policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkedPolicy { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_ORN = "Orn"; - - @SerializedName(SERIALIZED_NAME_ORN) - private String orn; - - public static final String SERIALIZED_NAME_POLICY_ID = "PolicyId"; - - @SerializedName(SERIALIZED_NAME_POLICY_ID) - private String policyId; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public LinkedPolicy() {} - - public LinkedPolicy creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the linked policy was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public LinkedPolicy lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) at which the linked policy was last modified. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public LinkedPolicy orn(String orn) { - - this.orn = orn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return orn - */ - @javax.annotation.Nullable - public String getOrn() { - return orn; - } - - public void setOrn(String orn) { - this.orn = orn; - } - - public LinkedPolicy policyId(String policyId) { - - this.policyId = policyId; - return this; - } - - /** - * The ID of the policy. - * - * @return policyId - */ - @javax.annotation.Nullable - public String getPolicyId() { - return policyId; - } - - public void setPolicyId(String policyId) { - this.policyId = policyId; - } - - public LinkedPolicy policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy. - * - * @return policyName - */ - @javax.annotation.Nullable - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkedPolicy linkedPolicy = (LinkedPolicy) o; - return Objects.equals(this.creationDate, linkedPolicy.creationDate) - && Objects.equals(this.lastModificationDate, linkedPolicy.lastModificationDate) - && Objects.equals(this.orn, linkedPolicy.orn) - && Objects.equals(this.policyId, linkedPolicy.policyId) - && Objects.equals(this.policyName, linkedPolicy.policyName); - } - - @Override - public int hashCode() { - return Objects.hash(creationDate, lastModificationDate, orn, policyId, policyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkedPolicy {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" orn: ").append(toIndentedString(orn)).append("\n"); - sb.append(" policyId: ").append(toIndentedString(policyId)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("LastModificationDate"); - openapiFields.add("Orn"); - openapiFields.add("PolicyId"); - openapiFields.add("PolicyName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkedPolicy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkedPolicy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkedPolicy is not found in the" - + " empty JSON string", - LinkedPolicy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkedPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkedPolicy` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Orn") != null && !jsonObj.get("Orn").isJsonNull()) - && !jsonObj.get("Orn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Orn` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Orn").toString())); - } - if ((jsonObj.get("PolicyId") != null && !jsonObj.get("PolicyId").isJsonNull()) - && !jsonObj.get("PolicyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyId").toString())); - } - if ((jsonObj.get("PolicyName") != null && !jsonObj.get("PolicyName").isJsonNull()) - && !jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkedPolicy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkedPolicy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkedPolicy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkedPolicy value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkedPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkedPolicy given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkedPolicy - * @throws IOException if the JSON string is invalid with respect to LinkedPolicy - */ - public static LinkedPolicy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkedPolicy.class); - } - - /** - * Convert an instance of LinkedPolicy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolume.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolume.java deleted file mode 100644 index f7392247..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolume.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about volume attachment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LinkedVolume { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_DEVICE_NAME = "DeviceName"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NAME) - private String deviceName; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public LinkedVolume() {} - - public LinkedVolume deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the volume is deleted when terminating the VM. If false, the volume is not deleted - * when terminating the VM. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public LinkedVolume deviceName(String deviceName) { - - this.deviceName = deviceName; - return this; - } - - /** - * The name of the device. - * - * @return deviceName - */ - @javax.annotation.Nullable - public String getDeviceName() { - return deviceName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public LinkedVolume state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the attachment of the volume (`attaching` \\| `detaching` - * \\| `attached` \\| `detached`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public LinkedVolume vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - public LinkedVolume volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkedVolume linkedVolume = (LinkedVolume) o; - return Objects.equals(this.deleteOnVmDeletion, linkedVolume.deleteOnVmDeletion) - && Objects.equals(this.deviceName, linkedVolume.deviceName) - && Objects.equals(this.state, linkedVolume.state) - && Objects.equals(this.vmId, linkedVolume.vmId) - && Objects.equals(this.volumeId, linkedVolume.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, deviceName, state, vmId, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LinkedVolume {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" deviceName: ").append(toIndentedString(deviceName)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("DeviceName"); - openapiFields.add("State"); - openapiFields.add("VmId"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LinkedVolume - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LinkedVolume.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LinkedVolume is not found in the" - + " empty JSON string", - LinkedVolume.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LinkedVolume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LinkedVolume` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DeviceName") != null && !jsonObj.get("DeviceName").isJsonNull()) - && !jsonObj.get("DeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DeviceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DeviceName").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LinkedVolume.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LinkedVolume' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LinkedVolume.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LinkedVolume value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LinkedVolume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LinkedVolume given an JSON string - * - * @param jsonString JSON string - * @return An instance of LinkedVolume - * @throws IOException if the JSON string is invalid with respect to LinkedVolume - */ - public static LinkedVolume fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LinkedVolume.class); - } - - /** - * Convert an instance of LinkedVolume to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Listener.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Listener.java deleted file mode 100644 index 41891d25..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Listener.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the listener. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Listener { - public static final String SERIALIZED_NAME_BACKEND_PORT = "BackendPort"; - - @SerializedName(SERIALIZED_NAME_BACKEND_PORT) - private Integer backendPort; - - public static final String SERIALIZED_NAME_BACKEND_PROTOCOL = "BackendProtocol"; - - @SerializedName(SERIALIZED_NAME_BACKEND_PROTOCOL) - private String backendProtocol; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PORT = "LoadBalancerPort"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PORT) - private Integer loadBalancerPort; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PROTOCOL = "LoadBalancerProtocol"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PROTOCOL) - private String loadBalancerProtocol; - - public static final String SERIALIZED_NAME_POLICY_NAMES = "PolicyNames"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAMES) - private List policyNames = null; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATE_ID = "ServerCertificateId"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATE_ID) - private String serverCertificateId; - - public Listener() {} - - public Listener backendPort(Integer backendPort) { - - this.backendPort = backendPort; - return this; - } - - /** - * The port on which the backend VM is listening (between `1` and `65535`, - * both included). - * - * @return backendPort - */ - @javax.annotation.Nullable - public Integer getBackendPort() { - return backendPort; - } - - public void setBackendPort(Integer backendPort) { - this.backendPort = backendPort; - } - - public Listener backendProtocol(String backendProtocol) { - - this.backendProtocol = backendProtocol; - return this; - } - - /** - * The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| - * `TCP` \\| `SSL`). - * - * @return backendProtocol - */ - @javax.annotation.Nullable - public String getBackendProtocol() { - return backendProtocol; - } - - public void setBackendProtocol(String backendProtocol) { - this.backendProtocol = backendProtocol; - } - - public Listener loadBalancerPort(Integer loadBalancerPort) { - - this.loadBalancerPort = loadBalancerPort; - return this; - } - - /** - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). - * - * @return loadBalancerPort - */ - @javax.annotation.Nullable - public Integer getLoadBalancerPort() { - return loadBalancerPort; - } - - public void setLoadBalancerPort(Integer loadBalancerPort) { - this.loadBalancerPort = loadBalancerPort; - } - - public Listener loadBalancerProtocol(String loadBalancerProtocol) { - - this.loadBalancerProtocol = loadBalancerProtocol; - return this; - } - - /** - * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| - * `SSL`). - * - * @return loadBalancerProtocol - */ - @javax.annotation.Nullable - public String getLoadBalancerProtocol() { - return loadBalancerProtocol; - } - - public void setLoadBalancerProtocol(String loadBalancerProtocol) { - this.loadBalancerProtocol = loadBalancerProtocol; - } - - public Listener policyNames(List policyNames) { - - this.policyNames = policyNames; - return this; - } - - public Listener addPolicyNamesItem(String policyNamesItem) { - if (this.policyNames == null) { - this.policyNames = new ArrayList<>(); - } - this.policyNames.add(policyNamesItem); - return this; - } - - /** - * The names of the policies. If there are no policies enabled, the list is empty. - * - * @return policyNames - */ - @javax.annotation.Nullable - public List getPolicyNames() { - return policyNames; - } - - public void setPolicyNames(List policyNames) { - this.policyNames = policyNames; - } - - public Listener serverCertificateId(String serverCertificateId) { - - this.serverCertificateId = serverCertificateId; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see - * [Resource Identifiers > OUTSCALE Resource Names - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). - * - * @return serverCertificateId - */ - @javax.annotation.Nullable - public String getServerCertificateId() { - return serverCertificateId; - } - - public void setServerCertificateId(String serverCertificateId) { - this.serverCertificateId = serverCertificateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Listener listener = (Listener) o; - return Objects.equals(this.backendPort, listener.backendPort) - && Objects.equals(this.backendProtocol, listener.backendProtocol) - && Objects.equals(this.loadBalancerPort, listener.loadBalancerPort) - && Objects.equals(this.loadBalancerProtocol, listener.loadBalancerProtocol) - && Objects.equals(this.policyNames, listener.policyNames) - && Objects.equals(this.serverCertificateId, listener.serverCertificateId); - } - - @Override - public int hashCode() { - return Objects.hash( - backendPort, - backendProtocol, - loadBalancerPort, - loadBalancerProtocol, - policyNames, - serverCertificateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Listener {\n"); - sb.append(" backendPort: ").append(toIndentedString(backendPort)).append("\n"); - sb.append(" backendProtocol: ").append(toIndentedString(backendProtocol)).append("\n"); - sb.append(" loadBalancerPort: ").append(toIndentedString(loadBalancerPort)).append("\n"); - sb.append(" loadBalancerProtocol: ") - .append(toIndentedString(loadBalancerProtocol)) - .append("\n"); - sb.append(" policyNames: ").append(toIndentedString(policyNames)).append("\n"); - sb.append(" serverCertificateId: ") - .append(toIndentedString(serverCertificateId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendPort"); - openapiFields.add("BackendProtocol"); - openapiFields.add("LoadBalancerPort"); - openapiFields.add("LoadBalancerProtocol"); - openapiFields.add("PolicyNames"); - openapiFields.add("ServerCertificateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Listener - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Listener.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Listener is not found in the empty" - + " JSON string", - Listener.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Listener.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Listener` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("BackendProtocol") != null && !jsonObj.get("BackendProtocol").isJsonNull()) - && !jsonObj.get("BackendProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendProtocol` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("BackendProtocol").toString())); - } - if ((jsonObj.get("LoadBalancerProtocol") != null - && !jsonObj.get("LoadBalancerProtocol").isJsonNull()) - && !jsonObj.get("LoadBalancerProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerProtocol` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("LoadBalancerProtocol").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PolicyNames") != null && !jsonObj.get("PolicyNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("PolicyNames").toString())); - } - if ((jsonObj.get("ServerCertificateId") != null - && !jsonObj.get("ServerCertificateId").isJsonNull()) - && !jsonObj.get("ServerCertificateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServerCertificateId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("ServerCertificateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Listener.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Listener' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Listener.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Listener value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Listener read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Listener given an JSON string - * - * @param jsonString JSON string - * @return An instance of Listener - * @throws IOException if the JSON string is invalid with respect to Listener - */ - public static Listener fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Listener.class); - } - - /** - * Convert an instance of Listener to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreation.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreation.java deleted file mode 100644 index c7e6511d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreation.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the listener to create. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListenerForCreation { - public static final String SERIALIZED_NAME_BACKEND_PORT = "BackendPort"; - - @SerializedName(SERIALIZED_NAME_BACKEND_PORT) - private Integer backendPort; - - public static final String SERIALIZED_NAME_BACKEND_PROTOCOL = "BackendProtocol"; - - @SerializedName(SERIALIZED_NAME_BACKEND_PROTOCOL) - private String backendProtocol; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PORT = "LoadBalancerPort"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PORT) - private Integer loadBalancerPort; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PROTOCOL = "LoadBalancerProtocol"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PROTOCOL) - private String loadBalancerProtocol; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATE_ID = "ServerCertificateId"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATE_ID) - private String serverCertificateId; - - public ListenerForCreation() {} - - public ListenerForCreation backendPort(Integer backendPort) { - - this.backendPort = backendPort; - return this; - } - - /** - * The port on which the backend VM is listening (between `1` and `65535`, - * both included). - * - * @return backendPort - */ - @javax.annotation.Nonnull - public Integer getBackendPort() { - return backendPort; - } - - public void setBackendPort(Integer backendPort) { - this.backendPort = backendPort; - } - - public ListenerForCreation backendProtocol(String backendProtocol) { - - this.backendProtocol = backendProtocol; - return this; - } - - /** - * The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| - * `TCP` \\| `SSL`). - * - * @return backendProtocol - */ - @javax.annotation.Nullable - public String getBackendProtocol() { - return backendProtocol; - } - - public void setBackendProtocol(String backendProtocol) { - this.backendProtocol = backendProtocol; - } - - public ListenerForCreation loadBalancerPort(Integer loadBalancerPort) { - - this.loadBalancerPort = loadBalancerPort; - return this; - } - - /** - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). - * - * @return loadBalancerPort - */ - @javax.annotation.Nonnull - public Integer getLoadBalancerPort() { - return loadBalancerPort; - } - - public void setLoadBalancerPort(Integer loadBalancerPort) { - this.loadBalancerPort = loadBalancerPort; - } - - public ListenerForCreation loadBalancerProtocol(String loadBalancerProtocol) { - - this.loadBalancerProtocol = loadBalancerProtocol; - return this; - } - - /** - * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| - * `SSL`). - * - * @return loadBalancerProtocol - */ - @javax.annotation.Nonnull - public String getLoadBalancerProtocol() { - return loadBalancerProtocol; - } - - public void setLoadBalancerProtocol(String loadBalancerProtocol) { - this.loadBalancerProtocol = loadBalancerProtocol; - } - - public ListenerForCreation serverCertificateId(String serverCertificateId) { - - this.serverCertificateId = serverCertificateId; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see - * [Resource Identifiers > OUTSCALE Resource Names - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). - * - * @return serverCertificateId - */ - @javax.annotation.Nullable - public String getServerCertificateId() { - return serverCertificateId; - } - - public void setServerCertificateId(String serverCertificateId) { - this.serverCertificateId = serverCertificateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListenerForCreation listenerForCreation = (ListenerForCreation) o; - return Objects.equals(this.backendPort, listenerForCreation.backendPort) - && Objects.equals(this.backendProtocol, listenerForCreation.backendProtocol) - && Objects.equals(this.loadBalancerPort, listenerForCreation.loadBalancerPort) - && Objects.equals( - this.loadBalancerProtocol, listenerForCreation.loadBalancerProtocol) - && Objects.equals( - this.serverCertificateId, listenerForCreation.serverCertificateId); - } - - @Override - public int hashCode() { - return Objects.hash( - backendPort, - backendProtocol, - loadBalancerPort, - loadBalancerProtocol, - serverCertificateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListenerForCreation {\n"); - sb.append(" backendPort: ").append(toIndentedString(backendPort)).append("\n"); - sb.append(" backendProtocol: ").append(toIndentedString(backendProtocol)).append("\n"); - sb.append(" loadBalancerPort: ").append(toIndentedString(loadBalancerPort)).append("\n"); - sb.append(" loadBalancerProtocol: ") - .append(toIndentedString(loadBalancerProtocol)) - .append("\n"); - sb.append(" serverCertificateId: ") - .append(toIndentedString(serverCertificateId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendPort"); - openapiFields.add("BackendProtocol"); - openapiFields.add("LoadBalancerPort"); - openapiFields.add("LoadBalancerProtocol"); - openapiFields.add("ServerCertificateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("BackendPort"); - openapiRequiredFields.add("LoadBalancerPort"); - openapiRequiredFields.add("LoadBalancerProtocol"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ListenerForCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ListenerForCreation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ListenerForCreation is not found in" - + " the empty JSON string", - ListenerForCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ListenerForCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ListenerForCreation` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ListenerForCreation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("BackendProtocol") != null && !jsonObj.get("BackendProtocol").isJsonNull()) - && !jsonObj.get("BackendProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendProtocol` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("BackendProtocol").toString())); - } - if (!jsonObj.get("LoadBalancerProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerProtocol` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("LoadBalancerProtocol").toString())); - } - if ((jsonObj.get("ServerCertificateId") != null - && !jsonObj.get("ServerCertificateId").isJsonNull()) - && !jsonObj.get("ServerCertificateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServerCertificateId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("ServerCertificateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListenerForCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListenerForCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ListenerForCreation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ListenerForCreation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListenerForCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ListenerForCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListenerForCreation - * @throws IOException if the JSON string is invalid with respect to ListenerForCreation - */ - public static ListenerForCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListenerForCreation.class); - } - - /** - * Convert an instance of ListenerForCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRule.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRule.java deleted file mode 100644 index f91dadff..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRule.java +++ /dev/null @@ -1,449 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the listener rule. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListenerRule { - public static final String SERIALIZED_NAME_ACTION = "Action"; - - @SerializedName(SERIALIZED_NAME_ACTION) - private String action; - - public static final String SERIALIZED_NAME_HOST_NAME_PATTERN = "HostNamePattern"; - - @SerializedName(SERIALIZED_NAME_HOST_NAME_PATTERN) - private String hostNamePattern; - - public static final String SERIALIZED_NAME_LISTENER_ID = "ListenerId"; - - @SerializedName(SERIALIZED_NAME_LISTENER_ID) - private Integer listenerId; - - public static final String SERIALIZED_NAME_LISTENER_RULE_ID = "ListenerRuleId"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_ID) - private Integer listenerRuleId; - - public static final String SERIALIZED_NAME_LISTENER_RULE_NAME = "ListenerRuleName"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_NAME) - private String listenerRuleName; - - public static final String SERIALIZED_NAME_PATH_PATTERN = "PathPattern"; - - @SerializedName(SERIALIZED_NAME_PATH_PATTERN) - private String pathPattern; - - public static final String SERIALIZED_NAME_PRIORITY = "Priority"; - - @SerializedName(SERIALIZED_NAME_PRIORITY) - private Integer priority; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public ListenerRule() {} - - public ListenerRule action(String action) { - - this.action = action; - return this; - } - - /** - * The type of action for the rule (always `forward`). - * - * @return action - */ - @javax.annotation.Nullable - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public ListenerRule hostNamePattern(String hostNamePattern) { - - this.hostNamePattern = hostNamePattern; - return this; - } - - /** - * A host-name pattern for the rule, with a maximum length of 128 characters. This host-name - * pattern supports maximum three wildcards, and must not contain any special characters except - * [-.?]. - * - * @return hostNamePattern - */ - @javax.annotation.Nullable - public String getHostNamePattern() { - return hostNamePattern; - } - - public void setHostNamePattern(String hostNamePattern) { - this.hostNamePattern = hostNamePattern; - } - - public ListenerRule listenerId(Integer listenerId) { - - this.listenerId = listenerId; - return this; - } - - /** - * The ID of the listener. - * - * @return listenerId - */ - @javax.annotation.Nullable - public Integer getListenerId() { - return listenerId; - } - - public void setListenerId(Integer listenerId) { - this.listenerId = listenerId; - } - - public ListenerRule listenerRuleId(Integer listenerRuleId) { - - this.listenerRuleId = listenerRuleId; - return this; - } - - /** - * The ID of the listener rule. - * - * @return listenerRuleId - */ - @javax.annotation.Nullable - public Integer getListenerRuleId() { - return listenerRuleId; - } - - public void setListenerRuleId(Integer listenerRuleId) { - this.listenerRuleId = listenerRuleId; - } - - public ListenerRule listenerRuleName(String listenerRuleName) { - - this.listenerRuleName = listenerRuleName; - return this; - } - - /** - * A human-readable name for the listener rule. - * - * @return listenerRuleName - */ - @javax.annotation.Nullable - public String getListenerRuleName() { - return listenerRuleName; - } - - public void setListenerRuleName(String listenerRuleName) { - this.listenerRuleName = listenerRuleName; - } - - public ListenerRule pathPattern(String pathPattern) { - - this.pathPattern = pathPattern; - return this; - } - - /** - * A path pattern for the rule, with a maximum length of 128 characters. This path pattern - * supports maximum three wildcards, and must not contain any special characters except - * [_-.$/~&quot;'@:+?]. - * - * @return pathPattern - */ - @javax.annotation.Nullable - public String getPathPattern() { - return pathPattern; - } - - public void setPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - } - - public ListenerRule priority(Integer priority) { - - this.priority = priority; - return this; - } - - /** - * The priority level of the listener rule, between `1` and `19999` both - * included. Each rule must have a unique priority level. Otherwise, an error is returned. - * - * @return priority - */ - @javax.annotation.Nullable - public Integer getPriority() { - return priority; - } - - public void setPriority(Integer priority) { - this.priority = priority; - } - - public ListenerRule vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public ListenerRule addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * The IDs of the backend VMs. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListenerRule listenerRule = (ListenerRule) o; - return Objects.equals(this.action, listenerRule.action) - && Objects.equals(this.hostNamePattern, listenerRule.hostNamePattern) - && Objects.equals(this.listenerId, listenerRule.listenerId) - && Objects.equals(this.listenerRuleId, listenerRule.listenerRuleId) - && Objects.equals(this.listenerRuleName, listenerRule.listenerRuleName) - && Objects.equals(this.pathPattern, listenerRule.pathPattern) - && Objects.equals(this.priority, listenerRule.priority) - && Objects.equals(this.vmIds, listenerRule.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash( - action, - hostNamePattern, - listenerId, - listenerRuleId, - listenerRuleName, - pathPattern, - priority, - vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListenerRule {\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" hostNamePattern: ").append(toIndentedString(hostNamePattern)).append("\n"); - sb.append(" listenerId: ").append(toIndentedString(listenerId)).append("\n"); - sb.append(" listenerRuleId: ").append(toIndentedString(listenerRuleId)).append("\n"); - sb.append(" listenerRuleName: ").append(toIndentedString(listenerRuleName)).append("\n"); - sb.append(" pathPattern: ").append(toIndentedString(pathPattern)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Action"); - openapiFields.add("HostNamePattern"); - openapiFields.add("ListenerId"); - openapiFields.add("ListenerRuleId"); - openapiFields.add("ListenerRuleName"); - openapiFields.add("PathPattern"); - openapiFields.add("Priority"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ListenerRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ListenerRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ListenerRule is not found in the" - + " empty JSON string", - ListenerRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ListenerRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ListenerRule` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Action") != null && !jsonObj.get("Action").isJsonNull()) - && !jsonObj.get("Action").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Action` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Action").toString())); - } - if ((jsonObj.get("HostNamePattern") != null && !jsonObj.get("HostNamePattern").isJsonNull()) - && !jsonObj.get("HostNamePattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `HostNamePattern` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("HostNamePattern").toString())); - } - if ((jsonObj.get("ListenerRuleName") != null - && !jsonObj.get("ListenerRuleName").isJsonNull()) - && !jsonObj.get("ListenerRuleName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRuleName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ListenerRuleName").toString())); - } - if ((jsonObj.get("PathPattern") != null && !jsonObj.get("PathPattern").isJsonNull()) - && !jsonObj.get("PathPattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPattern").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListenerRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListenerRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ListenerRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ListenerRule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListenerRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ListenerRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListenerRule - * @throws IOException if the JSON string is invalid with respect to ListenerRule - */ - public static ListenerRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListenerRule.class); - } - - /** - * Convert an instance of ListenerRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreation.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreation.java deleted file mode 100644 index be5e2656..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreation.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the listener rule. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListenerRuleForCreation { - public static final String SERIALIZED_NAME_ACTION = "Action"; - - @SerializedName(SERIALIZED_NAME_ACTION) - private String action; - - public static final String SERIALIZED_NAME_HOST_NAME_PATTERN = "HostNamePattern"; - - @SerializedName(SERIALIZED_NAME_HOST_NAME_PATTERN) - private String hostNamePattern; - - public static final String SERIALIZED_NAME_LISTENER_RULE_NAME = "ListenerRuleName"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_NAME) - private String listenerRuleName; - - public static final String SERIALIZED_NAME_PATH_PATTERN = "PathPattern"; - - @SerializedName(SERIALIZED_NAME_PATH_PATTERN) - private String pathPattern; - - public static final String SERIALIZED_NAME_PRIORITY = "Priority"; - - @SerializedName(SERIALIZED_NAME_PRIORITY) - private Integer priority; - - public ListenerRuleForCreation() {} - - public ListenerRuleForCreation action(String action) { - - this.action = action; - return this; - } - - /** - * The type of action for the rule (always `forward`). - * - * @return action - */ - @javax.annotation.Nullable - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public ListenerRuleForCreation hostNamePattern(String hostNamePattern) { - - this.hostNamePattern = hostNamePattern; - return this; - } - - /** - * A host-name pattern for the rule, with a maximum length of 128 characters. This host-name - * pattern supports maximum three wildcards, and must not contain any special characters except - * [-.?]. - * - * @return hostNamePattern - */ - @javax.annotation.Nullable - public String getHostNamePattern() { - return hostNamePattern; - } - - public void setHostNamePattern(String hostNamePattern) { - this.hostNamePattern = hostNamePattern; - } - - public ListenerRuleForCreation listenerRuleName(String listenerRuleName) { - - this.listenerRuleName = listenerRuleName; - return this; - } - - /** - * A human-readable name for the listener rule. - * - * @return listenerRuleName - */ - @javax.annotation.Nonnull - public String getListenerRuleName() { - return listenerRuleName; - } - - public void setListenerRuleName(String listenerRuleName) { - this.listenerRuleName = listenerRuleName; - } - - public ListenerRuleForCreation pathPattern(String pathPattern) { - - this.pathPattern = pathPattern; - return this; - } - - /** - * A path pattern for the rule, with a maximum length of 128 characters. This path pattern - * supports maximum three wildcards, and must not contain any special characters except - * [_-.$/~&quot;'@:+?]. - * - * @return pathPattern - */ - @javax.annotation.Nullable - public String getPathPattern() { - return pathPattern; - } - - public void setPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - } - - public ListenerRuleForCreation priority(Integer priority) { - - this.priority = priority; - return this; - } - - /** - * The priority level of the listener rule, between `1` and `19999` both - * included. Each rule must have a unique priority level. Otherwise, an error is returned. - * - * @return priority - */ - @javax.annotation.Nonnull - public Integer getPriority() { - return priority; - } - - public void setPriority(Integer priority) { - this.priority = priority; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListenerRuleForCreation listenerRuleForCreation = (ListenerRuleForCreation) o; - return Objects.equals(this.action, listenerRuleForCreation.action) - && Objects.equals(this.hostNamePattern, listenerRuleForCreation.hostNamePattern) - && Objects.equals(this.listenerRuleName, listenerRuleForCreation.listenerRuleName) - && Objects.equals(this.pathPattern, listenerRuleForCreation.pathPattern) - && Objects.equals(this.priority, listenerRuleForCreation.priority); - } - - @Override - public int hashCode() { - return Objects.hash(action, hostNamePattern, listenerRuleName, pathPattern, priority); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListenerRuleForCreation {\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" hostNamePattern: ").append(toIndentedString(hostNamePattern)).append("\n"); - sb.append(" listenerRuleName: ").append(toIndentedString(listenerRuleName)).append("\n"); - sb.append(" pathPattern: ").append(toIndentedString(pathPattern)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Action"); - openapiFields.add("HostNamePattern"); - openapiFields.add("ListenerRuleName"); - openapiFields.add("PathPattern"); - openapiFields.add("Priority"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ListenerRuleName"); - openapiRequiredFields.add("Priority"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ListenerRuleForCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ListenerRuleForCreation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ListenerRuleForCreation is not found" - + " in the empty JSON string", - ListenerRuleForCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ListenerRuleForCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ListenerRuleForCreation` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ListenerRuleForCreation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Action") != null && !jsonObj.get("Action").isJsonNull()) - && !jsonObj.get("Action").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Action` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Action").toString())); - } - if ((jsonObj.get("HostNamePattern") != null && !jsonObj.get("HostNamePattern").isJsonNull()) - && !jsonObj.get("HostNamePattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `HostNamePattern` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("HostNamePattern").toString())); - } - if (!jsonObj.get("ListenerRuleName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRuleName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ListenerRuleName").toString())); - } - if ((jsonObj.get("PathPattern") != null && !jsonObj.get("PathPattern").isJsonNull()) - && !jsonObj.get("PathPattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPattern").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListenerRuleForCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListenerRuleForCreation' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ListenerRuleForCreation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ListenerRuleForCreation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListenerRuleForCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ListenerRuleForCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListenerRuleForCreation - * @throws IOException if the JSON string is invalid with respect to ListenerRuleForCreation - */ - public static ListenerRuleForCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListenerRuleForCreation.class); - } - - /** - * Convert an instance of ListenerRuleForCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancer.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancer.java deleted file mode 100644 index a6f7d459..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancer.java +++ /dev/null @@ -1,957 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the load balancer. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LoadBalancer { - public static final String SERIALIZED_NAME_ACCESS_LOG = "AccessLog"; - - @SerializedName(SERIALIZED_NAME_ACCESS_LOG) - private AccessLog accessLog; - - public static final String SERIALIZED_NAME_APPLICATION_STICKY_COOKIE_POLICIES = - "ApplicationStickyCookiePolicies"; - - @SerializedName(SERIALIZED_NAME_APPLICATION_STICKY_COOKIE_POLICIES) - private List applicationStickyCookiePolicies = null; - - public static final String SERIALIZED_NAME_BACKEND_IPS = "BackendIps"; - - @SerializedName(SERIALIZED_NAME_BACKEND_IPS) - private List backendIps = null; - - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = null; - - public static final String SERIALIZED_NAME_DNS_NAME = "DnsName"; - - @SerializedName(SERIALIZED_NAME_DNS_NAME) - private String dnsName; - - public static final String SERIALIZED_NAME_HEALTH_CHECK = "HealthCheck"; - - @SerializedName(SERIALIZED_NAME_HEALTH_CHECK) - private HealthCheck healthCheck; - - public static final String SERIALIZED_NAME_LISTENERS = "Listeners"; - - @SerializedName(SERIALIZED_NAME_LISTENERS) - private List listeners = null; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_STICKY_COOKIE_POLICIES = - "LoadBalancerStickyCookiePolicies"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_STICKY_COOKIE_POLICIES) - private List loadBalancerStickyCookiePolicies = null; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_TYPE = "LoadBalancerType"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_TYPE) - private String loadBalancerType; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_SECURED_COOKIES = "SecuredCookies"; - - @SerializedName(SERIALIZED_NAME_SECURED_COOKIES) - private Boolean securedCookies; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_SOURCE_SECURITY_GROUP = "SourceSecurityGroup"; - - @SerializedName(SERIALIZED_NAME_SOURCE_SECURITY_GROUP) - private SourceSecurityGroup sourceSecurityGroup; - - public static final String SERIALIZED_NAME_SUBNETS = "Subnets"; - - @SerializedName(SERIALIZED_NAME_SUBNETS) - private List subnets = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAMES = "SubregionNames"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAMES) - private List subregionNames = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public LoadBalancer() {} - - public LoadBalancer accessLog(AccessLog accessLog) { - - this.accessLog = accessLog; - return this; - } - - /** - * Get accessLog - * - * @return accessLog - */ - @javax.annotation.Nullable - public AccessLog getAccessLog() { - return accessLog; - } - - public void setAccessLog(AccessLog accessLog) { - this.accessLog = accessLog; - } - - public LoadBalancer applicationStickyCookiePolicies( - List applicationStickyCookiePolicies) { - - this.applicationStickyCookiePolicies = applicationStickyCookiePolicies; - return this; - } - - public LoadBalancer addApplicationStickyCookiePoliciesItem( - ApplicationStickyCookiePolicy applicationStickyCookiePoliciesItem) { - if (this.applicationStickyCookiePolicies == null) { - this.applicationStickyCookiePolicies = new ArrayList<>(); - } - this.applicationStickyCookiePolicies.add(applicationStickyCookiePoliciesItem); - return this; - } - - /** - * The stickiness policies defined for the load balancer. - * - * @return applicationStickyCookiePolicies - */ - @javax.annotation.Nullable - public List getApplicationStickyCookiePolicies() { - return applicationStickyCookiePolicies; - } - - public void setApplicationStickyCookiePolicies( - List applicationStickyCookiePolicies) { - this.applicationStickyCookiePolicies = applicationStickyCookiePolicies; - } - - public LoadBalancer backendIps(List backendIps) { - - this.backendIps = backendIps; - return this; - } - - public LoadBalancer addBackendIpsItem(String backendIpsItem) { - if (this.backendIps == null) { - this.backendIps = new ArrayList<>(); - } - this.backendIps.add(backendIpsItem); - return this; - } - - /** - * One or more public IPs of backend VMs. - * - * @return backendIps - */ - @javax.annotation.Nullable - public List getBackendIps() { - return backendIps; - } - - public void setBackendIps(List backendIps) { - this.backendIps = backendIps; - } - - public LoadBalancer backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public LoadBalancer addBackendVmIdsItem(String backendVmIdsItem) { - if (this.backendVmIds == null) { - this.backendVmIds = new ArrayList<>(); - } - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs for the load balancer. - * - * @return backendVmIds - */ - @javax.annotation.Nullable - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public LoadBalancer dnsName(String dnsName) { - - this.dnsName = dnsName; - return this; - } - - /** - * The DNS name of the load balancer. - * - * @return dnsName - */ - @javax.annotation.Nullable - public String getDnsName() { - return dnsName; - } - - public void setDnsName(String dnsName) { - this.dnsName = dnsName; - } - - public LoadBalancer healthCheck(HealthCheck healthCheck) { - - this.healthCheck = healthCheck; - return this; - } - - /** - * Get healthCheck - * - * @return healthCheck - */ - @javax.annotation.Nullable - public HealthCheck getHealthCheck() { - return healthCheck; - } - - public void setHealthCheck(HealthCheck healthCheck) { - this.healthCheck = healthCheck; - } - - public LoadBalancer listeners(List listeners) { - - this.listeners = listeners; - return this; - } - - public LoadBalancer addListenersItem(Listener listenersItem) { - if (this.listeners == null) { - this.listeners = new ArrayList<>(); - } - this.listeners.add(listenersItem); - return this; - } - - /** - * The listeners for the load balancer. - * - * @return listeners - */ - @javax.annotation.Nullable - public List getListeners() { - return listeners; - } - - public void setListeners(List listeners) { - this.listeners = listeners; - } - - public LoadBalancer loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nullable - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public LoadBalancer loadBalancerStickyCookiePolicies( - List loadBalancerStickyCookiePolicies) { - - this.loadBalancerStickyCookiePolicies = loadBalancerStickyCookiePolicies; - return this; - } - - public LoadBalancer addLoadBalancerStickyCookiePoliciesItem( - LoadBalancerStickyCookiePolicy loadBalancerStickyCookiePoliciesItem) { - if (this.loadBalancerStickyCookiePolicies == null) { - this.loadBalancerStickyCookiePolicies = new ArrayList<>(); - } - this.loadBalancerStickyCookiePolicies.add(loadBalancerStickyCookiePoliciesItem); - return this; - } - - /** - * The policies defined for the load balancer. - * - * @return loadBalancerStickyCookiePolicies - */ - @javax.annotation.Nullable - public List getLoadBalancerStickyCookiePolicies() { - return loadBalancerStickyCookiePolicies; - } - - public void setLoadBalancerStickyCookiePolicies( - List loadBalancerStickyCookiePolicies) { - this.loadBalancerStickyCookiePolicies = loadBalancerStickyCookiePolicies; - } - - public LoadBalancer loadBalancerType(String loadBalancerType) { - - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * The type of load balancer. Valid only for load balancers in a Net.<br /> If - * `LoadBalancerType` is `internet-facing`, the load balancer has a public - * DNS name that resolves to a public IP.<br /> If `LoadBalancerType` is - * `internal`, the load balancer has a public DNS name that resolves to a private IP. - * - * @return loadBalancerType - */ - @javax.annotation.Nullable - public String getLoadBalancerType() { - return loadBalancerType; - } - - public void setLoadBalancerType(String loadBalancerType) { - this.loadBalancerType = loadBalancerType; - } - - public LoadBalancer netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the load balancer. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public LoadBalancer publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * (internet-facing only) The public IP associated with the load balancer. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public LoadBalancer securedCookies(Boolean securedCookies) { - - this.securedCookies = securedCookies; - return this; - } - - /** - * Whether secure cookies are enabled for the load balancer. - * - * @return securedCookies - */ - @javax.annotation.Nullable - public Boolean getSecuredCookies() { - return securedCookies; - } - - public void setSecuredCookies(Boolean securedCookies) { - this.securedCookies = securedCookies; - } - - public LoadBalancer securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public LoadBalancer addSecurityGroupsItem(String securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * One or more IDs of security groups for the load balancers. Valid only for load balancers in a - * Net. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public LoadBalancer sourceSecurityGroup(SourceSecurityGroup sourceSecurityGroup) { - - this.sourceSecurityGroup = sourceSecurityGroup; - return this; - } - - /** - * Get sourceSecurityGroup - * - * @return sourceSecurityGroup - */ - @javax.annotation.Nullable - public SourceSecurityGroup getSourceSecurityGroup() { - return sourceSecurityGroup; - } - - public void setSourceSecurityGroup(SourceSecurityGroup sourceSecurityGroup) { - this.sourceSecurityGroup = sourceSecurityGroup; - } - - public LoadBalancer subnets(List subnets) { - - this.subnets = subnets; - return this; - } - - public LoadBalancer addSubnetsItem(String subnetsItem) { - if (this.subnets == null) { - this.subnets = new ArrayList<>(); - } - this.subnets.add(subnetsItem); - return this; - } - - /** - * The ID of the Subnet in which the load balancer was created. - * - * @return subnets - */ - @javax.annotation.Nullable - public List getSubnets() { - return subnets; - } - - public void setSubnets(List subnets) { - this.subnets = subnets; - } - - public LoadBalancer subregionNames(List subregionNames) { - - this.subregionNames = subregionNames; - return this; - } - - public LoadBalancer addSubregionNamesItem(String subregionNamesItem) { - if (this.subregionNames == null) { - this.subregionNames = new ArrayList<>(); - } - this.subregionNames.add(subregionNamesItem); - return this; - } - - /** - * The ID of the Subregion in which the load balancer was created. - * - * @return subregionNames - */ - @javax.annotation.Nullable - public List getSubregionNames() { - return subregionNames; - } - - public void setSubregionNames(List subregionNames) { - this.subregionNames = subregionNames; - } - - public LoadBalancer tags(List tags) { - - this.tags = tags; - return this; - } - - public LoadBalancer addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the load balancer. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoadBalancer loadBalancer = (LoadBalancer) o; - return Objects.equals(this.accessLog, loadBalancer.accessLog) - && Objects.equals( - this.applicationStickyCookiePolicies, - loadBalancer.applicationStickyCookiePolicies) - && Objects.equals(this.backendIps, loadBalancer.backendIps) - && Objects.equals(this.backendVmIds, loadBalancer.backendVmIds) - && Objects.equals(this.dnsName, loadBalancer.dnsName) - && Objects.equals(this.healthCheck, loadBalancer.healthCheck) - && Objects.equals(this.listeners, loadBalancer.listeners) - && Objects.equals(this.loadBalancerName, loadBalancer.loadBalancerName) - && Objects.equals( - this.loadBalancerStickyCookiePolicies, - loadBalancer.loadBalancerStickyCookiePolicies) - && Objects.equals(this.loadBalancerType, loadBalancer.loadBalancerType) - && Objects.equals(this.netId, loadBalancer.netId) - && Objects.equals(this.publicIp, loadBalancer.publicIp) - && Objects.equals(this.securedCookies, loadBalancer.securedCookies) - && Objects.equals(this.securityGroups, loadBalancer.securityGroups) - && Objects.equals(this.sourceSecurityGroup, loadBalancer.sourceSecurityGroup) - && Objects.equals(this.subnets, loadBalancer.subnets) - && Objects.equals(this.subregionNames, loadBalancer.subregionNames) - && Objects.equals(this.tags, loadBalancer.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - accessLog, - applicationStickyCookiePolicies, - backendIps, - backendVmIds, - dnsName, - healthCheck, - listeners, - loadBalancerName, - loadBalancerStickyCookiePolicies, - loadBalancerType, - netId, - publicIp, - securedCookies, - securityGroups, - sourceSecurityGroup, - subnets, - subregionNames, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoadBalancer {\n"); - sb.append(" accessLog: ").append(toIndentedString(accessLog)).append("\n"); - sb.append(" applicationStickyCookiePolicies: ") - .append(toIndentedString(applicationStickyCookiePolicies)) - .append("\n"); - sb.append(" backendIps: ").append(toIndentedString(backendIps)).append("\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dnsName: ").append(toIndentedString(dnsName)).append("\n"); - sb.append(" healthCheck: ").append(toIndentedString(healthCheck)).append("\n"); - sb.append(" listeners: ").append(toIndentedString(listeners)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" loadBalancerStickyCookiePolicies: ") - .append(toIndentedString(loadBalancerStickyCookiePolicies)) - .append("\n"); - sb.append(" loadBalancerType: ").append(toIndentedString(loadBalancerType)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" securedCookies: ").append(toIndentedString(securedCookies)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" sourceSecurityGroup: ") - .append(toIndentedString(sourceSecurityGroup)) - .append("\n"); - sb.append(" subnets: ").append(toIndentedString(subnets)).append("\n"); - sb.append(" subregionNames: ").append(toIndentedString(subregionNames)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessLog"); - openapiFields.add("ApplicationStickyCookiePolicies"); - openapiFields.add("BackendIps"); - openapiFields.add("BackendVmIds"); - openapiFields.add("DnsName"); - openapiFields.add("HealthCheck"); - openapiFields.add("Listeners"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("LoadBalancerStickyCookiePolicies"); - openapiFields.add("LoadBalancerType"); - openapiFields.add("NetId"); - openapiFields.add("PublicIp"); - openapiFields.add("SecuredCookies"); - openapiFields.add("SecurityGroups"); - openapiFields.add("SourceSecurityGroup"); - openapiFields.add("Subnets"); - openapiFields.add("SubregionNames"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LoadBalancer - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoadBalancer.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LoadBalancer is not found in the" - + " empty JSON string", - LoadBalancer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoadBalancer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LoadBalancer` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `AccessLog` - if (jsonObj.get("AccessLog") != null && !jsonObj.get("AccessLog").isJsonNull()) { - AccessLog.validateJsonObject(jsonObj.getAsJsonObject("AccessLog")); - } - if (jsonObj.get("ApplicationStickyCookiePolicies") != null - && !jsonObj.get("ApplicationStickyCookiePolicies").isJsonNull()) { - JsonArray jsonArrayapplicationStickyCookiePolicies = - jsonObj.getAsJsonArray("ApplicationStickyCookiePolicies"); - if (jsonArrayapplicationStickyCookiePolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("ApplicationStickyCookiePolicies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApplicationStickyCookiePolicies` to be an" - + " array in the JSON string but got `%s`", - jsonObj.get("ApplicationStickyCookiePolicies").toString())); - } - - // validate the optional field `ApplicationStickyCookiePolicies` (array) - for (int i = 0; i < jsonArrayapplicationStickyCookiePolicies.size(); i++) { - ApplicationStickyCookiePolicy.validateJsonObject( - jsonArrayapplicationStickyCookiePolicies.get(i).getAsJsonObject()); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendIps") != null && !jsonObj.get("BackendIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("BackendIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendVmIds") != null && !jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if ((jsonObj.get("DnsName") != null && !jsonObj.get("DnsName").isJsonNull()) - && !jsonObj.get("DnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DnsName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("DnsName").toString())); - } - // validate the optional field `HealthCheck` - if (jsonObj.get("HealthCheck") != null && !jsonObj.get("HealthCheck").isJsonNull()) { - HealthCheck.validateJsonObject(jsonObj.getAsJsonObject("HealthCheck")); - } - if (jsonObj.get("Listeners") != null && !jsonObj.get("Listeners").isJsonNull()) { - JsonArray jsonArraylisteners = jsonObj.getAsJsonArray("Listeners"); - if (jsonArraylisteners != null) { - // ensure the json data is an array - if (!jsonObj.get("Listeners").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Listeners` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Listeners").toString())); - } - - // validate the optional field `Listeners` (array) - for (int i = 0; i < jsonArraylisteners.size(); i++) { - Listener.validateJsonObject(jsonArraylisteners.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("LoadBalancerName") != null - && !jsonObj.get("LoadBalancerName").isJsonNull()) - && !jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - if (jsonObj.get("LoadBalancerStickyCookiePolicies") != null - && !jsonObj.get("LoadBalancerStickyCookiePolicies").isJsonNull()) { - JsonArray jsonArrayloadBalancerStickyCookiePolicies = - jsonObj.getAsJsonArray("LoadBalancerStickyCookiePolicies"); - if (jsonArrayloadBalancerStickyCookiePolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("LoadBalancerStickyCookiePolicies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerStickyCookiePolicies` to be" - + " an array in the JSON string but got `%s`", - jsonObj.get("LoadBalancerStickyCookiePolicies").toString())); - } - - // validate the optional field `LoadBalancerStickyCookiePolicies` (array) - for (int i = 0; i < jsonArrayloadBalancerStickyCookiePolicies.size(); i++) { - LoadBalancerStickyCookiePolicy.validateJsonObject( - jsonArrayloadBalancerStickyCookiePolicies.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("LoadBalancerType") != null - && !jsonObj.get("LoadBalancerType").isJsonNull()) - && !jsonObj.get("LoadBalancerType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerType").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - // validate the optional field `SourceSecurityGroup` - if (jsonObj.get("SourceSecurityGroup") != null - && !jsonObj.get("SourceSecurityGroup").isJsonNull()) { - SourceSecurityGroup.validateJsonObject(jsonObj.getAsJsonObject("SourceSecurityGroup")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Subnets") != null && !jsonObj.get("Subnets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Subnets` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("Subnets").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SubregionNames") != null && !jsonObj.get("SubregionNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SubregionNames").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoadBalancer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoadBalancer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LoadBalancer.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LoadBalancer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoadBalancer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LoadBalancer given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoadBalancer - * @throws IOException if the JSON string is invalid with respect to LoadBalancer - */ - public static LoadBalancer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoadBalancer.class); - } - - /** - * Convert an instance of LoadBalancer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLight.java deleted file mode 100644 index cc1f1879..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLight.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the load balancer. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LoadBalancerLight { - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PORT = "LoadBalancerPort"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PORT) - private Integer loadBalancerPort; - - public LoadBalancerLight() {} - - public LoadBalancerLight loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer to which the listener is attached. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public LoadBalancerLight loadBalancerPort(Integer loadBalancerPort) { - - this.loadBalancerPort = loadBalancerPort; - return this; - } - - /** - * The port of load balancer on which the load balancer is listening (between `1` and - * `65535` both included). - * - * @return loadBalancerPort - */ - @javax.annotation.Nonnull - public Integer getLoadBalancerPort() { - return loadBalancerPort; - } - - public void setLoadBalancerPort(Integer loadBalancerPort) { - this.loadBalancerPort = loadBalancerPort; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoadBalancerLight loadBalancerLight = (LoadBalancerLight) o; - return Objects.equals(this.loadBalancerName, loadBalancerLight.loadBalancerName) - && Objects.equals(this.loadBalancerPort, loadBalancerLight.loadBalancerPort); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancerName, loadBalancerPort); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoadBalancerLight {\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" loadBalancerPort: ").append(toIndentedString(loadBalancerPort)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancerName"); - openapiFields.add("LoadBalancerPort"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - openapiRequiredFields.add("LoadBalancerPort"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LoadBalancerLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoadBalancerLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LoadBalancerLight is not found in the" - + " empty JSON string", - LoadBalancerLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoadBalancerLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LoadBalancerLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoadBalancerLight.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoadBalancerLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoadBalancerLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LoadBalancerLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LoadBalancerLight value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoadBalancerLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LoadBalancerLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoadBalancerLight - * @throws IOException if the JSON string is invalid with respect to LoadBalancerLight - */ - public static LoadBalancerLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoadBalancerLight.class); - } - - /** - * Convert an instance of LoadBalancerLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicy.java deleted file mode 100644 index 7dcec988..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicy.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the stickiness policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LoadBalancerStickyCookiePolicy { - public static final String SERIALIZED_NAME_COOKIE_EXPIRATION_PERIOD = "CookieExpirationPeriod"; - - @SerializedName(SERIALIZED_NAME_COOKIE_EXPIRATION_PERIOD) - private Integer cookieExpirationPeriod; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public LoadBalancerStickyCookiePolicy() {} - - public LoadBalancerStickyCookiePolicy cookieExpirationPeriod(Integer cookieExpirationPeriod) { - - this.cookieExpirationPeriod = cookieExpirationPeriod; - return this; - } - - /** - * The time period, in seconds, after which the cookie should be considered stale.<br /> - * If `1`, the stickiness session lasts for the duration of the browser session. - * - * @return cookieExpirationPeriod - */ - @javax.annotation.Nullable - public Integer getCookieExpirationPeriod() { - return cookieExpirationPeriod; - } - - public void setCookieExpirationPeriod(Integer cookieExpirationPeriod) { - this.cookieExpirationPeriod = cookieExpirationPeriod; - } - - public LoadBalancerStickyCookiePolicy policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the stickiness policy. - * - * @return policyName - */ - @javax.annotation.Nullable - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoadBalancerStickyCookiePolicy loadBalancerStickyCookiePolicy = - (LoadBalancerStickyCookiePolicy) o; - return Objects.equals( - this.cookieExpirationPeriod, - loadBalancerStickyCookiePolicy.cookieExpirationPeriod) - && Objects.equals(this.policyName, loadBalancerStickyCookiePolicy.policyName); - } - - @Override - public int hashCode() { - return Objects.hash(cookieExpirationPeriod, policyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoadBalancerStickyCookiePolicy {\n"); - sb.append(" cookieExpirationPeriod: ") - .append(toIndentedString(cookieExpirationPeriod)) - .append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CookieExpirationPeriod"); - openapiFields.add("PolicyName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * LoadBalancerStickyCookiePolicy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoadBalancerStickyCookiePolicy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LoadBalancerStickyCookiePolicy is not" - + " found in the empty JSON string", - LoadBalancerStickyCookiePolicy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoadBalancerStickyCookiePolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LoadBalancerStickyCookiePolicy` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PolicyName") != null && !jsonObj.get("PolicyName").isJsonNull()) - && !jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoadBalancerStickyCookiePolicy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoadBalancerStickyCookiePolicy' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(LoadBalancerStickyCookiePolicy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LoadBalancerStickyCookiePolicy value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoadBalancerStickyCookiePolicy read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LoadBalancerStickyCookiePolicy given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoadBalancerStickyCookiePolicy - * @throws IOException if the JSON string is invalid with respect to - * LoadBalancerStickyCookiePolicy - */ - public static LoadBalancerStickyCookiePolicy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoadBalancerStickyCookiePolicy.class); - } - - /** - * Convert an instance of LoadBalancerStickyCookiePolicy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTag.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTag.java deleted file mode 100644 index b1e0e32e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTag.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the load balancer tag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LoadBalancerTag { - public static final String SERIALIZED_NAME_KEY = "Key"; - - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_VALUE = "Value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public LoadBalancerTag() {} - - public LoadBalancerTag key(String key) { - - this.key = key; - return this; - } - - /** - * The key of the tag. - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public LoadBalancerTag loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nullable - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public LoadBalancerTag value(String value) { - - this.value = value; - return this; - } - - /** - * The value of the tag. - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoadBalancerTag loadBalancerTag = (LoadBalancerTag) o; - return Objects.equals(this.key, loadBalancerTag.key) - && Objects.equals(this.loadBalancerName, loadBalancerTag.loadBalancerName) - && Objects.equals(this.value, loadBalancerTag.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, loadBalancerName, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoadBalancerTag {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Key"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("Value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LoadBalancerTag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoadBalancerTag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LoadBalancerTag is not found in the" - + " empty JSON string", - LoadBalancerTag.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoadBalancerTag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LoadBalancerTag` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Key") != null && !jsonObj.get("Key").isJsonNull()) - && !jsonObj.get("Key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Key").toString())); - } - if ((jsonObj.get("LoadBalancerName") != null - && !jsonObj.get("LoadBalancerName").isJsonNull()) - && !jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - if ((jsonObj.get("Value") != null && !jsonObj.get("Value").isJsonNull()) - && !jsonObj.get("Value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoadBalancerTag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoadBalancerTag' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LoadBalancerTag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LoadBalancerTag value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoadBalancerTag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LoadBalancerTag given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoadBalancerTag - * @throws IOException if the JSON string is invalid with respect to LoadBalancerTag - */ - public static LoadBalancerTag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoadBalancerTag.class); - } - - /** - * Convert an instance of LoadBalancerTag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Location.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Location.java deleted file mode 100644 index 8795cdbf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Location.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the DirectLink location. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Location { - public static final String SERIALIZED_NAME_CODE = "Code"; - - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Location() {} - - public Location code(String code) { - - this.code = code; - return this; - } - - /** - * The location code, to be set as the `Location` parameter of the *CreateDirectLink* - * method when creating a DirectLink. - * - * @return code - */ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public Location name(String name) { - - this.name = name; - return this; - } - - /** - * The name and description of the location, corresponding to a datacenter. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Location location = (Location) o; - return Objects.equals(this.code, location.code) && Objects.equals(this.name, location.name); - } - - @Override - public int hashCode() { - return Objects.hash(code, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Location {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Code"); - openapiFields.add("Name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Location - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Location.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Location is not found in the empty" - + " JSON string", - Location.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Location.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Location` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Code") != null && !jsonObj.get("Code").isJsonNull()) - && !jsonObj.get("Code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Code` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Code").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Location.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Location' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Location.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Location value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Location read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Location given an JSON string - * - * @param jsonString JSON string - * @return An instance of Location - * @throws IOException if the JSON string is invalid with respect to Location - */ - public static Location fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Location.class); - } - - /** - * Convert an instance of Location to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Log.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Log.java deleted file mode 100644 index f8c62689..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Log.java +++ /dev/null @@ -1,708 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the log. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Log { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CALL_DURATION = "CallDuration"; - - @SerializedName(SERIALIZED_NAME_CALL_DURATION) - private Integer callDuration; - - public static final String SERIALIZED_NAME_QUERY_ACCESS_KEY = "QueryAccessKey"; - - @SerializedName(SERIALIZED_NAME_QUERY_ACCESS_KEY) - private String queryAccessKey; - - public static final String SERIALIZED_NAME_QUERY_API_NAME = "QueryApiName"; - - @SerializedName(SERIALIZED_NAME_QUERY_API_NAME) - private String queryApiName; - - public static final String SERIALIZED_NAME_QUERY_API_VERSION = "QueryApiVersion"; - - @SerializedName(SERIALIZED_NAME_QUERY_API_VERSION) - private String queryApiVersion; - - public static final String SERIALIZED_NAME_QUERY_CALL_NAME = "QueryCallName"; - - @SerializedName(SERIALIZED_NAME_QUERY_CALL_NAME) - private String queryCallName; - - public static final String SERIALIZED_NAME_QUERY_DATE = "QueryDate"; - - @SerializedName(SERIALIZED_NAME_QUERY_DATE) - private OffsetDateTime queryDate; - - public static final String SERIALIZED_NAME_QUERY_HEADER_RAW = "QueryHeaderRaw"; - - @SerializedName(SERIALIZED_NAME_QUERY_HEADER_RAW) - private String queryHeaderRaw; - - public static final String SERIALIZED_NAME_QUERY_HEADER_SIZE = "QueryHeaderSize"; - - @SerializedName(SERIALIZED_NAME_QUERY_HEADER_SIZE) - private Integer queryHeaderSize; - - public static final String SERIALIZED_NAME_QUERY_IP_ADDRESS = "QueryIpAddress"; - - @SerializedName(SERIALIZED_NAME_QUERY_IP_ADDRESS) - private String queryIpAddress; - - public static final String SERIALIZED_NAME_QUERY_PAYLOAD_RAW = "QueryPayloadRaw"; - - @SerializedName(SERIALIZED_NAME_QUERY_PAYLOAD_RAW) - private String queryPayloadRaw; - - public static final String SERIALIZED_NAME_QUERY_PAYLOAD_SIZE = "QueryPayloadSize"; - - @SerializedName(SERIALIZED_NAME_QUERY_PAYLOAD_SIZE) - private Integer queryPayloadSize; - - public static final String SERIALIZED_NAME_QUERY_USER_AGENT = "QueryUserAgent"; - - @SerializedName(SERIALIZED_NAME_QUERY_USER_AGENT) - private String queryUserAgent; - - public static final String SERIALIZED_NAME_REQUEST_ID = "RequestId"; - - @SerializedName(SERIALIZED_NAME_REQUEST_ID) - private String requestId; - - public static final String SERIALIZED_NAME_RESPONSE_SIZE = "ResponseSize"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_SIZE) - private Integer responseSize; - - public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "ResponseStatusCode"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) - private Integer responseStatusCode; - - public Log() {} - - public Log accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the logged call. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Log callDuration(Integer callDuration) { - - this.callDuration = callDuration; - return this; - } - - /** - * The duration of the logged call, in microseconds. - * - * @return callDuration - */ - @javax.annotation.Nullable - public Integer getCallDuration() { - return callDuration; - } - - public void setCallDuration(Integer callDuration) { - this.callDuration = callDuration; - } - - public Log queryAccessKey(String queryAccessKey) { - - this.queryAccessKey = queryAccessKey; - return this; - } - - /** - * The access key used for the logged call. - * - * @return queryAccessKey - */ - @javax.annotation.Nullable - public String getQueryAccessKey() { - return queryAccessKey; - } - - public void setQueryAccessKey(String queryAccessKey) { - this.queryAccessKey = queryAccessKey; - } - - public Log queryApiName(String queryApiName) { - - this.queryApiName = queryApiName; - return this; - } - - /** - * The name of the API used by the logged call (always `oapi` for the OUTSCALE API). - * - * @return queryApiName - */ - @javax.annotation.Nullable - public String getQueryApiName() { - return queryApiName; - } - - public void setQueryApiName(String queryApiName) { - this.queryApiName = queryApiName; - } - - public Log queryApiVersion(String queryApiVersion) { - - this.queryApiVersion = queryApiVersion; - return this; - } - - /** - * The version of the API used by the logged call. - * - * @return queryApiVersion - */ - @javax.annotation.Nullable - public String getQueryApiVersion() { - return queryApiVersion; - } - - public void setQueryApiVersion(String queryApiVersion) { - this.queryApiVersion = queryApiVersion; - } - - public Log queryCallName(String queryCallName) { - - this.queryCallName = queryCallName; - return this; - } - - /** - * The name of the logged call. - * - * @return queryCallName - */ - @javax.annotation.Nullable - public String getQueryCallName() { - return queryCallName; - } - - public void setQueryCallName(String queryCallName) { - this.queryCallName = queryCallName; - } - - public Log queryDate(OffsetDateTime queryDate) { - - this.queryDate = queryDate; - return this; - } - - /** - * The date and time (UTC) of the logged call. - * - * @return queryDate - */ - @javax.annotation.Nullable - public OffsetDateTime getQueryDate() { - return queryDate; - } - - public void setQueryDate(OffsetDateTime queryDate) { - this.queryDate = queryDate; - } - - public Log queryHeaderRaw(String queryHeaderRaw) { - - this.queryHeaderRaw = queryHeaderRaw; - return this; - } - - /** - * The raw header of the HTTP request of the logged call. - * - * @return queryHeaderRaw - */ - @javax.annotation.Nullable - public String getQueryHeaderRaw() { - return queryHeaderRaw; - } - - public void setQueryHeaderRaw(String queryHeaderRaw) { - this.queryHeaderRaw = queryHeaderRaw; - } - - public Log queryHeaderSize(Integer queryHeaderSize) { - - this.queryHeaderSize = queryHeaderSize; - return this; - } - - /** - * The size of the raw header of the HTTP request of the logged call, in bytes. - * - * @return queryHeaderSize - */ - @javax.annotation.Nullable - public Integer getQueryHeaderSize() { - return queryHeaderSize; - } - - public void setQueryHeaderSize(Integer queryHeaderSize) { - this.queryHeaderSize = queryHeaderSize; - } - - public Log queryIpAddress(String queryIpAddress) { - - this.queryIpAddress = queryIpAddress; - return this; - } - - /** - * The IP used for the logged call. - * - * @return queryIpAddress - */ - @javax.annotation.Nullable - public String getQueryIpAddress() { - return queryIpAddress; - } - - public void setQueryIpAddress(String queryIpAddress) { - this.queryIpAddress = queryIpAddress; - } - - public Log queryPayloadRaw(String queryPayloadRaw) { - - this.queryPayloadRaw = queryPayloadRaw; - return this; - } - - /** - * The raw payload of the HTTP request of the logged call. - * - * @return queryPayloadRaw - */ - @javax.annotation.Nullable - public String getQueryPayloadRaw() { - return queryPayloadRaw; - } - - public void setQueryPayloadRaw(String queryPayloadRaw) { - this.queryPayloadRaw = queryPayloadRaw; - } - - public Log queryPayloadSize(Integer queryPayloadSize) { - - this.queryPayloadSize = queryPayloadSize; - return this; - } - - /** - * The size of the raw payload of the HTTP request of the logged call, in bytes. - * - * @return queryPayloadSize - */ - @javax.annotation.Nullable - public Integer getQueryPayloadSize() { - return queryPayloadSize; - } - - public void setQueryPayloadSize(Integer queryPayloadSize) { - this.queryPayloadSize = queryPayloadSize; - } - - public Log queryUserAgent(String queryUserAgent) { - - this.queryUserAgent = queryUserAgent; - return this; - } - - /** - * The user agent of the HTTP request of the logged call. - * - * @return queryUserAgent - */ - @javax.annotation.Nullable - public String getQueryUserAgent() { - return queryUserAgent; - } - - public void setQueryUserAgent(String queryUserAgent) { - this.queryUserAgent = queryUserAgent; - } - - public Log requestId(String requestId) { - - this.requestId = requestId; - return this; - } - - /** - * The request ID provided in the response of the logged call. - * - * @return requestId - */ - @javax.annotation.Nullable - public String getRequestId() { - return requestId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - public Log responseSize(Integer responseSize) { - - this.responseSize = responseSize; - return this; - } - - /** - * The size of the response of the logged call, in bytes. - * - * @return responseSize - */ - @javax.annotation.Nullable - public Integer getResponseSize() { - return responseSize; - } - - public void setResponseSize(Integer responseSize) { - this.responseSize = responseSize; - } - - public Log responseStatusCode(Integer responseStatusCode) { - - this.responseStatusCode = responseStatusCode; - return this; - } - - /** - * The HTTP status code of the response of the logged call. - * - * @return responseStatusCode - */ - @javax.annotation.Nullable - public Integer getResponseStatusCode() { - return responseStatusCode; - } - - public void setResponseStatusCode(Integer responseStatusCode) { - this.responseStatusCode = responseStatusCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Log log = (Log) o; - return Objects.equals(this.accountId, log.accountId) - && Objects.equals(this.callDuration, log.callDuration) - && Objects.equals(this.queryAccessKey, log.queryAccessKey) - && Objects.equals(this.queryApiName, log.queryApiName) - && Objects.equals(this.queryApiVersion, log.queryApiVersion) - && Objects.equals(this.queryCallName, log.queryCallName) - && Objects.equals(this.queryDate, log.queryDate) - && Objects.equals(this.queryHeaderRaw, log.queryHeaderRaw) - && Objects.equals(this.queryHeaderSize, log.queryHeaderSize) - && Objects.equals(this.queryIpAddress, log.queryIpAddress) - && Objects.equals(this.queryPayloadRaw, log.queryPayloadRaw) - && Objects.equals(this.queryPayloadSize, log.queryPayloadSize) - && Objects.equals(this.queryUserAgent, log.queryUserAgent) - && Objects.equals(this.requestId, log.requestId) - && Objects.equals(this.responseSize, log.responseSize) - && Objects.equals(this.responseStatusCode, log.responseStatusCode); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - callDuration, - queryAccessKey, - queryApiName, - queryApiVersion, - queryCallName, - queryDate, - queryHeaderRaw, - queryHeaderSize, - queryIpAddress, - queryPayloadRaw, - queryPayloadSize, - queryUserAgent, - requestId, - responseSize, - responseStatusCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Log {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" callDuration: ").append(toIndentedString(callDuration)).append("\n"); - sb.append(" queryAccessKey: ").append(toIndentedString(queryAccessKey)).append("\n"); - sb.append(" queryApiName: ").append(toIndentedString(queryApiName)).append("\n"); - sb.append(" queryApiVersion: ").append(toIndentedString(queryApiVersion)).append("\n"); - sb.append(" queryCallName: ").append(toIndentedString(queryCallName)).append("\n"); - sb.append(" queryDate: ").append(toIndentedString(queryDate)).append("\n"); - sb.append(" queryHeaderRaw: ").append(toIndentedString(queryHeaderRaw)).append("\n"); - sb.append(" queryHeaderSize: ").append(toIndentedString(queryHeaderSize)).append("\n"); - sb.append(" queryIpAddress: ").append(toIndentedString(queryIpAddress)).append("\n"); - sb.append(" queryPayloadRaw: ").append(toIndentedString(queryPayloadRaw)).append("\n"); - sb.append(" queryPayloadSize: ").append(toIndentedString(queryPayloadSize)).append("\n"); - sb.append(" queryUserAgent: ").append(toIndentedString(queryUserAgent)).append("\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" responseSize: ").append(toIndentedString(responseSize)).append("\n"); - sb.append(" responseStatusCode: ") - .append(toIndentedString(responseStatusCode)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("CallDuration"); - openapiFields.add("QueryAccessKey"); - openapiFields.add("QueryApiName"); - openapiFields.add("QueryApiVersion"); - openapiFields.add("QueryCallName"); - openapiFields.add("QueryDate"); - openapiFields.add("QueryHeaderRaw"); - openapiFields.add("QueryHeaderSize"); - openapiFields.add("QueryIpAddress"); - openapiFields.add("QueryPayloadRaw"); - openapiFields.add("QueryPayloadSize"); - openapiFields.add("QueryUserAgent"); - openapiFields.add("RequestId"); - openapiFields.add("ResponseSize"); - openapiFields.add("ResponseStatusCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Log - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Log.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Log is not found in the empty JSON" - + " string", - Log.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Log.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Log`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("QueryAccessKey") != null && !jsonObj.get("QueryAccessKey").isJsonNull()) - && !jsonObj.get("QueryAccessKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryAccessKey` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryAccessKey").toString())); - } - if ((jsonObj.get("QueryApiName") != null && !jsonObj.get("QueryApiName").isJsonNull()) - && !jsonObj.get("QueryApiName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryApiName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("QueryApiName").toString())); - } - if ((jsonObj.get("QueryApiVersion") != null && !jsonObj.get("QueryApiVersion").isJsonNull()) - && !jsonObj.get("QueryApiVersion").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryApiVersion` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryApiVersion").toString())); - } - if ((jsonObj.get("QueryCallName") != null && !jsonObj.get("QueryCallName").isJsonNull()) - && !jsonObj.get("QueryCallName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryCallName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("QueryCallName").toString())); - } - if ((jsonObj.get("QueryHeaderRaw") != null && !jsonObj.get("QueryHeaderRaw").isJsonNull()) - && !jsonObj.get("QueryHeaderRaw").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryHeaderRaw` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryHeaderRaw").toString())); - } - if ((jsonObj.get("QueryIpAddress") != null && !jsonObj.get("QueryIpAddress").isJsonNull()) - && !jsonObj.get("QueryIpAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryIpAddress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryIpAddress").toString())); - } - if ((jsonObj.get("QueryPayloadRaw") != null && !jsonObj.get("QueryPayloadRaw").isJsonNull()) - && !jsonObj.get("QueryPayloadRaw").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryPayloadRaw` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryPayloadRaw").toString())); - } - if ((jsonObj.get("QueryUserAgent") != null && !jsonObj.get("QueryUserAgent").isJsonNull()) - && !jsonObj.get("QueryUserAgent").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QueryUserAgent` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QueryUserAgent").toString())); - } - if ((jsonObj.get("RequestId") != null && !jsonObj.get("RequestId").isJsonNull()) - && !jsonObj.get("RequestId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RequestId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RequestId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Log.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Log' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Log.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Log value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Log read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Log given an JSON string - * - * @param jsonString JSON string - * @return An instance of Log - * @throws IOException if the JSON string is invalid with respect to Log - */ - public static Log fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Log.class); - } - - /** - * Convert an instance of Log to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEvent.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEvent.java deleted file mode 100644 index a9e36d71..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEvent.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the maintenance event. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MaintenanceEvent { - public static final String SERIALIZED_NAME_CODE = "Code"; - - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NOT_AFTER = "NotAfter"; - - @SerializedName(SERIALIZED_NAME_NOT_AFTER) - private LocalDate notAfter; - - public static final String SERIALIZED_NAME_NOT_BEFORE = "NotBefore"; - - @SerializedName(SERIALIZED_NAME_NOT_BEFORE) - private LocalDate notBefore; - - public MaintenanceEvent() {} - - public MaintenanceEvent code(String code) { - - this.code = code; - return this; - } - - /** - * The code of the event (`system-reboot` \\| `system-maintenance`). - * - * @return code - */ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public MaintenanceEvent description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the event. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public MaintenanceEvent notAfter(LocalDate notAfter) { - - this.notAfter = notAfter; - return this; - } - - /** - * The latest scheduled end date and time (UTC) for the event. - * - * @return notAfter - */ - @javax.annotation.Nullable - public LocalDate getNotAfter() { - return notAfter; - } - - public void setNotAfter(LocalDate notAfter) { - this.notAfter = notAfter; - } - - public MaintenanceEvent notBefore(LocalDate notBefore) { - - this.notBefore = notBefore; - return this; - } - - /** - * The earliest scheduled start date and time (UTC) for the event. - * - * @return notBefore - */ - @javax.annotation.Nullable - public LocalDate getNotBefore() { - return notBefore; - } - - public void setNotBefore(LocalDate notBefore) { - this.notBefore = notBefore; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MaintenanceEvent maintenanceEvent = (MaintenanceEvent) o; - return Objects.equals(this.code, maintenanceEvent.code) - && Objects.equals(this.description, maintenanceEvent.description) - && Objects.equals(this.notAfter, maintenanceEvent.notAfter) - && Objects.equals(this.notBefore, maintenanceEvent.notBefore); - } - - @Override - public int hashCode() { - return Objects.hash(code, description, notAfter, notBefore); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MaintenanceEvent {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" notAfter: ").append(toIndentedString(notAfter)).append("\n"); - sb.append(" notBefore: ").append(toIndentedString(notBefore)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Code"); - openapiFields.add("Description"); - openapiFields.add("NotAfter"); - openapiFields.add("NotBefore"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MaintenanceEvent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MaintenanceEvent.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MaintenanceEvent is not found in the" - + " empty JSON string", - MaintenanceEvent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MaintenanceEvent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MaintenanceEvent` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Code") != null && !jsonObj.get("Code").isJsonNull()) - && !jsonObj.get("Code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Code` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Code").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MaintenanceEvent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MaintenanceEvent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MaintenanceEvent.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MaintenanceEvent value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MaintenanceEvent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MaintenanceEvent given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaintenanceEvent - * @throws IOException if the JSON string is invalid with respect to MaintenanceEvent - */ - public static MaintenanceEvent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MaintenanceEvent.class); - } - - /** - * Convert an instance of MaintenanceEvent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NatService.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NatService.java deleted file mode 100644 index 3e1b2063..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NatService.java +++ /dev/null @@ -1,455 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the NAT service. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NatService { - public static final String SERIALIZED_NAME_CLIENT_TOKEN = "ClientToken"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKEN) - private String clientToken; - - public static final String SERIALIZED_NAME_NAT_SERVICE_ID = "NatServiceId"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_ID) - private String natServiceId; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public NatService() {} - - public NatService clientToken(String clientToken) { - - this.clientToken = clientToken; - return this; - } - - /** - * The idempotency token provided when creating the NAT service. - * - * @return clientToken - */ - @javax.annotation.Nullable - public String getClientToken() { - return clientToken; - } - - public void setClientToken(String clientToken) { - this.clientToken = clientToken; - } - - public NatService natServiceId(String natServiceId) { - - this.natServiceId = natServiceId; - return this; - } - - /** - * The ID of the NAT service. - * - * @return natServiceId - */ - @javax.annotation.Nullable - public String getNatServiceId() { - return natServiceId; - } - - public void setNatServiceId(String natServiceId) { - this.natServiceId = natServiceId; - } - - public NatService netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net in which the NAT service is. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public NatService publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public NatService addPublicIpsItem(PublicIpLight publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * Information about the public IP or IPs associated with the NAT service. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public NatService state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the NAT service (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public NatService subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet in which the NAT service is. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public NatService tags(List tags) { - - this.tags = tags; - return this; - } - - public NatService addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the NAT service. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NatService natService = (NatService) o; - return Objects.equals(this.clientToken, natService.clientToken) - && Objects.equals(this.natServiceId, natService.natServiceId) - && Objects.equals(this.netId, natService.netId) - && Objects.equals(this.publicIps, natService.publicIps) - && Objects.equals(this.state, natService.state) - && Objects.equals(this.subnetId, natService.subnetId) - && Objects.equals(this.tags, natService.tags); - } - - @Override - public int hashCode() { - return Objects.hash(clientToken, natServiceId, netId, publicIps, state, subnetId, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NatService {\n"); - sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n"); - sb.append(" natServiceId: ").append(toIndentedString(natServiceId)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientToken"); - openapiFields.add("NatServiceId"); - openapiFields.add("NetId"); - openapiFields.add("PublicIps"); - openapiFields.add("State"); - openapiFields.add("SubnetId"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NatService - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NatService.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NatService is not found in the empty" - + " JSON string", - NatService.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NatService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NatService` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ClientToken") != null && !jsonObj.get("ClientToken").isJsonNull()) - && !jsonObj.get("ClientToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ClientToken").toString())); - } - if ((jsonObj.get("NatServiceId") != null && !jsonObj.get("NatServiceId").isJsonNull()) - && !jsonObj.get("NatServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NatServiceId").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonNull()) { - JsonArray jsonArraypublicIps = jsonObj.getAsJsonArray("PublicIps"); - if (jsonArraypublicIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIps").toString())); - } - - // validate the optional field `PublicIps` (array) - for (int i = 0; i < jsonArraypublicIps.size(); i++) { - PublicIpLight.validateJsonObject(jsonArraypublicIps.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NatService.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NatService' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NatService.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NatService value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NatService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NatService given an JSON string - * - * @param jsonString JSON string - * @return An instance of NatService - * @throws IOException if the JSON string is invalid with respect to NatService - */ - public static NatService fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NatService.class); - } - - /** - * Convert an instance of NatService to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Net.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Net.java deleted file mode 100644 index 1d4b92df..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Net.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Net. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Net { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_ID = "DhcpOptionsSetId"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_ID) - private String dhcpOptionsSetId; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_TENANCY = "Tenancy"; - - @SerializedName(SERIALIZED_NAME_TENANCY) - private String tenancy; - - public Net() {} - - public Net dhcpOptionsSetId(String dhcpOptionsSetId) { - - this.dhcpOptionsSetId = dhcpOptionsSetId; - return this; - } - - /** - * The ID of the DHCP options set (or `default` if you want to associate the default - * one). - * - * @return dhcpOptionsSetId - */ - @javax.annotation.Nullable - public String getDhcpOptionsSetId() { - return dhcpOptionsSetId; - } - - public void setDhcpOptionsSetId(String dhcpOptionsSetId) { - this.dhcpOptionsSetId = dhcpOptionsSetId; - } - - public Net ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public Net netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public Net state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the Net (`pending` \\| `available` \\| - * `deleting`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Net tags(List tags) { - - this.tags = tags; - return this; - } - - public Net addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the Net. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Net tenancy(String tenancy) { - - this.tenancy = tenancy; - return this; - } - - /** - * The VM tenancy in a Net. - * - * @return tenancy - */ - @javax.annotation.Nullable - public String getTenancy() { - return tenancy; - } - - public void setTenancy(String tenancy) { - this.tenancy = tenancy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Net net = (Net) o; - return Objects.equals(this.dhcpOptionsSetId, net.dhcpOptionsSetId) - && Objects.equals(this.ipRange, net.ipRange) - && Objects.equals(this.netId, net.netId) - && Objects.equals(this.state, net.state) - && Objects.equals(this.tags, net.tags) - && Objects.equals(this.tenancy, net.tenancy); - } - - @Override - public int hashCode() { - return Objects.hash(dhcpOptionsSetId, ipRange, netId, state, tags, tenancy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Net {\n"); - sb.append(" dhcpOptionsSetId: ").append(toIndentedString(dhcpOptionsSetId)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" tenancy: ").append(toIndentedString(tenancy)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSetId"); - openapiFields.add("IpRange"); - openapiFields.add("NetId"); - openapiFields.add("State"); - openapiFields.add("Tags"); - openapiFields.add("Tenancy"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Net - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Net.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Net is not found in the empty JSON" - + " string", - Net.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Net.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Net`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DhcpOptionsSetId") != null - && !jsonObj.get("DhcpOptionsSetId").isJsonNull()) - && !jsonObj.get("DhcpOptionsSetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DhcpOptionsSetId").toString())); - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("Tenancy") != null && !jsonObj.get("Tenancy").isJsonNull()) - && !jsonObj.get("Tenancy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tenancy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Tenancy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Net.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Net' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Net.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Net value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Net read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Net given an JSON string - * - * @param jsonString JSON string - * @return An instance of Net - * @throws IOException if the JSON string is invalid with respect to Net - */ - public static Net fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Net.class); - } - - /** - * Convert an instance of Net to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPoint.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPoint.java deleted file mode 100644 index d1ec591d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPoint.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Net access point. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetAccessPoint { - public static final String SERIALIZED_NAME_NET_ACCESS_POINT_ID = "NetAccessPointId"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT_ID) - private String netAccessPointId; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_IDS = "RouteTableIds"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_IDS) - private List routeTableIds = null; - - public static final String SERIALIZED_NAME_SERVICE_NAME = "ServiceName"; - - @SerializedName(SERIALIZED_NAME_SERVICE_NAME) - private String serviceName; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public NetAccessPoint() {} - - public NetAccessPoint netAccessPointId(String netAccessPointId) { - - this.netAccessPointId = netAccessPointId; - return this; - } - - /** - * The ID of the Net access point. - * - * @return netAccessPointId - */ - @javax.annotation.Nullable - public String getNetAccessPointId() { - return netAccessPointId; - } - - public void setNetAccessPointId(String netAccessPointId) { - this.netAccessPointId = netAccessPointId; - } - - public NetAccessPoint netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net with which the Net access point is associated. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public NetAccessPoint routeTableIds(List routeTableIds) { - - this.routeTableIds = routeTableIds; - return this; - } - - public NetAccessPoint addRouteTableIdsItem(String routeTableIdsItem) { - if (this.routeTableIds == null) { - this.routeTableIds = new ArrayList<>(); - } - this.routeTableIds.add(routeTableIdsItem); - return this; - } - - /** - * The ID of the route tables associated with the Net access point. - * - * @return routeTableIds - */ - @javax.annotation.Nullable - public List getRouteTableIds() { - return routeTableIds; - } - - public void setRouteTableIds(List routeTableIds) { - this.routeTableIds = routeTableIds; - } - - public NetAccessPoint serviceName(String serviceName) { - - this.serviceName = serviceName; - return this; - } - - /** - * The name of the service with which the Net access point is associated. - * - * @return serviceName - */ - @javax.annotation.Nullable - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public NetAccessPoint state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the Net access point (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public NetAccessPoint tags(List tags) { - - this.tags = tags; - return this; - } - - public NetAccessPoint addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the Net access point. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetAccessPoint netAccessPoint = (NetAccessPoint) o; - return Objects.equals(this.netAccessPointId, netAccessPoint.netAccessPointId) - && Objects.equals(this.netId, netAccessPoint.netId) - && Objects.equals(this.routeTableIds, netAccessPoint.routeTableIds) - && Objects.equals(this.serviceName, netAccessPoint.serviceName) - && Objects.equals(this.state, netAccessPoint.state) - && Objects.equals(this.tags, netAccessPoint.tags); - } - - @Override - public int hashCode() { - return Objects.hash(netAccessPointId, netId, routeTableIds, serviceName, state, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetAccessPoint {\n"); - sb.append(" netAccessPointId: ").append(toIndentedString(netAccessPointId)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" routeTableIds: ").append(toIndentedString(routeTableIds)).append("\n"); - sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetAccessPointId"); - openapiFields.add("NetId"); - openapiFields.add("RouteTableIds"); - openapiFields.add("ServiceName"); - openapiFields.add("State"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NetAccessPoint - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NetAccessPoint.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NetAccessPoint is not found in the" - + " empty JSON string", - NetAccessPoint.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NetAccessPoint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NetAccessPoint` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("NetAccessPointId") != null - && !jsonObj.get("NetAccessPointId").isJsonNull()) - && !jsonObj.get("NetAccessPointId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPointId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("NetAccessPointId").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RouteTableIds") != null && !jsonObj.get("RouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("RouteTableIds").toString())); - } - if ((jsonObj.get("ServiceName") != null && !jsonObj.get("ServiceName").isJsonNull()) - && !jsonObj.get("ServiceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ServiceName").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NetAccessPoint.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NetAccessPoint' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NetAccessPoint.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NetAccessPoint value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NetAccessPoint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NetAccessPoint given an JSON string - * - * @param jsonString JSON string - * @return An instance of NetAccessPoint - * @throws IOException if the JSON string is invalid with respect to NetAccessPoint - */ - public static NetAccessPoint fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NetAccessPoint.class); - } - - /** - * Convert an instance of NetAccessPoint to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeering.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeering.java deleted file mode 100644 index c063a0ab..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeering.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Information about the Net peering. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetPeering { - public static final String SERIALIZED_NAME_ACCEPTER_NET = "AccepterNet"; - - @SerializedName(SERIALIZED_NAME_ACCEPTER_NET) - private AccepterNet accepterNet; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private OffsetDateTime expirationDate; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public static final String SERIALIZED_NAME_SOURCE_NET = "SourceNet"; - - @SerializedName(SERIALIZED_NAME_SOURCE_NET) - private SourceNet sourceNet; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private NetPeeringState state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public NetPeering() {} - - public NetPeering accepterNet(AccepterNet accepterNet) { - - this.accepterNet = accepterNet; - return this; - } - - /** - * Get accepterNet - * - * @return accepterNet - */ - @javax.annotation.Nullable - public AccepterNet getAccepterNet() { - return accepterNet; - } - - public void setAccepterNet(AccepterNet accepterNet) { - this.accepterNet = accepterNet; - } - - public NetPeering expirationDate(OffsetDateTime expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date and time (UTC) at which the Net peerings expire. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - } - - public NetPeering netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of the Net peering. - * - * @return netPeeringId - */ - @javax.annotation.Nullable - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - public NetPeering sourceNet(SourceNet sourceNet) { - - this.sourceNet = sourceNet; - return this; - } - - /** - * Get sourceNet - * - * @return sourceNet - */ - @javax.annotation.Nullable - public SourceNet getSourceNet() { - return sourceNet; - } - - public void setSourceNet(SourceNet sourceNet) { - this.sourceNet = sourceNet; - } - - public NetPeering state(NetPeeringState state) { - - this.state = state; - return this; - } - - /** - * Get state - * - * @return state - */ - @javax.annotation.Nullable - public NetPeeringState getState() { - return state; - } - - public void setState(NetPeeringState state) { - this.state = state; - } - - public NetPeering tags(List tags) { - - this.tags = tags; - return this; - } - - public NetPeering addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the Net peering. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetPeering netPeering = (NetPeering) o; - return Objects.equals(this.accepterNet, netPeering.accepterNet) - && Objects.equals(this.expirationDate, netPeering.expirationDate) - && Objects.equals(this.netPeeringId, netPeering.netPeeringId) - && Objects.equals(this.sourceNet, netPeering.sourceNet) - && Objects.equals(this.state, netPeering.state) - && Objects.equals(this.tags, netPeering.tags); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(accepterNet, expirationDate, netPeeringId, sourceNet, state, tags); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetPeering {\n"); - sb.append(" accepterNet: ").append(toIndentedString(accepterNet)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append(" sourceNet: ").append(toIndentedString(sourceNet)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccepterNet"); - openapiFields.add("ExpirationDate"); - openapiFields.add("NetPeeringId"); - openapiFields.add("SourceNet"); - openapiFields.add("State"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NetPeering - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NetPeering.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NetPeering is not found in the empty" - + " JSON string", - NetPeering.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NetPeering.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NetPeering` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `AccepterNet` - if (jsonObj.get("AccepterNet") != null && !jsonObj.get("AccepterNet").isJsonNull()) { - AccepterNet.validateJsonObject(jsonObj.getAsJsonObject("AccepterNet")); - } - if ((jsonObj.get("NetPeeringId") != null && !jsonObj.get("NetPeeringId").isJsonNull()) - && !jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - // validate the optional field `SourceNet` - if (jsonObj.get("SourceNet") != null && !jsonObj.get("SourceNet").isJsonNull()) { - SourceNet.validateJsonObject(jsonObj.getAsJsonObject("SourceNet")); - } - // validate the optional field `State` - if (jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) { - NetPeeringState.validateJsonObject(jsonObj.getAsJsonObject("State")); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NetPeering.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NetPeering' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NetPeering.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NetPeering value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NetPeering read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NetPeering given an JSON string - * - * @param jsonString JSON string - * @return An instance of NetPeering - * @throws IOException if the JSON string is invalid with respect to NetPeering - */ - public static NetPeering fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NetPeering.class); - } - - /** - * Convert an instance of NetPeering to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringState.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringState.java deleted file mode 100644 index 820220a5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringState.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the state of the Net peering. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetPeeringState { - public static final String SERIALIZED_NAME_MESSAGE = "Message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public NetPeeringState() {} - - public NetPeeringState message(String message) { - - this.message = message; - return this; - } - - /** - * Additional information about the state of the Net peering. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public NetPeeringState name(String name) { - - this.name = name; - return this; - } - - /** - * The state of the Net peering (`pending-acceptance` \\| `active` \\| - * `rejected` \\| `failed` \\| `expired` \\| `deleted`). - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetPeeringState netPeeringState = (NetPeeringState) o; - return Objects.equals(this.message, netPeeringState.message) - && Objects.equals(this.name, netPeeringState.name); - } - - @Override - public int hashCode() { - return Objects.hash(message, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetPeeringState {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Message"); - openapiFields.add("Name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NetPeeringState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NetPeeringState.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NetPeeringState is not found in the" - + " empty JSON string", - NetPeeringState.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NetPeeringState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NetPeeringState` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Message") != null && !jsonObj.get("Message").isJsonNull()) - && !jsonObj.get("Message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Message` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Message").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NetPeeringState.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NetPeeringState' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NetPeeringState.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NetPeeringState value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NetPeeringState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NetPeeringState given an JSON string - * - * @param jsonString JSON string - * @return An instance of NetPeeringState - * @throws IOException if the JSON string is invalid with respect to NetPeeringState - */ - public static NetPeeringState fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NetPeeringState.class); - } - - /** - * Convert an instance of NetPeeringState to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLink.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLink.java deleted file mode 100644 index b4abfa02..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLink.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the attachment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetToVirtualGatewayLink { - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public NetToVirtualGatewayLink() {} - - public NetToVirtualGatewayLink netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net to which the virtual gateway is attached. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public NetToVirtualGatewayLink state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the attachment (`attaching` \\| `attached` \\| - * `detaching` \\| `detached`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetToVirtualGatewayLink netToVirtualGatewayLink = (NetToVirtualGatewayLink) o; - return Objects.equals(this.netId, netToVirtualGatewayLink.netId) - && Objects.equals(this.state, netToVirtualGatewayLink.state); - } - - @Override - public int hashCode() { - return Objects.hash(netId, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetToVirtualGatewayLink {\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetId"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NetToVirtualGatewayLink - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NetToVirtualGatewayLink.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NetToVirtualGatewayLink is not found" - + " in the empty JSON string", - NetToVirtualGatewayLink.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NetToVirtualGatewayLink.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NetToVirtualGatewayLink` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NetToVirtualGatewayLink.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NetToVirtualGatewayLink' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NetToVirtualGatewayLink.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NetToVirtualGatewayLink value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NetToVirtualGatewayLink read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NetToVirtualGatewayLink given an JSON string - * - * @param jsonString JSON string - * @return An instance of NetToVirtualGatewayLink - * @throws IOException if the JSON string is invalid with respect to NetToVirtualGatewayLink - */ - public static NetToVirtualGatewayLink fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NetToVirtualGatewayLink.class); - } - - /** - * Convert an instance of NetToVirtualGatewayLink to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Nic.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Nic.java deleted file mode 100644 index f00cb9ab..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Nic.java +++ /dev/null @@ -1,764 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the NIC. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Nic { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED = "IsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED) - private Boolean isSourceDestChecked; - - public static final String SERIALIZED_NAME_LINK_NIC = "LinkNic"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC) - private LinkNic linkNic; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP = "LinkPublicIp"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP) - private LinkPublicIp linkPublicIp; - - public static final String SERIALIZED_NAME_MAC_ADDRESS = "MacAddress"; - - @SerializedName(SERIALIZED_NAME_MAC_ADDRESS) - private String macAddress; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAME = "PrivateDnsName"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAME) - private String privateDnsName; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public Nic() {} - - public Nic accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the NIC. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Nic description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the NIC. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Nic isSourceDestChecked(Boolean isSourceDestChecked) { - - this.isSourceDestChecked = isSourceDestChecked; - return this; - } - - /** - * (Net only) If true, the source/destination check is enabled. If false, it is disabled. - * - * @return isSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestChecked() { - return isSourceDestChecked; - } - - public void setIsSourceDestChecked(Boolean isSourceDestChecked) { - this.isSourceDestChecked = isSourceDestChecked; - } - - public Nic linkNic(LinkNic linkNic) { - - this.linkNic = linkNic; - return this; - } - - /** - * Get linkNic - * - * @return linkNic - */ - @javax.annotation.Nullable - public LinkNic getLinkNic() { - return linkNic; - } - - public void setLinkNic(LinkNic linkNic) { - this.linkNic = linkNic; - } - - public Nic linkPublicIp(LinkPublicIp linkPublicIp) { - - this.linkPublicIp = linkPublicIp; - return this; - } - - /** - * Get linkPublicIp - * - * @return linkPublicIp - */ - @javax.annotation.Nullable - public LinkPublicIp getLinkPublicIp() { - return linkPublicIp; - } - - public void setLinkPublicIp(LinkPublicIp linkPublicIp) { - this.linkPublicIp = linkPublicIp; - } - - public Nic macAddress(String macAddress) { - - this.macAddress = macAddress; - return this; - } - - /** - * The Media Access Control (MAC) address of the NIC. - * - * @return macAddress - */ - @javax.annotation.Nullable - public String getMacAddress() { - return macAddress; - } - - public void setMacAddress(String macAddress) { - this.macAddress = macAddress; - } - - public Nic netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the NIC. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public Nic nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public Nic privateDnsName(String privateDnsName) { - - this.privateDnsName = privateDnsName; - return this; - } - - /** - * The name of the private DNS. - * - * @return privateDnsName - */ - @javax.annotation.Nullable - public String getPrivateDnsName() { - return privateDnsName; - } - - public void setPrivateDnsName(String privateDnsName) { - this.privateDnsName = privateDnsName; - } - - public Nic privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public Nic addPrivateIpsItem(PrivateIp privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The private IPs of the NIC. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public Nic securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public Nic addSecurityGroupsItem(SecurityGroupLight securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * One or more IDs of security groups for the NIC. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public Nic state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the NIC (`available` \\| `attaching` \\| `in-use` - * \\| `detaching`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Nic subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public Nic subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion in which the NIC is located. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public Nic tags(List tags) { - - this.tags = tags; - return this; - } - - public Nic addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the NIC. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Nic nic = (Nic) o; - return Objects.equals(this.accountId, nic.accountId) - && Objects.equals(this.description, nic.description) - && Objects.equals(this.isSourceDestChecked, nic.isSourceDestChecked) - && Objects.equals(this.linkNic, nic.linkNic) - && Objects.equals(this.linkPublicIp, nic.linkPublicIp) - && Objects.equals(this.macAddress, nic.macAddress) - && Objects.equals(this.netId, nic.netId) - && Objects.equals(this.nicId, nic.nicId) - && Objects.equals(this.privateDnsName, nic.privateDnsName) - && Objects.equals(this.privateIps, nic.privateIps) - && Objects.equals(this.securityGroups, nic.securityGroups) - && Objects.equals(this.state, nic.state) - && Objects.equals(this.subnetId, nic.subnetId) - && Objects.equals(this.subregionName, nic.subregionName) - && Objects.equals(this.tags, nic.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - description, - isSourceDestChecked, - linkNic, - linkPublicIp, - macAddress, - netId, - nicId, - privateDnsName, - privateIps, - securityGroups, - state, - subnetId, - subregionName, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Nic {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" isSourceDestChecked: ") - .append(toIndentedString(isSourceDestChecked)) - .append("\n"); - sb.append(" linkNic: ").append(toIndentedString(linkNic)).append("\n"); - sb.append(" linkPublicIp: ").append(toIndentedString(linkPublicIp)).append("\n"); - sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateDnsName: ").append(toIndentedString(privateDnsName)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Description"); - openapiFields.add("IsSourceDestChecked"); - openapiFields.add("LinkNic"); - openapiFields.add("LinkPublicIp"); - openapiFields.add("MacAddress"); - openapiFields.add("NetId"); - openapiFields.add("NicId"); - openapiFields.add("PrivateDnsName"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecurityGroups"); - openapiFields.add("State"); - openapiFields.add("SubnetId"); - openapiFields.add("SubregionName"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Nic - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Nic.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Nic is not found in the empty JSON" - + " string", - Nic.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Nic.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Nic`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // validate the optional field `LinkNic` - if (jsonObj.get("LinkNic") != null && !jsonObj.get("LinkNic").isJsonNull()) { - LinkNic.validateJsonObject(jsonObj.getAsJsonObject("LinkNic")); - } - // validate the optional field `LinkPublicIp` - if (jsonObj.get("LinkPublicIp") != null && !jsonObj.get("LinkPublicIp").isJsonNull()) { - LinkPublicIp.validateJsonObject(jsonObj.getAsJsonObject("LinkPublicIp")); - } - if ((jsonObj.get("MacAddress") != null && !jsonObj.get("MacAddress").isJsonNull()) - && !jsonObj.get("MacAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MacAddress` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("MacAddress").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if ((jsonObj.get("PrivateDnsName") != null && !jsonObj.get("PrivateDnsName").isJsonNull()) - && !jsonObj.get("PrivateDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PrivateDnsName").toString())); - } - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonNull()) { - JsonArray jsonArrayprivateIps = jsonObj.getAsJsonArray("PrivateIps"); - if (jsonArrayprivateIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIps").toString())); - } - - // validate the optional field `PrivateIps` (array) - for (int i = 0; i < jsonArrayprivateIps.size(); i++) { - PrivateIp.validateJsonObject(jsonArrayprivateIps.get(i).getAsJsonObject()); - } - ; - } - } - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonNull()) { - JsonArray jsonArraysecurityGroups = jsonObj.getAsJsonArray("SecurityGroups"); - if (jsonArraysecurityGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - - // validate the optional field `SecurityGroups` (array) - for (int i = 0; i < jsonArraysecurityGroups.size(); i++) { - SecurityGroupLight.validateJsonObject( - jsonArraysecurityGroups.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Nic.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Nic' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Nic.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Nic value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Nic read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Nic given an JSON string - * - * @param jsonString JSON string - * @return An instance of Nic - * @throws IOException if the JSON string is invalid with respect to Nic - */ - public static Nic fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Nic.class); - } - - /** - * Convert an instance of Nic to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreation.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreation.java deleted file mode 100644 index d0fdb767..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreation.java +++ /dev/null @@ -1,477 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the network interface card (NIC) when creating a virtual machine (VM). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NicForVmCreation { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DEVICE_NUMBER = "DeviceNumber"; - - @SerializedName(SERIALIZED_NAME_DEVICE_NUMBER) - private Integer deviceNumber; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECONDARY_PRIVATE_IP_COUNT = - "SecondaryPrivateIpCount"; - - @SerializedName(SERIALIZED_NAME_SECONDARY_PRIVATE_IP_COUNT) - private Integer secondaryPrivateIpCount; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public NicForVmCreation() {} - - public NicForVmCreation deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the NIC is deleted when the VM is terminated. You can specify this parameter only - * for a new NIC. To modify this value for an existing NIC, see [UpdateNic](#updatenic). - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public NicForVmCreation description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the NIC, if you are creating a NIC when creating the VM. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public NicForVmCreation deviceNumber(Integer deviceNumber) { - - this.deviceNumber = deviceNumber; - return this; - } - - /** - * The index of the VM device for the NIC attachment (between `0` and `7`, - * both included). This parameter is required if you create a NIC when creating the VM. - * - * @return deviceNumber - */ - @javax.annotation.Nullable - public Integer getDeviceNumber() { - return deviceNumber; - } - - public void setDeviceNumber(Integer deviceNumber) { - this.deviceNumber = deviceNumber; - } - - public NicForVmCreation nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC, if you are attaching an existing NIC when creating a VM. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public NicForVmCreation privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public NicForVmCreation addPrivateIpsItem(PrivateIpLight privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only - * one private IP can be the primary private IP. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public NicForVmCreation secondaryPrivateIpCount(Integer secondaryPrivateIpCount) { - - this.secondaryPrivateIpCount = secondaryPrivateIpCount; - return this; - } - - /** - * The number of secondary private IPs, if you create a NIC when creating a VM. This parameter - * cannot be specified if you specified more than one private IP in the `PrivateIps` - * parameter. - * - * @return secondaryPrivateIpCount - */ - @javax.annotation.Nullable - public Integer getSecondaryPrivateIpCount() { - return secondaryPrivateIpCount; - } - - public void setSecondaryPrivateIpCount(Integer secondaryPrivateIpCount) { - this.secondaryPrivateIpCount = secondaryPrivateIpCount; - } - - public NicForVmCreation securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public NicForVmCreation addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the NIC, if you create a NIC when creating a VM. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public NicForVmCreation subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is - * required if you create a NIC when creating the VM. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NicForVmCreation nicForVmCreation = (NicForVmCreation) o; - return Objects.equals(this.deleteOnVmDeletion, nicForVmCreation.deleteOnVmDeletion) - && Objects.equals(this.description, nicForVmCreation.description) - && Objects.equals(this.deviceNumber, nicForVmCreation.deviceNumber) - && Objects.equals(this.nicId, nicForVmCreation.nicId) - && Objects.equals(this.privateIps, nicForVmCreation.privateIps) - && Objects.equals( - this.secondaryPrivateIpCount, nicForVmCreation.secondaryPrivateIpCount) - && Objects.equals(this.securityGroupIds, nicForVmCreation.securityGroupIds) - && Objects.equals(this.subnetId, nicForVmCreation.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash( - deleteOnVmDeletion, - description, - deviceNumber, - nicId, - privateIps, - secondaryPrivateIpCount, - securityGroupIds, - subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NicForVmCreation {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" deviceNumber: ").append(toIndentedString(deviceNumber)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" secondaryPrivateIpCount: ") - .append(toIndentedString(secondaryPrivateIpCount)) - .append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("Description"); - openapiFields.add("DeviceNumber"); - openapiFields.add("NicId"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecondaryPrivateIpCount"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NicForVmCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NicForVmCreation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NicForVmCreation is not found in the" - + " empty JSON string", - NicForVmCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NicForVmCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NicForVmCreation` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonNull()) { - JsonArray jsonArrayprivateIps = jsonObj.getAsJsonArray("PrivateIps"); - if (jsonArrayprivateIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIps").toString())); - } - - // validate the optional field `PrivateIps` (array) - for (int i = 0; i < jsonArrayprivateIps.size(); i++) { - PrivateIpLight.validateJsonObject(jsonArrayprivateIps.get(i).getAsJsonObject()); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NicForVmCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NicForVmCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NicForVmCreation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NicForVmCreation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NicForVmCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NicForVmCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of NicForVmCreation - * @throws IOException if the JSON string is invalid with respect to NicForVmCreation - */ - public static NicForVmCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NicForVmCreation.class); - } - - /** - * Convert an instance of NicForVmCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicLight.java deleted file mode 100644 index eeedb976..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/NicLight.java +++ /dev/null @@ -1,672 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the network interface card (NIC). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NicLight { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED = "IsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED) - private Boolean isSourceDestChecked; - - public static final String SERIALIZED_NAME_LINK_NIC = "LinkNic"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC) - private LinkNicLight linkNic; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP = "LinkPublicIp"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP) - private LinkPublicIpLightForVm linkPublicIp; - - public static final String SERIALIZED_NAME_MAC_ADDRESS = "MacAddress"; - - @SerializedName(SERIALIZED_NAME_MAC_ADDRESS) - private String macAddress; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAME = "PrivateDnsName"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAME) - private String privateDnsName; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public NicLight() {} - - public NicLight accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the NIC. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public NicLight description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the NIC. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public NicLight isSourceDestChecked(Boolean isSourceDestChecked) { - - this.isSourceDestChecked = isSourceDestChecked; - return this; - } - - /** - * (Net only) If true, the source/destination check is enabled. If false, it is disabled. - * - * @return isSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestChecked() { - return isSourceDestChecked; - } - - public void setIsSourceDestChecked(Boolean isSourceDestChecked) { - this.isSourceDestChecked = isSourceDestChecked; - } - - public NicLight linkNic(LinkNicLight linkNic) { - - this.linkNic = linkNic; - return this; - } - - /** - * Get linkNic - * - * @return linkNic - */ - @javax.annotation.Nullable - public LinkNicLight getLinkNic() { - return linkNic; - } - - public void setLinkNic(LinkNicLight linkNic) { - this.linkNic = linkNic; - } - - public NicLight linkPublicIp(LinkPublicIpLightForVm linkPublicIp) { - - this.linkPublicIp = linkPublicIp; - return this; - } - - /** - * Get linkPublicIp - * - * @return linkPublicIp - */ - @javax.annotation.Nullable - public LinkPublicIpLightForVm getLinkPublicIp() { - return linkPublicIp; - } - - public void setLinkPublicIp(LinkPublicIpLightForVm linkPublicIp) { - this.linkPublicIp = linkPublicIp; - } - - public NicLight macAddress(String macAddress) { - - this.macAddress = macAddress; - return this; - } - - /** - * The Media Access Control (MAC) address of the NIC. - * - * @return macAddress - */ - @javax.annotation.Nullable - public String getMacAddress() { - return macAddress; - } - - public void setMacAddress(String macAddress) { - this.macAddress = macAddress; - } - - public NicLight netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the NIC. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public NicLight nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public NicLight privateDnsName(String privateDnsName) { - - this.privateDnsName = privateDnsName; - return this; - } - - /** - * The name of the private DNS. - * - * @return privateDnsName - */ - @javax.annotation.Nullable - public String getPrivateDnsName() { - return privateDnsName; - } - - public void setPrivateDnsName(String privateDnsName) { - this.privateDnsName = privateDnsName; - } - - public NicLight privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public NicLight addPrivateIpsItem(PrivateIpLightForVm privateIpsItem) { - if (this.privateIps == null) { - this.privateIps = new ArrayList<>(); - } - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * The private IP or IPs of the NIC. - * - * @return privateIps - */ - @javax.annotation.Nullable - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - public NicLight securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public NicLight addSecurityGroupsItem(SecurityGroupLight securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * One or more IDs of security groups for the NIC. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public NicLight state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the NIC (`available` \\| `attaching` \\| `in-use` - * \\| `detaching`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public NicLight subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet for the NIC. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NicLight nicLight = (NicLight) o; - return Objects.equals(this.accountId, nicLight.accountId) - && Objects.equals(this.description, nicLight.description) - && Objects.equals(this.isSourceDestChecked, nicLight.isSourceDestChecked) - && Objects.equals(this.linkNic, nicLight.linkNic) - && Objects.equals(this.linkPublicIp, nicLight.linkPublicIp) - && Objects.equals(this.macAddress, nicLight.macAddress) - && Objects.equals(this.netId, nicLight.netId) - && Objects.equals(this.nicId, nicLight.nicId) - && Objects.equals(this.privateDnsName, nicLight.privateDnsName) - && Objects.equals(this.privateIps, nicLight.privateIps) - && Objects.equals(this.securityGroups, nicLight.securityGroups) - && Objects.equals(this.state, nicLight.state) - && Objects.equals(this.subnetId, nicLight.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - description, - isSourceDestChecked, - linkNic, - linkPublicIp, - macAddress, - netId, - nicId, - privateDnsName, - privateIps, - securityGroups, - state, - subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NicLight {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" isSourceDestChecked: ") - .append(toIndentedString(isSourceDestChecked)) - .append("\n"); - sb.append(" linkNic: ").append(toIndentedString(linkNic)).append("\n"); - sb.append(" linkPublicIp: ").append(toIndentedString(linkPublicIp)).append("\n"); - sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateDnsName: ").append(toIndentedString(privateDnsName)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Description"); - openapiFields.add("IsSourceDestChecked"); - openapiFields.add("LinkNic"); - openapiFields.add("LinkPublicIp"); - openapiFields.add("MacAddress"); - openapiFields.add("NetId"); - openapiFields.add("NicId"); - openapiFields.add("PrivateDnsName"); - openapiFields.add("PrivateIps"); - openapiFields.add("SecurityGroups"); - openapiFields.add("State"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NicLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NicLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in NicLight is not found in the empty" - + " JSON string", - NicLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NicLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `NicLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // validate the optional field `LinkNic` - if (jsonObj.get("LinkNic") != null && !jsonObj.get("LinkNic").isJsonNull()) { - LinkNicLight.validateJsonObject(jsonObj.getAsJsonObject("LinkNic")); - } - // validate the optional field `LinkPublicIp` - if (jsonObj.get("LinkPublicIp") != null && !jsonObj.get("LinkPublicIp").isJsonNull()) { - LinkPublicIpLightForVm.validateJsonObject(jsonObj.getAsJsonObject("LinkPublicIp")); - } - if ((jsonObj.get("MacAddress") != null && !jsonObj.get("MacAddress").isJsonNull()) - && !jsonObj.get("MacAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MacAddress` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("MacAddress").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if ((jsonObj.get("PrivateDnsName") != null && !jsonObj.get("PrivateDnsName").isJsonNull()) - && !jsonObj.get("PrivateDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PrivateDnsName").toString())); - } - if (jsonObj.get("PrivateIps") != null && !jsonObj.get("PrivateIps").isJsonNull()) { - JsonArray jsonArrayprivateIps = jsonObj.getAsJsonArray("PrivateIps"); - if (jsonArrayprivateIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIps").toString())); - } - - // validate the optional field `PrivateIps` (array) - for (int i = 0; i < jsonArrayprivateIps.size(); i++) { - PrivateIpLightForVm.validateJsonObject( - jsonArrayprivateIps.get(i).getAsJsonObject()); - } - ; - } - } - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonNull()) { - JsonArray jsonArraysecurityGroups = jsonObj.getAsJsonArray("SecurityGroups"); - if (jsonArraysecurityGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - - // validate the optional field `SecurityGroups` (array) - for (int i = 0; i < jsonArraysecurityGroups.size(); i++) { - SecurityGroupLight.validateJsonObject( - jsonArraysecurityGroups.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NicLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NicLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(NicLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, NicLight value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NicLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of NicLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of NicLight - * @throws IOException if the JSON string is invalid with respect to NicLight - */ - public static NicLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NicLight.class); - } - - /** - * Convert an instance of NicLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKey.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKey.java deleted file mode 100644 index eebefb1a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKey.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the OOS API key. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OsuApiKey { - public static final String SERIALIZED_NAME_API_KEY_ID = "ApiKeyId"; - - @SerializedName(SERIALIZED_NAME_API_KEY_ID) - private String apiKeyId; - - public static final String SERIALIZED_NAME_SECRET_KEY = "SecretKey"; - - @SerializedName(SERIALIZED_NAME_SECRET_KEY) - private String secretKey; - - public OsuApiKey() {} - - public OsuApiKey apiKeyId(String apiKeyId) { - - this.apiKeyId = apiKeyId; - return this; - } - - /** - * The API key of the OOS account that enables you to access the bucket. - * - * @return apiKeyId - */ - @javax.annotation.Nullable - public String getApiKeyId() { - return apiKeyId; - } - - public void setApiKeyId(String apiKeyId) { - this.apiKeyId = apiKeyId; - } - - public OsuApiKey secretKey(String secretKey) { - - this.secretKey = secretKey; - return this; - } - - /** - * The secret key of the OOS account that enables you to access the bucket. - * - * @return secretKey - */ - @javax.annotation.Nullable - public String getSecretKey() { - return secretKey; - } - - public void setSecretKey(String secretKey) { - this.secretKey = secretKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OsuApiKey osuApiKey = (OsuApiKey) o; - return Objects.equals(this.apiKeyId, osuApiKey.apiKeyId) - && Objects.equals(this.secretKey, osuApiKey.secretKey); - } - - @Override - public int hashCode() { - return Objects.hash(apiKeyId, secretKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OsuApiKey {\n"); - sb.append(" apiKeyId: ").append(toIndentedString(apiKeyId)).append("\n"); - sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiKeyId"); - openapiFields.add("SecretKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OsuApiKey - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OsuApiKey.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OsuApiKey is not found in the empty" - + " JSON string", - OsuApiKey.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OsuApiKey.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OsuApiKey` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ApiKeyId") != null && !jsonObj.get("ApiKeyId").isJsonNull()) - && !jsonObj.get("ApiKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ApiKeyId").toString())); - } - if ((jsonObj.get("SecretKey") != null && !jsonObj.get("SecretKey").isJsonNull()) - && !jsonObj.get("SecretKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecretKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SecretKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OsuApiKey.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OsuApiKey' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OsuApiKey.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OsuApiKey value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OsuApiKey read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OsuApiKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of OsuApiKey - * @throws IOException if the JSON string is invalid with respect to OsuApiKey - */ - public static OsuApiKey fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OsuApiKey.class); - } - - /** - * Convert an instance of OsuApiKey to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTask.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTask.java deleted file mode 100644 index ac87ee20..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTask.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the OMI export task. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OsuExportImageExportTask { - public static final String SERIALIZED_NAME_DISK_IMAGE_FORMAT = "DiskImageFormat"; - - @SerializedName(SERIALIZED_NAME_DISK_IMAGE_FORMAT) - private String diskImageFormat; - - public static final String SERIALIZED_NAME_OSU_BUCKET = "OsuBucket"; - - @SerializedName(SERIALIZED_NAME_OSU_BUCKET) - private String osuBucket; - - public static final String SERIALIZED_NAME_OSU_MANIFEST_URL = "OsuManifestUrl"; - - @SerializedName(SERIALIZED_NAME_OSU_MANIFEST_URL) - private String osuManifestUrl; - - public static final String SERIALIZED_NAME_OSU_PREFIX = "OsuPrefix"; - - @SerializedName(SERIALIZED_NAME_OSU_PREFIX) - private String osuPrefix; - - public OsuExportImageExportTask() {} - - public OsuExportImageExportTask diskImageFormat(String diskImageFormat) { - - this.diskImageFormat = diskImageFormat; - return this; - } - - /** - * The format of the export disk (`qcow2` \\| `raw`). - * - * @return diskImageFormat - */ - @javax.annotation.Nonnull - public String getDiskImageFormat() { - return diskImageFormat; - } - - public void setDiskImageFormat(String diskImageFormat) { - this.diskImageFormat = diskImageFormat; - } - - public OsuExportImageExportTask osuBucket(String osuBucket) { - - this.osuBucket = osuBucket; - return this; - } - - /** - * The name of the OOS bucket the OMI is exported to. - * - * @return osuBucket - */ - @javax.annotation.Nonnull - public String getOsuBucket() { - return osuBucket; - } - - public void setOsuBucket(String osuBucket) { - this.osuBucket = osuBucket; - } - - public OsuExportImageExportTask osuManifestUrl(String osuManifestUrl) { - - this.osuManifestUrl = osuManifestUrl; - return this; - } - - /** - * The URL of the manifest file. - * - * @return osuManifestUrl - */ - @javax.annotation.Nullable - public String getOsuManifestUrl() { - return osuManifestUrl; - } - - public void setOsuManifestUrl(String osuManifestUrl) { - this.osuManifestUrl = osuManifestUrl; - } - - public OsuExportImageExportTask osuPrefix(String osuPrefix) { - - this.osuPrefix = osuPrefix; - return this; - } - - /** - * The prefix for the key of the OOS object corresponding to the image. - * - * @return osuPrefix - */ - @javax.annotation.Nullable - public String getOsuPrefix() { - return osuPrefix; - } - - public void setOsuPrefix(String osuPrefix) { - this.osuPrefix = osuPrefix; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OsuExportImageExportTask osuExportImageExportTask = (OsuExportImageExportTask) o; - return Objects.equals(this.diskImageFormat, osuExportImageExportTask.diskImageFormat) - && Objects.equals(this.osuBucket, osuExportImageExportTask.osuBucket) - && Objects.equals(this.osuManifestUrl, osuExportImageExportTask.osuManifestUrl) - && Objects.equals(this.osuPrefix, osuExportImageExportTask.osuPrefix); - } - - @Override - public int hashCode() { - return Objects.hash(diskImageFormat, osuBucket, osuManifestUrl, osuPrefix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OsuExportImageExportTask {\n"); - sb.append(" diskImageFormat: ").append(toIndentedString(diskImageFormat)).append("\n"); - sb.append(" osuBucket: ").append(toIndentedString(osuBucket)).append("\n"); - sb.append(" osuManifestUrl: ").append(toIndentedString(osuManifestUrl)).append("\n"); - sb.append(" osuPrefix: ").append(toIndentedString(osuPrefix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DiskImageFormat"); - openapiFields.add("OsuBucket"); - openapiFields.add("OsuManifestUrl"); - openapiFields.add("OsuPrefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DiskImageFormat"); - openapiRequiredFields.add("OsuBucket"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OsuExportImageExportTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OsuExportImageExportTask.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OsuExportImageExportTask is not found" - + " in the empty JSON string", - OsuExportImageExportTask.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OsuExportImageExportTask.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OsuExportImageExportTask` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OsuExportImageExportTask.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DiskImageFormat").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DiskImageFormat` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DiskImageFormat").toString())); - } - if (!jsonObj.get("OsuBucket").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuBucket` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuBucket").toString())); - } - if ((jsonObj.get("OsuManifestUrl") != null && !jsonObj.get("OsuManifestUrl").isJsonNull()) - && !jsonObj.get("OsuManifestUrl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuManifestUrl` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OsuManifestUrl").toString())); - } - if ((jsonObj.get("OsuPrefix") != null && !jsonObj.get("OsuPrefix").isJsonNull()) - && !jsonObj.get("OsuPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuPrefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OsuExportImageExportTask.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OsuExportImageExportTask' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OsuExportImageExportTask.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OsuExportImageExportTask value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OsuExportImageExportTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OsuExportImageExportTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of OsuExportImageExportTask - * @throws IOException if the JSON string is invalid with respect to OsuExportImageExportTask - */ - public static OsuExportImageExportTask fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OsuExportImageExportTask.class); - } - - /** - * Convert an instance of OsuExportImageExportTask to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTask.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTask.java deleted file mode 100644 index 7ba15e2d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTask.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the snapshot export task. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OsuExportSnapshotExportTask { - public static final String SERIALIZED_NAME_DISK_IMAGE_FORMAT = "DiskImageFormat"; - - @SerializedName(SERIALIZED_NAME_DISK_IMAGE_FORMAT) - private String diskImageFormat; - - public static final String SERIALIZED_NAME_OSU_BUCKET = "OsuBucket"; - - @SerializedName(SERIALIZED_NAME_OSU_BUCKET) - private String osuBucket; - - public static final String SERIALIZED_NAME_OSU_PREFIX = "OsuPrefix"; - - @SerializedName(SERIALIZED_NAME_OSU_PREFIX) - private String osuPrefix; - - public OsuExportSnapshotExportTask() {} - - public OsuExportSnapshotExportTask diskImageFormat(String diskImageFormat) { - - this.diskImageFormat = diskImageFormat; - return this; - } - - /** - * The format of the export disk (`qcow2` \\| `raw`). - * - * @return diskImageFormat - */ - @javax.annotation.Nonnull - public String getDiskImageFormat() { - return diskImageFormat; - } - - public void setDiskImageFormat(String diskImageFormat) { - this.diskImageFormat = diskImageFormat; - } - - public OsuExportSnapshotExportTask osuBucket(String osuBucket) { - - this.osuBucket = osuBucket; - return this; - } - - /** - * The name of the OOS bucket the snapshot is exported to. - * - * @return osuBucket - */ - @javax.annotation.Nonnull - public String getOsuBucket() { - return osuBucket; - } - - public void setOsuBucket(String osuBucket) { - this.osuBucket = osuBucket; - } - - public OsuExportSnapshotExportTask osuPrefix(String osuPrefix) { - - this.osuPrefix = osuPrefix; - return this; - } - - /** - * The prefix for the key of the OOS object corresponding to the snapshot. - * - * @return osuPrefix - */ - @javax.annotation.Nullable - public String getOsuPrefix() { - return osuPrefix; - } - - public void setOsuPrefix(String osuPrefix) { - this.osuPrefix = osuPrefix; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OsuExportSnapshotExportTask osuExportSnapshotExportTask = (OsuExportSnapshotExportTask) o; - return Objects.equals(this.diskImageFormat, osuExportSnapshotExportTask.diskImageFormat) - && Objects.equals(this.osuBucket, osuExportSnapshotExportTask.osuBucket) - && Objects.equals(this.osuPrefix, osuExportSnapshotExportTask.osuPrefix); - } - - @Override - public int hashCode() { - return Objects.hash(diskImageFormat, osuBucket, osuPrefix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OsuExportSnapshotExportTask {\n"); - sb.append(" diskImageFormat: ").append(toIndentedString(diskImageFormat)).append("\n"); - sb.append(" osuBucket: ").append(toIndentedString(osuBucket)).append("\n"); - sb.append(" osuPrefix: ").append(toIndentedString(osuPrefix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DiskImageFormat"); - openapiFields.add("OsuBucket"); - openapiFields.add("OsuPrefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DiskImageFormat"); - openapiRequiredFields.add("OsuBucket"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OsuExportSnapshotExportTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OsuExportSnapshotExportTask.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OsuExportSnapshotExportTask is not" - + " found in the empty JSON string", - OsuExportSnapshotExportTask.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OsuExportSnapshotExportTask.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OsuExportSnapshotExportTask` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OsuExportSnapshotExportTask.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DiskImageFormat").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DiskImageFormat` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DiskImageFormat").toString())); - } - if (!jsonObj.get("OsuBucket").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuBucket` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuBucket").toString())); - } - if ((jsonObj.get("OsuPrefix") != null && !jsonObj.get("OsuPrefix").isJsonNull()) - && !jsonObj.get("OsuPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuPrefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OsuExportSnapshotExportTask.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OsuExportSnapshotExportTask' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OsuExportSnapshotExportTask.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OsuExportSnapshotExportTask value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OsuExportSnapshotExportTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OsuExportSnapshotExportTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of OsuExportSnapshotExportTask - * @throws IOException if the JSON string is invalid with respect to OsuExportSnapshotExportTask - */ - public static OsuExportSnapshotExportTask fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OsuExportSnapshotExportTask.class); - } - - /** - * Convert an instance of OsuExportSnapshotExportTask to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreate.java deleted file mode 100644 index 2d06c80a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreate.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the OOS export task to create. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OsuExportToCreate { - public static final String SERIALIZED_NAME_DISK_IMAGE_FORMAT = "DiskImageFormat"; - - @SerializedName(SERIALIZED_NAME_DISK_IMAGE_FORMAT) - private String diskImageFormat; - - public static final String SERIALIZED_NAME_OSU_API_KEY = "OsuApiKey"; - - @SerializedName(SERIALIZED_NAME_OSU_API_KEY) - private OsuApiKey osuApiKey; - - public static final String SERIALIZED_NAME_OSU_BUCKET = "OsuBucket"; - - @SerializedName(SERIALIZED_NAME_OSU_BUCKET) - private String osuBucket; - - public static final String SERIALIZED_NAME_OSU_MANIFEST_URL = "OsuManifestUrl"; - - @SerializedName(SERIALIZED_NAME_OSU_MANIFEST_URL) - private String osuManifestUrl; - - public static final String SERIALIZED_NAME_OSU_PREFIX = "OsuPrefix"; - - @SerializedName(SERIALIZED_NAME_OSU_PREFIX) - private String osuPrefix; - - public OsuExportToCreate() {} - - public OsuExportToCreate diskImageFormat(String diskImageFormat) { - - this.diskImageFormat = diskImageFormat; - return this; - } - - /** - * The format of the export disk (`qcow2` \\| `raw`). - * - * @return diskImageFormat - */ - @javax.annotation.Nonnull - public String getDiskImageFormat() { - return diskImageFormat; - } - - public void setDiskImageFormat(String diskImageFormat) { - this.diskImageFormat = diskImageFormat; - } - - public OsuExportToCreate osuApiKey(OsuApiKey osuApiKey) { - - this.osuApiKey = osuApiKey; - return this; - } - - /** - * Get osuApiKey - * - * @return osuApiKey - */ - @javax.annotation.Nullable - public OsuApiKey getOsuApiKey() { - return osuApiKey; - } - - public void setOsuApiKey(OsuApiKey osuApiKey) { - this.osuApiKey = osuApiKey; - } - - public OsuExportToCreate osuBucket(String osuBucket) { - - this.osuBucket = osuBucket; - return this; - } - - /** - * The name of the OOS bucket where you want to export the object. - * - * @return osuBucket - */ - @javax.annotation.Nonnull - public String getOsuBucket() { - return osuBucket; - } - - public void setOsuBucket(String osuBucket) { - this.osuBucket = osuBucket; - } - - public OsuExportToCreate osuManifestUrl(String osuManifestUrl) { - - this.osuManifestUrl = osuManifestUrl; - return this; - } - - /** - * The URL of the manifest file. - * - * @return osuManifestUrl - */ - @javax.annotation.Nullable - public String getOsuManifestUrl() { - return osuManifestUrl; - } - - public void setOsuManifestUrl(String osuManifestUrl) { - this.osuManifestUrl = osuManifestUrl; - } - - public OsuExportToCreate osuPrefix(String osuPrefix) { - - this.osuPrefix = osuPrefix; - return this; - } - - /** - * The prefix for the key of the OOS object. - * - * @return osuPrefix - */ - @javax.annotation.Nullable - public String getOsuPrefix() { - return osuPrefix; - } - - public void setOsuPrefix(String osuPrefix) { - this.osuPrefix = osuPrefix; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OsuExportToCreate osuExportToCreate = (OsuExportToCreate) o; - return Objects.equals(this.diskImageFormat, osuExportToCreate.diskImageFormat) - && Objects.equals(this.osuApiKey, osuExportToCreate.osuApiKey) - && Objects.equals(this.osuBucket, osuExportToCreate.osuBucket) - && Objects.equals(this.osuManifestUrl, osuExportToCreate.osuManifestUrl) - && Objects.equals(this.osuPrefix, osuExportToCreate.osuPrefix); - } - - @Override - public int hashCode() { - return Objects.hash(diskImageFormat, osuApiKey, osuBucket, osuManifestUrl, osuPrefix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OsuExportToCreate {\n"); - sb.append(" diskImageFormat: ").append(toIndentedString(diskImageFormat)).append("\n"); - sb.append(" osuApiKey: ").append(toIndentedString(osuApiKey)).append("\n"); - sb.append(" osuBucket: ").append(toIndentedString(osuBucket)).append("\n"); - sb.append(" osuManifestUrl: ").append(toIndentedString(osuManifestUrl)).append("\n"); - sb.append(" osuPrefix: ").append(toIndentedString(osuPrefix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DiskImageFormat"); - openapiFields.add("OsuApiKey"); - openapiFields.add("OsuBucket"); - openapiFields.add("OsuManifestUrl"); - openapiFields.add("OsuPrefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DiskImageFormat"); - openapiRequiredFields.add("OsuBucket"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OsuExportToCreate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OsuExportToCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OsuExportToCreate is not found in the" - + " empty JSON string", - OsuExportToCreate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OsuExportToCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OsuExportToCreate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OsuExportToCreate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DiskImageFormat").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DiskImageFormat` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DiskImageFormat").toString())); - } - // validate the optional field `OsuApiKey` - if (jsonObj.get("OsuApiKey") != null && !jsonObj.get("OsuApiKey").isJsonNull()) { - OsuApiKey.validateJsonObject(jsonObj.getAsJsonObject("OsuApiKey")); - } - if (!jsonObj.get("OsuBucket").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuBucket` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuBucket").toString())); - } - if ((jsonObj.get("OsuManifestUrl") != null && !jsonObj.get("OsuManifestUrl").isJsonNull()) - && !jsonObj.get("OsuManifestUrl").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuManifestUrl` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OsuManifestUrl").toString())); - } - if ((jsonObj.get("OsuPrefix") != null && !jsonObj.get("OsuPrefix").isJsonNull()) - && !jsonObj.get("OsuPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsuPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsuPrefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OsuExportToCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OsuExportToCreate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OsuExportToCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OsuExportToCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OsuExportToCreate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OsuExportToCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of OsuExportToCreate - * @throws IOException if the JSON string is invalid with respect to OsuExportToCreate - */ - public static OsuExportToCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OsuExportToCreate.class); - } - - /** - * Convert an instance of OsuExportToCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResource.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResource.java deleted file mode 100644 index 1973b0c1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResource.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Permissions for the resource. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PermissionsOnResource { - public static final String SERIALIZED_NAME_ACCOUNT_IDS = "AccountIds"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_IDS) - private List accountIds = null; - - public static final String SERIALIZED_NAME_GLOBAL_PERMISSION = "GlobalPermission"; - - @SerializedName(SERIALIZED_NAME_GLOBAL_PERMISSION) - private Boolean globalPermission; - - public PermissionsOnResource() {} - - public PermissionsOnResource accountIds(List accountIds) { - - this.accountIds = accountIds; - return this; - } - - public PermissionsOnResource addAccountIdsItem(String accountIdsItem) { - if (this.accountIds == null) { - this.accountIds = new ArrayList<>(); - } - this.accountIds.add(accountIdsItem); - return this; - } - - /** - * One or more account IDs that the permission is associated with. - * - * @return accountIds - */ - @javax.annotation.Nullable - public List getAccountIds() { - return accountIds; - } - - public void setAccountIds(List accountIds) { - this.accountIds = accountIds; - } - - public PermissionsOnResource globalPermission(Boolean globalPermission) { - - this.globalPermission = globalPermission; - return this; - } - - /** - * A global permission for all accounts.<br /> (Request) Set this parameter to true to - * make the resource public (if the parent parameter is `Additions`) or to make the - * resource private (if the parent parameter is `Removals`).<br /> (Response) If - * true, the resource is public. If false, the resource is private. - * - * @return globalPermission - */ - @javax.annotation.Nullable - public Boolean getGlobalPermission() { - return globalPermission; - } - - public void setGlobalPermission(Boolean globalPermission) { - this.globalPermission = globalPermission; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PermissionsOnResource permissionsOnResource = (PermissionsOnResource) o; - return Objects.equals(this.accountIds, permissionsOnResource.accountIds) - && Objects.equals(this.globalPermission, permissionsOnResource.globalPermission); - } - - @Override - public int hashCode() { - return Objects.hash(accountIds, globalPermission); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionsOnResource {\n"); - sb.append(" accountIds: ").append(toIndentedString(accountIds)).append("\n"); - sb.append(" globalPermission: ").append(toIndentedString(globalPermission)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountIds"); - openapiFields.add("GlobalPermission"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PermissionsOnResource - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PermissionsOnResource.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionsOnResource is not found in" - + " the empty JSON string", - PermissionsOnResource.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PermissionsOnResource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionsOnResource` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AccountIds") != null && !jsonObj.get("AccountIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("AccountIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionsOnResource.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionsOnResource' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PermissionsOnResource.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionsOnResource value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionsOnResource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionsOnResource given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionsOnResource - * @throws IOException if the JSON string is invalid with respect to PermissionsOnResource - */ - public static PermissionsOnResource fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionsOnResource.class); - } - - /** - * Convert an instance of PermissionsOnResource to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreation.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreation.java deleted file mode 100644 index 2aebaf8d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreation.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** - * Information about the permissions for the resource.<br /> Specify either the - * `Additions` or the `Removals` parameter. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PermissionsOnResourceCreation { - public static final String SERIALIZED_NAME_ADDITIONS = "Additions"; - - @SerializedName(SERIALIZED_NAME_ADDITIONS) - private PermissionsOnResource additions; - - public static final String SERIALIZED_NAME_REMOVALS = "Removals"; - - @SerializedName(SERIALIZED_NAME_REMOVALS) - private PermissionsOnResource removals; - - public PermissionsOnResourceCreation() {} - - public PermissionsOnResourceCreation additions(PermissionsOnResource additions) { - - this.additions = additions; - return this; - } - - /** - * Get additions - * - * @return additions - */ - @javax.annotation.Nullable - public PermissionsOnResource getAdditions() { - return additions; - } - - public void setAdditions(PermissionsOnResource additions) { - this.additions = additions; - } - - public PermissionsOnResourceCreation removals(PermissionsOnResource removals) { - - this.removals = removals; - return this; - } - - /** - * Get removals - * - * @return removals - */ - @javax.annotation.Nullable - public PermissionsOnResource getRemovals() { - return removals; - } - - public void setRemovals(PermissionsOnResource removals) { - this.removals = removals; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PermissionsOnResourceCreation permissionsOnResourceCreation = - (PermissionsOnResourceCreation) o; - return Objects.equals(this.additions, permissionsOnResourceCreation.additions) - && Objects.equals(this.removals, permissionsOnResourceCreation.removals); - } - - @Override - public int hashCode() { - return Objects.hash(additions, removals); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionsOnResourceCreation {\n"); - sb.append(" additions: ").append(toIndentedString(additions)).append("\n"); - sb.append(" removals: ").append(toIndentedString(removals)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Additions"); - openapiFields.add("Removals"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * PermissionsOnResourceCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PermissionsOnResourceCreation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionsOnResourceCreation is not" - + " found in the empty JSON string", - PermissionsOnResourceCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PermissionsOnResourceCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionsOnResourceCreation` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Additions` - if (jsonObj.get("Additions") != null && !jsonObj.get("Additions").isJsonNull()) { - PermissionsOnResource.validateJsonObject(jsonObj.getAsJsonObject("Additions")); - } - // validate the optional field `Removals` - if (jsonObj.get("Removals") != null && !jsonObj.get("Removals").isJsonNull()) { - PermissionsOnResource.validateJsonObject(jsonObj.getAsJsonObject("Removals")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionsOnResourceCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionsOnResourceCreation' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PermissionsOnResourceCreation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionsOnResourceCreation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionsOnResourceCreation read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionsOnResourceCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionsOnResourceCreation - * @throws IOException if the JSON string is invalid with respect to - * PermissionsOnResourceCreation - */ - public static PermissionsOnResourceCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionsOnResourceCreation.class); - } - - /** - * Convert an instance of PermissionsOnResourceCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase1Options.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase1Options.java deleted file mode 100644 index 09fc123e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase1Options.java +++ /dev/null @@ -1,526 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** - * Information about Phase 1 of the Internet Key Exchange (IKE) negotiation. When Phase 1 finishes - * successfully, peers proceed to Phase 2 negotiations. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Phase1Options { - public static final String SERIALIZED_NAME_DPD_TIMEOUT_ACTION = "DpdTimeoutAction"; - - @SerializedName(SERIALIZED_NAME_DPD_TIMEOUT_ACTION) - private String dpdTimeoutAction; - - public static final String SERIALIZED_NAME_DPD_TIMEOUT_SECONDS = "DpdTimeoutSeconds"; - - @SerializedName(SERIALIZED_NAME_DPD_TIMEOUT_SECONDS) - private Integer dpdTimeoutSeconds; - - public static final String SERIALIZED_NAME_IKE_VERSIONS = "IkeVersions"; - - @SerializedName(SERIALIZED_NAME_IKE_VERSIONS) - private List ikeVersions = null; - - public static final String SERIALIZED_NAME_PHASE1_DH_GROUP_NUMBERS = "Phase1DhGroupNumbers"; - - @SerializedName(SERIALIZED_NAME_PHASE1_DH_GROUP_NUMBERS) - private List phase1DhGroupNumbers = null; - - public static final String SERIALIZED_NAME_PHASE1_ENCRYPTION_ALGORITHMS = - "Phase1EncryptionAlgorithms"; - - @SerializedName(SERIALIZED_NAME_PHASE1_ENCRYPTION_ALGORITHMS) - private List phase1EncryptionAlgorithms = null; - - public static final String SERIALIZED_NAME_PHASE1_INTEGRITY_ALGORITHMS = - "Phase1IntegrityAlgorithms"; - - @SerializedName(SERIALIZED_NAME_PHASE1_INTEGRITY_ALGORITHMS) - private List phase1IntegrityAlgorithms = null; - - public static final String SERIALIZED_NAME_PHASE1_LIFETIME_SECONDS = "Phase1LifetimeSeconds"; - - @SerializedName(SERIALIZED_NAME_PHASE1_LIFETIME_SECONDS) - private Integer phase1LifetimeSeconds; - - public static final String SERIALIZED_NAME_REPLAY_WINDOW_SIZE = "ReplayWindowSize"; - - @SerializedName(SERIALIZED_NAME_REPLAY_WINDOW_SIZE) - private Integer replayWindowSize; - - public static final String SERIALIZED_NAME_STARTUP_ACTION = "StartupAction"; - - @SerializedName(SERIALIZED_NAME_STARTUP_ACTION) - private String startupAction; - - public Phase1Options() {} - - public Phase1Options dpdTimeoutAction(String dpdTimeoutAction) { - - this.dpdTimeoutAction = dpdTimeoutAction; - return this; - } - - /** - * The action to carry out after a Dead Peer Detection (DPD) timeout occurs. - * - * @return dpdTimeoutAction - */ - @javax.annotation.Nullable - public String getDpdTimeoutAction() { - return dpdTimeoutAction; - } - - public void setDpdTimeoutAction(String dpdTimeoutAction) { - this.dpdTimeoutAction = dpdTimeoutAction; - } - - public Phase1Options dpdTimeoutSeconds(Integer dpdTimeoutSeconds) { - - this.dpdTimeoutSeconds = dpdTimeoutSeconds; - return this; - } - - /** - * The maximum waiting time for a Dead Peer Detection (DPD) response before considering the peer - * as dead, in seconds. - * - * @return dpdTimeoutSeconds - */ - @javax.annotation.Nullable - public Integer getDpdTimeoutSeconds() { - return dpdTimeoutSeconds; - } - - public void setDpdTimeoutSeconds(Integer dpdTimeoutSeconds) { - this.dpdTimeoutSeconds = dpdTimeoutSeconds; - } - - public Phase1Options ikeVersions(List ikeVersions) { - - this.ikeVersions = ikeVersions; - return this; - } - - public Phase1Options addIkeVersionsItem(String ikeVersionsItem) { - if (this.ikeVersions == null) { - this.ikeVersions = new ArrayList<>(); - } - this.ikeVersions.add(ikeVersionsItem); - return this; - } - - /** - * The Internet Key Exchange (IKE) versions allowed for the VPN tunnel. - * - * @return ikeVersions - */ - @javax.annotation.Nullable - public List getIkeVersions() { - return ikeVersions; - } - - public void setIkeVersions(List ikeVersions) { - this.ikeVersions = ikeVersions; - } - - public Phase1Options phase1DhGroupNumbers(List phase1DhGroupNumbers) { - - this.phase1DhGroupNumbers = phase1DhGroupNumbers; - return this; - } - - public Phase1Options addPhase1DhGroupNumbersItem(Integer phase1DhGroupNumbersItem) { - if (this.phase1DhGroupNumbers == null) { - this.phase1DhGroupNumbers = new ArrayList<>(); - } - this.phase1DhGroupNumbers.add(phase1DhGroupNumbersItem); - return this; - } - - /** - * The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 1. - * - * @return phase1DhGroupNumbers - */ - @javax.annotation.Nullable - public List getPhase1DhGroupNumbers() { - return phase1DhGroupNumbers; - } - - public void setPhase1DhGroupNumbers(List phase1DhGroupNumbers) { - this.phase1DhGroupNumbers = phase1DhGroupNumbers; - } - - public Phase1Options phase1EncryptionAlgorithms(List phase1EncryptionAlgorithms) { - - this.phase1EncryptionAlgorithms = phase1EncryptionAlgorithms; - return this; - } - - public Phase1Options addPhase1EncryptionAlgorithmsItem(String phase1EncryptionAlgorithmsItem) { - if (this.phase1EncryptionAlgorithms == null) { - this.phase1EncryptionAlgorithms = new ArrayList<>(); - } - this.phase1EncryptionAlgorithms.add(phase1EncryptionAlgorithmsItem); - return this; - } - - /** - * The encryption algorithms allowed for the VPN tunnel for phase 1. - * - * @return phase1EncryptionAlgorithms - */ - @javax.annotation.Nullable - public List getPhase1EncryptionAlgorithms() { - return phase1EncryptionAlgorithms; - } - - public void setPhase1EncryptionAlgorithms(List phase1EncryptionAlgorithms) { - this.phase1EncryptionAlgorithms = phase1EncryptionAlgorithms; - } - - public Phase1Options phase1IntegrityAlgorithms(List phase1IntegrityAlgorithms) { - - this.phase1IntegrityAlgorithms = phase1IntegrityAlgorithms; - return this; - } - - public Phase1Options addPhase1IntegrityAlgorithmsItem(String phase1IntegrityAlgorithmsItem) { - if (this.phase1IntegrityAlgorithms == null) { - this.phase1IntegrityAlgorithms = new ArrayList<>(); - } - this.phase1IntegrityAlgorithms.add(phase1IntegrityAlgorithmsItem); - return this; - } - - /** - * The integrity algorithms allowed for the VPN tunnel for phase 1. - * - * @return phase1IntegrityAlgorithms - */ - @javax.annotation.Nullable - public List getPhase1IntegrityAlgorithms() { - return phase1IntegrityAlgorithms; - } - - public void setPhase1IntegrityAlgorithms(List phase1IntegrityAlgorithms) { - this.phase1IntegrityAlgorithms = phase1IntegrityAlgorithms; - } - - public Phase1Options phase1LifetimeSeconds(Integer phase1LifetimeSeconds) { - - this.phase1LifetimeSeconds = phase1LifetimeSeconds; - return this; - } - - /** - * The lifetime for phase 1 of the IKE negotiation process, in seconds. - * - * @return phase1LifetimeSeconds - */ - @javax.annotation.Nullable - public Integer getPhase1LifetimeSeconds() { - return phase1LifetimeSeconds; - } - - public void setPhase1LifetimeSeconds(Integer phase1LifetimeSeconds) { - this.phase1LifetimeSeconds = phase1LifetimeSeconds; - } - - public Phase1Options replayWindowSize(Integer replayWindowSize) { - - this.replayWindowSize = replayWindowSize; - return this; - } - - /** - * The number of packets in an IKE replay window. - * - * @return replayWindowSize - */ - @javax.annotation.Nullable - public Integer getReplayWindowSize() { - return replayWindowSize; - } - - public void setReplayWindowSize(Integer replayWindowSize) { - this.replayWindowSize = replayWindowSize; - } - - public Phase1Options startupAction(String startupAction) { - - this.startupAction = startupAction; - return this; - } - - /** - * The action to carry out when establishing tunnels for a VPN connection. - * - * @return startupAction - */ - @javax.annotation.Nullable - public String getStartupAction() { - return startupAction; - } - - public void setStartupAction(String startupAction) { - this.startupAction = startupAction; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Phase1Options phase1Options = (Phase1Options) o; - return Objects.equals(this.dpdTimeoutAction, phase1Options.dpdTimeoutAction) - && Objects.equals(this.dpdTimeoutSeconds, phase1Options.dpdTimeoutSeconds) - && Objects.equals(this.ikeVersions, phase1Options.ikeVersions) - && Objects.equals(this.phase1DhGroupNumbers, phase1Options.phase1DhGroupNumbers) - && Objects.equals( - this.phase1EncryptionAlgorithms, phase1Options.phase1EncryptionAlgorithms) - && Objects.equals( - this.phase1IntegrityAlgorithms, phase1Options.phase1IntegrityAlgorithms) - && Objects.equals(this.phase1LifetimeSeconds, phase1Options.phase1LifetimeSeconds) - && Objects.equals(this.replayWindowSize, phase1Options.replayWindowSize) - && Objects.equals(this.startupAction, phase1Options.startupAction); - } - - @Override - public int hashCode() { - return Objects.hash( - dpdTimeoutAction, - dpdTimeoutSeconds, - ikeVersions, - phase1DhGroupNumbers, - phase1EncryptionAlgorithms, - phase1IntegrityAlgorithms, - phase1LifetimeSeconds, - replayWindowSize, - startupAction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Phase1Options {\n"); - sb.append(" dpdTimeoutAction: ").append(toIndentedString(dpdTimeoutAction)).append("\n"); - sb.append(" dpdTimeoutSeconds: ") - .append(toIndentedString(dpdTimeoutSeconds)) - .append("\n"); - sb.append(" ikeVersions: ").append(toIndentedString(ikeVersions)).append("\n"); - sb.append(" phase1DhGroupNumbers: ") - .append(toIndentedString(phase1DhGroupNumbers)) - .append("\n"); - sb.append(" phase1EncryptionAlgorithms: ") - .append(toIndentedString(phase1EncryptionAlgorithms)) - .append("\n"); - sb.append(" phase1IntegrityAlgorithms: ") - .append(toIndentedString(phase1IntegrityAlgorithms)) - .append("\n"); - sb.append(" phase1LifetimeSeconds: ") - .append(toIndentedString(phase1LifetimeSeconds)) - .append("\n"); - sb.append(" replayWindowSize: ").append(toIndentedString(replayWindowSize)).append("\n"); - sb.append(" startupAction: ").append(toIndentedString(startupAction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DpdTimeoutAction"); - openapiFields.add("DpdTimeoutSeconds"); - openapiFields.add("IkeVersions"); - openapiFields.add("Phase1DhGroupNumbers"); - openapiFields.add("Phase1EncryptionAlgorithms"); - openapiFields.add("Phase1IntegrityAlgorithms"); - openapiFields.add("Phase1LifetimeSeconds"); - openapiFields.add("ReplayWindowSize"); - openapiFields.add("StartupAction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Phase1Options - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Phase1Options.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Phase1Options is not found in the" - + " empty JSON string", - Phase1Options.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Phase1Options.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Phase1Options` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DpdTimeoutAction") != null - && !jsonObj.get("DpdTimeoutAction").isJsonNull()) - && !jsonObj.get("DpdTimeoutAction").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DpdTimeoutAction` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DpdTimeoutAction").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IkeVersions") != null && !jsonObj.get("IkeVersions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IkeVersions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("IkeVersions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase1DhGroupNumbers") != null - && !jsonObj.get("Phase1DhGroupNumbers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase1DhGroupNumbers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Phase1DhGroupNumbers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase1EncryptionAlgorithms") != null - && !jsonObj.get("Phase1EncryptionAlgorithms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase1EncryptionAlgorithms` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("Phase1EncryptionAlgorithms").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase1IntegrityAlgorithms") != null - && !jsonObj.get("Phase1IntegrityAlgorithms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase1IntegrityAlgorithms` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("Phase1IntegrityAlgorithms").toString())); - } - if ((jsonObj.get("StartupAction") != null && !jsonObj.get("StartupAction").isJsonNull()) - && !jsonObj.get("StartupAction").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StartupAction` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StartupAction").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Phase1Options.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Phase1Options' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Phase1Options.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Phase1Options value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Phase1Options read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Phase1Options given an JSON string - * - * @param jsonString JSON string - * @return An instance of Phase1Options - * @throws IOException if the JSON string is invalid with respect to Phase1Options - */ - public static Phase1Options fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Phase1Options.class); - } - - /** - * Convert an instance of Phase1Options to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase2Options.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase2Options.java deleted file mode 100644 index aa228044..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Phase2Options.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about Phase 2 of the Internet Key Exchange (IKE) negotiation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Phase2Options { - public static final String SERIALIZED_NAME_PHASE2_DH_GROUP_NUMBERS = "Phase2DhGroupNumbers"; - - @SerializedName(SERIALIZED_NAME_PHASE2_DH_GROUP_NUMBERS) - private List phase2DhGroupNumbers = null; - - public static final String SERIALIZED_NAME_PHASE2_ENCRYPTION_ALGORITHMS = - "Phase2EncryptionAlgorithms"; - - @SerializedName(SERIALIZED_NAME_PHASE2_ENCRYPTION_ALGORITHMS) - private List phase2EncryptionAlgorithms = null; - - public static final String SERIALIZED_NAME_PHASE2_INTEGRITY_ALGORITHMS = - "Phase2IntegrityAlgorithms"; - - @SerializedName(SERIALIZED_NAME_PHASE2_INTEGRITY_ALGORITHMS) - private List phase2IntegrityAlgorithms = null; - - public static final String SERIALIZED_NAME_PHASE2_LIFETIME_SECONDS = "Phase2LifetimeSeconds"; - - @SerializedName(SERIALIZED_NAME_PHASE2_LIFETIME_SECONDS) - private Integer phase2LifetimeSeconds; - - public static final String SERIALIZED_NAME_PRE_SHARED_KEY = "PreSharedKey"; - - @SerializedName(SERIALIZED_NAME_PRE_SHARED_KEY) - private String preSharedKey; - - public Phase2Options() {} - - public Phase2Options phase2DhGroupNumbers(List phase2DhGroupNumbers) { - - this.phase2DhGroupNumbers = phase2DhGroupNumbers; - return this; - } - - public Phase2Options addPhase2DhGroupNumbersItem(Integer phase2DhGroupNumbersItem) { - if (this.phase2DhGroupNumbers == null) { - this.phase2DhGroupNumbers = new ArrayList<>(); - } - this.phase2DhGroupNumbers.add(phase2DhGroupNumbersItem); - return this; - } - - /** - * The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 2. - * - * @return phase2DhGroupNumbers - */ - @javax.annotation.Nullable - public List getPhase2DhGroupNumbers() { - return phase2DhGroupNumbers; - } - - public void setPhase2DhGroupNumbers(List phase2DhGroupNumbers) { - this.phase2DhGroupNumbers = phase2DhGroupNumbers; - } - - public Phase2Options phase2EncryptionAlgorithms(List phase2EncryptionAlgorithms) { - - this.phase2EncryptionAlgorithms = phase2EncryptionAlgorithms; - return this; - } - - public Phase2Options addPhase2EncryptionAlgorithmsItem(String phase2EncryptionAlgorithmsItem) { - if (this.phase2EncryptionAlgorithms == null) { - this.phase2EncryptionAlgorithms = new ArrayList<>(); - } - this.phase2EncryptionAlgorithms.add(phase2EncryptionAlgorithmsItem); - return this; - } - - /** - * The encryption algorithms allowed for the VPN tunnel for phase 2. - * - * @return phase2EncryptionAlgorithms - */ - @javax.annotation.Nullable - public List getPhase2EncryptionAlgorithms() { - return phase2EncryptionAlgorithms; - } - - public void setPhase2EncryptionAlgorithms(List phase2EncryptionAlgorithms) { - this.phase2EncryptionAlgorithms = phase2EncryptionAlgorithms; - } - - public Phase2Options phase2IntegrityAlgorithms(List phase2IntegrityAlgorithms) { - - this.phase2IntegrityAlgorithms = phase2IntegrityAlgorithms; - return this; - } - - public Phase2Options addPhase2IntegrityAlgorithmsItem(String phase2IntegrityAlgorithmsItem) { - if (this.phase2IntegrityAlgorithms == null) { - this.phase2IntegrityAlgorithms = new ArrayList<>(); - } - this.phase2IntegrityAlgorithms.add(phase2IntegrityAlgorithmsItem); - return this; - } - - /** - * The integrity algorithms allowed for the VPN tunnel for phase 2. - * - * @return phase2IntegrityAlgorithms - */ - @javax.annotation.Nullable - public List getPhase2IntegrityAlgorithms() { - return phase2IntegrityAlgorithms; - } - - public void setPhase2IntegrityAlgorithms(List phase2IntegrityAlgorithms) { - this.phase2IntegrityAlgorithms = phase2IntegrityAlgorithms; - } - - public Phase2Options phase2LifetimeSeconds(Integer phase2LifetimeSeconds) { - - this.phase2LifetimeSeconds = phase2LifetimeSeconds; - return this; - } - - /** - * The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation process, in seconds. - * - * @return phase2LifetimeSeconds - */ - @javax.annotation.Nullable - public Integer getPhase2LifetimeSeconds() { - return phase2LifetimeSeconds; - } - - public void setPhase2LifetimeSeconds(Integer phase2LifetimeSeconds) { - this.phase2LifetimeSeconds = phase2LifetimeSeconds; - } - - public Phase2Options preSharedKey(String preSharedKey) { - - this.preSharedKey = preSharedKey; - return this; - } - - /** - * The pre-shared key to establish the initial authentication between the client gateway and the - * virtual gateway. This key can contain any character except line breaks and double quotes - * (&quot;). - * - * @return preSharedKey - */ - @javax.annotation.Nullable - public String getPreSharedKey() { - return preSharedKey; - } - - public void setPreSharedKey(String preSharedKey) { - this.preSharedKey = preSharedKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Phase2Options phase2Options = (Phase2Options) o; - return Objects.equals(this.phase2DhGroupNumbers, phase2Options.phase2DhGroupNumbers) - && Objects.equals( - this.phase2EncryptionAlgorithms, phase2Options.phase2EncryptionAlgorithms) - && Objects.equals( - this.phase2IntegrityAlgorithms, phase2Options.phase2IntegrityAlgorithms) - && Objects.equals(this.phase2LifetimeSeconds, phase2Options.phase2LifetimeSeconds) - && Objects.equals(this.preSharedKey, phase2Options.preSharedKey); - } - - @Override - public int hashCode() { - return Objects.hash( - phase2DhGroupNumbers, - phase2EncryptionAlgorithms, - phase2IntegrityAlgorithms, - phase2LifetimeSeconds, - preSharedKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Phase2Options {\n"); - sb.append(" phase2DhGroupNumbers: ") - .append(toIndentedString(phase2DhGroupNumbers)) - .append("\n"); - sb.append(" phase2EncryptionAlgorithms: ") - .append(toIndentedString(phase2EncryptionAlgorithms)) - .append("\n"); - sb.append(" phase2IntegrityAlgorithms: ") - .append(toIndentedString(phase2IntegrityAlgorithms)) - .append("\n"); - sb.append(" phase2LifetimeSeconds: ") - .append(toIndentedString(phase2LifetimeSeconds)) - .append("\n"); - sb.append(" preSharedKey: ").append(toIndentedString(preSharedKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Phase2DhGroupNumbers"); - openapiFields.add("Phase2EncryptionAlgorithms"); - openapiFields.add("Phase2IntegrityAlgorithms"); - openapiFields.add("Phase2LifetimeSeconds"); - openapiFields.add("PreSharedKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Phase2Options - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Phase2Options.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Phase2Options is not found in the" - + " empty JSON string", - Phase2Options.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Phase2Options.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Phase2Options` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase2DhGroupNumbers") != null - && !jsonObj.get("Phase2DhGroupNumbers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase2DhGroupNumbers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Phase2DhGroupNumbers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase2EncryptionAlgorithms") != null - && !jsonObj.get("Phase2EncryptionAlgorithms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase2EncryptionAlgorithms` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("Phase2EncryptionAlgorithms").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Phase2IntegrityAlgorithms") != null - && !jsonObj.get("Phase2IntegrityAlgorithms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Phase2IntegrityAlgorithms` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("Phase2IntegrityAlgorithms").toString())); - } - if ((jsonObj.get("PreSharedKey") != null && !jsonObj.get("PreSharedKey").isJsonNull()) - && !jsonObj.get("PreSharedKey").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PreSharedKey` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PreSharedKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Phase2Options.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Phase2Options' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Phase2Options.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Phase2Options value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Phase2Options read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Phase2Options given an JSON string - * - * @param jsonString JSON string - * @return An instance of Phase2Options - * @throws IOException if the JSON string is invalid with respect to Phase2Options - */ - public static Phase2Options fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Phase2Options.class); - } - - /** - * Convert an instance of Phase2Options to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Placement.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Placement.java deleted file mode 100644 index a9f7c900..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Placement.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the placement of the VM. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Placement { - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TENANCY = "Tenancy"; - - @SerializedName(SERIALIZED_NAME_TENANCY) - private String tenancy; - - public Placement() {} - - public Placement subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion. If you specify this parameter, you must not specify the - * `Nics` parameter. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public Placement tenancy(String tenancy) { - - this.tenancy = tenancy; - return this; - } - - /** - * The tenancy of the VM (`default`, `dedicated`, or a dedicated group ID). - * - * @return tenancy - */ - @javax.annotation.Nullable - public String getTenancy() { - return tenancy; - } - - public void setTenancy(String tenancy) { - this.tenancy = tenancy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Placement placement = (Placement) o; - return Objects.equals(this.subregionName, placement.subregionName) - && Objects.equals(this.tenancy, placement.tenancy); - } - - @Override - public int hashCode() { - return Objects.hash(subregionName, tenancy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Placement {\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" tenancy: ").append(toIndentedString(tenancy)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("SubregionName"); - openapiFields.add("Tenancy"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Placement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Placement.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Placement is not found in the empty" - + " JSON string", - Placement.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Placement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Placement` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("Tenancy") != null && !jsonObj.get("Tenancy").isJsonNull()) - && !jsonObj.get("Tenancy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tenancy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Tenancy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Placement.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Placement' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Placement.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Placement value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Placement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Placement given an JSON string - * - * @param jsonString JSON string - * @return An instance of Placement - * @throws IOException if the JSON string is invalid with respect to Placement - */ - public static Placement fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Placement.class); - } - - /** - * Convert an instance of Placement to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Policy.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Policy.java deleted file mode 100644 index 3618ce32..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Policy.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the policy. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Policy { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IS_LINKABLE = "IsLinkable"; - - @SerializedName(SERIALIZED_NAME_IS_LINKABLE) - private Boolean isLinkable; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_ORN = "Orn"; - - @SerializedName(SERIALIZED_NAME_ORN) - private String orn; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_POLICY_DEFAULT_VERSION_ID = "PolicyDefaultVersionId"; - - @SerializedName(SERIALIZED_NAME_POLICY_DEFAULT_VERSION_ID) - private String policyDefaultVersionId; - - public static final String SERIALIZED_NAME_POLICY_ID = "PolicyId"; - - @SerializedName(SERIALIZED_NAME_POLICY_ID) - private String policyId; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public static final String SERIALIZED_NAME_RESOURCES_COUNT = "ResourcesCount"; - - @SerializedName(SERIALIZED_NAME_RESOURCES_COUNT) - private Integer resourcesCount; - - public Policy() {} - - public Policy creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the policy was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public Policy description(String description) { - - this.description = description; - return this; - } - - /** - * A friendly name for the policy (between 0 and 1000 characters). - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Policy isLinkable(Boolean isLinkable) { - - this.isLinkable = isLinkable; - return this; - } - - /** - * Indicates whether the policy can be linked to a group or an EIM user. - * - * @return isLinkable - */ - @javax.annotation.Nullable - public Boolean getIsLinkable() { - return isLinkable; - } - - public void setIsLinkable(Boolean isLinkable) { - this.isLinkable = isLinkable; - } - - public Policy lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) at which the policy was last modified. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public Policy orn(String orn) { - - this.orn = orn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return orn - */ - @javax.annotation.Nullable - public String getOrn() { - return orn; - } - - public void setOrn(String orn) { - this.orn = orn; - } - - public Policy path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the policy. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Policy policyDefaultVersionId(String policyDefaultVersionId) { - - this.policyDefaultVersionId = policyDefaultVersionId; - return this; - } - - /** - * The ID of the policy default version. - * - * @return policyDefaultVersionId - */ - @javax.annotation.Nullable - public String getPolicyDefaultVersionId() { - return policyDefaultVersionId; - } - - public void setPolicyDefaultVersionId(String policyDefaultVersionId) { - this.policyDefaultVersionId = policyDefaultVersionId; - } - - public Policy policyId(String policyId) { - - this.policyId = policyId; - return this; - } - - /** - * The ID of the policy. - * - * @return policyId - */ - @javax.annotation.Nullable - public String getPolicyId() { - return policyId; - } - - public void setPolicyId(String policyId) { - this.policyId = policyId; - } - - public Policy policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy. - * - * @return policyName - */ - @javax.annotation.Nullable - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - public Policy resourcesCount(Integer resourcesCount) { - - this.resourcesCount = resourcesCount; - return this; - } - - /** - * The number of resources attached to the policy. - * - * @return resourcesCount - */ - @javax.annotation.Nullable - public Integer getResourcesCount() { - return resourcesCount; - } - - public void setResourcesCount(Integer resourcesCount) { - this.resourcesCount = resourcesCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Policy policy = (Policy) o; - return Objects.equals(this.creationDate, policy.creationDate) - && Objects.equals(this.description, policy.description) - && Objects.equals(this.isLinkable, policy.isLinkable) - && Objects.equals(this.lastModificationDate, policy.lastModificationDate) - && Objects.equals(this.orn, policy.orn) - && Objects.equals(this.path, policy.path) - && Objects.equals(this.policyDefaultVersionId, policy.policyDefaultVersionId) - && Objects.equals(this.policyId, policy.policyId) - && Objects.equals(this.policyName, policy.policyName) - && Objects.equals(this.resourcesCount, policy.resourcesCount); - } - - @Override - public int hashCode() { - return Objects.hash( - creationDate, - description, - isLinkable, - lastModificationDate, - orn, - path, - policyDefaultVersionId, - policyId, - policyName, - resourcesCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Policy {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" isLinkable: ").append(toIndentedString(isLinkable)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" orn: ").append(toIndentedString(orn)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" policyDefaultVersionId: ") - .append(toIndentedString(policyDefaultVersionId)) - .append("\n"); - sb.append(" policyId: ").append(toIndentedString(policyId)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append(" resourcesCount: ").append(toIndentedString(resourcesCount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("Description"); - openapiFields.add("IsLinkable"); - openapiFields.add("LastModificationDate"); - openapiFields.add("Orn"); - openapiFields.add("Path"); - openapiFields.add("PolicyDefaultVersionId"); - openapiFields.add("PolicyId"); - openapiFields.add("PolicyName"); - openapiFields.add("ResourcesCount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Policy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Policy.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Policy is not found in the empty JSON" - + " string", - Policy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Policy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Policy`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("Orn") != null && !jsonObj.get("Orn").isJsonNull()) - && !jsonObj.get("Orn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Orn` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Orn").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if ((jsonObj.get("PolicyDefaultVersionId") != null - && !jsonObj.get("PolicyDefaultVersionId").isJsonNull()) - && !jsonObj.get("PolicyDefaultVersionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyDefaultVersionId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("PolicyDefaultVersionId").toString())); - } - if ((jsonObj.get("PolicyId") != null && !jsonObj.get("PolicyId").isJsonNull()) - && !jsonObj.get("PolicyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyId").toString())); - } - if ((jsonObj.get("PolicyName") != null && !jsonObj.get("PolicyName").isJsonNull()) - && !jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Policy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Policy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Policy.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Policy value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Policy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Policy given an JSON string - * - * @param jsonString JSON string - * @return An instance of Policy - * @throws IOException if the JSON string is invalid with respect to Policy - */ - public static Policy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Policy.class); - } - - /** - * Convert an instance of Policy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersion.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersion.java deleted file mode 100644 index cc22e5f6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersion.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the policy version. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PolicyVersion { - public static final String SERIALIZED_NAME_BODY = "Body"; - - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DEFAULT_VERSION = "DefaultVersion"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_VERSION) - private Boolean defaultVersion; - - public static final String SERIALIZED_NAME_VERSION_ID = "VersionId"; - - @SerializedName(SERIALIZED_NAME_VERSION_ID) - private String versionId; - - public PolicyVersion() {} - - public PolicyVersion body(String body) { - - this.body = body; - return this; - } - - /** - * The policy document, corresponding to a JSON string that contains the policy. For more - * information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and [EIM - * Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html). - * - * @return body - */ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - public void setBody(String body) { - this.body = body; - } - - public PolicyVersion creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the version was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public PolicyVersion defaultVersion(Boolean defaultVersion) { - - this.defaultVersion = defaultVersion; - return this; - } - - /** - * If true, the version is the default one. - * - * @return defaultVersion - */ - @javax.annotation.Nullable - public Boolean getDefaultVersion() { - return defaultVersion; - } - - public void setDefaultVersion(Boolean defaultVersion) { - this.defaultVersion = defaultVersion; - } - - public PolicyVersion versionId(String versionId) { - - this.versionId = versionId; - return this; - } - - /** - * The ID of the version. - * - * @return versionId - */ - @javax.annotation.Nullable - public String getVersionId() { - return versionId; - } - - public void setVersionId(String versionId) { - this.versionId = versionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PolicyVersion policyVersion = (PolicyVersion) o; - return Objects.equals(this.body, policyVersion.body) - && Objects.equals(this.creationDate, policyVersion.creationDate) - && Objects.equals(this.defaultVersion, policyVersion.defaultVersion) - && Objects.equals(this.versionId, policyVersion.versionId); - } - - @Override - public int hashCode() { - return Objects.hash(body, creationDate, defaultVersion, versionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PolicyVersion {\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" defaultVersion: ").append(toIndentedString(defaultVersion)).append("\n"); - sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Body"); - openapiFields.add("CreationDate"); - openapiFields.add("DefaultVersion"); - openapiFields.add("VersionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PolicyVersion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PolicyVersion.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PolicyVersion is not found in the" - + " empty JSON string", - PolicyVersion.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PolicyVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PolicyVersion` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Body") != null && !jsonObj.get("Body").isJsonNull()) - && !jsonObj.get("Body").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Body` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Body").toString())); - } - if ((jsonObj.get("VersionId") != null && !jsonObj.get("VersionId").isJsonNull()) - && !jsonObj.get("VersionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VersionId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VersionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PolicyVersion.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PolicyVersion' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PolicyVersion.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PolicyVersion value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PolicyVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PolicyVersion given an JSON string - * - * @param jsonString JSON string - * @return An instance of PolicyVersion - * @throws IOException if the JSON string is invalid with respect to PolicyVersion - */ - public static PolicyVersion fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PolicyVersion.class); - } - - /** - * Convert an instance of PolicyVersion to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIp.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIp.java deleted file mode 100644 index 62be71d1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIp.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the private IP. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PrivateIp { - public static final String SERIALIZED_NAME_IS_PRIMARY = "IsPrimary"; - - @SerializedName(SERIALIZED_NAME_IS_PRIMARY) - private Boolean isPrimary; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP = "LinkPublicIp"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP) - private LinkPublicIp linkPublicIp; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAME = "PrivateDnsName"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAME) - private String privateDnsName; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public PrivateIp() {} - - public PrivateIp isPrimary(Boolean isPrimary) { - - this.isPrimary = isPrimary; - return this; - } - - /** - * If true, the IP is the primary private IP of the NIC. - * - * @return isPrimary - */ - @javax.annotation.Nullable - public Boolean getIsPrimary() { - return isPrimary; - } - - public void setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - } - - public PrivateIp linkPublicIp(LinkPublicIp linkPublicIp) { - - this.linkPublicIp = linkPublicIp; - return this; - } - - /** - * Get linkPublicIp - * - * @return linkPublicIp - */ - @javax.annotation.Nullable - public LinkPublicIp getLinkPublicIp() { - return linkPublicIp; - } - - public void setLinkPublicIp(LinkPublicIp linkPublicIp) { - this.linkPublicIp = linkPublicIp; - } - - public PrivateIp privateDnsName(String privateDnsName) { - - this.privateDnsName = privateDnsName; - return this; - } - - /** - * The name of the private DNS. - * - * @return privateDnsName - */ - @javax.annotation.Nullable - public String getPrivateDnsName() { - return privateDnsName; - } - - public void setPrivateDnsName(String privateDnsName) { - this.privateDnsName = privateDnsName; - } - - public PrivateIp privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * The private IP of the NIC. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrivateIp privateIp = (PrivateIp) o; - return Objects.equals(this.isPrimary, privateIp.isPrimary) - && Objects.equals(this.linkPublicIp, privateIp.linkPublicIp) - && Objects.equals(this.privateDnsName, privateIp.privateDnsName) - && Objects.equals(this.privateIp, privateIp.privateIp); - } - - @Override - public int hashCode() { - return Objects.hash(isPrimary, linkPublicIp, privateDnsName, privateIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrivateIp {\n"); - sb.append(" isPrimary: ").append(toIndentedString(isPrimary)).append("\n"); - sb.append(" linkPublicIp: ").append(toIndentedString(linkPublicIp)).append("\n"); - sb.append(" privateDnsName: ").append(toIndentedString(privateDnsName)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("IsPrimary"); - openapiFields.add("LinkPublicIp"); - openapiFields.add("PrivateDnsName"); - openapiFields.add("PrivateIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PrivateIp - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrivateIp.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrivateIp is not found in the empty" - + " JSON string", - PrivateIp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PrivateIp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrivateIp` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LinkPublicIp` - if (jsonObj.get("LinkPublicIp") != null && !jsonObj.get("LinkPublicIp").isJsonNull()) { - LinkPublicIp.validateJsonObject(jsonObj.getAsJsonObject("LinkPublicIp")); - } - if ((jsonObj.get("PrivateDnsName") != null && !jsonObj.get("PrivateDnsName").isJsonNull()) - && !jsonObj.get("PrivateDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PrivateDnsName").toString())); - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrivateIp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrivateIp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrivateIp.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrivateIp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrivateIp read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrivateIp given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrivateIp - * @throws IOException if the JSON string is invalid with respect to PrivateIp - */ - public static PrivateIp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrivateIp.class); - } - - /** - * Convert an instance of PrivateIp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLight.java deleted file mode 100644 index fca794b6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLight.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the private IP. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PrivateIpLight { - public static final String SERIALIZED_NAME_IS_PRIMARY = "IsPrimary"; - - @SerializedName(SERIALIZED_NAME_IS_PRIMARY) - private Boolean isPrimary; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public PrivateIpLight() {} - - public PrivateIpLight isPrimary(Boolean isPrimary) { - - this.isPrimary = isPrimary; - return this; - } - - /** - * If true, the IP is the primary private IP of the NIC. - * - * @return isPrimary - */ - @javax.annotation.Nullable - public Boolean getIsPrimary() { - return isPrimary; - } - - public void setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - } - - public PrivateIpLight privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * The private IP of the NIC. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrivateIpLight privateIpLight = (PrivateIpLight) o; - return Objects.equals(this.isPrimary, privateIpLight.isPrimary) - && Objects.equals(this.privateIp, privateIpLight.privateIp); - } - - @Override - public int hashCode() { - return Objects.hash(isPrimary, privateIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrivateIpLight {\n"); - sb.append(" isPrimary: ").append(toIndentedString(isPrimary)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("IsPrimary"); - openapiFields.add("PrivateIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PrivateIpLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrivateIpLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrivateIpLight is not found in the" - + " empty JSON string", - PrivateIpLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PrivateIpLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrivateIpLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrivateIpLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrivateIpLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrivateIpLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrivateIpLight value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrivateIpLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrivateIpLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrivateIpLight - * @throws IOException if the JSON string is invalid with respect to PrivateIpLight - */ - public static PrivateIpLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrivateIpLight.class); - } - - /** - * Convert an instance of PrivateIpLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVm.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVm.java deleted file mode 100644 index 29c7b803..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVm.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the private IP of the NIC. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PrivateIpLightForVm { - public static final String SERIALIZED_NAME_IS_PRIMARY = "IsPrimary"; - - @SerializedName(SERIALIZED_NAME_IS_PRIMARY) - private Boolean isPrimary; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP = "LinkPublicIp"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP) - private LinkPublicIpLightForVm linkPublicIp; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAME = "PrivateDnsName"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAME) - private String privateDnsName; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public PrivateIpLightForVm() {} - - public PrivateIpLightForVm isPrimary(Boolean isPrimary) { - - this.isPrimary = isPrimary; - return this; - } - - /** - * If true, the IP is the primary private IP of the NIC. - * - * @return isPrimary - */ - @javax.annotation.Nullable - public Boolean getIsPrimary() { - return isPrimary; - } - - public void setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - } - - public PrivateIpLightForVm linkPublicIp(LinkPublicIpLightForVm linkPublicIp) { - - this.linkPublicIp = linkPublicIp; - return this; - } - - /** - * Get linkPublicIp - * - * @return linkPublicIp - */ - @javax.annotation.Nullable - public LinkPublicIpLightForVm getLinkPublicIp() { - return linkPublicIp; - } - - public void setLinkPublicIp(LinkPublicIpLightForVm linkPublicIp) { - this.linkPublicIp = linkPublicIp; - } - - public PrivateIpLightForVm privateDnsName(String privateDnsName) { - - this.privateDnsName = privateDnsName; - return this; - } - - /** - * The name of the private DNS. - * - * @return privateDnsName - */ - @javax.annotation.Nullable - public String getPrivateDnsName() { - return privateDnsName; - } - - public void setPrivateDnsName(String privateDnsName) { - this.privateDnsName = privateDnsName; - } - - public PrivateIpLightForVm privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * The private IP. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrivateIpLightForVm privateIpLightForVm = (PrivateIpLightForVm) o; - return Objects.equals(this.isPrimary, privateIpLightForVm.isPrimary) - && Objects.equals(this.linkPublicIp, privateIpLightForVm.linkPublicIp) - && Objects.equals(this.privateDnsName, privateIpLightForVm.privateDnsName) - && Objects.equals(this.privateIp, privateIpLightForVm.privateIp); - } - - @Override - public int hashCode() { - return Objects.hash(isPrimary, linkPublicIp, privateDnsName, privateIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrivateIpLightForVm {\n"); - sb.append(" isPrimary: ").append(toIndentedString(isPrimary)).append("\n"); - sb.append(" linkPublicIp: ").append(toIndentedString(linkPublicIp)).append("\n"); - sb.append(" privateDnsName: ").append(toIndentedString(privateDnsName)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("IsPrimary"); - openapiFields.add("LinkPublicIp"); - openapiFields.add("PrivateDnsName"); - openapiFields.add("PrivateIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PrivateIpLightForVm - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrivateIpLightForVm.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrivateIpLightForVm is not found in" - + " the empty JSON string", - PrivateIpLightForVm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PrivateIpLightForVm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrivateIpLightForVm` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LinkPublicIp` - if (jsonObj.get("LinkPublicIp") != null && !jsonObj.get("LinkPublicIp").isJsonNull()) { - LinkPublicIpLightForVm.validateJsonObject(jsonObj.getAsJsonObject("LinkPublicIp")); - } - if ((jsonObj.get("PrivateDnsName") != null && !jsonObj.get("PrivateDnsName").isJsonNull()) - && !jsonObj.get("PrivateDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PrivateDnsName").toString())); - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrivateIpLightForVm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrivateIpLightForVm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrivateIpLightForVm.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrivateIpLightForVm value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrivateIpLightForVm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrivateIpLightForVm given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrivateIpLightForVm - * @throws IOException if the JSON string is invalid with respect to PrivateIpLightForVm - */ - public static PrivateIpLightForVm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrivateIpLightForVm.class); - } - - /** - * Convert an instance of PrivateIpLightForVm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ProductType.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ProductType.java deleted file mode 100644 index 95d66707..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ProductType.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the product type. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProductType { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_PRODUCT_TYPE_ID = "ProductTypeId"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE_ID) - private String productTypeId; - - public static final String SERIALIZED_NAME_VENDOR = "Vendor"; - - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public ProductType() {} - - public ProductType description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the product type. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ProductType productTypeId(String productTypeId) { - - this.productTypeId = productTypeId; - return this; - } - - /** - * The ID of the product type. - * - * @return productTypeId - */ - @javax.annotation.Nullable - public String getProductTypeId() { - return productTypeId; - } - - public void setProductTypeId(String productTypeId) { - this.productTypeId = productTypeId; - } - - public ProductType vendor(String vendor) { - - this.vendor = vendor; - return this; - } - - /** - * The vendor of the product type. - * - * @return vendor - */ - @javax.annotation.Nullable - public String getVendor() { - return vendor; - } - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductType productType = (ProductType) o; - return Objects.equals(this.description, productType.description) - && Objects.equals(this.productTypeId, productType.productTypeId) - && Objects.equals(this.vendor, productType.vendor); - } - - @Override - public int hashCode() { - return Objects.hash(description, productTypeId, vendor); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductType {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" productTypeId: ").append(toIndentedString(productTypeId)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("ProductTypeId"); - openapiFields.add("Vendor"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductType - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ProductType is not found in the empty" - + " JSON string", - ProductType.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ProductType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ProductType` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("ProductTypeId") != null && !jsonObj.get("ProductTypeId").isJsonNull()) - && !jsonObj.get("ProductTypeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductTypeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ProductTypeId").toString())); - } - if ((jsonObj.get("Vendor") != null && !jsonObj.get("Vendor").isJsonNull()) - && !jsonObj.get("Vendor").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vendor` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Vendor").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProductType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProductType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ProductType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ProductType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ProductType read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ProductType given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductType - * @throws IOException if the JSON string is invalid with respect to ProductType - */ - public static ProductType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProductType.class); - } - - /** - * Convert an instance of ProductType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIp.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIp.java deleted file mode 100644 index 194cd504..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIp.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the public IP. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PublicIp { - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_ID = "LinkPublicIpId"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_ID) - private String linkPublicIpId; - - public static final String SERIALIZED_NAME_NIC_ACCOUNT_ID = "NicAccountId"; - - @SerializedName(SERIALIZED_NAME_NIC_ACCOUNT_ID) - private String nicAccountId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public PublicIp() {} - - public PublicIp linkPublicIpId(String linkPublicIpId) { - - this.linkPublicIpId = linkPublicIpId; - return this; - } - - /** - * (Required in a Net) The ID representing the association of the public IP with the VM or the - * NIC. - * - * @return linkPublicIpId - */ - @javax.annotation.Nullable - public String getLinkPublicIpId() { - return linkPublicIpId; - } - - public void setLinkPublicIpId(String linkPublicIpId) { - this.linkPublicIpId = linkPublicIpId; - } - - public PublicIp nicAccountId(String nicAccountId) { - - this.nicAccountId = nicAccountId; - return this; - } - - /** - * The account ID of the owner of the NIC. - * - * @return nicAccountId - */ - @javax.annotation.Nullable - public String getNicAccountId() { - return nicAccountId; - } - - public void setNicAccountId(String nicAccountId) { - this.nicAccountId = nicAccountId; - } - - public PublicIp nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC the public IP is associated with (if any). - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public PublicIp privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * The private IP associated with the public IP. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - public PublicIp publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public PublicIp publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The allocation ID of the public IP. - * - * @return publicIpId - */ - @javax.annotation.Nullable - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - public PublicIp tags(List tags) { - - this.tags = tags; - return this; - } - - public PublicIp addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the public IP. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public PublicIp vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM the public IP is associated with (if any). - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PublicIp publicIp = (PublicIp) o; - return Objects.equals(this.linkPublicIpId, publicIp.linkPublicIpId) - && Objects.equals(this.nicAccountId, publicIp.nicAccountId) - && Objects.equals(this.nicId, publicIp.nicId) - && Objects.equals(this.privateIp, publicIp.privateIp) - && Objects.equals(this.publicIp, publicIp.publicIp) - && Objects.equals(this.publicIpId, publicIp.publicIpId) - && Objects.equals(this.tags, publicIp.tags) - && Objects.equals(this.vmId, publicIp.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - linkPublicIpId, nicAccountId, nicId, privateIp, publicIp, publicIpId, tags, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PublicIp {\n"); - sb.append(" linkPublicIpId: ").append(toIndentedString(linkPublicIpId)).append("\n"); - sb.append(" nicAccountId: ").append(toIndentedString(nicAccountId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkPublicIpId"); - openapiFields.add("NicAccountId"); - openapiFields.add("NicId"); - openapiFields.add("PrivateIp"); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpId"); - openapiFields.add("Tags"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PublicIp - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PublicIp.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PublicIp is not found in the empty" - + " JSON string", - PublicIp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PublicIp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PublicIp` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkPublicIpId") != null && !jsonObj.get("LinkPublicIpId").isJsonNull()) - && !jsonObj.get("LinkPublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpId").toString())); - } - if ((jsonObj.get("NicAccountId") != null && !jsonObj.get("NicAccountId").isJsonNull()) - && !jsonObj.get("NicAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicAccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NicAccountId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpId") != null && !jsonObj.get("PublicIpId").isJsonNull()) - && !jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PublicIp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PublicIp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PublicIp.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PublicIp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PublicIp read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PublicIp given an JSON string - * - * @param jsonString JSON string - * @return An instance of PublicIp - * @throws IOException if the JSON string is invalid with respect to PublicIp - */ - public static PublicIp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PublicIp.class); - } - - /** - * Convert an instance of PublicIp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLight.java deleted file mode 100644 index 6d19463e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLight.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the public IP. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PublicIpLight { - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_PUBLIC_IP_ID = "PublicIpId"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP_ID) - private String publicIpId; - - public PublicIpLight() {} - - public PublicIpLight publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP associated with the NAT service. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public PublicIpLight publicIpId(String publicIpId) { - - this.publicIpId = publicIpId; - return this; - } - - /** - * The allocation ID of the public IP associated with the NAT service. - * - * @return publicIpId - */ - @javax.annotation.Nullable - public String getPublicIpId() { - return publicIpId; - } - - public void setPublicIpId(String publicIpId) { - this.publicIpId = publicIpId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PublicIpLight publicIpLight = (PublicIpLight) o; - return Objects.equals(this.publicIp, publicIpLight.publicIp) - && Objects.equals(this.publicIpId, publicIpLight.publicIpId); - } - - @Override - public int hashCode() { - return Objects.hash(publicIp, publicIpId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PublicIpLight {\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" publicIpId: ").append(toIndentedString(publicIpId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PublicIp"); - openapiFields.add("PublicIpId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PublicIpLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PublicIpLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PublicIpLight is not found in the" - + " empty JSON string", - PublicIpLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PublicIpLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PublicIpLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("PublicIpId") != null && !jsonObj.get("PublicIpId").isJsonNull()) - && !jsonObj.get("PublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIpId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIpId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PublicIpLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PublicIpLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PublicIpLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PublicIpLight value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PublicIpLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PublicIpLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of PublicIpLight - * @throws IOException if the JSON string is invalid with respect to PublicIpLight - */ - public static PublicIpLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PublicIpLight.class); - } - - /** - * Convert an instance of PublicIpLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequest.java deleted file mode 100644 index fa690322..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequest.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** PutUserGroupPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PutUserGroupPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_DOCUMENT = "PolicyDocument"; - - @SerializedName(SERIALIZED_NAME_POLICY_DOCUMENT) - private String policyDocument; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public PutUserGroupPolicyRequest() {} - - public PutUserGroupPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public PutUserGroupPolicyRequest policyDocument(String policyDocument) { - - this.policyDocument = policyDocument; - return this; - } - - /** - * The policy document, corresponding to a JSON string that contains the policy. For more - * information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and [EIM - * Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html). - * - * @return policyDocument - */ - @javax.annotation.Nonnull - public String getPolicyDocument() { - return policyDocument; - } - - public void setPolicyDocument(String policyDocument) { - this.policyDocument = policyDocument; - } - - public PutUserGroupPolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy. - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - public PutUserGroupPolicyRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public PutUserGroupPolicyRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PutUserGroupPolicyRequest putUserGroupPolicyRequest = (PutUserGroupPolicyRequest) o; - return Objects.equals(this.dryRun, putUserGroupPolicyRequest.dryRun) - && Objects.equals(this.policyDocument, putUserGroupPolicyRequest.policyDocument) - && Objects.equals(this.policyName, putUserGroupPolicyRequest.policyName) - && Objects.equals(this.userGroupName, putUserGroupPolicyRequest.userGroupName) - && Objects.equals(this.userGroupPath, putUserGroupPolicyRequest.userGroupPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyDocument, policyName, userGroupName, userGroupPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PutUserGroupPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyDocument: ").append(toIndentedString(policyDocument)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyDocument"); - openapiFields.add("PolicyName"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyDocument"); - openapiRequiredFields.add("PolicyName"); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PutUserGroupPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PutUserGroupPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PutUserGroupPolicyRequest is not" - + " found in the empty JSON string", - PutUserGroupPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PutUserGroupPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PutUserGroupPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PutUserGroupPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyDocument").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyDocument` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PolicyDocument").toString())); - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PutUserGroupPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PutUserGroupPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PutUserGroupPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PutUserGroupPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PutUserGroupPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PutUserGroupPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PutUserGroupPolicyRequest - * @throws IOException if the JSON string is invalid with respect to PutUserGroupPolicyRequest - */ - public static PutUserGroupPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PutUserGroupPolicyRequest.class); - } - - /** - * Convert an instance of PutUserGroupPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponse.java deleted file mode 100644 index 8d22af38..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** PutUserGroupPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PutUserGroupPolicyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public PutUserGroupPolicyResponse() {} - - public PutUserGroupPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PutUserGroupPolicyResponse putUserGroupPolicyResponse = (PutUserGroupPolicyResponse) o; - return Objects.equals(this.responseContext, putUserGroupPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PutUserGroupPolicyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PutUserGroupPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PutUserGroupPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PutUserGroupPolicyResponse is not" - + " found in the empty JSON string", - PutUserGroupPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PutUserGroupPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PutUserGroupPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PutUserGroupPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PutUserGroupPolicyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PutUserGroupPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PutUserGroupPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PutUserGroupPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PutUserGroupPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PutUserGroupPolicyResponse - * @throws IOException if the JSON string is invalid with respect to PutUserGroupPolicyResponse - */ - public static PutUserGroupPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PutUserGroupPolicyResponse.class); - } - - /** - * Convert an instance of PutUserGroupPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Quota.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Quota.java deleted file mode 100644 index 02b3bd2b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Quota.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the quota. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Quota { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_MAX_VALUE = "MaxValue"; - - @SerializedName(SERIALIZED_NAME_MAX_VALUE) - private Integer maxValue; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_QUOTA_COLLECTION = "QuotaCollection"; - - @SerializedName(SERIALIZED_NAME_QUOTA_COLLECTION) - private String quotaCollection; - - public static final String SERIALIZED_NAME_SHORT_DESCRIPTION = "ShortDescription"; - - @SerializedName(SERIALIZED_NAME_SHORT_DESCRIPTION) - private String shortDescription; - - public static final String SERIALIZED_NAME_USED_VALUE = "UsedValue"; - - @SerializedName(SERIALIZED_NAME_USED_VALUE) - private Integer usedValue; - - public Quota() {} - - public Quota accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the quotas. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Quota description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the quota. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Quota maxValue(Integer maxValue) { - - this.maxValue = maxValue; - return this; - } - - /** - * The maximum value of the quota for the account (if there is no limit, `0`). - * - * @return maxValue - */ - @javax.annotation.Nullable - public Integer getMaxValue() { - return maxValue; - } - - public void setMaxValue(Integer maxValue) { - this.maxValue = maxValue; - } - - public Quota name(String name) { - - this.name = name; - return this; - } - - /** - * The unique name of the quota. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Quota quotaCollection(String quotaCollection) { - - this.quotaCollection = quotaCollection; - return this; - } - - /** - * The group name of the quota. - * - * @return quotaCollection - */ - @javax.annotation.Nullable - public String getQuotaCollection() { - return quotaCollection; - } - - public void setQuotaCollection(String quotaCollection) { - this.quotaCollection = quotaCollection; - } - - public Quota shortDescription(String shortDescription) { - - this.shortDescription = shortDescription; - return this; - } - - /** - * The description of the quota. - * - * @return shortDescription - */ - @javax.annotation.Nullable - public String getShortDescription() { - return shortDescription; - } - - public void setShortDescription(String shortDescription) { - this.shortDescription = shortDescription; - } - - public Quota usedValue(Integer usedValue) { - - this.usedValue = usedValue; - return this; - } - - /** - * The limit value currently used by the account. - * - * @return usedValue - */ - @javax.annotation.Nullable - public Integer getUsedValue() { - return usedValue; - } - - public void setUsedValue(Integer usedValue) { - this.usedValue = usedValue; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Quota quota = (Quota) o; - return Objects.equals(this.accountId, quota.accountId) - && Objects.equals(this.description, quota.description) - && Objects.equals(this.maxValue, quota.maxValue) - && Objects.equals(this.name, quota.name) - && Objects.equals(this.quotaCollection, quota.quotaCollection) - && Objects.equals(this.shortDescription, quota.shortDescription) - && Objects.equals(this.usedValue, quota.usedValue); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - description, - maxValue, - name, - quotaCollection, - shortDescription, - usedValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Quota {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" maxValue: ").append(toIndentedString(maxValue)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" quotaCollection: ").append(toIndentedString(quotaCollection)).append("\n"); - sb.append(" shortDescription: ").append(toIndentedString(shortDescription)).append("\n"); - sb.append(" usedValue: ").append(toIndentedString(usedValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Description"); - openapiFields.add("MaxValue"); - openapiFields.add("Name"); - openapiFields.add("QuotaCollection"); - openapiFields.add("ShortDescription"); - openapiFields.add("UsedValue"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Quota - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Quota.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Quota is not found in the empty JSON" - + " string", - Quota.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Quota.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Quota`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if ((jsonObj.get("QuotaCollection") != null && !jsonObj.get("QuotaCollection").isJsonNull()) - && !jsonObj.get("QuotaCollection").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QuotaCollection` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("QuotaCollection").toString())); - } - if ((jsonObj.get("ShortDescription") != null - && !jsonObj.get("ShortDescription").isJsonNull()) - && !jsonObj.get("ShortDescription").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ShortDescription` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ShortDescription").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Quota.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Quota' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Quota.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Quota value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Quota read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Quota given an JSON string - * - * @param jsonString JSON string - * @return An instance of Quota - * @throws IOException if the JSON string is invalid with respect to Quota - */ - public static Quota fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Quota.class); - } - - /** - * Convert an instance of Quota to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypes.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypes.java deleted file mode 100644 index 2d166c22..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypes.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more quotas. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class QuotaTypes { - public static final String SERIALIZED_NAME_QUOTA_TYPE = "QuotaType"; - - @SerializedName(SERIALIZED_NAME_QUOTA_TYPE) - private String quotaType; - - public static final String SERIALIZED_NAME_QUOTAS = "Quotas"; - - @SerializedName(SERIALIZED_NAME_QUOTAS) - private List quotas = null; - - public QuotaTypes() {} - - public QuotaTypes quotaType(String quotaType) { - - this.quotaType = quotaType; - return this; - } - - /** - * The resource ID if it is a resource-specific quota, `global` if it is not. - * - * @return quotaType - */ - @javax.annotation.Nullable - public String getQuotaType() { - return quotaType; - } - - public void setQuotaType(String quotaType) { - this.quotaType = quotaType; - } - - public QuotaTypes quotas(List quotas) { - - this.quotas = quotas; - return this; - } - - public QuotaTypes addQuotasItem(Quota quotasItem) { - if (this.quotas == null) { - this.quotas = new ArrayList<>(); - } - this.quotas.add(quotasItem); - return this; - } - - /** - * One or more quotas associated with the account. - * - * @return quotas - */ - @javax.annotation.Nullable - public List getQuotas() { - return quotas; - } - - public void setQuotas(List quotas) { - this.quotas = quotas; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuotaTypes quotaTypes = (QuotaTypes) o; - return Objects.equals(this.quotaType, quotaTypes.quotaType) - && Objects.equals(this.quotas, quotaTypes.quotas); - } - - @Override - public int hashCode() { - return Objects.hash(quotaType, quotas); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuotaTypes {\n"); - sb.append(" quotaType: ").append(toIndentedString(quotaType)).append("\n"); - sb.append(" quotas: ").append(toIndentedString(quotas)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("QuotaType"); - openapiFields.add("Quotas"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to QuotaTypes - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!QuotaTypes.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in QuotaTypes is not found in the empty" - + " JSON string", - QuotaTypes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!QuotaTypes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `QuotaTypes` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("QuotaType") != null && !jsonObj.get("QuotaType").isJsonNull()) - && !jsonObj.get("QuotaType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QuotaType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("QuotaType").toString())); - } - if (jsonObj.get("Quotas") != null && !jsonObj.get("Quotas").isJsonNull()) { - JsonArray jsonArrayquotas = jsonObj.getAsJsonArray("Quotas"); - if (jsonArrayquotas != null) { - // ensure the json data is an array - if (!jsonObj.get("Quotas").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Quotas` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Quotas").toString())); - } - - // validate the optional field `Quotas` (array) - for (int i = 0; i < jsonArrayquotas.size(); i++) { - Quota.validateJsonObject(jsonArrayquotas.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!QuotaTypes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'QuotaTypes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(QuotaTypes.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, QuotaTypes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public QuotaTypes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of QuotaTypes given an JSON string - * - * @param jsonString JSON string - * @return An instance of QuotaTypes - * @throws IOException if the JSON string is invalid with respect to QuotaTypes - */ - public static QuotaTypes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, QuotaTypes.class); - } - - /** - * Convert an instance of QuotaTypes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequest.java deleted file mode 100644 index a55709fc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequest.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAccessKeysRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAccessKeysRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersAccessKeys filters; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public ReadAccessKeysRequest() {} - - public ReadAccessKeysRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadAccessKeysRequest filters(FiltersAccessKeys filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersAccessKeys getFilters() { - return filters; - } - - public void setFilters(FiltersAccessKeys filters) { - this.filters = filters; - } - - public ReadAccessKeysRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user. By default, the user who sends the request (which can be the root - * account). - * - * @return userName - */ - @javax.annotation.Nullable - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAccessKeysRequest readAccessKeysRequest = (ReadAccessKeysRequest) o; - return Objects.equals(this.dryRun, readAccessKeysRequest.dryRun) - && Objects.equals(this.filters, readAccessKeysRequest.filters) - && Objects.equals(this.userName, readAccessKeysRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAccessKeysRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAccessKeysRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAccessKeysRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAccessKeysRequest is not found in" - + " the empty JSON string", - ReadAccessKeysRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAccessKeysRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAccessKeysRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersAccessKeys.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - if ((jsonObj.get("UserName") != null && !jsonObj.get("UserName").isJsonNull()) - && !jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAccessKeysRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAccessKeysRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAccessKeysRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAccessKeysRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAccessKeysRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAccessKeysRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAccessKeysRequest - * @throws IOException if the JSON string is invalid with respect to ReadAccessKeysRequest - */ - public static ReadAccessKeysRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAccessKeysRequest.class); - } - - /** - * Convert an instance of ReadAccessKeysRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponse.java deleted file mode 100644 index 927d1e36..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAccessKeysResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAccessKeysResponse { - public static final String SERIALIZED_NAME_ACCESS_KEYS = "AccessKeys"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEYS) - private List accessKeys = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadAccessKeysResponse() {} - - public ReadAccessKeysResponse accessKeys(List accessKeys) { - - this.accessKeys = accessKeys; - return this; - } - - public ReadAccessKeysResponse addAccessKeysItem(AccessKey accessKeysItem) { - if (this.accessKeys == null) { - this.accessKeys = new ArrayList<>(); - } - this.accessKeys.add(accessKeysItem); - return this; - } - - /** - * A list of access keys. - * - * @return accessKeys - */ - @javax.annotation.Nullable - public List getAccessKeys() { - return accessKeys; - } - - public void setAccessKeys(List accessKeys) { - this.accessKeys = accessKeys; - } - - public ReadAccessKeysResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAccessKeysResponse readAccessKeysResponse = (ReadAccessKeysResponse) o; - return Objects.equals(this.accessKeys, readAccessKeysResponse.accessKeys) - && Objects.equals(this.responseContext, readAccessKeysResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeys, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAccessKeysResponse {\n"); - sb.append(" accessKeys: ").append(toIndentedString(accessKeys)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeys"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAccessKeysResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAccessKeysResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAccessKeysResponse is not found" - + " in the empty JSON string", - ReadAccessKeysResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAccessKeysResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAccessKeysResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("AccessKeys") != null && !jsonObj.get("AccessKeys").isJsonNull()) { - JsonArray jsonArrayaccessKeys = jsonObj.getAsJsonArray("AccessKeys"); - if (jsonArrayaccessKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("AccessKeys").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeys` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeys").toString())); - } - - // validate the optional field `AccessKeys` (array) - for (int i = 0; i < jsonArrayaccessKeys.size(); i++) { - AccessKey.validateJsonObject(jsonArrayaccessKeys.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAccessKeysResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAccessKeysResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAccessKeysResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAccessKeysResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAccessKeysResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAccessKeysResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAccessKeysResponse - * @throws IOException if the JSON string is invalid with respect to ReadAccessKeysResponse - */ - public static ReadAccessKeysResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAccessKeysResponse.class); - } - - /** - * Convert an instance of ReadAccessKeysResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequest.java deleted file mode 100644 index d4e12578..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAccountsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAccountsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadAccountsRequest() {} - - public ReadAccountsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAccountsRequest readAccountsRequest = (ReadAccountsRequest) o; - return Objects.equals(this.dryRun, readAccountsRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAccountsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAccountsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAccountsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAccountsRequest is not found in" - + " the empty JSON string", - ReadAccountsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAccountsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAccountsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAccountsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAccountsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAccountsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAccountsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAccountsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAccountsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAccountsRequest - * @throws IOException if the JSON string is invalid with respect to ReadAccountsRequest - */ - public static ReadAccountsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAccountsRequest.class); - } - - /** - * Convert an instance of ReadAccountsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponse.java deleted file mode 100644 index 7bbe076b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAccountsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAccountsResponse { - public static final String SERIALIZED_NAME_ACCOUNTS = "Accounts"; - - @SerializedName(SERIALIZED_NAME_ACCOUNTS) - private List accounts = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadAccountsResponse() {} - - public ReadAccountsResponse accounts(List accounts) { - - this.accounts = accounts; - return this; - } - - public ReadAccountsResponse addAccountsItem(Account accountsItem) { - if (this.accounts == null) { - this.accounts = new ArrayList<>(); - } - this.accounts.add(accountsItem); - return this; - } - - /** - * The list of the accounts. - * - * @return accounts - */ - @javax.annotation.Nullable - public List getAccounts() { - return accounts; - } - - public void setAccounts(List accounts) { - this.accounts = accounts; - } - - public ReadAccountsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAccountsResponse readAccountsResponse = (ReadAccountsResponse) o; - return Objects.equals(this.accounts, readAccountsResponse.accounts) - && Objects.equals(this.responseContext, readAccountsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(accounts, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAccountsResponse {\n"); - sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Accounts"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAccountsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAccountsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAccountsResponse is not found in" - + " the empty JSON string", - ReadAccountsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAccountsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAccountsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Accounts") != null && !jsonObj.get("Accounts").isJsonNull()) { - JsonArray jsonArrayaccounts = jsonObj.getAsJsonArray("Accounts"); - if (jsonArrayaccounts != null) { - // ensure the json data is an array - if (!jsonObj.get("Accounts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Accounts` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Accounts").toString())); - } - - // validate the optional field `Accounts` (array) - for (int i = 0; i < jsonArrayaccounts.size(); i++) { - Account.validateJsonObject(jsonArrayaccounts.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAccountsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAccountsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAccountsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAccountsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAccountsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAccountsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAccountsResponse - * @throws IOException if the JSON string is invalid with respect to ReadAccountsResponse - */ - public static ReadAccountsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAccountsResponse.class); - } - - /** - * Convert an instance of ReadAccountsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequest.java deleted file mode 100644 index 9b5e2365..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAdminPasswordRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdminPasswordRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public ReadAdminPasswordRequest() {} - - public ReadAdminPasswordRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadAdminPasswordRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAdminPasswordRequest readAdminPasswordRequest = (ReadAdminPasswordRequest) o; - return Objects.equals(this.dryRun, readAdminPasswordRequest.dryRun) - && Objects.equals(this.vmId, readAdminPasswordRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdminPasswordRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdminPasswordRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAdminPasswordRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAdminPasswordRequest is not found" - + " in the empty JSON string", - ReadAdminPasswordRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAdminPasswordRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAdminPasswordRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadAdminPasswordRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdminPasswordRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdminPasswordRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAdminPasswordRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAdminPasswordRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAdminPasswordRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAdminPasswordRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAdminPasswordRequest - * @throws IOException if the JSON string is invalid with respect to ReadAdminPasswordRequest - */ - public static ReadAdminPasswordRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdminPasswordRequest.class); - } - - /** - * Convert an instance of ReadAdminPasswordRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponse.java deleted file mode 100644 index db9fd297..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponse.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadAdminPasswordResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdminPasswordResponse { - public static final String SERIALIZED_NAME_ADMIN_PASSWORD = "AdminPassword"; - - @SerializedName(SERIALIZED_NAME_ADMIN_PASSWORD) - private String adminPassword; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public ReadAdminPasswordResponse() {} - - public ReadAdminPasswordResponse adminPassword(String adminPassword) { - - this.adminPassword = adminPassword; - return this; - } - - /** - * The password of the VM. After the first boot, returns an empty string. - * - * @return adminPassword - */ - @javax.annotation.Nullable - public String getAdminPassword() { - return adminPassword; - } - - public void setAdminPassword(String adminPassword) { - this.adminPassword = adminPassword; - } - - public ReadAdminPasswordResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadAdminPasswordResponse vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadAdminPasswordResponse readAdminPasswordResponse = (ReadAdminPasswordResponse) o; - return Objects.equals(this.adminPassword, readAdminPasswordResponse.adminPassword) - && Objects.equals(this.responseContext, readAdminPasswordResponse.responseContext) - && Objects.equals(this.vmId, readAdminPasswordResponse.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(adminPassword, responseContext, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdminPasswordResponse {\n"); - sb.append(" adminPassword: ").append(toIndentedString(adminPassword)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AdminPassword"); - openapiFields.add("ResponseContext"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdminPasswordResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadAdminPasswordResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadAdminPasswordResponse is not" - + " found in the empty JSON string", - ReadAdminPasswordResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadAdminPasswordResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadAdminPasswordResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AdminPassword") != null && !jsonObj.get("AdminPassword").isJsonNull()) - && !jsonObj.get("AdminPassword").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AdminPassword` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AdminPassword").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdminPasswordResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdminPasswordResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadAdminPasswordResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadAdminPasswordResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadAdminPasswordResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadAdminPasswordResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadAdminPasswordResponse - * @throws IOException if the JSON string is invalid with respect to ReadAdminPasswordResponse - */ - public static ReadAdminPasswordResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdminPasswordResponse.class); - } - - /** - * Convert an instance of ReadAdminPasswordResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequest.java deleted file mode 100644 index 4c230d01..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiAccessPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiAccessPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadApiAccessPolicyRequest() {} - - public ReadApiAccessPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiAccessPolicyRequest readApiAccessPolicyRequest = (ReadApiAccessPolicyRequest) o; - return Objects.equals(this.dryRun, readApiAccessPolicyRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiAccessPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiAccessPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiAccessPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiAccessPolicyRequest is not" - + " found in the empty JSON string", - ReadApiAccessPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiAccessPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiAccessPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiAccessPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiAccessPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiAccessPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiAccessPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiAccessPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiAccessPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiAccessPolicyRequest - * @throws IOException if the JSON string is invalid with respect to ReadApiAccessPolicyRequest - */ - public static ReadApiAccessPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiAccessPolicyRequest.class); - } - - /** - * Convert an instance of ReadApiAccessPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponse.java deleted file mode 100644 index e3622f90..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiAccessPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiAccessPolicyResponse { - public static final String SERIALIZED_NAME_API_ACCESS_POLICY = "ApiAccessPolicy"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_POLICY) - private ApiAccessPolicy apiAccessPolicy; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadApiAccessPolicyResponse() {} - - public ReadApiAccessPolicyResponse apiAccessPolicy(ApiAccessPolicy apiAccessPolicy) { - - this.apiAccessPolicy = apiAccessPolicy; - return this; - } - - /** - * Get apiAccessPolicy - * - * @return apiAccessPolicy - */ - @javax.annotation.Nullable - public ApiAccessPolicy getApiAccessPolicy() { - return apiAccessPolicy; - } - - public void setApiAccessPolicy(ApiAccessPolicy apiAccessPolicy) { - this.apiAccessPolicy = apiAccessPolicy; - } - - public ReadApiAccessPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiAccessPolicyResponse readApiAccessPolicyResponse = (ReadApiAccessPolicyResponse) o; - return Objects.equals(this.apiAccessPolicy, readApiAccessPolicyResponse.apiAccessPolicy) - && Objects.equals( - this.responseContext, readApiAccessPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessPolicy, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiAccessPolicyResponse {\n"); - sb.append(" apiAccessPolicy: ").append(toIndentedString(apiAccessPolicy)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessPolicy"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiAccessPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiAccessPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiAccessPolicyResponse is not" - + " found in the empty JSON string", - ReadApiAccessPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiAccessPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiAccessPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ApiAccessPolicy` - if (jsonObj.get("ApiAccessPolicy") != null - && !jsonObj.get("ApiAccessPolicy").isJsonNull()) { - ApiAccessPolicy.validateJsonObject(jsonObj.getAsJsonObject("ApiAccessPolicy")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiAccessPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiAccessPolicyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiAccessPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiAccessPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiAccessPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiAccessPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiAccessPolicyResponse - * @throws IOException if the JSON string is invalid with respect to ReadApiAccessPolicyResponse - */ - public static ReadApiAccessPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiAccessPolicyResponse.class); - } - - /** - * Convert an instance of ReadApiAccessPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequest.java deleted file mode 100644 index 5eff5900..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequest.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiAccessRulesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiAccessRulesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersApiAccessRule filters; - - public ReadApiAccessRulesRequest() {} - - public ReadApiAccessRulesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadApiAccessRulesRequest filters(FiltersApiAccessRule filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersApiAccessRule getFilters() { - return filters; - } - - public void setFilters(FiltersApiAccessRule filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiAccessRulesRequest readApiAccessRulesRequest = (ReadApiAccessRulesRequest) o; - return Objects.equals(this.dryRun, readApiAccessRulesRequest.dryRun) - && Objects.equals(this.filters, readApiAccessRulesRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiAccessRulesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiAccessRulesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiAccessRulesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiAccessRulesRequest is not" - + " found in the empty JSON string", - ReadApiAccessRulesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiAccessRulesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiAccessRulesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersApiAccessRule.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiAccessRulesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiAccessRulesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiAccessRulesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiAccessRulesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiAccessRulesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiAccessRulesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiAccessRulesRequest - * @throws IOException if the JSON string is invalid with respect to ReadApiAccessRulesRequest - */ - public static ReadApiAccessRulesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiAccessRulesRequest.class); - } - - /** - * Convert an instance of ReadApiAccessRulesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponse.java deleted file mode 100644 index 6bf5a0e0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponse.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiAccessRulesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiAccessRulesResponse { - public static final String SERIALIZED_NAME_API_ACCESS_RULES = "ApiAccessRules"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULES) - private List apiAccessRules = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadApiAccessRulesResponse() {} - - public ReadApiAccessRulesResponse apiAccessRules(List apiAccessRules) { - - this.apiAccessRules = apiAccessRules; - return this; - } - - public ReadApiAccessRulesResponse addApiAccessRulesItem(ApiAccessRule apiAccessRulesItem) { - if (this.apiAccessRules == null) { - this.apiAccessRules = new ArrayList<>(); - } - this.apiAccessRules.add(apiAccessRulesItem); - return this; - } - - /** - * A list of API access rules. - * - * @return apiAccessRules - */ - @javax.annotation.Nullable - public List getApiAccessRules() { - return apiAccessRules; - } - - public void setApiAccessRules(List apiAccessRules) { - this.apiAccessRules = apiAccessRules; - } - - public ReadApiAccessRulesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiAccessRulesResponse readApiAccessRulesResponse = (ReadApiAccessRulesResponse) o; - return Objects.equals(this.apiAccessRules, readApiAccessRulesResponse.apiAccessRules) - && Objects.equals(this.responseContext, readApiAccessRulesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRules, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiAccessRulesResponse {\n"); - sb.append(" apiAccessRules: ").append(toIndentedString(apiAccessRules)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRules"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiAccessRulesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiAccessRulesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiAccessRulesResponse is not" - + " found in the empty JSON string", - ReadApiAccessRulesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiAccessRulesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiAccessRulesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ApiAccessRules") != null && !jsonObj.get("ApiAccessRules").isJsonNull()) { - JsonArray jsonArrayapiAccessRules = jsonObj.getAsJsonArray("ApiAccessRules"); - if (jsonArrayapiAccessRules != null) { - // ensure the json data is an array - if (!jsonObj.get("ApiAccessRules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiAccessRules` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("ApiAccessRules").toString())); - } - - // validate the optional field `ApiAccessRules` (array) - for (int i = 0; i < jsonArrayapiAccessRules.size(); i++) { - ApiAccessRule.validateJsonObject( - jsonArrayapiAccessRules.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiAccessRulesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiAccessRulesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiAccessRulesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiAccessRulesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiAccessRulesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiAccessRulesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiAccessRulesResponse - * @throws IOException if the JSON string is invalid with respect to ReadApiAccessRulesResponse - */ - public static ReadApiAccessRulesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiAccessRulesResponse.class); - } - - /** - * Convert an instance of ReadApiAccessRulesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequest.java deleted file mode 100644 index f1bb3740..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequest.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiLogsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiLogsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersApiLog filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private String nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage = 100; - - public static final String SERIALIZED_NAME_WITH = "With"; - - @SerializedName(SERIALIZED_NAME_WITH) - private With with; - - public ReadApiLogsRequest() {} - - public ReadApiLogsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadApiLogsRequest filters(FiltersApiLog filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersApiLog getFilters() { - return filters; - } - - public void setFilters(FiltersApiLog filters) { - this.filters = filters; - } - - public ReadApiLogsRequest nextPageToken(String nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public String getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(String nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadApiLogsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - public ReadApiLogsRequest with(With with) { - - this.with = with; - return this; - } - - /** - * Get with - * - * @return with - */ - @javax.annotation.Nullable - public With getWith() { - return with; - } - - public void setWith(With with) { - this.with = with; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiLogsRequest readApiLogsRequest = (ReadApiLogsRequest) o; - return Objects.equals(this.dryRun, readApiLogsRequest.dryRun) - && Objects.equals(this.filters, readApiLogsRequest.filters) - && Objects.equals(this.nextPageToken, readApiLogsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readApiLogsRequest.resultsPerPage) - && Objects.equals(this.with, readApiLogsRequest.with); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, nextPageToken, resultsPerPage, with); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiLogsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append(" with: ").append(toIndentedString(with)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - openapiFields.add("With"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiLogsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiLogsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiLogsRequest is not found in" - + " the empty JSON string", - ReadApiLogsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiLogsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiLogsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersApiLog.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - if ((jsonObj.get("NextPageToken") != null && !jsonObj.get("NextPageToken").isJsonNull()) - && !jsonObj.get("NextPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NextPageToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NextPageToken").toString())); - } - // validate the optional field `With` - if (jsonObj.get("With") != null && !jsonObj.get("With").isJsonNull()) { - With.validateJsonObject(jsonObj.getAsJsonObject("With")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiLogsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiLogsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiLogsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiLogsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiLogsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiLogsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiLogsRequest - * @throws IOException if the JSON string is invalid with respect to ReadApiLogsRequest - */ - public static ReadApiLogsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiLogsRequest.class); - } - - /** - * Convert an instance of ReadApiLogsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponse.java deleted file mode 100644 index 8e6adac4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponse.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadApiLogsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadApiLogsResponse { - public static final String SERIALIZED_NAME_LOGS = "Logs"; - - @SerializedName(SERIALIZED_NAME_LOGS) - private List logs = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private String nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadApiLogsResponse() {} - - public ReadApiLogsResponse logs(List logs) { - - this.logs = logs; - return this; - } - - public ReadApiLogsResponse addLogsItem(Log logsItem) { - if (this.logs == null) { - this.logs = new ArrayList<>(); - } - this.logs.add(logsItem); - return this; - } - - /** - * Information about one or more logs. - * - * @return logs - */ - @javax.annotation.Nullable - public List getLogs() { - return logs; - } - - public void setLogs(List logs) { - this.logs = logs; - } - - public ReadApiLogsResponse nextPageToken(String nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public String getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(String nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadApiLogsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadApiLogsResponse readApiLogsResponse = (ReadApiLogsResponse) o; - return Objects.equals(this.logs, readApiLogsResponse.logs) - && Objects.equals(this.nextPageToken, readApiLogsResponse.nextPageToken) - && Objects.equals(this.responseContext, readApiLogsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(logs, nextPageToken, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadApiLogsResponse {\n"); - sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Logs"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadApiLogsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadApiLogsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadApiLogsResponse is not found in" - + " the empty JSON string", - ReadApiLogsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadApiLogsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadApiLogsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Logs") != null && !jsonObj.get("Logs").isJsonNull()) { - JsonArray jsonArraylogs = jsonObj.getAsJsonArray("Logs"); - if (jsonArraylogs != null) { - // ensure the json data is an array - if (!jsonObj.get("Logs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Logs` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Logs").toString())); - } - - // validate the optional field `Logs` (array) - for (int i = 0; i < jsonArraylogs.size(); i++) { - Log.validateJsonObject(jsonArraylogs.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("NextPageToken") != null && !jsonObj.get("NextPageToken").isJsonNull()) - && !jsonObj.get("NextPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NextPageToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NextPageToken").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadApiLogsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadApiLogsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadApiLogsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadApiLogsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadApiLogsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadApiLogsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadApiLogsResponse - * @throws IOException if the JSON string is invalid with respect to ReadApiLogsResponse - */ - public static ReadApiLogsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadApiLogsResponse.class); - } - - /** - * Convert an instance of ReadApiLogsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequest.java deleted file mode 100644 index 6dbbbc50..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCasRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCasRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersCa filters; - - public ReadCasRequest() {} - - public ReadCasRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadCasRequest filters(FiltersCa filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersCa getFilters() { - return filters; - } - - public void setFilters(FiltersCa filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCasRequest readCasRequest = (ReadCasRequest) o; - return Objects.equals(this.dryRun, readCasRequest.dryRun) - && Objects.equals(this.filters, readCasRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCasRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCasRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCasRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCasRequest is not found in the" - + " empty JSON string", - ReadCasRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCasRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCasRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersCa.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCasRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCasRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCasRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCasRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCasRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCasRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCasRequest - * @throws IOException if the JSON string is invalid with respect to ReadCasRequest - */ - public static ReadCasRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCasRequest.class); - } - - /** - * Convert an instance of ReadCasRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponse.java deleted file mode 100644 index 29b65539..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCasResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCasResponse { - public static final String SERIALIZED_NAME_CAS = "Cas"; - - @SerializedName(SERIALIZED_NAME_CAS) - private List cas = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadCasResponse() {} - - public ReadCasResponse cas(List cas) { - - this.cas = cas; - return this; - } - - public ReadCasResponse addCasItem(Ca casItem) { - if (this.cas == null) { - this.cas = new ArrayList<>(); - } - this.cas.add(casItem); - return this; - } - - /** - * Information about one or more CAs. - * - * @return cas - */ - @javax.annotation.Nullable - public List getCas() { - return cas; - } - - public void setCas(List cas) { - this.cas = cas; - } - - public ReadCasResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCasResponse readCasResponse = (ReadCasResponse) o; - return Objects.equals(this.cas, readCasResponse.cas) - && Objects.equals(this.responseContext, readCasResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(cas, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCasResponse {\n"); - sb.append(" cas: ").append(toIndentedString(cas)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Cas"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCasResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCasResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCasResponse is not found in the" - + " empty JSON string", - ReadCasResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCasResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCasResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Cas") != null && !jsonObj.get("Cas").isJsonNull()) { - JsonArray jsonArraycas = jsonObj.getAsJsonArray("Cas"); - if (jsonArraycas != null) { - // ensure the json data is an array - if (!jsonObj.get("Cas").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cas` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Cas").toString())); - } - - // validate the optional field `Cas` (array) - for (int i = 0; i < jsonArraycas.size(); i++) { - Ca.validateJsonObject(jsonArraycas.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCasResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCasResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCasResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCasResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCasResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCasResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCasResponse - * @throws IOException if the JSON string is invalid with respect to ReadCasResponse - */ - public static ReadCasResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCasResponse.class); - } - - /** - * Convert an instance of ReadCasResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequest.java deleted file mode 100644 index 97dd00a1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCatalogRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCatalogRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadCatalogRequest() {} - - public ReadCatalogRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCatalogRequest readCatalogRequest = (ReadCatalogRequest) o; - return Objects.equals(this.dryRun, readCatalogRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCatalogRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCatalogRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCatalogRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCatalogRequest is not found in" - + " the empty JSON string", - ReadCatalogRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCatalogRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCatalogRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCatalogRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCatalogRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCatalogRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCatalogRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCatalogRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCatalogRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCatalogRequest - * @throws IOException if the JSON string is invalid with respect to ReadCatalogRequest - */ - public static ReadCatalogRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCatalogRequest.class); - } - - /** - * Convert an instance of ReadCatalogRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponse.java deleted file mode 100644 index b01d5f77..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCatalogResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCatalogResponse { - public static final String SERIALIZED_NAME_CATALOG = "Catalog"; - - @SerializedName(SERIALIZED_NAME_CATALOG) - private Catalog catalog; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadCatalogResponse() {} - - public ReadCatalogResponse catalog(Catalog catalog) { - - this.catalog = catalog; - return this; - } - - /** - * Get catalog - * - * @return catalog - */ - @javax.annotation.Nullable - public Catalog getCatalog() { - return catalog; - } - - public void setCatalog(Catalog catalog) { - this.catalog = catalog; - } - - public ReadCatalogResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCatalogResponse readCatalogResponse = (ReadCatalogResponse) o; - return Objects.equals(this.catalog, readCatalogResponse.catalog) - && Objects.equals(this.responseContext, readCatalogResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(catalog, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCatalogResponse {\n"); - sb.append(" catalog: ").append(toIndentedString(catalog)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Catalog"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCatalogResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCatalogResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCatalogResponse is not found in" - + " the empty JSON string", - ReadCatalogResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCatalogResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCatalogResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Catalog` - if (jsonObj.get("Catalog") != null && !jsonObj.get("Catalog").isJsonNull()) { - Catalog.validateJsonObject(jsonObj.getAsJsonObject("Catalog")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCatalogResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCatalogResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCatalogResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCatalogResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCatalogResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCatalogResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCatalogResponse - * @throws IOException if the JSON string is invalid with respect to ReadCatalogResponse - */ - public static ReadCatalogResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCatalogResponse.class); - } - - /** - * Convert an instance of ReadCatalogResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequest.java deleted file mode 100644 index f1eab566..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCatalogsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCatalogsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersCatalogs filters; - - public ReadCatalogsRequest() {} - - public ReadCatalogsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadCatalogsRequest filters(FiltersCatalogs filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersCatalogs getFilters() { - return filters; - } - - public void setFilters(FiltersCatalogs filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCatalogsRequest readCatalogsRequest = (ReadCatalogsRequest) o; - return Objects.equals(this.dryRun, readCatalogsRequest.dryRun) - && Objects.equals(this.filters, readCatalogsRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCatalogsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCatalogsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCatalogsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCatalogsRequest is not found in" - + " the empty JSON string", - ReadCatalogsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCatalogsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCatalogsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersCatalogs.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCatalogsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCatalogsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCatalogsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCatalogsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCatalogsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCatalogsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCatalogsRequest - * @throws IOException if the JSON string is invalid with respect to ReadCatalogsRequest - */ - public static ReadCatalogsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCatalogsRequest.class); - } - - /** - * Convert an instance of ReadCatalogsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponse.java deleted file mode 100644 index ab8be647..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadCatalogsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadCatalogsResponse { - public static final String SERIALIZED_NAME_CATALOGS = "Catalogs"; - - @SerializedName(SERIALIZED_NAME_CATALOGS) - private List catalogs = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadCatalogsResponse() {} - - public ReadCatalogsResponse catalogs(List catalogs) { - - this.catalogs = catalogs; - return this; - } - - public ReadCatalogsResponse addCatalogsItem(Catalogs catalogsItem) { - if (this.catalogs == null) { - this.catalogs = new ArrayList<>(); - } - this.catalogs.add(catalogsItem); - return this; - } - - /** - * Information about one or more catalogs. - * - * @return catalogs - */ - @javax.annotation.Nullable - public List getCatalogs() { - return catalogs; - } - - public void setCatalogs(List catalogs) { - this.catalogs = catalogs; - } - - public ReadCatalogsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadCatalogsResponse readCatalogsResponse = (ReadCatalogsResponse) o; - return Objects.equals(this.catalogs, readCatalogsResponse.catalogs) - && Objects.equals(this.responseContext, readCatalogsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(catalogs, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadCatalogsResponse {\n"); - sb.append(" catalogs: ").append(toIndentedString(catalogs)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Catalogs"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadCatalogsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadCatalogsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadCatalogsResponse is not found in" - + " the empty JSON string", - ReadCatalogsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadCatalogsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadCatalogsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Catalogs") != null && !jsonObj.get("Catalogs").isJsonNull()) { - JsonArray jsonArraycatalogs = jsonObj.getAsJsonArray("Catalogs"); - if (jsonArraycatalogs != null) { - // ensure the json data is an array - if (!jsonObj.get("Catalogs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Catalogs` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Catalogs").toString())); - } - - // validate the optional field `Catalogs` (array) - for (int i = 0; i < jsonArraycatalogs.size(); i++) { - Catalogs.validateJsonObject(jsonArraycatalogs.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadCatalogsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadCatalogsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadCatalogsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadCatalogsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadCatalogsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadCatalogsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadCatalogsResponse - * @throws IOException if the JSON string is invalid with respect to ReadCatalogsResponse - */ - public static ReadCatalogsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadCatalogsResponse.class); - } - - /** - * Convert an instance of ReadCatalogsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequest.java deleted file mode 100644 index 68fc71fd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadClientGatewaysRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadClientGatewaysRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersClientGateway filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadClientGatewaysRequest() {} - - public ReadClientGatewaysRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadClientGatewaysRequest filters(FiltersClientGateway filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersClientGateway getFilters() { - return filters; - } - - public void setFilters(FiltersClientGateway filters) { - this.filters = filters; - } - - public ReadClientGatewaysRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadClientGatewaysRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadClientGatewaysRequest readClientGatewaysRequest = (ReadClientGatewaysRequest) o; - return Objects.equals(this.dryRun, readClientGatewaysRequest.dryRun) - && Objects.equals(this.filters, readClientGatewaysRequest.filters) - && Arrays.equals(this.nextPageToken, readClientGatewaysRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readClientGatewaysRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadClientGatewaysRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadClientGatewaysRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadClientGatewaysRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadClientGatewaysRequest is not" - + " found in the empty JSON string", - ReadClientGatewaysRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadClientGatewaysRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadClientGatewaysRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersClientGateway.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadClientGatewaysRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadClientGatewaysRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadClientGatewaysRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadClientGatewaysRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadClientGatewaysRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadClientGatewaysRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadClientGatewaysRequest - * @throws IOException if the JSON string is invalid with respect to ReadClientGatewaysRequest - */ - public static ReadClientGatewaysRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadClientGatewaysRequest.class); - } - - /** - * Convert an instance of ReadClientGatewaysRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponse.java deleted file mode 100644 index 85007886..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadClientGatewaysResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadClientGatewaysResponse { - public static final String SERIALIZED_NAME_CLIENT_GATEWAYS = "ClientGateways"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAYS) - private List clientGateways = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadClientGatewaysResponse() {} - - public ReadClientGatewaysResponse clientGateways(List clientGateways) { - - this.clientGateways = clientGateways; - return this; - } - - public ReadClientGatewaysResponse addClientGatewaysItem(ClientGateway clientGatewaysItem) { - if (this.clientGateways == null) { - this.clientGateways = new ArrayList<>(); - } - this.clientGateways.add(clientGatewaysItem); - return this; - } - - /** - * Information about one or more client gateways. - * - * @return clientGateways - */ - @javax.annotation.Nullable - public List getClientGateways() { - return clientGateways; - } - - public void setClientGateways(List clientGateways) { - this.clientGateways = clientGateways; - } - - public ReadClientGatewaysResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadClientGatewaysResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadClientGatewaysResponse readClientGatewaysResponse = (ReadClientGatewaysResponse) o; - return Objects.equals(this.clientGateways, readClientGatewaysResponse.clientGateways) - && Arrays.equals(this.nextPageToken, readClientGatewaysResponse.nextPageToken) - && Objects.equals(this.responseContext, readClientGatewaysResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(clientGateways, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadClientGatewaysResponse {\n"); - sb.append(" clientGateways: ").append(toIndentedString(clientGateways)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGateways"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadClientGatewaysResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadClientGatewaysResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadClientGatewaysResponse is not" - + " found in the empty JSON string", - ReadClientGatewaysResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadClientGatewaysResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadClientGatewaysResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ClientGateways") != null && !jsonObj.get("ClientGateways").isJsonNull()) { - JsonArray jsonArrayclientGateways = jsonObj.getAsJsonArray("ClientGateways"); - if (jsonArrayclientGateways != null) { - // ensure the json data is an array - if (!jsonObj.get("ClientGateways").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGateways` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGateways").toString())); - } - - // validate the optional field `ClientGateways` (array) - for (int i = 0; i < jsonArrayclientGateways.size(); i++) { - ClientGateway.validateJsonObject( - jsonArrayclientGateways.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadClientGatewaysResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadClientGatewaysResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadClientGatewaysResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadClientGatewaysResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadClientGatewaysResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadClientGatewaysResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadClientGatewaysResponse - * @throws IOException if the JSON string is invalid with respect to ReadClientGatewaysResponse - */ - public static ReadClientGatewaysResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadClientGatewaysResponse.class); - } - - /** - * Convert an instance of ReadClientGatewaysResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequest.java deleted file mode 100644 index 3f2b9569..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadConsoleOutputRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadConsoleOutputRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public ReadConsoleOutputRequest() {} - - public ReadConsoleOutputRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadConsoleOutputRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadConsoleOutputRequest readConsoleOutputRequest = (ReadConsoleOutputRequest) o; - return Objects.equals(this.dryRun, readConsoleOutputRequest.dryRun) - && Objects.equals(this.vmId, readConsoleOutputRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadConsoleOutputRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadConsoleOutputRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadConsoleOutputRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadConsoleOutputRequest is not found" - + " in the empty JSON string", - ReadConsoleOutputRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadConsoleOutputRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadConsoleOutputRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadConsoleOutputRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadConsoleOutputRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadConsoleOutputRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadConsoleOutputRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadConsoleOutputRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadConsoleOutputRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadConsoleOutputRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadConsoleOutputRequest - * @throws IOException if the JSON string is invalid with respect to ReadConsoleOutputRequest - */ - public static ReadConsoleOutputRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadConsoleOutputRequest.class); - } - - /** - * Convert an instance of ReadConsoleOutputRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponse.java deleted file mode 100644 index 00956686..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponse.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadConsoleOutputResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadConsoleOutputResponse { - public static final String SERIALIZED_NAME_CONSOLE_OUTPUT = "ConsoleOutput"; - - @SerializedName(SERIALIZED_NAME_CONSOLE_OUTPUT) - private String consoleOutput; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public ReadConsoleOutputResponse() {} - - public ReadConsoleOutputResponse consoleOutput(String consoleOutput) { - - this.consoleOutput = consoleOutput; - return this; - } - - /** - * The Base64-encoded output of the console. If a command line tool is used, the output is - * decoded by the tool. - * - * @return consoleOutput - */ - @javax.annotation.Nullable - public String getConsoleOutput() { - return consoleOutput; - } - - public void setConsoleOutput(String consoleOutput) { - this.consoleOutput = consoleOutput; - } - - public ReadConsoleOutputResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadConsoleOutputResponse vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadConsoleOutputResponse readConsoleOutputResponse = (ReadConsoleOutputResponse) o; - return Objects.equals(this.consoleOutput, readConsoleOutputResponse.consoleOutput) - && Objects.equals(this.responseContext, readConsoleOutputResponse.responseContext) - && Objects.equals(this.vmId, readConsoleOutputResponse.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(consoleOutput, responseContext, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadConsoleOutputResponse {\n"); - sb.append(" consoleOutput: ").append(toIndentedString(consoleOutput)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ConsoleOutput"); - openapiFields.add("ResponseContext"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadConsoleOutputResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadConsoleOutputResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadConsoleOutputResponse is not" - + " found in the empty JSON string", - ReadConsoleOutputResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadConsoleOutputResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadConsoleOutputResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ConsoleOutput") != null && !jsonObj.get("ConsoleOutput").isJsonNull()) - && !jsonObj.get("ConsoleOutput").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConsoleOutput` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ConsoleOutput").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadConsoleOutputResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadConsoleOutputResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadConsoleOutputResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadConsoleOutputResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadConsoleOutputResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadConsoleOutputResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadConsoleOutputResponse - * @throws IOException if the JSON string is invalid with respect to ReadConsoleOutputResponse - */ - public static ReadConsoleOutputResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadConsoleOutputResponse.class); - } - - /** - * Convert an instance of ReadConsoleOutputResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequest.java deleted file mode 100644 index 1c637f34..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequest.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadConsumptionAccountRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadConsumptionAccountRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FROM_DATE = "FromDate"; - - @SerializedName(SERIALIZED_NAME_FROM_DATE) - private LocalDate fromDate; - - public static final String SERIALIZED_NAME_OVERALL = "Overall"; - - @SerializedName(SERIALIZED_NAME_OVERALL) - private Boolean overall = false; - - public static final String SERIALIZED_NAME_SHOW_PRICE = "ShowPrice"; - - @SerializedName(SERIALIZED_NAME_SHOW_PRICE) - private Boolean showPrice; - - public static final String SERIALIZED_NAME_TO_DATE = "ToDate"; - - @SerializedName(SERIALIZED_NAME_TO_DATE) - private LocalDate toDate; - - public ReadConsumptionAccountRequest() {} - - public ReadConsumptionAccountRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadConsumptionAccountRequest fromDate(LocalDate fromDate) { - - this.fromDate = fromDate; - return this; - } - - /** - * The beginning of the time period, in ISO 8601 date format (for example, - * `2020-06-14`). The date-time format is also accepted, but only with a time set to - * midnight (for example, `2020-06-14T00:00:00.000Z`). This value is included in the - * time period. - * - * @return fromDate - */ - @javax.annotation.Nonnull - public LocalDate getFromDate() { - return fromDate; - } - - public void setFromDate(LocalDate fromDate) { - this.fromDate = fromDate; - } - - public ReadConsumptionAccountRequest overall(Boolean overall) { - - this.overall = overall; - return this; - } - - /** - * By default or if false, returns only the consumption of the specific account that sends this - * request. If true, returns either the overall consumption of your paying account and all - * linked accounts (if the account that sends this request is a paying account) or returns - * nothing (if the account that sends this request is a linked account). - * - * @return overall - */ - @javax.annotation.Nullable - public Boolean getOverall() { - return overall; - } - - public void setOverall(Boolean overall) { - this.overall = overall; - } - - public ReadConsumptionAccountRequest showPrice(Boolean showPrice) { - - this.showPrice = showPrice; - return this; - } - - /** - * If true, the response also includes the unit price of the consumed resource - * (`UnitPrice`) and the total price of the consumed resource during the specified - * time period (`Price`), in the currency of your account. - * - * @return showPrice - */ - @javax.annotation.Nullable - public Boolean getShowPrice() { - return showPrice; - } - - public void setShowPrice(Boolean showPrice) { - this.showPrice = showPrice; - } - - public ReadConsumptionAccountRequest toDate(LocalDate toDate) { - - this.toDate = toDate; - return this; - } - - /** - * The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). - * The date-time format is also accepted, but only with a time set to midnight (for example, - * `2020-06-30T00:00:00.000Z`). This value is excluded from the time period, and must - * be set to a later date than `FromDate`. - * - * @return toDate - */ - @javax.annotation.Nonnull - public LocalDate getToDate() { - return toDate; - } - - public void setToDate(LocalDate toDate) { - this.toDate = toDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadConsumptionAccountRequest readConsumptionAccountRequest = - (ReadConsumptionAccountRequest) o; - return Objects.equals(this.dryRun, readConsumptionAccountRequest.dryRun) - && Objects.equals(this.fromDate, readConsumptionAccountRequest.fromDate) - && Objects.equals(this.overall, readConsumptionAccountRequest.overall) - && Objects.equals(this.showPrice, readConsumptionAccountRequest.showPrice) - && Objects.equals(this.toDate, readConsumptionAccountRequest.toDate); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, fromDate, overall, showPrice, toDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadConsumptionAccountRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" fromDate: ").append(toIndentedString(fromDate)).append("\n"); - sb.append(" overall: ").append(toIndentedString(overall)).append("\n"); - sb.append(" showPrice: ").append(toIndentedString(showPrice)).append("\n"); - sb.append(" toDate: ").append(toIndentedString(toDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("FromDate"); - openapiFields.add("Overall"); - openapiFields.add("ShowPrice"); - openapiFields.add("ToDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("FromDate"); - openapiRequiredFields.add("ToDate"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadConsumptionAccountRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadConsumptionAccountRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadConsumptionAccountRequest is not" - + " found in the empty JSON string", - ReadConsumptionAccountRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadConsumptionAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadConsumptionAccountRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadConsumptionAccountRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadConsumptionAccountRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadConsumptionAccountRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadConsumptionAccountRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadConsumptionAccountRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadConsumptionAccountRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadConsumptionAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadConsumptionAccountRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadConsumptionAccountRequest - */ - public static ReadConsumptionAccountRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadConsumptionAccountRequest.class); - } - - /** - * Convert an instance of ReadConsumptionAccountRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponse.java deleted file mode 100644 index c2b609b6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponse.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ReadConsumptionAccountResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadConsumptionAccountResponse { - public static final String SERIALIZED_NAME_CONSUMPTION_ENTRIES = "ConsumptionEntries"; - - @SerializedName(SERIALIZED_NAME_CONSUMPTION_ENTRIES) - private List consumptionEntries = null; - - public static final String SERIALIZED_NAME_CURRENCY = "Currency"; - - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadConsumptionAccountResponse() {} - - public ReadConsumptionAccountResponse consumptionEntries( - List consumptionEntries) { - - this.consumptionEntries = consumptionEntries; - return this; - } - - public ReadConsumptionAccountResponse addConsumptionEntriesItem( - ConsumptionEntry consumptionEntriesItem) { - if (this.consumptionEntries == null) { - this.consumptionEntries = new ArrayList<>(); - } - this.consumptionEntries.add(consumptionEntriesItem); - return this; - } - - /** - * Information about the resources consumed during the specified time period. - * - * @return consumptionEntries - */ - @javax.annotation.Nullable - public List getConsumptionEntries() { - return consumptionEntries; - } - - public void setConsumptionEntries(List consumptionEntries) { - this.consumptionEntries = consumptionEntries; - } - - public ReadConsumptionAccountResponse currency(String currency) { - - this.currency = currency; - return this; - } - - /** - * The currency of your account for the `UnitPrice` and `Price` parameters, - * in the ISO-4217 format (for example, `EUR`). - * - * @return currency - */ - @javax.annotation.Nullable - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public ReadConsumptionAccountResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadConsumptionAccountResponse readConsumptionAccountResponse = - (ReadConsumptionAccountResponse) o; - return Objects.equals( - this.consumptionEntries, readConsumptionAccountResponse.consumptionEntries) - && Objects.equals(this.currency, readConsumptionAccountResponse.currency) - && Objects.equals( - this.responseContext, readConsumptionAccountResponse.responseContext); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(consumptionEntries, currency, responseContext); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadConsumptionAccountResponse {\n"); - sb.append(" consumptionEntries: ") - .append(toIndentedString(consumptionEntries)) - .append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ConsumptionEntries"); - openapiFields.add("Currency"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadConsumptionAccountResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadConsumptionAccountResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadConsumptionAccountResponse is not" - + " found in the empty JSON string", - ReadConsumptionAccountResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadConsumptionAccountResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadConsumptionAccountResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ConsumptionEntries") != null - && !jsonObj.get("ConsumptionEntries").isJsonNull()) { - JsonArray jsonArrayconsumptionEntries = jsonObj.getAsJsonArray("ConsumptionEntries"); - if (jsonArrayconsumptionEntries != null) { - // ensure the json data is an array - if (!jsonObj.get("ConsumptionEntries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConsumptionEntries` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("ConsumptionEntries").toString())); - } - - // validate the optional field `ConsumptionEntries` (array) - for (int i = 0; i < jsonArrayconsumptionEntries.size(); i++) { - ConsumptionEntry.validateJsonObject( - jsonArrayconsumptionEntries.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("Currency") != null && !jsonObj.get("Currency").isJsonNull()) - && !jsonObj.get("Currency").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Currency` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Currency").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadConsumptionAccountResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadConsumptionAccountResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadConsumptionAccountResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadConsumptionAccountResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadConsumptionAccountResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadConsumptionAccountResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadConsumptionAccountResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadConsumptionAccountResponse - */ - public static ReadConsumptionAccountResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadConsumptionAccountResponse.class); - } - - /** - * Convert an instance of ReadConsumptionAccountResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequest.java deleted file mode 100644 index a701f33f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDedicatedGroupsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDedicatedGroupsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersDedicatedGroup filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadDedicatedGroupsRequest() {} - - public ReadDedicatedGroupsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadDedicatedGroupsRequest filters(FiltersDedicatedGroup filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersDedicatedGroup getFilters() { - return filters; - } - - public void setFilters(FiltersDedicatedGroup filters) { - this.filters = filters; - } - - public ReadDedicatedGroupsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDedicatedGroupsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDedicatedGroupsRequest readDedicatedGroupsRequest = (ReadDedicatedGroupsRequest) o; - return Objects.equals(this.dryRun, readDedicatedGroupsRequest.dryRun) - && Objects.equals(this.filters, readDedicatedGroupsRequest.filters) - && Arrays.equals(this.nextPageToken, readDedicatedGroupsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readDedicatedGroupsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDedicatedGroupsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDedicatedGroupsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDedicatedGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDedicatedGroupsRequest is not" - + " found in the empty JSON string", - ReadDedicatedGroupsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDedicatedGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDedicatedGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersDedicatedGroup.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDedicatedGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDedicatedGroupsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDedicatedGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDedicatedGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDedicatedGroupsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDedicatedGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDedicatedGroupsRequest - * @throws IOException if the JSON string is invalid with respect to ReadDedicatedGroupsRequest - */ - public static ReadDedicatedGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDedicatedGroupsRequest.class); - } - - /** - * Convert an instance of ReadDedicatedGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponse.java deleted file mode 100644 index d77c950c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponse.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDedicatedGroupsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDedicatedGroupsResponse { - public static final String SERIALIZED_NAME_DEDICATED_GROUPS = "DedicatedGroups"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUPS) - private List dedicatedGroups = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadDedicatedGroupsResponse() {} - - public ReadDedicatedGroupsResponse dedicatedGroups(List dedicatedGroups) { - - this.dedicatedGroups = dedicatedGroups; - return this; - } - - public ReadDedicatedGroupsResponse addDedicatedGroupsItem(DedicatedGroup dedicatedGroupsItem) { - if (this.dedicatedGroups == null) { - this.dedicatedGroups = new ArrayList<>(); - } - this.dedicatedGroups.add(dedicatedGroupsItem); - return this; - } - - /** - * Information about one or more dedicated groups. - * - * @return dedicatedGroups - */ - @javax.annotation.Nullable - public List getDedicatedGroups() { - return dedicatedGroups; - } - - public void setDedicatedGroups(List dedicatedGroups) { - this.dedicatedGroups = dedicatedGroups; - } - - public ReadDedicatedGroupsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDedicatedGroupsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDedicatedGroupsResponse readDedicatedGroupsResponse = (ReadDedicatedGroupsResponse) o; - return Objects.equals(this.dedicatedGroups, readDedicatedGroupsResponse.dedicatedGroups) - && Arrays.equals(this.nextPageToken, readDedicatedGroupsResponse.nextPageToken) - && Objects.equals( - this.responseContext, readDedicatedGroupsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(dedicatedGroups, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDedicatedGroupsResponse {\n"); - sb.append(" dedicatedGroups: ").append(toIndentedString(dedicatedGroups)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DedicatedGroups"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDedicatedGroupsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDedicatedGroupsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDedicatedGroupsResponse is not" - + " found in the empty JSON string", - ReadDedicatedGroupsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDedicatedGroupsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDedicatedGroupsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("DedicatedGroups") != null - && !jsonObj.get("DedicatedGroups").isJsonNull()) { - JsonArray jsonArraydedicatedGroups = jsonObj.getAsJsonArray("DedicatedGroups"); - if (jsonArraydedicatedGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("DedicatedGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DedicatedGroups` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("DedicatedGroups").toString())); - } - - // validate the optional field `DedicatedGroups` (array) - for (int i = 0; i < jsonArraydedicatedGroups.size(); i++) { - DedicatedGroup.validateJsonObject( - jsonArraydedicatedGroups.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDedicatedGroupsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDedicatedGroupsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDedicatedGroupsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDedicatedGroupsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDedicatedGroupsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDedicatedGroupsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDedicatedGroupsResponse - * @throws IOException if the JSON string is invalid with respect to ReadDedicatedGroupsResponse - */ - public static ReadDedicatedGroupsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDedicatedGroupsResponse.class); - } - - /** - * Convert an instance of ReadDedicatedGroupsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequest.java deleted file mode 100644 index f4948550..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDhcpOptionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDhcpOptionsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersDhcpOptions filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadDhcpOptionsRequest() {} - - public ReadDhcpOptionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadDhcpOptionsRequest filters(FiltersDhcpOptions filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersDhcpOptions getFilters() { - return filters; - } - - public void setFilters(FiltersDhcpOptions filters) { - this.filters = filters; - } - - public ReadDhcpOptionsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDhcpOptionsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDhcpOptionsRequest readDhcpOptionsRequest = (ReadDhcpOptionsRequest) o; - return Objects.equals(this.dryRun, readDhcpOptionsRequest.dryRun) - && Objects.equals(this.filters, readDhcpOptionsRequest.filters) - && Arrays.equals(this.nextPageToken, readDhcpOptionsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readDhcpOptionsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDhcpOptionsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDhcpOptionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDhcpOptionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDhcpOptionsRequest is not found" - + " in the empty JSON string", - ReadDhcpOptionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDhcpOptionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDhcpOptionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersDhcpOptions.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDhcpOptionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDhcpOptionsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDhcpOptionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDhcpOptionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDhcpOptionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDhcpOptionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDhcpOptionsRequest - * @throws IOException if the JSON string is invalid with respect to ReadDhcpOptionsRequest - */ - public static ReadDhcpOptionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDhcpOptionsRequest.class); - } - - /** - * Convert an instance of ReadDhcpOptionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponse.java deleted file mode 100644 index be08a7ce..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponse.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDhcpOptionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDhcpOptionsResponse { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SETS = "DhcpOptionsSets"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SETS) - private List dhcpOptionsSets = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadDhcpOptionsResponse() {} - - public ReadDhcpOptionsResponse dhcpOptionsSets(List dhcpOptionsSets) { - - this.dhcpOptionsSets = dhcpOptionsSets; - return this; - } - - public ReadDhcpOptionsResponse addDhcpOptionsSetsItem(DhcpOptionsSet dhcpOptionsSetsItem) { - if (this.dhcpOptionsSets == null) { - this.dhcpOptionsSets = new ArrayList<>(); - } - this.dhcpOptionsSets.add(dhcpOptionsSetsItem); - return this; - } - - /** - * Information about one or more DHCP options sets. - * - * @return dhcpOptionsSets - */ - @javax.annotation.Nullable - public List getDhcpOptionsSets() { - return dhcpOptionsSets; - } - - public void setDhcpOptionsSets(List dhcpOptionsSets) { - this.dhcpOptionsSets = dhcpOptionsSets; - } - - public ReadDhcpOptionsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDhcpOptionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDhcpOptionsResponse readDhcpOptionsResponse = (ReadDhcpOptionsResponse) o; - return Objects.equals(this.dhcpOptionsSets, readDhcpOptionsResponse.dhcpOptionsSets) - && Arrays.equals(this.nextPageToken, readDhcpOptionsResponse.nextPageToken) - && Objects.equals(this.responseContext, readDhcpOptionsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(dhcpOptionsSets, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDhcpOptionsResponse {\n"); - sb.append(" dhcpOptionsSets: ").append(toIndentedString(dhcpOptionsSets)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSets"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDhcpOptionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDhcpOptionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDhcpOptionsResponse is not found" - + " in the empty JSON string", - ReadDhcpOptionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDhcpOptionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDhcpOptionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("DhcpOptionsSets") != null - && !jsonObj.get("DhcpOptionsSets").isJsonNull()) { - JsonArray jsonArraydhcpOptionsSets = jsonObj.getAsJsonArray("DhcpOptionsSets"); - if (jsonArraydhcpOptionsSets != null) { - // ensure the json data is an array - if (!jsonObj.get("DhcpOptionsSets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSets` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("DhcpOptionsSets").toString())); - } - - // validate the optional field `DhcpOptionsSets` (array) - for (int i = 0; i < jsonArraydhcpOptionsSets.size(); i++) { - DhcpOptionsSet.validateJsonObject( - jsonArraydhcpOptionsSets.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDhcpOptionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDhcpOptionsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDhcpOptionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDhcpOptionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDhcpOptionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDhcpOptionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDhcpOptionsResponse - * @throws IOException if the JSON string is invalid with respect to ReadDhcpOptionsResponse - */ - public static ReadDhcpOptionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDhcpOptionsResponse.class); - } - - /** - * Convert an instance of ReadDhcpOptionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequest.java deleted file mode 100644 index c2589d98..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequest.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDirectLinkInterfacesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDirectLinkInterfacesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersDirectLinkInterface filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadDirectLinkInterfacesRequest() {} - - public ReadDirectLinkInterfacesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadDirectLinkInterfacesRequest filters(FiltersDirectLinkInterface filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersDirectLinkInterface getFilters() { - return filters; - } - - public void setFilters(FiltersDirectLinkInterface filters) { - this.filters = filters; - } - - public ReadDirectLinkInterfacesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDirectLinkInterfacesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest = - (ReadDirectLinkInterfacesRequest) o; - return Objects.equals(this.dryRun, readDirectLinkInterfacesRequest.dryRun) - && Objects.equals(this.filters, readDirectLinkInterfacesRequest.filters) - && Arrays.equals(this.nextPageToken, readDirectLinkInterfacesRequest.nextPageToken) - && Objects.equals( - this.resultsPerPage, readDirectLinkInterfacesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDirectLinkInterfacesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadDirectLinkInterfacesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDirectLinkInterfacesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDirectLinkInterfacesRequest is" - + " not found in the empty JSON string", - ReadDirectLinkInterfacesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDirectLinkInterfacesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDirectLinkInterfacesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersDirectLinkInterface.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDirectLinkInterfacesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDirectLinkInterfacesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadDirectLinkInterfacesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDirectLinkInterfacesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDirectLinkInterfacesRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDirectLinkInterfacesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDirectLinkInterfacesRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadDirectLinkInterfacesRequest - */ - public static ReadDirectLinkInterfacesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDirectLinkInterfacesRequest.class); - } - - /** - * Convert an instance of ReadDirectLinkInterfacesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponse.java deleted file mode 100644 index 149fb71f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponse.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDirectLinkInterfacesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDirectLinkInterfacesResponse { - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACES = "DirectLinkInterfaces"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACES) - private List directLinkInterfaces = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadDirectLinkInterfacesResponse() {} - - public ReadDirectLinkInterfacesResponse directLinkInterfaces( - List directLinkInterfaces) { - - this.directLinkInterfaces = directLinkInterfaces; - return this; - } - - public ReadDirectLinkInterfacesResponse addDirectLinkInterfacesItem( - DirectLinkInterfaces directLinkInterfacesItem) { - if (this.directLinkInterfaces == null) { - this.directLinkInterfaces = new ArrayList<>(); - } - this.directLinkInterfaces.add(directLinkInterfacesItem); - return this; - } - - /** - * Information about one or more DirectLink interfaces. - * - * @return directLinkInterfaces - */ - @javax.annotation.Nullable - public List getDirectLinkInterfaces() { - return directLinkInterfaces; - } - - public void setDirectLinkInterfaces(List directLinkInterfaces) { - this.directLinkInterfaces = directLinkInterfaces; - } - - public ReadDirectLinkInterfacesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDirectLinkInterfacesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDirectLinkInterfacesResponse readDirectLinkInterfacesResponse = - (ReadDirectLinkInterfacesResponse) o; - return Objects.equals( - this.directLinkInterfaces, - readDirectLinkInterfacesResponse.directLinkInterfaces) - && Arrays.equals(this.nextPageToken, readDirectLinkInterfacesResponse.nextPageToken) - && Objects.equals( - this.responseContext, readDirectLinkInterfacesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkInterfaces, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDirectLinkInterfacesResponse {\n"); - sb.append(" directLinkInterfaces: ") - .append(toIndentedString(directLinkInterfaces)) - .append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkInterfaces"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadDirectLinkInterfacesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDirectLinkInterfacesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDirectLinkInterfacesResponse is" - + " not found in the empty JSON string", - ReadDirectLinkInterfacesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDirectLinkInterfacesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDirectLinkInterfacesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("DirectLinkInterfaces") != null - && !jsonObj.get("DirectLinkInterfaces").isJsonNull()) { - JsonArray jsonArraydirectLinkInterfaces = - jsonObj.getAsJsonArray("DirectLinkInterfaces"); - if (jsonArraydirectLinkInterfaces != null) { - // ensure the json data is an array - if (!jsonObj.get("DirectLinkInterfaces").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaces` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaces").toString())); - } - - // validate the optional field `DirectLinkInterfaces` (array) - for (int i = 0; i < jsonArraydirectLinkInterfaces.size(); i++) { - DirectLinkInterfaces.validateJsonObject( - jsonArraydirectLinkInterfaces.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDirectLinkInterfacesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDirectLinkInterfacesResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadDirectLinkInterfacesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDirectLinkInterfacesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDirectLinkInterfacesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDirectLinkInterfacesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDirectLinkInterfacesResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadDirectLinkInterfacesResponse - */ - public static ReadDirectLinkInterfacesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDirectLinkInterfacesResponse.class); - } - - /** - * Convert an instance of ReadDirectLinkInterfacesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequest.java deleted file mode 100644 index 83aa74d2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDirectLinksRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDirectLinksRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersDirectLink filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadDirectLinksRequest() {} - - public ReadDirectLinksRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadDirectLinksRequest filters(FiltersDirectLink filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersDirectLink getFilters() { - return filters; - } - - public void setFilters(FiltersDirectLink filters) { - this.filters = filters; - } - - public ReadDirectLinksRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDirectLinksRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDirectLinksRequest readDirectLinksRequest = (ReadDirectLinksRequest) o; - return Objects.equals(this.dryRun, readDirectLinksRequest.dryRun) - && Objects.equals(this.filters, readDirectLinksRequest.filters) - && Arrays.equals(this.nextPageToken, readDirectLinksRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readDirectLinksRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDirectLinksRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDirectLinksRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDirectLinksRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDirectLinksRequest is not found" - + " in the empty JSON string", - ReadDirectLinksRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDirectLinksRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDirectLinksRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersDirectLink.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDirectLinksRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDirectLinksRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDirectLinksRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDirectLinksRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDirectLinksRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDirectLinksRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDirectLinksRequest - * @throws IOException if the JSON string is invalid with respect to ReadDirectLinksRequest - */ - public static ReadDirectLinksRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDirectLinksRequest.class); - } - - /** - * Convert an instance of ReadDirectLinksRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponse.java deleted file mode 100644 index 5b02f08c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadDirectLinksResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadDirectLinksResponse { - public static final String SERIALIZED_NAME_DIRECT_LINKS = "DirectLinks"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINKS) - private List directLinks = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadDirectLinksResponse() {} - - public ReadDirectLinksResponse directLinks(List directLinks) { - - this.directLinks = directLinks; - return this; - } - - public ReadDirectLinksResponse addDirectLinksItem(DirectLink directLinksItem) { - if (this.directLinks == null) { - this.directLinks = new ArrayList<>(); - } - this.directLinks.add(directLinksItem); - return this; - } - - /** - * Information about one or more DirectLinks. - * - * @return directLinks - */ - @javax.annotation.Nullable - public List getDirectLinks() { - return directLinks; - } - - public void setDirectLinks(List directLinks) { - this.directLinks = directLinks; - } - - public ReadDirectLinksResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadDirectLinksResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadDirectLinksResponse readDirectLinksResponse = (ReadDirectLinksResponse) o; - return Objects.equals(this.directLinks, readDirectLinksResponse.directLinks) - && Arrays.equals(this.nextPageToken, readDirectLinksResponse.nextPageToken) - && Objects.equals(this.responseContext, readDirectLinksResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(directLinks, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadDirectLinksResponse {\n"); - sb.append(" directLinks: ").append(toIndentedString(directLinks)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinks"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadDirectLinksResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadDirectLinksResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadDirectLinksResponse is not found" - + " in the empty JSON string", - ReadDirectLinksResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadDirectLinksResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadDirectLinksResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("DirectLinks") != null && !jsonObj.get("DirectLinks").isJsonNull()) { - JsonArray jsonArraydirectLinks = jsonObj.getAsJsonArray("DirectLinks"); - if (jsonArraydirectLinks != null) { - // ensure the json data is an array - if (!jsonObj.get("DirectLinks").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinks` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("DirectLinks").toString())); - } - - // validate the optional field `DirectLinks` (array) - for (int i = 0; i < jsonArraydirectLinks.size(); i++) { - DirectLink.validateJsonObject(jsonArraydirectLinks.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadDirectLinksResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadDirectLinksResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadDirectLinksResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadDirectLinksResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadDirectLinksResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadDirectLinksResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadDirectLinksResponse - * @throws IOException if the JSON string is invalid with respect to ReadDirectLinksResponse - */ - public static ReadDirectLinksResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadDirectLinksResponse.class); - } - - /** - * Convert an instance of ReadDirectLinksResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequest.java deleted file mode 100644 index ccd0500e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadFlexibleGpuCatalogRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadFlexibleGpuCatalogRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadFlexibleGpuCatalogRequest() {} - - public ReadFlexibleGpuCatalogRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest = - (ReadFlexibleGpuCatalogRequest) o; - return Objects.equals(this.dryRun, readFlexibleGpuCatalogRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadFlexibleGpuCatalogRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadFlexibleGpuCatalogRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadFlexibleGpuCatalogRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadFlexibleGpuCatalogRequest is not" - + " found in the empty JSON string", - ReadFlexibleGpuCatalogRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadFlexibleGpuCatalogRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadFlexibleGpuCatalogRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadFlexibleGpuCatalogRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadFlexibleGpuCatalogRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadFlexibleGpuCatalogRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadFlexibleGpuCatalogRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadFlexibleGpuCatalogRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadFlexibleGpuCatalogRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadFlexibleGpuCatalogRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadFlexibleGpuCatalogRequest - */ - public static ReadFlexibleGpuCatalogRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadFlexibleGpuCatalogRequest.class); - } - - /** - * Convert an instance of ReadFlexibleGpuCatalogRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponse.java deleted file mode 100644 index ac84bf68..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponse.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadFlexibleGpuCatalogResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadFlexibleGpuCatalogResponse { - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_CATALOG = "FlexibleGpuCatalog"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_CATALOG) - private List flexibleGpuCatalog = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadFlexibleGpuCatalogResponse() {} - - public ReadFlexibleGpuCatalogResponse flexibleGpuCatalog( - List flexibleGpuCatalog) { - - this.flexibleGpuCatalog = flexibleGpuCatalog; - return this; - } - - public ReadFlexibleGpuCatalogResponse addFlexibleGpuCatalogItem( - FlexibleGpuCatalog flexibleGpuCatalogItem) { - if (this.flexibleGpuCatalog == null) { - this.flexibleGpuCatalog = new ArrayList<>(); - } - this.flexibleGpuCatalog.add(flexibleGpuCatalogItem); - return this; - } - - /** - * Information about one or more fGPUs available in the public catalog. - * - * @return flexibleGpuCatalog - */ - @javax.annotation.Nullable - public List getFlexibleGpuCatalog() { - return flexibleGpuCatalog; - } - - public void setFlexibleGpuCatalog(List flexibleGpuCatalog) { - this.flexibleGpuCatalog = flexibleGpuCatalog; - } - - public ReadFlexibleGpuCatalogResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadFlexibleGpuCatalogResponse readFlexibleGpuCatalogResponse = - (ReadFlexibleGpuCatalogResponse) o; - return Objects.equals( - this.flexibleGpuCatalog, readFlexibleGpuCatalogResponse.flexibleGpuCatalog) - && Objects.equals( - this.responseContext, readFlexibleGpuCatalogResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(flexibleGpuCatalog, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadFlexibleGpuCatalogResponse {\n"); - sb.append(" flexibleGpuCatalog: ") - .append(toIndentedString(flexibleGpuCatalog)) - .append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FlexibleGpuCatalog"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadFlexibleGpuCatalogResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadFlexibleGpuCatalogResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadFlexibleGpuCatalogResponse is not" - + " found in the empty JSON string", - ReadFlexibleGpuCatalogResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadFlexibleGpuCatalogResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadFlexibleGpuCatalogResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("FlexibleGpuCatalog") != null - && !jsonObj.get("FlexibleGpuCatalog").isJsonNull()) { - JsonArray jsonArrayflexibleGpuCatalog = jsonObj.getAsJsonArray("FlexibleGpuCatalog"); - if (jsonArrayflexibleGpuCatalog != null) { - // ensure the json data is an array - if (!jsonObj.get("FlexibleGpuCatalog").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuCatalog` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("FlexibleGpuCatalog").toString())); - } - - // validate the optional field `FlexibleGpuCatalog` (array) - for (int i = 0; i < jsonArrayflexibleGpuCatalog.size(); i++) { - FlexibleGpuCatalog.validateJsonObject( - jsonArrayflexibleGpuCatalog.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadFlexibleGpuCatalogResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadFlexibleGpuCatalogResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadFlexibleGpuCatalogResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadFlexibleGpuCatalogResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadFlexibleGpuCatalogResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadFlexibleGpuCatalogResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadFlexibleGpuCatalogResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadFlexibleGpuCatalogResponse - */ - public static ReadFlexibleGpuCatalogResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadFlexibleGpuCatalogResponse.class); - } - - /** - * Convert an instance of ReadFlexibleGpuCatalogResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequest.java deleted file mode 100644 index 0676f4f4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequest.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadFlexibleGpusRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadFlexibleGpusRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersFlexibleGpu filters; - - public ReadFlexibleGpusRequest() {} - - public ReadFlexibleGpusRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadFlexibleGpusRequest filters(FiltersFlexibleGpu filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersFlexibleGpu getFilters() { - return filters; - } - - public void setFilters(FiltersFlexibleGpu filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadFlexibleGpusRequest readFlexibleGpusRequest = (ReadFlexibleGpusRequest) o; - return Objects.equals(this.dryRun, readFlexibleGpusRequest.dryRun) - && Objects.equals(this.filters, readFlexibleGpusRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadFlexibleGpusRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadFlexibleGpusRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadFlexibleGpusRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadFlexibleGpusRequest is not found" - + " in the empty JSON string", - ReadFlexibleGpusRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadFlexibleGpusRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadFlexibleGpusRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersFlexibleGpu.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadFlexibleGpusRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadFlexibleGpusRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadFlexibleGpusRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadFlexibleGpusRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadFlexibleGpusRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadFlexibleGpusRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadFlexibleGpusRequest - * @throws IOException if the JSON string is invalid with respect to ReadFlexibleGpusRequest - */ - public static ReadFlexibleGpusRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadFlexibleGpusRequest.class); - } - - /** - * Convert an instance of ReadFlexibleGpusRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponse.java deleted file mode 100644 index bdf426a4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponse.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadFlexibleGpusResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadFlexibleGpusResponse { - public static final String SERIALIZED_NAME_FLEXIBLE_GPUS = "FlexibleGpus"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPUS) - private List flexibleGpus = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadFlexibleGpusResponse() {} - - public ReadFlexibleGpusResponse flexibleGpus(List flexibleGpus) { - - this.flexibleGpus = flexibleGpus; - return this; - } - - public ReadFlexibleGpusResponse addFlexibleGpusItem(FlexibleGpu flexibleGpusItem) { - if (this.flexibleGpus == null) { - this.flexibleGpus = new ArrayList<>(); - } - this.flexibleGpus.add(flexibleGpusItem); - return this; - } - - /** - * Information about one or more fGPUs. - * - * @return flexibleGpus - */ - @javax.annotation.Nullable - public List getFlexibleGpus() { - return flexibleGpus; - } - - public void setFlexibleGpus(List flexibleGpus) { - this.flexibleGpus = flexibleGpus; - } - - public ReadFlexibleGpusResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadFlexibleGpusResponse readFlexibleGpusResponse = (ReadFlexibleGpusResponse) o; - return Objects.equals(this.flexibleGpus, readFlexibleGpusResponse.flexibleGpus) - && Objects.equals(this.responseContext, readFlexibleGpusResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(flexibleGpus, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadFlexibleGpusResponse {\n"); - sb.append(" flexibleGpus: ").append(toIndentedString(flexibleGpus)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FlexibleGpus"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadFlexibleGpusResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadFlexibleGpusResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadFlexibleGpusResponse is not found" - + " in the empty JSON string", - ReadFlexibleGpusResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadFlexibleGpusResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadFlexibleGpusResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("FlexibleGpus") != null && !jsonObj.get("FlexibleGpus").isJsonNull()) { - JsonArray jsonArrayflexibleGpus = jsonObj.getAsJsonArray("FlexibleGpus"); - if (jsonArrayflexibleGpus != null) { - // ensure the json data is an array - if (!jsonObj.get("FlexibleGpus").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpus` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpus").toString())); - } - - // validate the optional field `FlexibleGpus` (array) - for (int i = 0; i < jsonArrayflexibleGpus.size(); i++) { - FlexibleGpu.validateJsonObject(jsonArrayflexibleGpus.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadFlexibleGpusResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadFlexibleGpusResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadFlexibleGpusResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadFlexibleGpusResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadFlexibleGpusResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadFlexibleGpusResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadFlexibleGpusResponse - * @throws IOException if the JSON string is invalid with respect to ReadFlexibleGpusResponse - */ - public static ReadFlexibleGpusResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadFlexibleGpusResponse.class); - } - - /** - * Convert an instance of ReadFlexibleGpusResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequest.java deleted file mode 100644 index d3733d38..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadImageExportTasksRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadImageExportTasksRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersExportTask filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadImageExportTasksRequest() {} - - public ReadImageExportTasksRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadImageExportTasksRequest filters(FiltersExportTask filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersExportTask getFilters() { - return filters; - } - - public void setFilters(FiltersExportTask filters) { - this.filters = filters; - } - - public ReadImageExportTasksRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadImageExportTasksRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadImageExportTasksRequest readImageExportTasksRequest = (ReadImageExportTasksRequest) o; - return Objects.equals(this.dryRun, readImageExportTasksRequest.dryRun) - && Objects.equals(this.filters, readImageExportTasksRequest.filters) - && Arrays.equals(this.nextPageToken, readImageExportTasksRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readImageExportTasksRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadImageExportTasksRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadImageExportTasksRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadImageExportTasksRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadImageExportTasksRequest is not" - + " found in the empty JSON string", - ReadImageExportTasksRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadImageExportTasksRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadImageExportTasksRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersExportTask.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadImageExportTasksRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadImageExportTasksRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadImageExportTasksRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadImageExportTasksRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadImageExportTasksRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadImageExportTasksRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadImageExportTasksRequest - * @throws IOException if the JSON string is invalid with respect to ReadImageExportTasksRequest - */ - public static ReadImageExportTasksRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadImageExportTasksRequest.class); - } - - /** - * Convert an instance of ReadImageExportTasksRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponse.java deleted file mode 100644 index da67acb7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponse.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadImageExportTasksResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadImageExportTasksResponse { - public static final String SERIALIZED_NAME_IMAGE_EXPORT_TASKS = "ImageExportTasks"; - - @SerializedName(SERIALIZED_NAME_IMAGE_EXPORT_TASKS) - private List imageExportTasks = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadImageExportTasksResponse() {} - - public ReadImageExportTasksResponse imageExportTasks(List imageExportTasks) { - - this.imageExportTasks = imageExportTasks; - return this; - } - - public ReadImageExportTasksResponse addImageExportTasksItem( - ImageExportTask imageExportTasksItem) { - if (this.imageExportTasks == null) { - this.imageExportTasks = new ArrayList<>(); - } - this.imageExportTasks.add(imageExportTasksItem); - return this; - } - - /** - * Information about one or more image export tasks. - * - * @return imageExportTasks - */ - @javax.annotation.Nullable - public List getImageExportTasks() { - return imageExportTasks; - } - - public void setImageExportTasks(List imageExportTasks) { - this.imageExportTasks = imageExportTasks; - } - - public ReadImageExportTasksResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadImageExportTasksResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadImageExportTasksResponse readImageExportTasksResponse = - (ReadImageExportTasksResponse) o; - return Objects.equals(this.imageExportTasks, readImageExportTasksResponse.imageExportTasks) - && Arrays.equals(this.nextPageToken, readImageExportTasksResponse.nextPageToken) - && Objects.equals( - this.responseContext, readImageExportTasksResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(imageExportTasks, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadImageExportTasksResponse {\n"); - sb.append(" imageExportTasks: ").append(toIndentedString(imageExportTasks)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ImageExportTasks"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadImageExportTasksResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadImageExportTasksResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadImageExportTasksResponse is not" - + " found in the empty JSON string", - ReadImageExportTasksResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadImageExportTasksResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadImageExportTasksResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ImageExportTasks") != null - && !jsonObj.get("ImageExportTasks").isJsonNull()) { - JsonArray jsonArrayimageExportTasks = jsonObj.getAsJsonArray("ImageExportTasks"); - if (jsonArrayimageExportTasks != null) { - // ensure the json data is an array - if (!jsonObj.get("ImageExportTasks").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageExportTasks` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("ImageExportTasks").toString())); - } - - // validate the optional field `ImageExportTasks` (array) - for (int i = 0; i < jsonArrayimageExportTasks.size(); i++) { - ImageExportTask.validateJsonObject( - jsonArrayimageExportTasks.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadImageExportTasksResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadImageExportTasksResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadImageExportTasksResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadImageExportTasksResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadImageExportTasksResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadImageExportTasksResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadImageExportTasksResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadImageExportTasksResponse - */ - public static ReadImageExportTasksResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadImageExportTasksResponse.class); - } - - /** - * Convert an instance of ReadImageExportTasksResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequest.java deleted file mode 100644 index 405d1204..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadImagesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadImagesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersImage filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadImagesRequest() {} - - public ReadImagesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadImagesRequest filters(FiltersImage filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersImage getFilters() { - return filters; - } - - public void setFilters(FiltersImage filters) { - this.filters = filters; - } - - public ReadImagesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadImagesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadImagesRequest readImagesRequest = (ReadImagesRequest) o; - return Objects.equals(this.dryRun, readImagesRequest.dryRun) - && Objects.equals(this.filters, readImagesRequest.filters) - && Arrays.equals(this.nextPageToken, readImagesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readImagesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadImagesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadImagesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadImagesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadImagesRequest is not found in the" - + " empty JSON string", - ReadImagesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadImagesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadImagesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersImage.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadImagesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadImagesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadImagesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadImagesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadImagesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadImagesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadImagesRequest - * @throws IOException if the JSON string is invalid with respect to ReadImagesRequest - */ - public static ReadImagesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadImagesRequest.class); - } - - /** - * Convert an instance of ReadImagesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponse.java deleted file mode 100644 index 1bd81eac..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadImagesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadImagesResponse { - public static final String SERIALIZED_NAME_IMAGES = "Images"; - - @SerializedName(SERIALIZED_NAME_IMAGES) - private List images = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadImagesResponse() {} - - public ReadImagesResponse images(List images) { - - this.images = images; - return this; - } - - public ReadImagesResponse addImagesItem(Image imagesItem) { - if (this.images == null) { - this.images = new ArrayList<>(); - } - this.images.add(imagesItem); - return this; - } - - /** - * Information about one or more OMIs. - * - * @return images - */ - @javax.annotation.Nullable - public List getImages() { - return images; - } - - public void setImages(List images) { - this.images = images; - } - - public ReadImagesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadImagesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadImagesResponse readImagesResponse = (ReadImagesResponse) o; - return Objects.equals(this.images, readImagesResponse.images) - && Arrays.equals(this.nextPageToken, readImagesResponse.nextPageToken) - && Objects.equals(this.responseContext, readImagesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(images, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadImagesResponse {\n"); - sb.append(" images: ").append(toIndentedString(images)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Images"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadImagesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadImagesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadImagesResponse is not found in" - + " the empty JSON string", - ReadImagesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadImagesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadImagesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Images") != null && !jsonObj.get("Images").isJsonNull()) { - JsonArray jsonArrayimages = jsonObj.getAsJsonArray("Images"); - if (jsonArrayimages != null) { - // ensure the json data is an array - if (!jsonObj.get("Images").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Images` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Images").toString())); - } - - // validate the optional field `Images` (array) - for (int i = 0; i < jsonArrayimages.size(); i++) { - Image.validateJsonObject(jsonArrayimages.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadImagesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadImagesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadImagesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadImagesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadImagesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadImagesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadImagesResponse - * @throws IOException if the JSON string is invalid with respect to ReadImagesResponse - */ - public static ReadImagesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadImagesResponse.class); - } - - /** - * Convert an instance of ReadImagesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequest.java deleted file mode 100644 index 8cb7dca2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadInternetServicesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadInternetServicesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersInternetService filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadInternetServicesRequest() {} - - public ReadInternetServicesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadInternetServicesRequest filters(FiltersInternetService filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersInternetService getFilters() { - return filters; - } - - public void setFilters(FiltersInternetService filters) { - this.filters = filters; - } - - public ReadInternetServicesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadInternetServicesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadInternetServicesRequest readInternetServicesRequest = (ReadInternetServicesRequest) o; - return Objects.equals(this.dryRun, readInternetServicesRequest.dryRun) - && Objects.equals(this.filters, readInternetServicesRequest.filters) - && Arrays.equals(this.nextPageToken, readInternetServicesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readInternetServicesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadInternetServicesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadInternetServicesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadInternetServicesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadInternetServicesRequest is not" - + " found in the empty JSON string", - ReadInternetServicesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadInternetServicesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadInternetServicesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersInternetService.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadInternetServicesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadInternetServicesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadInternetServicesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadInternetServicesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadInternetServicesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadInternetServicesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadInternetServicesRequest - * @throws IOException if the JSON string is invalid with respect to ReadInternetServicesRequest - */ - public static ReadInternetServicesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadInternetServicesRequest.class); - } - - /** - * Convert an instance of ReadInternetServicesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponse.java deleted file mode 100644 index bc4c89c3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponse.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadInternetServicesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadInternetServicesResponse { - public static final String SERIALIZED_NAME_INTERNET_SERVICES = "InternetServices"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICES) - private List internetServices = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadInternetServicesResponse() {} - - public ReadInternetServicesResponse internetServices(List internetServices) { - - this.internetServices = internetServices; - return this; - } - - public ReadInternetServicesResponse addInternetServicesItem( - InternetService internetServicesItem) { - if (this.internetServices == null) { - this.internetServices = new ArrayList<>(); - } - this.internetServices.add(internetServicesItem); - return this; - } - - /** - * Information about one or more Internet services. - * - * @return internetServices - */ - @javax.annotation.Nullable - public List getInternetServices() { - return internetServices; - } - - public void setInternetServices(List internetServices) { - this.internetServices = internetServices; - } - - public ReadInternetServicesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadInternetServicesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadInternetServicesResponse readInternetServicesResponse = - (ReadInternetServicesResponse) o; - return Objects.equals(this.internetServices, readInternetServicesResponse.internetServices) - && Arrays.equals(this.nextPageToken, readInternetServicesResponse.nextPageToken) - && Objects.equals( - this.responseContext, readInternetServicesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(internetServices, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadInternetServicesResponse {\n"); - sb.append(" internetServices: ").append(toIndentedString(internetServices)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("InternetServices"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadInternetServicesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadInternetServicesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadInternetServicesResponse is not" - + " found in the empty JSON string", - ReadInternetServicesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadInternetServicesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadInternetServicesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("InternetServices") != null - && !jsonObj.get("InternetServices").isJsonNull()) { - JsonArray jsonArrayinternetServices = jsonObj.getAsJsonArray("InternetServices"); - if (jsonArrayinternetServices != null) { - // ensure the json data is an array - if (!jsonObj.get("InternetServices").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServices` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("InternetServices").toString())); - } - - // validate the optional field `InternetServices` (array) - for (int i = 0; i < jsonArrayinternetServices.size(); i++) { - InternetService.validateJsonObject( - jsonArrayinternetServices.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadInternetServicesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadInternetServicesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadInternetServicesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadInternetServicesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadInternetServicesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadInternetServicesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadInternetServicesResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadInternetServicesResponse - */ - public static ReadInternetServicesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadInternetServicesResponse.class); - } - - /** - * Convert an instance of ReadInternetServicesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequest.java deleted file mode 100644 index f05db1a1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadKeypairsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadKeypairsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersKeypair filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadKeypairsRequest() {} - - public ReadKeypairsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadKeypairsRequest filters(FiltersKeypair filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersKeypair getFilters() { - return filters; - } - - public void setFilters(FiltersKeypair filters) { - this.filters = filters; - } - - public ReadKeypairsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadKeypairsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadKeypairsRequest readKeypairsRequest = (ReadKeypairsRequest) o; - return Objects.equals(this.dryRun, readKeypairsRequest.dryRun) - && Objects.equals(this.filters, readKeypairsRequest.filters) - && Arrays.equals(this.nextPageToken, readKeypairsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readKeypairsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadKeypairsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadKeypairsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadKeypairsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadKeypairsRequest is not found in" - + " the empty JSON string", - ReadKeypairsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadKeypairsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadKeypairsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersKeypair.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadKeypairsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadKeypairsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadKeypairsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadKeypairsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadKeypairsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadKeypairsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadKeypairsRequest - * @throws IOException if the JSON string is invalid with respect to ReadKeypairsRequest - */ - public static ReadKeypairsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadKeypairsRequest.class); - } - - /** - * Convert an instance of ReadKeypairsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponse.java deleted file mode 100644 index 407f06a0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadKeypairsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadKeypairsResponse { - public static final String SERIALIZED_NAME_KEYPAIRS = "Keypairs"; - - @SerializedName(SERIALIZED_NAME_KEYPAIRS) - private List keypairs = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadKeypairsResponse() {} - - public ReadKeypairsResponse keypairs(List keypairs) { - - this.keypairs = keypairs; - return this; - } - - public ReadKeypairsResponse addKeypairsItem(Keypair keypairsItem) { - if (this.keypairs == null) { - this.keypairs = new ArrayList<>(); - } - this.keypairs.add(keypairsItem); - return this; - } - - /** - * Information about one or more keypairs. - * - * @return keypairs - */ - @javax.annotation.Nullable - public List getKeypairs() { - return keypairs; - } - - public void setKeypairs(List keypairs) { - this.keypairs = keypairs; - } - - public ReadKeypairsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadKeypairsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadKeypairsResponse readKeypairsResponse = (ReadKeypairsResponse) o; - return Objects.equals(this.keypairs, readKeypairsResponse.keypairs) - && Arrays.equals(this.nextPageToken, readKeypairsResponse.nextPageToken) - && Objects.equals(this.responseContext, readKeypairsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(keypairs, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadKeypairsResponse {\n"); - sb.append(" keypairs: ").append(toIndentedString(keypairs)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Keypairs"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadKeypairsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadKeypairsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadKeypairsResponse is not found in" - + " the empty JSON string", - ReadKeypairsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadKeypairsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadKeypairsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Keypairs") != null && !jsonObj.get("Keypairs").isJsonNull()) { - JsonArray jsonArraykeypairs = jsonObj.getAsJsonArray("Keypairs"); - if (jsonArraykeypairs != null) { - // ensure the json data is an array - if (!jsonObj.get("Keypairs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Keypairs` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Keypairs").toString())); - } - - // validate the optional field `Keypairs` (array) - for (int i = 0; i < jsonArraykeypairs.size(); i++) { - Keypair.validateJsonObject(jsonArraykeypairs.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadKeypairsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadKeypairsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadKeypairsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadKeypairsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadKeypairsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadKeypairsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadKeypairsResponse - * @throws IOException if the JSON string is invalid with respect to ReadKeypairsResponse - */ - public static ReadKeypairsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadKeypairsResponse.class); - } - - /** - * Convert an instance of ReadKeypairsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFilters.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFilters.java deleted file mode 100644 index 8c1310cc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFilters.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLinkedPoliciesFilters { - public static final String SERIALIZED_NAME_PATH_PREFIX = "PathPrefix"; - - @SerializedName(SERIALIZED_NAME_PATH_PREFIX) - private String pathPrefix; - - public ReadLinkedPoliciesFilters() {} - - public ReadLinkedPoliciesFilters pathPrefix(String pathPrefix) { - - this.pathPrefix = pathPrefix; - return this; - } - - /** - * The path prefix of the policies. If not specified, it is set to a slash (`/`). - * - * @return pathPrefix - */ - @javax.annotation.Nullable - public String getPathPrefix() { - return pathPrefix; - } - - public void setPathPrefix(String pathPrefix) { - this.pathPrefix = pathPrefix; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLinkedPoliciesFilters readLinkedPoliciesFilters = (ReadLinkedPoliciesFilters) o; - return Objects.equals(this.pathPrefix, readLinkedPoliciesFilters.pathPrefix); - } - - @Override - public int hashCode() { - return Objects.hash(pathPrefix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLinkedPoliciesFilters {\n"); - sb.append(" pathPrefix: ").append(toIndentedString(pathPrefix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PathPrefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLinkedPoliciesFilters - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLinkedPoliciesFilters.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLinkedPoliciesFilters is not" - + " found in the empty JSON string", - ReadLinkedPoliciesFilters.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLinkedPoliciesFilters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLinkedPoliciesFilters` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PathPrefix") != null && !jsonObj.get("PathPrefix").isJsonNull()) - && !jsonObj.get("PathPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPrefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLinkedPoliciesFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLinkedPoliciesFilters' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLinkedPoliciesFilters.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLinkedPoliciesFilters value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLinkedPoliciesFilters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLinkedPoliciesFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLinkedPoliciesFilters - * @throws IOException if the JSON string is invalid with respect to ReadLinkedPoliciesFilters - */ - public static ReadLinkedPoliciesFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLinkedPoliciesFilters.class); - } - - /** - * Convert an instance of ReadLinkedPoliciesFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequest.java deleted file mode 100644 index 2194df86..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequest.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLinkedPoliciesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLinkedPoliciesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private ReadLinkedPoliciesFilters filters; - - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public ReadLinkedPoliciesRequest() {} - - public ReadLinkedPoliciesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadLinkedPoliciesRequest filters(ReadLinkedPoliciesFilters filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public ReadLinkedPoliciesFilters getFilters() { - return filters; - } - - public void setFilters(ReadLinkedPoliciesFilters filters) { - this.filters = filters; - } - - public ReadLinkedPoliciesRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of policies requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadLinkedPoliciesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - public ReadLinkedPoliciesRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user the policies are linked to. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLinkedPoliciesRequest readLinkedPoliciesRequest = (ReadLinkedPoliciesRequest) o; - return Objects.equals(this.dryRun, readLinkedPoliciesRequest.dryRun) - && Objects.equals(this.filters, readLinkedPoliciesRequest.filters) - && Objects.equals(this.firstItem, readLinkedPoliciesRequest.firstItem) - && Objects.equals(this.resultsPerPage, readLinkedPoliciesRequest.resultsPerPage) - && Objects.equals(this.userName, readLinkedPoliciesRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, firstItem, resultsPerPage, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLinkedPoliciesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("FirstItem"); - openapiFields.add("ResultsPerPage"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLinkedPoliciesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLinkedPoliciesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLinkedPoliciesRequest is not" - + " found in the empty JSON string", - ReadLinkedPoliciesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLinkedPoliciesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLinkedPoliciesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadLinkedPoliciesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - ReadLinkedPoliciesFilters.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLinkedPoliciesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLinkedPoliciesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLinkedPoliciesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLinkedPoliciesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLinkedPoliciesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLinkedPoliciesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLinkedPoliciesRequest - * @throws IOException if the JSON string is invalid with respect to ReadLinkedPoliciesRequest - */ - public static ReadLinkedPoliciesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLinkedPoliciesRequest.class); - } - - /** - * Convert an instance of ReadLinkedPoliciesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponse.java deleted file mode 100644 index 4b25794f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponse.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLinkedPoliciesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLinkedPoliciesResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_MAX_RESULTS_TRUNCATED = "MaxResultsTruncated"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_TRUNCATED) - private Boolean maxResultsTruncated; - - public static final String SERIALIZED_NAME_POLICIES = "Policies"; - - @SerializedName(SERIALIZED_NAME_POLICIES) - private List policies = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadLinkedPoliciesResponse() {} - - public ReadLinkedPoliciesResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadLinkedPoliciesResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadLinkedPoliciesResponse maxResultsTruncated(Boolean maxResultsTruncated) { - - this.maxResultsTruncated = maxResultsTruncated; - return this; - } - - /** - * If true, indicates whether requested page size is more than allowed. - * - * @return maxResultsTruncated - */ - @javax.annotation.Nullable - public Boolean getMaxResultsTruncated() { - return maxResultsTruncated; - } - - public void setMaxResultsTruncated(Boolean maxResultsTruncated) { - this.maxResultsTruncated = maxResultsTruncated; - } - - public ReadLinkedPoliciesResponse policies(List policies) { - - this.policies = policies; - return this; - } - - public ReadLinkedPoliciesResponse addPoliciesItem(LinkedPolicy policiesItem) { - if (this.policies == null) { - this.policies = new ArrayList<>(); - } - this.policies.add(policiesItem); - return this; - } - - /** - * One or more policies linked to the specified user. - * - * @return policies - */ - @javax.annotation.Nullable - public List getPolicies() { - return policies; - } - - public void setPolicies(List policies) { - this.policies = policies; - } - - public ReadLinkedPoliciesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLinkedPoliciesResponse readLinkedPoliciesResponse = (ReadLinkedPoliciesResponse) o; - return Objects.equals(this.hasMoreItems, readLinkedPoliciesResponse.hasMoreItems) - && Objects.equals(this.maxResultsLimit, readLinkedPoliciesResponse.maxResultsLimit) - && Objects.equals( - this.maxResultsTruncated, readLinkedPoliciesResponse.maxResultsTruncated) - && Objects.equals(this.policies, readLinkedPoliciesResponse.policies) - && Objects.equals(this.responseContext, readLinkedPoliciesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash( - hasMoreItems, maxResultsLimit, maxResultsTruncated, policies, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLinkedPoliciesResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" maxResultsTruncated: ") - .append(toIndentedString(maxResultsTruncated)) - .append("\n"); - sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("MaxResultsTruncated"); - openapiFields.add("Policies"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLinkedPoliciesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLinkedPoliciesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLinkedPoliciesResponse is not" - + " found in the empty JSON string", - ReadLinkedPoliciesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLinkedPoliciesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLinkedPoliciesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Policies") != null && !jsonObj.get("Policies").isJsonNull()) { - JsonArray jsonArraypolicies = jsonObj.getAsJsonArray("Policies"); - if (jsonArraypolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("Policies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Policies` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Policies").toString())); - } - - // validate the optional field `Policies` (array) - for (int i = 0; i < jsonArraypolicies.size(); i++) { - LinkedPolicy.validateJsonObject(jsonArraypolicies.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLinkedPoliciesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLinkedPoliciesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLinkedPoliciesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLinkedPoliciesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLinkedPoliciesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLinkedPoliciesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLinkedPoliciesResponse - * @throws IOException if the JSON string is invalid with respect to ReadLinkedPoliciesResponse - */ - public static ReadLinkedPoliciesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLinkedPoliciesResponse.class); - } - - /** - * Convert an instance of ReadLinkedPoliciesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequest.java deleted file mode 100644 index 5f090c4c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequest.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadListenerRulesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadListenerRulesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersListenerRule filters; - - public ReadListenerRulesRequest() {} - - public ReadListenerRulesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadListenerRulesRequest filters(FiltersListenerRule filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersListenerRule getFilters() { - return filters; - } - - public void setFilters(FiltersListenerRule filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadListenerRulesRequest readListenerRulesRequest = (ReadListenerRulesRequest) o; - return Objects.equals(this.dryRun, readListenerRulesRequest.dryRun) - && Objects.equals(this.filters, readListenerRulesRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadListenerRulesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadListenerRulesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadListenerRulesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadListenerRulesRequest is not found" - + " in the empty JSON string", - ReadListenerRulesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadListenerRulesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadListenerRulesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersListenerRule.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadListenerRulesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadListenerRulesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadListenerRulesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadListenerRulesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadListenerRulesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadListenerRulesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadListenerRulesRequest - * @throws IOException if the JSON string is invalid with respect to ReadListenerRulesRequest - */ - public static ReadListenerRulesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadListenerRulesRequest.class); - } - - /** - * Convert an instance of ReadListenerRulesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponse.java deleted file mode 100644 index 2af37a9a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponse.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadListenerRulesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadListenerRulesResponse { - public static final String SERIALIZED_NAME_LISTENER_RULES = "ListenerRules"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULES) - private List listenerRules = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadListenerRulesResponse() {} - - public ReadListenerRulesResponse listenerRules(List listenerRules) { - - this.listenerRules = listenerRules; - return this; - } - - public ReadListenerRulesResponse addListenerRulesItem(ListenerRule listenerRulesItem) { - if (this.listenerRules == null) { - this.listenerRules = new ArrayList<>(); - } - this.listenerRules.add(listenerRulesItem); - return this; - } - - /** - * The list of the rules to describe. - * - * @return listenerRules - */ - @javax.annotation.Nullable - public List getListenerRules() { - return listenerRules; - } - - public void setListenerRules(List listenerRules) { - this.listenerRules = listenerRules; - } - - public ReadListenerRulesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadListenerRulesResponse readListenerRulesResponse = (ReadListenerRulesResponse) o; - return Objects.equals(this.listenerRules, readListenerRulesResponse.listenerRules) - && Objects.equals(this.responseContext, readListenerRulesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(listenerRules, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadListenerRulesResponse {\n"); - sb.append(" listenerRules: ").append(toIndentedString(listenerRules)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ListenerRules"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadListenerRulesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadListenerRulesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadListenerRulesResponse is not" - + " found in the empty JSON string", - ReadListenerRulesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadListenerRulesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadListenerRulesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ListenerRules") != null && !jsonObj.get("ListenerRules").isJsonNull()) { - JsonArray jsonArraylistenerRules = jsonObj.getAsJsonArray("ListenerRules"); - if (jsonArraylistenerRules != null) { - // ensure the json data is an array - if (!jsonObj.get("ListenerRules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRules` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ListenerRules").toString())); - } - - // validate the optional field `ListenerRules` (array) - for (int i = 0; i < jsonArraylistenerRules.size(); i++) { - ListenerRule.validateJsonObject( - jsonArraylistenerRules.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadListenerRulesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadListenerRulesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadListenerRulesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadListenerRulesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadListenerRulesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadListenerRulesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadListenerRulesResponse - * @throws IOException if the JSON string is invalid with respect to ReadListenerRulesResponse - */ - public static ReadListenerRulesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadListenerRulesResponse.class); - } - - /** - * Convert an instance of ReadListenerRulesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequest.java deleted file mode 100644 index 9970eb5e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequest.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLoadBalancerTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLoadBalancerTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAMES = "LoadBalancerNames"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAMES) - private List loadBalancerNames = new ArrayList<>(); - - public ReadLoadBalancerTagsRequest() {} - - public ReadLoadBalancerTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadLoadBalancerTagsRequest loadBalancerNames(List loadBalancerNames) { - - this.loadBalancerNames = loadBalancerNames; - return this; - } - - public ReadLoadBalancerTagsRequest addLoadBalancerNamesItem(String loadBalancerNamesItem) { - this.loadBalancerNames.add(loadBalancerNamesItem); - return this; - } - - /** - * One or more load balancer names. - * - * @return loadBalancerNames - */ - @javax.annotation.Nonnull - public List getLoadBalancerNames() { - return loadBalancerNames; - } - - public void setLoadBalancerNames(List loadBalancerNames) { - this.loadBalancerNames = loadBalancerNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest = (ReadLoadBalancerTagsRequest) o; - return Objects.equals(this.dryRun, readLoadBalancerTagsRequest.dryRun) - && Objects.equals( - this.loadBalancerNames, readLoadBalancerTagsRequest.loadBalancerNames); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, loadBalancerNames); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLoadBalancerTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerNames: ") - .append(toIndentedString(loadBalancerNames)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerNames"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerNames"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLoadBalancerTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLoadBalancerTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLoadBalancerTagsRequest is not" - + " found in the empty JSON string", - ReadLoadBalancerTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLoadBalancerTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLoadBalancerTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadLoadBalancerTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("LoadBalancerNames") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("LoadBalancerNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerNames` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancerNames").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLoadBalancerTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLoadBalancerTagsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLoadBalancerTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLoadBalancerTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLoadBalancerTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLoadBalancerTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLoadBalancerTagsRequest - * @throws IOException if the JSON string is invalid with respect to ReadLoadBalancerTagsRequest - */ - public static ReadLoadBalancerTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLoadBalancerTagsRequest.class); - } - - /** - * Convert an instance of ReadLoadBalancerTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponse.java deleted file mode 100644 index 7414ef66..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponse.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLoadBalancerTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLoadBalancerTagsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public ReadLoadBalancerTagsResponse() {} - - public ReadLoadBalancerTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadLoadBalancerTagsResponse tags(List tags) { - - this.tags = tags; - return this; - } - - public ReadLoadBalancerTagsResponse addTagsItem(LoadBalancerTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Information about one or more load balancer tags. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLoadBalancerTagsResponse readLoadBalancerTagsResponse = - (ReadLoadBalancerTagsResponse) o; - return Objects.equals(this.responseContext, readLoadBalancerTagsResponse.responseContext) - && Objects.equals(this.tags, readLoadBalancerTagsResponse.tags); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLoadBalancerTagsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadLoadBalancerTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLoadBalancerTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLoadBalancerTagsResponse is not" - + " found in the empty JSON string", - ReadLoadBalancerTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLoadBalancerTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLoadBalancerTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - LoadBalancerTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLoadBalancerTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLoadBalancerTagsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadLoadBalancerTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLoadBalancerTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLoadBalancerTagsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLoadBalancerTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLoadBalancerTagsResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadLoadBalancerTagsResponse - */ - public static ReadLoadBalancerTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLoadBalancerTagsResponse.class); - } - - /** - * Convert an instance of ReadLoadBalancerTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequest.java deleted file mode 100644 index d3034e66..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequest.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLoadBalancersRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLoadBalancersRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersLoadBalancer filters; - - public ReadLoadBalancersRequest() {} - - public ReadLoadBalancersRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadLoadBalancersRequest filters(FiltersLoadBalancer filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersLoadBalancer getFilters() { - return filters; - } - - public void setFilters(FiltersLoadBalancer filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLoadBalancersRequest readLoadBalancersRequest = (ReadLoadBalancersRequest) o; - return Objects.equals(this.dryRun, readLoadBalancersRequest.dryRun) - && Objects.equals(this.filters, readLoadBalancersRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLoadBalancersRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLoadBalancersRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLoadBalancersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLoadBalancersRequest is not found" - + " in the empty JSON string", - ReadLoadBalancersRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLoadBalancersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLoadBalancersRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersLoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLoadBalancersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLoadBalancersRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLoadBalancersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLoadBalancersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLoadBalancersRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLoadBalancersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLoadBalancersRequest - * @throws IOException if the JSON string is invalid with respect to ReadLoadBalancersRequest - */ - public static ReadLoadBalancersRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLoadBalancersRequest.class); - } - - /** - * Convert an instance of ReadLoadBalancersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponse.java deleted file mode 100644 index ffa02a90..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponse.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLoadBalancersResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLoadBalancersResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCERS = "LoadBalancers"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCERS) - private List loadBalancers = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadLoadBalancersResponse() {} - - public ReadLoadBalancersResponse loadBalancers(List loadBalancers) { - - this.loadBalancers = loadBalancers; - return this; - } - - public ReadLoadBalancersResponse addLoadBalancersItem(LoadBalancer loadBalancersItem) { - if (this.loadBalancers == null) { - this.loadBalancers = new ArrayList<>(); - } - this.loadBalancers.add(loadBalancersItem); - return this; - } - - /** - * Information about one or more load balancers. - * - * @return loadBalancers - */ - @javax.annotation.Nullable - public List getLoadBalancers() { - return loadBalancers; - } - - public void setLoadBalancers(List loadBalancers) { - this.loadBalancers = loadBalancers; - } - - public ReadLoadBalancersResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLoadBalancersResponse readLoadBalancersResponse = (ReadLoadBalancersResponse) o; - return Objects.equals(this.loadBalancers, readLoadBalancersResponse.loadBalancers) - && Objects.equals(this.responseContext, readLoadBalancersResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancers, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLoadBalancersResponse {\n"); - sb.append(" loadBalancers: ").append(toIndentedString(loadBalancers)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancers"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLoadBalancersResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLoadBalancersResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLoadBalancersResponse is not" - + " found in the empty JSON string", - ReadLoadBalancersResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLoadBalancersResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLoadBalancersResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("LoadBalancers") != null && !jsonObj.get("LoadBalancers").isJsonNull()) { - JsonArray jsonArrayloadBalancers = jsonObj.getAsJsonArray("LoadBalancers"); - if (jsonArrayloadBalancers != null) { - // ensure the json data is an array - if (!jsonObj.get("LoadBalancers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LoadBalancers").toString())); - } - - // validate the optional field `LoadBalancers` (array) - for (int i = 0; i < jsonArrayloadBalancers.size(); i++) { - LoadBalancer.validateJsonObject( - jsonArrayloadBalancers.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLoadBalancersResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLoadBalancersResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLoadBalancersResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLoadBalancersResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLoadBalancersResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLoadBalancersResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLoadBalancersResponse - * @throws IOException if the JSON string is invalid with respect to ReadLoadBalancersResponse - */ - public static ReadLoadBalancersResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLoadBalancersResponse.class); - } - - /** - * Convert an instance of ReadLoadBalancersResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequest.java deleted file mode 100644 index 52f0276a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLocationsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLocationsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadLocationsRequest() {} - - public ReadLocationsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadLocationsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadLocationsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLocationsRequest readLocationsRequest = (ReadLocationsRequest) o; - return Objects.equals(this.dryRun, readLocationsRequest.dryRun) - && Arrays.equals(this.nextPageToken, readLocationsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readLocationsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLocationsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLocationsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLocationsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLocationsRequest is not found in" - + " the empty JSON string", - ReadLocationsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLocationsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLocationsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLocationsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLocationsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLocationsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLocationsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLocationsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLocationsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLocationsRequest - * @throws IOException if the JSON string is invalid with respect to ReadLocationsRequest - */ - public static ReadLocationsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLocationsRequest.class); - } - - /** - * Convert an instance of ReadLocationsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponse.java deleted file mode 100644 index 09e6100e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadLocationsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadLocationsResponse { - public static final String SERIALIZED_NAME_LOCATIONS = "Locations"; - - @SerializedName(SERIALIZED_NAME_LOCATIONS) - private List locations = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadLocationsResponse() {} - - public ReadLocationsResponse locations(List locations) { - - this.locations = locations; - return this; - } - - public ReadLocationsResponse addLocationsItem(Location locationsItem) { - if (this.locations == null) { - this.locations = new ArrayList<>(); - } - this.locations.add(locationsItem); - return this; - } - - /** - * Information about one or more locations. - * - * @return locations - */ - @javax.annotation.Nullable - public List getLocations() { - return locations; - } - - public void setLocations(List locations) { - this.locations = locations; - } - - public ReadLocationsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadLocationsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadLocationsResponse readLocationsResponse = (ReadLocationsResponse) o; - return Objects.equals(this.locations, readLocationsResponse.locations) - && Arrays.equals(this.nextPageToken, readLocationsResponse.nextPageToken) - && Objects.equals(this.responseContext, readLocationsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(locations, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadLocationsResponse {\n"); - sb.append(" locations: ").append(toIndentedString(locations)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Locations"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadLocationsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadLocationsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadLocationsResponse is not found in" - + " the empty JSON string", - ReadLocationsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadLocationsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadLocationsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Locations") != null && !jsonObj.get("Locations").isJsonNull()) { - JsonArray jsonArraylocations = jsonObj.getAsJsonArray("Locations"); - if (jsonArraylocations != null) { - // ensure the json data is an array - if (!jsonObj.get("Locations").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Locations` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Locations").toString())); - } - - // validate the optional field `Locations` (array) - for (int i = 0; i < jsonArraylocations.size(); i++) { - Location.validateJsonObject(jsonArraylocations.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadLocationsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadLocationsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadLocationsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadLocationsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadLocationsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadLocationsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadLocationsResponse - * @throws IOException if the JSON string is invalid with respect to ReadLocationsResponse - */ - public static ReadLocationsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadLocationsResponse.class); - } - - /** - * Convert an instance of ReadLocationsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequest.java deleted file mode 100644 index 42971113..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequest.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadManagedPoliciesLinkedToUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadManagedPoliciesLinkedToUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersUserGroup filters; - - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public ReadManagedPoliciesLinkedToUserGroupRequest() {} - - public ReadManagedPoliciesLinkedToUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadManagedPoliciesLinkedToUserGroupRequest filters(FiltersUserGroup filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersUserGroup getFilters() { - return filters; - } - - public void setFilters(FiltersUserGroup filters) { - this.filters = filters; - } - - public ReadManagedPoliciesLinkedToUserGroupRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of policies requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadManagedPoliciesLinkedToUserGroupRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - public ReadManagedPoliciesLinkedToUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest = - (ReadManagedPoliciesLinkedToUserGroupRequest) o; - return Objects.equals(this.dryRun, readManagedPoliciesLinkedToUserGroupRequest.dryRun) - && Objects.equals(this.filters, readManagedPoliciesLinkedToUserGroupRequest.filters) - && Objects.equals( - this.firstItem, readManagedPoliciesLinkedToUserGroupRequest.firstItem) - && Objects.equals( - this.resultsPerPage, - readManagedPoliciesLinkedToUserGroupRequest.resultsPerPage) - && Objects.equals( - this.userGroupName, - readManagedPoliciesLinkedToUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, firstItem, resultsPerPage, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadManagedPoliciesLinkedToUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("FirstItem"); - openapiFields.add("ResultsPerPage"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadManagedPoliciesLinkedToUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadManagedPoliciesLinkedToUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " ReadManagedPoliciesLinkedToUserGroupRequest is not found" - + " in the empty JSON string", - ReadManagedPoliciesLinkedToUserGroupRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadManagedPoliciesLinkedToUserGroupRequest.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadManagedPoliciesLinkedToUserGroupRequest` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - ReadManagedPoliciesLinkedToUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersUserGroup.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadManagedPoliciesLinkedToUserGroupRequest.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ReadManagedPoliciesLinkedToUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadManagedPoliciesLinkedToUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, ReadManagedPoliciesLinkedToUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadManagedPoliciesLinkedToUserGroupRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadManagedPoliciesLinkedToUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadManagedPoliciesLinkedToUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadManagedPoliciesLinkedToUserGroupRequest - */ - public static ReadManagedPoliciesLinkedToUserGroupRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, ReadManagedPoliciesLinkedToUserGroupRequest.class); - } - - /** - * Convert an instance of ReadManagedPoliciesLinkedToUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponse.java deleted file mode 100644 index d89410ca..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponse.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadManagedPoliciesLinkedToUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadManagedPoliciesLinkedToUserGroupResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_MAX_RESULTS_TRUNCATED = "MaxResultsTruncated"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_TRUNCATED) - private Boolean maxResultsTruncated; - - public static final String SERIALIZED_NAME_POLICIES = "Policies"; - - @SerializedName(SERIALIZED_NAME_POLICIES) - private List policies = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadManagedPoliciesLinkedToUserGroupResponse() {} - - public ReadManagedPoliciesLinkedToUserGroupResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadManagedPoliciesLinkedToUserGroupResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadManagedPoliciesLinkedToUserGroupResponse maxResultsTruncated( - Boolean maxResultsTruncated) { - - this.maxResultsTruncated = maxResultsTruncated; - return this; - } - - /** - * If true, indicates whether requested page size is more than allowed. - * - * @return maxResultsTruncated - */ - @javax.annotation.Nullable - public Boolean getMaxResultsTruncated() { - return maxResultsTruncated; - } - - public void setMaxResultsTruncated(Boolean maxResultsTruncated) { - this.maxResultsTruncated = maxResultsTruncated; - } - - public ReadManagedPoliciesLinkedToUserGroupResponse policies(List policies) { - - this.policies = policies; - return this; - } - - public ReadManagedPoliciesLinkedToUserGroupResponse addPoliciesItem(LinkedPolicy policiesItem) { - if (this.policies == null) { - this.policies = new ArrayList<>(); - } - this.policies.add(policiesItem); - return this; - } - - /** - * A list of policies. - * - * @return policies - */ - @javax.annotation.Nullable - public List getPolicies() { - return policies; - } - - public void setPolicies(List policies) { - this.policies = policies; - } - - public ReadManagedPoliciesLinkedToUserGroupResponse responseContext( - ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadManagedPoliciesLinkedToUserGroupResponse readManagedPoliciesLinkedToUserGroupResponse = - (ReadManagedPoliciesLinkedToUserGroupResponse) o; - return Objects.equals( - this.hasMoreItems, - readManagedPoliciesLinkedToUserGroupResponse.hasMoreItems) - && Objects.equals( - this.maxResultsLimit, - readManagedPoliciesLinkedToUserGroupResponse.maxResultsLimit) - && Objects.equals( - this.maxResultsTruncated, - readManagedPoliciesLinkedToUserGroupResponse.maxResultsTruncated) - && Objects.equals( - this.policies, readManagedPoliciesLinkedToUserGroupResponse.policies) - && Objects.equals( - this.responseContext, - readManagedPoliciesLinkedToUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash( - hasMoreItems, maxResultsLimit, maxResultsTruncated, policies, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadManagedPoliciesLinkedToUserGroupResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" maxResultsTruncated: ") - .append(toIndentedString(maxResultsTruncated)) - .append("\n"); - sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("MaxResultsTruncated"); - openapiFields.add("Policies"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadManagedPoliciesLinkedToUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadManagedPoliciesLinkedToUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " ReadManagedPoliciesLinkedToUserGroupResponse is not found" - + " in the empty JSON string", - ReadManagedPoliciesLinkedToUserGroupResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadManagedPoliciesLinkedToUserGroupResponse.openapiFields.contains( - entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadManagedPoliciesLinkedToUserGroupResponse` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Policies") != null && !jsonObj.get("Policies").isJsonNull()) { - JsonArray jsonArraypolicies = jsonObj.getAsJsonArray("Policies"); - if (jsonArraypolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("Policies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Policies` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Policies").toString())); - } - - // validate the optional field `Policies` (array) - for (int i = 0; i < jsonArraypolicies.size(); i++) { - LinkedPolicy.validateJsonObject(jsonArraypolicies.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadManagedPoliciesLinkedToUserGroupResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'ReadManagedPoliciesLinkedToUserGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get(ReadManagedPoliciesLinkedToUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, ReadManagedPoliciesLinkedToUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadManagedPoliciesLinkedToUserGroupResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadManagedPoliciesLinkedToUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadManagedPoliciesLinkedToUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadManagedPoliciesLinkedToUserGroupResponse - */ - public static ReadManagedPoliciesLinkedToUserGroupResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, ReadManagedPoliciesLinkedToUserGroupResponse.class); - } - - /** - * Convert an instance of ReadManagedPoliciesLinkedToUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequest.java deleted file mode 100644 index 648d2ef8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNatServicesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNatServicesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersNatService filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadNatServicesRequest() {} - - public ReadNatServicesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNatServicesRequest filters(FiltersNatService filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersNatService getFilters() { - return filters; - } - - public void setFilters(FiltersNatService filters) { - this.filters = filters; - } - - public ReadNatServicesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNatServicesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNatServicesRequest readNatServicesRequest = (ReadNatServicesRequest) o; - return Objects.equals(this.dryRun, readNatServicesRequest.dryRun) - && Objects.equals(this.filters, readNatServicesRequest.filters) - && Arrays.equals(this.nextPageToken, readNatServicesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readNatServicesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNatServicesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNatServicesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNatServicesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNatServicesRequest is not found" - + " in the empty JSON string", - ReadNatServicesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNatServicesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNatServicesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersNatService.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNatServicesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNatServicesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNatServicesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNatServicesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNatServicesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNatServicesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNatServicesRequest - * @throws IOException if the JSON string is invalid with respect to ReadNatServicesRequest - */ - public static ReadNatServicesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNatServicesRequest.class); - } - - /** - * Convert an instance of ReadNatServicesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponse.java deleted file mode 100644 index f688fb2a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNatServicesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNatServicesResponse { - public static final String SERIALIZED_NAME_NAT_SERVICES = "NatServices"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICES) - private List natServices = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadNatServicesResponse() {} - - public ReadNatServicesResponse natServices(List natServices) { - - this.natServices = natServices; - return this; - } - - public ReadNatServicesResponse addNatServicesItem(NatService natServicesItem) { - if (this.natServices == null) { - this.natServices = new ArrayList<>(); - } - this.natServices.add(natServicesItem); - return this; - } - - /** - * Information about one or more NAT services. - * - * @return natServices - */ - @javax.annotation.Nullable - public List getNatServices() { - return natServices; - } - - public void setNatServices(List natServices) { - this.natServices = natServices; - } - - public ReadNatServicesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNatServicesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNatServicesResponse readNatServicesResponse = (ReadNatServicesResponse) o; - return Objects.equals(this.natServices, readNatServicesResponse.natServices) - && Arrays.equals(this.nextPageToken, readNatServicesResponse.nextPageToken) - && Objects.equals(this.responseContext, readNatServicesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(natServices, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNatServicesResponse {\n"); - sb.append(" natServices: ").append(toIndentedString(natServices)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NatServices"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNatServicesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNatServicesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNatServicesResponse is not found" - + " in the empty JSON string", - ReadNatServicesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNatServicesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNatServicesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("NatServices") != null && !jsonObj.get("NatServices").isJsonNull()) { - JsonArray jsonArraynatServices = jsonObj.getAsJsonArray("NatServices"); - if (jsonArraynatServices != null) { - // ensure the json data is an array - if (!jsonObj.get("NatServices").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServices` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NatServices").toString())); - } - - // validate the optional field `NatServices` (array) - for (int i = 0; i < jsonArraynatServices.size(); i++) { - NatService.validateJsonObject(jsonArraynatServices.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNatServicesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNatServicesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNatServicesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNatServicesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNatServicesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNatServicesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNatServicesResponse - * @throws IOException if the JSON string is invalid with respect to ReadNatServicesResponse - */ - public static ReadNatServicesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNatServicesResponse.class); - } - - /** - * Convert an instance of ReadNatServicesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequest.java deleted file mode 100644 index aeb32fe1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequest.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetAccessPointServicesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetAccessPointServicesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersService filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadNetAccessPointServicesRequest() {} - - public ReadNetAccessPointServicesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNetAccessPointServicesRequest filters(FiltersService filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersService getFilters() { - return filters; - } - - public void setFilters(FiltersService filters) { - this.filters = filters; - } - - public ReadNetAccessPointServicesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetAccessPointServicesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest = - (ReadNetAccessPointServicesRequest) o; - return Objects.equals(this.dryRun, readNetAccessPointServicesRequest.dryRun) - && Objects.equals(this.filters, readNetAccessPointServicesRequest.filters) - && Arrays.equals( - this.nextPageToken, readNetAccessPointServicesRequest.nextPageToken) - && Objects.equals( - this.resultsPerPage, readNetAccessPointServicesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetAccessPointServicesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadNetAccessPointServicesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetAccessPointServicesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetAccessPointServicesRequest is" - + " not found in the empty JSON string", - ReadNetAccessPointServicesRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetAccessPointServicesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetAccessPointServicesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersService.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetAccessPointServicesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetAccessPointServicesRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadNetAccessPointServicesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetAccessPointServicesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetAccessPointServicesRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetAccessPointServicesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetAccessPointServicesRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadNetAccessPointServicesRequest - */ - public static ReadNetAccessPointServicesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetAccessPointServicesRequest.class); - } - - /** - * Convert an instance of ReadNetAccessPointServicesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponse.java deleted file mode 100644 index 6bf47f03..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponse.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetAccessPointServicesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetAccessPointServicesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SERVICES = "Services"; - - @SerializedName(SERIALIZED_NAME_SERVICES) - private List services = null; - - public ReadNetAccessPointServicesResponse() {} - - public ReadNetAccessPointServicesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetAccessPointServicesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadNetAccessPointServicesResponse services(List services) { - - this.services = services; - return this; - } - - public ReadNetAccessPointServicesResponse addServicesItem(Service servicesItem) { - if (this.services == null) { - this.services = new ArrayList<>(); - } - this.services.add(servicesItem); - return this; - } - - /** - * The names of the services you can use for Net access points. - * - * @return services - */ - @javax.annotation.Nullable - public List getServices() { - return services; - } - - public void setServices(List services) { - this.services = services; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetAccessPointServicesResponse readNetAccessPointServicesResponse = - (ReadNetAccessPointServicesResponse) o; - return Arrays.equals(this.nextPageToken, readNetAccessPointServicesResponse.nextPageToken) - && Objects.equals( - this.responseContext, readNetAccessPointServicesResponse.responseContext) - && Objects.equals(this.services, readNetAccessPointServicesResponse.services); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, services); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetAccessPointServicesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" services: ").append(toIndentedString(services)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Services"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadNetAccessPointServicesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetAccessPointServicesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetAccessPointServicesResponse is" - + " not found in the empty JSON string", - ReadNetAccessPointServicesResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetAccessPointServicesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetAccessPointServicesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Services") != null && !jsonObj.get("Services").isJsonNull()) { - JsonArray jsonArrayservices = jsonObj.getAsJsonArray("Services"); - if (jsonArrayservices != null) { - // ensure the json data is an array - if (!jsonObj.get("Services").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Services` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Services").toString())); - } - - // validate the optional field `Services` (array) - for (int i = 0; i < jsonArrayservices.size(); i++) { - Service.validateJsonObject(jsonArrayservices.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetAccessPointServicesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetAccessPointServicesResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadNetAccessPointServicesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetAccessPointServicesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetAccessPointServicesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetAccessPointServicesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetAccessPointServicesResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadNetAccessPointServicesResponse - */ - public static ReadNetAccessPointServicesResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetAccessPointServicesResponse.class); - } - - /** - * Convert an instance of ReadNetAccessPointServicesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequest.java deleted file mode 100644 index c20c4ed7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetAccessPointsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetAccessPointsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersNetAccessPoint filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadNetAccessPointsRequest() {} - - public ReadNetAccessPointsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNetAccessPointsRequest filters(FiltersNetAccessPoint filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersNetAccessPoint getFilters() { - return filters; - } - - public void setFilters(FiltersNetAccessPoint filters) { - this.filters = filters; - } - - public ReadNetAccessPointsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetAccessPointsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetAccessPointsRequest readNetAccessPointsRequest = (ReadNetAccessPointsRequest) o; - return Objects.equals(this.dryRun, readNetAccessPointsRequest.dryRun) - && Objects.equals(this.filters, readNetAccessPointsRequest.filters) - && Arrays.equals(this.nextPageToken, readNetAccessPointsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readNetAccessPointsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetAccessPointsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetAccessPointsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetAccessPointsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetAccessPointsRequest is not" - + " found in the empty JSON string", - ReadNetAccessPointsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetAccessPointsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetAccessPointsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersNetAccessPoint.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetAccessPointsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetAccessPointsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetAccessPointsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetAccessPointsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetAccessPointsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetAccessPointsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetAccessPointsRequest - * @throws IOException if the JSON string is invalid with respect to ReadNetAccessPointsRequest - */ - public static ReadNetAccessPointsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetAccessPointsRequest.class); - } - - /** - * Convert an instance of ReadNetAccessPointsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponse.java deleted file mode 100644 index 4a7feed5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponse.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetAccessPointsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetAccessPointsResponse { - public static final String SERIALIZED_NAME_NET_ACCESS_POINTS = "NetAccessPoints"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINTS) - private List netAccessPoints = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadNetAccessPointsResponse() {} - - public ReadNetAccessPointsResponse netAccessPoints(List netAccessPoints) { - - this.netAccessPoints = netAccessPoints; - return this; - } - - public ReadNetAccessPointsResponse addNetAccessPointsItem(NetAccessPoint netAccessPointsItem) { - if (this.netAccessPoints == null) { - this.netAccessPoints = new ArrayList<>(); - } - this.netAccessPoints.add(netAccessPointsItem); - return this; - } - - /** - * One or more Net access points. - * - * @return netAccessPoints - */ - @javax.annotation.Nullable - public List getNetAccessPoints() { - return netAccessPoints; - } - - public void setNetAccessPoints(List netAccessPoints) { - this.netAccessPoints = netAccessPoints; - } - - public ReadNetAccessPointsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetAccessPointsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetAccessPointsResponse readNetAccessPointsResponse = (ReadNetAccessPointsResponse) o; - return Objects.equals(this.netAccessPoints, readNetAccessPointsResponse.netAccessPoints) - && Arrays.equals(this.nextPageToken, readNetAccessPointsResponse.nextPageToken) - && Objects.equals( - this.responseContext, readNetAccessPointsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netAccessPoints, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetAccessPointsResponse {\n"); - sb.append(" netAccessPoints: ").append(toIndentedString(netAccessPoints)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetAccessPoints"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetAccessPointsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetAccessPointsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetAccessPointsResponse is not" - + " found in the empty JSON string", - ReadNetAccessPointsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetAccessPointsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetAccessPointsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("NetAccessPoints") != null - && !jsonObj.get("NetAccessPoints").isJsonNull()) { - JsonArray jsonArraynetAccessPoints = jsonObj.getAsJsonArray("NetAccessPoints"); - if (jsonArraynetAccessPoints != null) { - // ensure the json data is an array - if (!jsonObj.get("NetAccessPoints").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPoints` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("NetAccessPoints").toString())); - } - - // validate the optional field `NetAccessPoints` (array) - for (int i = 0; i < jsonArraynetAccessPoints.size(); i++) { - NetAccessPoint.validateJsonObject( - jsonArraynetAccessPoints.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetAccessPointsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetAccessPointsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetAccessPointsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetAccessPointsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetAccessPointsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetAccessPointsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetAccessPointsResponse - * @throws IOException if the JSON string is invalid with respect to ReadNetAccessPointsResponse - */ - public static ReadNetAccessPointsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetAccessPointsResponse.class); - } - - /** - * Convert an instance of ReadNetAccessPointsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequest.java deleted file mode 100644 index d34f71bf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetPeeringsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetPeeringsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersNetPeering filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadNetPeeringsRequest() {} - - public ReadNetPeeringsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNetPeeringsRequest filters(FiltersNetPeering filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersNetPeering getFilters() { - return filters; - } - - public void setFilters(FiltersNetPeering filters) { - this.filters = filters; - } - - public ReadNetPeeringsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetPeeringsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetPeeringsRequest readNetPeeringsRequest = (ReadNetPeeringsRequest) o; - return Objects.equals(this.dryRun, readNetPeeringsRequest.dryRun) - && Objects.equals(this.filters, readNetPeeringsRequest.filters) - && Arrays.equals(this.nextPageToken, readNetPeeringsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readNetPeeringsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetPeeringsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetPeeringsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetPeeringsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetPeeringsRequest is not found" - + " in the empty JSON string", - ReadNetPeeringsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetPeeringsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetPeeringsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersNetPeering.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetPeeringsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetPeeringsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetPeeringsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetPeeringsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetPeeringsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetPeeringsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetPeeringsRequest - * @throws IOException if the JSON string is invalid with respect to ReadNetPeeringsRequest - */ - public static ReadNetPeeringsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetPeeringsRequest.class); - } - - /** - * Convert an instance of ReadNetPeeringsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponse.java deleted file mode 100644 index 2653ffda..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetPeeringsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetPeeringsResponse { - public static final String SERIALIZED_NAME_NET_PEERINGS = "NetPeerings"; - - @SerializedName(SERIALIZED_NAME_NET_PEERINGS) - private List netPeerings = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadNetPeeringsResponse() {} - - public ReadNetPeeringsResponse netPeerings(List netPeerings) { - - this.netPeerings = netPeerings; - return this; - } - - public ReadNetPeeringsResponse addNetPeeringsItem(NetPeering netPeeringsItem) { - if (this.netPeerings == null) { - this.netPeerings = new ArrayList<>(); - } - this.netPeerings.add(netPeeringsItem); - return this; - } - - /** - * Information about one or more Net peerings. - * - * @return netPeerings - */ - @javax.annotation.Nullable - public List getNetPeerings() { - return netPeerings; - } - - public void setNetPeerings(List netPeerings) { - this.netPeerings = netPeerings; - } - - public ReadNetPeeringsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetPeeringsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetPeeringsResponse readNetPeeringsResponse = (ReadNetPeeringsResponse) o; - return Objects.equals(this.netPeerings, readNetPeeringsResponse.netPeerings) - && Arrays.equals(this.nextPageToken, readNetPeeringsResponse.nextPageToken) - && Objects.equals(this.responseContext, readNetPeeringsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netPeerings, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetPeeringsResponse {\n"); - sb.append(" netPeerings: ").append(toIndentedString(netPeerings)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetPeerings"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetPeeringsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetPeeringsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetPeeringsResponse is not found" - + " in the empty JSON string", - ReadNetPeeringsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetPeeringsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetPeeringsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("NetPeerings") != null && !jsonObj.get("NetPeerings").isJsonNull()) { - JsonArray jsonArraynetPeerings = jsonObj.getAsJsonArray("NetPeerings"); - if (jsonArraynetPeerings != null) { - // ensure the json data is an array - if (!jsonObj.get("NetPeerings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeerings` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeerings").toString())); - } - - // validate the optional field `NetPeerings` (array) - for (int i = 0; i < jsonArraynetPeerings.size(); i++) { - NetPeering.validateJsonObject(jsonArraynetPeerings.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetPeeringsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetPeeringsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetPeeringsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetPeeringsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetPeeringsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetPeeringsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetPeeringsResponse - * @throws IOException if the JSON string is invalid with respect to ReadNetPeeringsResponse - */ - public static ReadNetPeeringsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetPeeringsResponse.class); - } - - /** - * Convert an instance of ReadNetPeeringsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequest.java deleted file mode 100644 index 32d0878d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersNet filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadNetsRequest() {} - - public ReadNetsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNetsRequest filters(FiltersNet filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersNet getFilters() { - return filters; - } - - public void setFilters(FiltersNet filters) { - this.filters = filters; - } - - public ReadNetsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetsRequest readNetsRequest = (ReadNetsRequest) o; - return Objects.equals(this.dryRun, readNetsRequest.dryRun) - && Objects.equals(this.filters, readNetsRequest.filters) - && Arrays.equals(this.nextPageToken, readNetsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readNetsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetsRequest is not found in the" - + " empty JSON string", - ReadNetsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersNet.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetsRequest - * @throws IOException if the JSON string is invalid with respect to ReadNetsRequest - */ - public static ReadNetsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetsRequest.class); - } - - /** - * Convert an instance of ReadNetsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponse.java deleted file mode 100644 index f8211eb0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNetsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNetsResponse { - public static final String SERIALIZED_NAME_NETS = "Nets"; - - @SerializedName(SERIALIZED_NAME_NETS) - private List nets = null; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadNetsResponse() {} - - public ReadNetsResponse nets(List nets) { - - this.nets = nets; - return this; - } - - public ReadNetsResponse addNetsItem(Net netsItem) { - if (this.nets == null) { - this.nets = new ArrayList<>(); - } - this.nets.add(netsItem); - return this; - } - - /** - * Information about the described Nets. - * - * @return nets - */ - @javax.annotation.Nullable - public List getNets() { - return nets; - } - - public void setNets(List nets) { - this.nets = nets; - } - - public ReadNetsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadNetsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNetsResponse readNetsResponse = (ReadNetsResponse) o; - return Objects.equals(this.nets, readNetsResponse.nets) - && Arrays.equals(this.nextPageToken, readNetsResponse.nextPageToken) - && Objects.equals(this.responseContext, readNetsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(nets, Arrays.hashCode(nextPageToken), responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNetsResponse {\n"); - sb.append(" nets: ").append(toIndentedString(nets)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Nets"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNetsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNetsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNetsResponse is not found in the" - + " empty JSON string", - ReadNetsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNetsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNetsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Nets") != null && !jsonObj.get("Nets").isJsonNull()) { - JsonArray jsonArraynets = jsonObj.getAsJsonArray("Nets"); - if (jsonArraynets != null) { - // ensure the json data is an array - if (!jsonObj.get("Nets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Nets` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Nets").toString())); - } - - // validate the optional field `Nets` (array) - for (int i = 0; i < jsonArraynets.size(); i++) { - Net.validateJsonObject(jsonArraynets.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNetsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNetsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNetsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNetsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNetsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNetsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNetsResponse - * @throws IOException if the JSON string is invalid with respect to ReadNetsResponse - */ - public static ReadNetsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNetsResponse.class); - } - - /** - * Convert an instance of ReadNetsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequest.java deleted file mode 100644 index 7b373001..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNicsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNicsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersNic filters; - - public ReadNicsRequest() {} - - public ReadNicsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadNicsRequest filters(FiltersNic filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersNic getFilters() { - return filters; - } - - public void setFilters(FiltersNic filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNicsRequest readNicsRequest = (ReadNicsRequest) o; - return Objects.equals(this.dryRun, readNicsRequest.dryRun) - && Objects.equals(this.filters, readNicsRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNicsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNicsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNicsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNicsRequest is not found in the" - + " empty JSON string", - ReadNicsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNicsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNicsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersNic.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNicsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNicsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNicsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNicsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNicsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNicsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNicsRequest - * @throws IOException if the JSON string is invalid with respect to ReadNicsRequest - */ - public static ReadNicsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNicsRequest.class); - } - - /** - * Convert an instance of ReadNicsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponse.java deleted file mode 100644 index 6569d4f8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadNicsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadNicsResponse { - public static final String SERIALIZED_NAME_NICS = "Nics"; - - @SerializedName(SERIALIZED_NAME_NICS) - private List nics = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadNicsResponse() {} - - public ReadNicsResponse nics(List nics) { - - this.nics = nics; - return this; - } - - public ReadNicsResponse addNicsItem(Nic nicsItem) { - if (this.nics == null) { - this.nics = new ArrayList<>(); - } - this.nics.add(nicsItem); - return this; - } - - /** - * Information about one or more NICs. - * - * @return nics - */ - @javax.annotation.Nullable - public List getNics() { - return nics; - } - - public void setNics(List nics) { - this.nics = nics; - } - - public ReadNicsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadNicsResponse readNicsResponse = (ReadNicsResponse) o; - return Objects.equals(this.nics, readNicsResponse.nics) - && Objects.equals(this.responseContext, readNicsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(nics, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadNicsResponse {\n"); - sb.append(" nics: ").append(toIndentedString(nics)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Nics"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadNicsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadNicsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadNicsResponse is not found in the" - + " empty JSON string", - ReadNicsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadNicsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadNicsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Nics") != null && !jsonObj.get("Nics").isJsonNull()) { - JsonArray jsonArraynics = jsonObj.getAsJsonArray("Nics"); - if (jsonArraynics != null) { - // ensure the json data is an array - if (!jsonObj.get("Nics").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Nics` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Nics").toString())); - } - - // validate the optional field `Nics` (array) - for (int i = 0; i < jsonArraynics.size(); i++) { - Nic.validateJsonObject(jsonArraynics.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadNicsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadNicsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadNicsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadNicsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadNicsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadNicsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadNicsResponse - * @throws IOException if the JSON string is invalid with respect to ReadNicsResponse - */ - public static ReadNicsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadNicsResponse.class); - } - - /** - * Convert an instance of ReadNicsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFilters.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFilters.java deleted file mode 100644 index 95ee8962..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFilters.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** One or more filters. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPoliciesFilters { - public static final String SERIALIZED_NAME_ONLY_LINKED = "OnlyLinked"; - - @SerializedName(SERIALIZED_NAME_ONLY_LINKED) - private Boolean onlyLinked; - - public static final String SERIALIZED_NAME_PATH_PREFIX = "PathPrefix"; - - @SerializedName(SERIALIZED_NAME_PATH_PREFIX) - private String pathPrefix; - - /** The scope to filter policies (`OWS` \\| `LOCAL`). */ - @JsonAdapter(ScopeEnum.Adapter.class) - public enum ScopeEnum { - LOCAL("LOCAL"), - - OWS("OWS"); - - private String value; - - ScopeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ScopeEnum fromValue(String value) { - for (ScopeEnum b : ScopeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ScopeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ScopeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ScopeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SCOPE = "Scope"; - - @SerializedName(SERIALIZED_NAME_SCOPE) - private ScopeEnum scope; - - public ReadPoliciesFilters() {} - - public ReadPoliciesFilters onlyLinked(Boolean onlyLinked) { - - this.onlyLinked = onlyLinked; - return this; - } - - /** - * If set to true, lists only the policies attached to a user. - * - * @return onlyLinked - */ - @javax.annotation.Nullable - public Boolean getOnlyLinked() { - return onlyLinked; - } - - public void setOnlyLinked(Boolean onlyLinked) { - this.onlyLinked = onlyLinked; - } - - public ReadPoliciesFilters pathPrefix(String pathPrefix) { - - this.pathPrefix = pathPrefix; - return this; - } - - /** - * The path prefix you can use to filter the results. If not specified, it is set to a slash - * (`/`). - * - * @return pathPrefix - */ - @javax.annotation.Nullable - public String getPathPrefix() { - return pathPrefix; - } - - public void setPathPrefix(String pathPrefix) { - this.pathPrefix = pathPrefix; - } - - public ReadPoliciesFilters scope(ScopeEnum scope) { - - this.scope = scope; - return this; - } - - /** - * The scope to filter policies (`OWS` \\| `LOCAL`). - * - * @return scope - */ - @javax.annotation.Nullable - public ScopeEnum getScope() { - return scope; - } - - public void setScope(ScopeEnum scope) { - this.scope = scope; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPoliciesFilters readPoliciesFilters = (ReadPoliciesFilters) o; - return Objects.equals(this.onlyLinked, readPoliciesFilters.onlyLinked) - && Objects.equals(this.pathPrefix, readPoliciesFilters.pathPrefix) - && Objects.equals(this.scope, readPoliciesFilters.scope); - } - - @Override - public int hashCode() { - return Objects.hash(onlyLinked, pathPrefix, scope); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPoliciesFilters {\n"); - sb.append(" onlyLinked: ").append(toIndentedString(onlyLinked)).append("\n"); - sb.append(" pathPrefix: ").append(toIndentedString(pathPrefix)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("OnlyLinked"); - openapiFields.add("PathPrefix"); - openapiFields.add("Scope"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPoliciesFilters - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPoliciesFilters.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPoliciesFilters is not found in" - + " the empty JSON string", - ReadPoliciesFilters.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPoliciesFilters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPoliciesFilters` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("PathPrefix") != null && !jsonObj.get("PathPrefix").isJsonNull()) - && !jsonObj.get("PathPrefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPrefix` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPrefix").toString())); - } - if ((jsonObj.get("Scope") != null && !jsonObj.get("Scope").isJsonNull()) - && !jsonObj.get("Scope").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Scope` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Scope").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPoliciesFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPoliciesFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPoliciesFilters.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPoliciesFilters value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPoliciesFilters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPoliciesFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPoliciesFilters - * @throws IOException if the JSON string is invalid with respect to ReadPoliciesFilters - */ - public static ReadPoliciesFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPoliciesFilters.class); - } - - /** - * Convert an instance of ReadPoliciesFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequest.java deleted file mode 100644 index a2eab63b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPoliciesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPoliciesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private ReadPoliciesFilters filters; - - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadPoliciesRequest() {} - - public ReadPoliciesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadPoliciesRequest filters(ReadPoliciesFilters filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public ReadPoliciesFilters getFilters() { - return filters; - } - - public void setFilters(ReadPoliciesFilters filters) { - this.filters = filters; - } - - public ReadPoliciesRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of policies requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadPoliciesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPoliciesRequest readPoliciesRequest = (ReadPoliciesRequest) o; - return Objects.equals(this.dryRun, readPoliciesRequest.dryRun) - && Objects.equals(this.filters, readPoliciesRequest.filters) - && Objects.equals(this.firstItem, readPoliciesRequest.firstItem) - && Objects.equals(this.resultsPerPage, readPoliciesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, firstItem, resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPoliciesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("FirstItem"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPoliciesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPoliciesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPoliciesRequest is not found in" - + " the empty JSON string", - ReadPoliciesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPoliciesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPoliciesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - ReadPoliciesFilters.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPoliciesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPoliciesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPoliciesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPoliciesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPoliciesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPoliciesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPoliciesRequest - * @throws IOException if the JSON string is invalid with respect to ReadPoliciesRequest - */ - public static ReadPoliciesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPoliciesRequest.class); - } - - /** - * Convert an instance of ReadPoliciesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponse.java deleted file mode 100644 index 66aa0b85..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponse.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPoliciesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPoliciesResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_MAX_RESULTS_TRUNCATED = "MaxResultsTruncated"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_TRUNCATED) - private Boolean maxResultsTruncated; - - public static final String SERIALIZED_NAME_POLICIES = "Policies"; - - @SerializedName(SERIALIZED_NAME_POLICIES) - private List policies = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPoliciesResponse() {} - - public ReadPoliciesResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadPoliciesResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadPoliciesResponse maxResultsTruncated(Boolean maxResultsTruncated) { - - this.maxResultsTruncated = maxResultsTruncated; - return this; - } - - /** - * If true, indicates whether requested page size is more than allowed. - * - * @return maxResultsTruncated - */ - @javax.annotation.Nullable - public Boolean getMaxResultsTruncated() { - return maxResultsTruncated; - } - - public void setMaxResultsTruncated(Boolean maxResultsTruncated) { - this.maxResultsTruncated = maxResultsTruncated; - } - - public ReadPoliciesResponse policies(List policies) { - - this.policies = policies; - return this; - } - - public ReadPoliciesResponse addPoliciesItem(Policy policiesItem) { - if (this.policies == null) { - this.policies = new ArrayList<>(); - } - this.policies.add(policiesItem); - return this; - } - - /** - * Information about one or more policies. - * - * @return policies - */ - @javax.annotation.Nullable - public List getPolicies() { - return policies; - } - - public void setPolicies(List policies) { - this.policies = policies; - } - - public ReadPoliciesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPoliciesResponse readPoliciesResponse = (ReadPoliciesResponse) o; - return Objects.equals(this.hasMoreItems, readPoliciesResponse.hasMoreItems) - && Objects.equals(this.maxResultsLimit, readPoliciesResponse.maxResultsLimit) - && Objects.equals( - this.maxResultsTruncated, readPoliciesResponse.maxResultsTruncated) - && Objects.equals(this.policies, readPoliciesResponse.policies) - && Objects.equals(this.responseContext, readPoliciesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash( - hasMoreItems, maxResultsLimit, maxResultsTruncated, policies, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPoliciesResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" maxResultsTruncated: ") - .append(toIndentedString(maxResultsTruncated)) - .append("\n"); - sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("MaxResultsTruncated"); - openapiFields.add("Policies"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPoliciesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPoliciesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPoliciesResponse is not found in" - + " the empty JSON string", - ReadPoliciesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPoliciesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPoliciesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Policies") != null && !jsonObj.get("Policies").isJsonNull()) { - JsonArray jsonArraypolicies = jsonObj.getAsJsonArray("Policies"); - if (jsonArraypolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("Policies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Policies` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Policies").toString())); - } - - // validate the optional field `Policies` (array) - for (int i = 0; i < jsonArraypolicies.size(); i++) { - Policy.validateJsonObject(jsonArraypolicies.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPoliciesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPoliciesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPoliciesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPoliciesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPoliciesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPoliciesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPoliciesResponse - * @throws IOException if the JSON string is invalid with respect to ReadPoliciesResponse - */ - public static ReadPoliciesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPoliciesResponse.class); - } - - /** - * Convert an instance of ReadPoliciesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequest.java deleted file mode 100644 index 798d3fa1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyRequest { - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public ReadPolicyRequest() {} - - public ReadPolicyRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyRequest readPolicyRequest = (ReadPolicyRequest) o; - return Objects.equals(this.policyOrn, readPolicyRequest.policyOrn); - } - - @Override - public int hashCode() { - return Objects.hash(policyOrn); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyRequest {\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyOrn"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyRequest is not found in the" - + " empty JSON string", - ReadPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyRequest - * @throws IOException if the JSON string is invalid with respect to ReadPolicyRequest - */ - public static ReadPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyRequest.class); - } - - /** - * Convert an instance of ReadPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponse.java deleted file mode 100644 index f620c196..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyResponse { - public static final String SERIALIZED_NAME_POLICY = "Policy"; - - @SerializedName(SERIALIZED_NAME_POLICY) - private Policy policy; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPolicyResponse() {} - - public ReadPolicyResponse policy(Policy policy) { - - this.policy = policy; - return this; - } - - /** - * Get policy - * - * @return policy - */ - @javax.annotation.Nullable - public Policy getPolicy() { - return policy; - } - - public void setPolicy(Policy policy) { - this.policy = policy; - } - - public ReadPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyResponse readPolicyResponse = (ReadPolicyResponse) o; - return Objects.equals(this.policy, readPolicyResponse.policy) - && Objects.equals(this.responseContext, readPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(policy, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyResponse {\n"); - sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Policy"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyResponse is not found in" - + " the empty JSON string", - ReadPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Policy` - if (jsonObj.get("Policy") != null && !jsonObj.get("Policy").isJsonNull()) { - Policy.validateJsonObject(jsonObj.getAsJsonObject("Policy")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyResponse - * @throws IOException if the JSON string is invalid with respect to ReadPolicyResponse - */ - public static ReadPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyResponse.class); - } - - /** - * Convert an instance of ReadPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequest.java deleted file mode 100644 index ba6805f6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyVersionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyVersionRequest { - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_VERSION_ID = "VersionId"; - - @SerializedName(SERIALIZED_NAME_VERSION_ID) - private String versionId; - - public ReadPolicyVersionRequest() {} - - public ReadPolicyVersionRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public ReadPolicyVersionRequest versionId(String versionId) { - - this.versionId = versionId; - return this; - } - - /** - * The ID of the policy version. - * - * @return versionId - */ - @javax.annotation.Nonnull - public String getVersionId() { - return versionId; - } - - public void setVersionId(String versionId) { - this.versionId = versionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyVersionRequest readPolicyVersionRequest = (ReadPolicyVersionRequest) o; - return Objects.equals(this.policyOrn, readPolicyVersionRequest.policyOrn) - && Objects.equals(this.versionId, readPolicyVersionRequest.versionId); - } - - @Override - public int hashCode() { - return Objects.hash(policyOrn, versionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyVersionRequest {\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyOrn"); - openapiFields.add("VersionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("VersionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyVersionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyVersionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyVersionRequest is not found" - + " in the empty JSON string", - ReadPolicyVersionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyVersionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyVersionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadPolicyVersionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("VersionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VersionId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VersionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyVersionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyVersionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyVersionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyVersionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyVersionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyVersionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyVersionRequest - * @throws IOException if the JSON string is invalid with respect to ReadPolicyVersionRequest - */ - public static ReadPolicyVersionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyVersionRequest.class); - } - - /** - * Convert an instance of ReadPolicyVersionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponse.java deleted file mode 100644 index 9c59543f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyVersionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyVersionResponse { - public static final String SERIALIZED_NAME_POLICY_VERSION = "PolicyVersion"; - - @SerializedName(SERIALIZED_NAME_POLICY_VERSION) - private PolicyVersion policyVersion; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPolicyVersionResponse() {} - - public ReadPolicyVersionResponse policyVersion(PolicyVersion policyVersion) { - - this.policyVersion = policyVersion; - return this; - } - - /** - * Get policyVersion - * - * @return policyVersion - */ - @javax.annotation.Nullable - public PolicyVersion getPolicyVersion() { - return policyVersion; - } - - public void setPolicyVersion(PolicyVersion policyVersion) { - this.policyVersion = policyVersion; - } - - public ReadPolicyVersionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyVersionResponse readPolicyVersionResponse = (ReadPolicyVersionResponse) o; - return Objects.equals(this.policyVersion, readPolicyVersionResponse.policyVersion) - && Objects.equals(this.responseContext, readPolicyVersionResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(policyVersion, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyVersionResponse {\n"); - sb.append(" policyVersion: ").append(toIndentedString(policyVersion)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyVersion"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyVersionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyVersionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyVersionResponse is not" - + " found in the empty JSON string", - ReadPolicyVersionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyVersionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyVersionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `PolicyVersion` - if (jsonObj.get("PolicyVersion") != null && !jsonObj.get("PolicyVersion").isJsonNull()) { - PolicyVersion.validateJsonObject(jsonObj.getAsJsonObject("PolicyVersion")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyVersionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyVersionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyVersionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyVersionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyVersionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyVersionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyVersionResponse - * @throws IOException if the JSON string is invalid with respect to ReadPolicyVersionResponse - */ - public static ReadPolicyVersionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyVersionResponse.class); - } - - /** - * Convert an instance of ReadPolicyVersionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequest.java deleted file mode 100644 index 46cc0cb0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyVersionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyVersionsRequest { - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadPolicyVersionsRequest() {} - - public ReadPolicyVersionsRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of policies requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadPolicyVersionsRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public ReadPolicyVersionsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyVersionsRequest readPolicyVersionsRequest = (ReadPolicyVersionsRequest) o; - return Objects.equals(this.firstItem, readPolicyVersionsRequest.firstItem) - && Objects.equals(this.policyOrn, readPolicyVersionsRequest.policyOrn) - && Objects.equals(this.resultsPerPage, readPolicyVersionsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(firstItem, policyOrn, resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyVersionsRequest {\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FirstItem"); - openapiFields.add("PolicyOrn"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyVersionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyVersionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyVersionsRequest is not" - + " found in the empty JSON string", - ReadPolicyVersionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyVersionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyVersionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadPolicyVersionsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyVersionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyVersionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyVersionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyVersionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyVersionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyVersionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyVersionsRequest - * @throws IOException if the JSON string is invalid with respect to ReadPolicyVersionsRequest - */ - public static ReadPolicyVersionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyVersionsRequest.class); - } - - /** - * Convert an instance of ReadPolicyVersionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponse.java deleted file mode 100644 index f54f30a1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponse.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPolicyVersionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPolicyVersionsResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_POLICY_VERSIONS = "PolicyVersions"; - - @SerializedName(SERIALIZED_NAME_POLICY_VERSIONS) - private List policyVersions = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPolicyVersionsResponse() {} - - public ReadPolicyVersionsResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadPolicyVersionsResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadPolicyVersionsResponse policyVersions(List policyVersions) { - - this.policyVersions = policyVersions; - return this; - } - - public ReadPolicyVersionsResponse addPolicyVersionsItem(PolicyVersion policyVersionsItem) { - if (this.policyVersions == null) { - this.policyVersions = new ArrayList<>(); - } - this.policyVersions.add(policyVersionsItem); - return this; - } - - /** - * A list of all the versions of the policy. - * - * @return policyVersions - */ - @javax.annotation.Nullable - public List getPolicyVersions() { - return policyVersions; - } - - public void setPolicyVersions(List policyVersions) { - this.policyVersions = policyVersions; - } - - public ReadPolicyVersionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPolicyVersionsResponse readPolicyVersionsResponse = (ReadPolicyVersionsResponse) o; - return Objects.equals(this.hasMoreItems, readPolicyVersionsResponse.hasMoreItems) - && Objects.equals(this.maxResultsLimit, readPolicyVersionsResponse.maxResultsLimit) - && Objects.equals(this.policyVersions, readPolicyVersionsResponse.policyVersions) - && Objects.equals(this.responseContext, readPolicyVersionsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(hasMoreItems, maxResultsLimit, policyVersions, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPolicyVersionsResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" policyVersions: ").append(toIndentedString(policyVersions)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("PolicyVersions"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPolicyVersionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPolicyVersionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPolicyVersionsResponse is not" - + " found in the empty JSON string", - ReadPolicyVersionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPolicyVersionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPolicyVersionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("PolicyVersions") != null && !jsonObj.get("PolicyVersions").isJsonNull()) { - JsonArray jsonArraypolicyVersions = jsonObj.getAsJsonArray("PolicyVersions"); - if (jsonArraypolicyVersions != null) { - // ensure the json data is an array - if (!jsonObj.get("PolicyVersions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyVersions` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("PolicyVersions").toString())); - } - - // validate the optional field `PolicyVersions` (array) - for (int i = 0; i < jsonArraypolicyVersions.size(); i++) { - PolicyVersion.validateJsonObject( - jsonArraypolicyVersions.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPolicyVersionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPolicyVersionsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPolicyVersionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPolicyVersionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPolicyVersionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPolicyVersionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPolicyVersionsResponse - * @throws IOException if the JSON string is invalid with respect to ReadPolicyVersionsResponse - */ - public static ReadPolicyVersionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPolicyVersionsResponse.class); - } - - /** - * Convert an instance of ReadPolicyVersionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequest.java deleted file mode 100644 index 45bc2f4a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadProductTypesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadProductTypesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersProductType filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadProductTypesRequest() {} - - public ReadProductTypesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadProductTypesRequest filters(FiltersProductType filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersProductType getFilters() { - return filters; - } - - public void setFilters(FiltersProductType filters) { - this.filters = filters; - } - - public ReadProductTypesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadProductTypesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadProductTypesRequest readProductTypesRequest = (ReadProductTypesRequest) o; - return Objects.equals(this.dryRun, readProductTypesRequest.dryRun) - && Objects.equals(this.filters, readProductTypesRequest.filters) - && Arrays.equals(this.nextPageToken, readProductTypesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readProductTypesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadProductTypesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadProductTypesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadProductTypesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadProductTypesRequest is not found" - + " in the empty JSON string", - ReadProductTypesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadProductTypesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadProductTypesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersProductType.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadProductTypesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadProductTypesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadProductTypesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadProductTypesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadProductTypesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadProductTypesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadProductTypesRequest - * @throws IOException if the JSON string is invalid with respect to ReadProductTypesRequest - */ - public static ReadProductTypesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadProductTypesRequest.class); - } - - /** - * Convert an instance of ReadProductTypesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponse.java deleted file mode 100644 index d9acb238..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadProductTypesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadProductTypesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_PRODUCT_TYPES = "ProductTypes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_TYPES) - private List productTypes = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadProductTypesResponse() {} - - public ReadProductTypesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadProductTypesResponse productTypes(List productTypes) { - - this.productTypes = productTypes; - return this; - } - - public ReadProductTypesResponse addProductTypesItem(ProductType productTypesItem) { - if (this.productTypes == null) { - this.productTypes = new ArrayList<>(); - } - this.productTypes.add(productTypesItem); - return this; - } - - /** - * Information about one or more product types. - * - * @return productTypes - */ - @javax.annotation.Nullable - public List getProductTypes() { - return productTypes; - } - - public void setProductTypes(List productTypes) { - this.productTypes = productTypes; - } - - public ReadProductTypesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadProductTypesResponse readProductTypesResponse = (ReadProductTypesResponse) o; - return Arrays.equals(this.nextPageToken, readProductTypesResponse.nextPageToken) - && Objects.equals(this.productTypes, readProductTypesResponse.productTypes) - && Objects.equals(this.responseContext, readProductTypesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), productTypes, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadProductTypesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" productTypes: ").append(toIndentedString(productTypes)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ProductTypes"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadProductTypesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadProductTypesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadProductTypesResponse is not found" - + " in the empty JSON string", - ReadProductTypesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadProductTypesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadProductTypesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("ProductTypes") != null && !jsonObj.get("ProductTypes").isJsonNull()) { - JsonArray jsonArrayproductTypes = jsonObj.getAsJsonArray("ProductTypes"); - if (jsonArrayproductTypes != null) { - // ensure the json data is an array - if (!jsonObj.get("ProductTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("ProductTypes").toString())); - } - - // validate the optional field `ProductTypes` (array) - for (int i = 0; i < jsonArrayproductTypes.size(); i++) { - ProductType.validateJsonObject(jsonArrayproductTypes.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadProductTypesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadProductTypesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadProductTypesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadProductTypesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadProductTypesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadProductTypesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadProductTypesResponse - * @throws IOException if the JSON string is invalid with respect to ReadProductTypesResponse - */ - public static ReadProductTypesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadProductTypesResponse.class); - } - - /** - * Convert an instance of ReadProductTypesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequest.java deleted file mode 100644 index 9daf59d3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicCatalogRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicCatalogRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadPublicCatalogRequest() {} - - public ReadPublicCatalogRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicCatalogRequest readPublicCatalogRequest = (ReadPublicCatalogRequest) o; - return Objects.equals(this.dryRun, readPublicCatalogRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicCatalogRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicCatalogRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicCatalogRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicCatalogRequest is not found" - + " in the empty JSON string", - ReadPublicCatalogRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicCatalogRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicCatalogRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicCatalogRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicCatalogRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicCatalogRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicCatalogRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicCatalogRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicCatalogRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicCatalogRequest - * @throws IOException if the JSON string is invalid with respect to ReadPublicCatalogRequest - */ - public static ReadPublicCatalogRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicCatalogRequest.class); - } - - /** - * Convert an instance of ReadPublicCatalogRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponse.java deleted file mode 100644 index e215c4ec..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicCatalogResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicCatalogResponse { - public static final String SERIALIZED_NAME_CATALOG = "Catalog"; - - @SerializedName(SERIALIZED_NAME_CATALOG) - private Catalog catalog; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPublicCatalogResponse() {} - - public ReadPublicCatalogResponse catalog(Catalog catalog) { - - this.catalog = catalog; - return this; - } - - /** - * Get catalog - * - * @return catalog - */ - @javax.annotation.Nullable - public Catalog getCatalog() { - return catalog; - } - - public void setCatalog(Catalog catalog) { - this.catalog = catalog; - } - - public ReadPublicCatalogResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicCatalogResponse readPublicCatalogResponse = (ReadPublicCatalogResponse) o; - return Objects.equals(this.catalog, readPublicCatalogResponse.catalog) - && Objects.equals(this.responseContext, readPublicCatalogResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(catalog, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicCatalogResponse {\n"); - sb.append(" catalog: ").append(toIndentedString(catalog)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Catalog"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicCatalogResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicCatalogResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicCatalogResponse is not" - + " found in the empty JSON string", - ReadPublicCatalogResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicCatalogResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicCatalogResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Catalog` - if (jsonObj.get("Catalog") != null && !jsonObj.get("Catalog").isJsonNull()) { - Catalog.validateJsonObject(jsonObj.getAsJsonObject("Catalog")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicCatalogResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicCatalogResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicCatalogResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicCatalogResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicCatalogResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicCatalogResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicCatalogResponse - * @throws IOException if the JSON string is invalid with respect to ReadPublicCatalogResponse - */ - public static ReadPublicCatalogResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicCatalogResponse.class); - } - - /** - * Convert an instance of ReadPublicCatalogResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequest.java deleted file mode 100644 index 53ee8c23..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequest.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicIpRangesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicIpRangesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadPublicIpRangesRequest() {} - - public ReadPublicIpRangesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadPublicIpRangesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadPublicIpRangesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicIpRangesRequest readPublicIpRangesRequest = (ReadPublicIpRangesRequest) o; - return Objects.equals(this.dryRun, readPublicIpRangesRequest.dryRun) - && Arrays.equals(this.nextPageToken, readPublicIpRangesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readPublicIpRangesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicIpRangesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicIpRangesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicIpRangesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicIpRangesRequest is not" - + " found in the empty JSON string", - ReadPublicIpRangesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicIpRangesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicIpRangesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicIpRangesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicIpRangesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicIpRangesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicIpRangesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicIpRangesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicIpRangesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicIpRangesRequest - * @throws IOException if the JSON string is invalid with respect to ReadPublicIpRangesRequest - */ - public static ReadPublicIpRangesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicIpRangesRequest.class); - } - - /** - * Convert an instance of ReadPublicIpRangesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponse.java deleted file mode 100644 index 9a9b337e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponse.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicIpRangesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicIpRangesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPublicIpRangesResponse() {} - - public ReadPublicIpRangesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadPublicIpRangesResponse publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public ReadPublicIpRangesResponse addPublicIpsItem(String publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * The list of public IPv4 addresses used in the Region, in CIDR notation. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public ReadPublicIpRangesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicIpRangesResponse readPublicIpRangesResponse = (ReadPublicIpRangesResponse) o; - return Arrays.equals(this.nextPageToken, readPublicIpRangesResponse.nextPageToken) - && Objects.equals(this.publicIps, readPublicIpRangesResponse.publicIps) - && Objects.equals(this.responseContext, readPublicIpRangesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), publicIps, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicIpRangesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("PublicIps"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicIpRangesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicIpRangesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicIpRangesResponse is not" - + " found in the empty JSON string", - ReadPublicIpRangesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicIpRangesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicIpRangesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PublicIps").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicIpRangesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicIpRangesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicIpRangesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicIpRangesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicIpRangesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicIpRangesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicIpRangesResponse - * @throws IOException if the JSON string is invalid with respect to ReadPublicIpRangesResponse - */ - public static ReadPublicIpRangesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicIpRangesResponse.class); - } - - /** - * Convert an instance of ReadPublicIpRangesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequest.java deleted file mode 100644 index f09318dd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicIpsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicIpsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersPublicIp filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadPublicIpsRequest() {} - - public ReadPublicIpsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadPublicIpsRequest filters(FiltersPublicIp filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersPublicIp getFilters() { - return filters; - } - - public void setFilters(FiltersPublicIp filters) { - this.filters = filters; - } - - public ReadPublicIpsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadPublicIpsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicIpsRequest readPublicIpsRequest = (ReadPublicIpsRequest) o; - return Objects.equals(this.dryRun, readPublicIpsRequest.dryRun) - && Objects.equals(this.filters, readPublicIpsRequest.filters) - && Arrays.equals(this.nextPageToken, readPublicIpsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readPublicIpsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicIpsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicIpsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicIpsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicIpsRequest is not found in" - + " the empty JSON string", - ReadPublicIpsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicIpsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicIpsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersPublicIp.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicIpsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicIpsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicIpsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicIpsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicIpsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicIpsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicIpsRequest - * @throws IOException if the JSON string is invalid with respect to ReadPublicIpsRequest - */ - public static ReadPublicIpsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicIpsRequest.class); - } - - /** - * Convert an instance of ReadPublicIpsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponse.java deleted file mode 100644 index 2885050b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadPublicIpsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadPublicIpsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_PUBLIC_IPS = "PublicIps"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IPS) - private List publicIps = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadPublicIpsResponse() {} - - public ReadPublicIpsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadPublicIpsResponse publicIps(List publicIps) { - - this.publicIps = publicIps; - return this; - } - - public ReadPublicIpsResponse addPublicIpsItem(PublicIp publicIpsItem) { - if (this.publicIps == null) { - this.publicIps = new ArrayList<>(); - } - this.publicIps.add(publicIpsItem); - return this; - } - - /** - * Information about one or more public IPs. - * - * @return publicIps - */ - @javax.annotation.Nullable - public List getPublicIps() { - return publicIps; - } - - public void setPublicIps(List publicIps) { - this.publicIps = publicIps; - } - - public ReadPublicIpsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadPublicIpsResponse readPublicIpsResponse = (ReadPublicIpsResponse) o; - return Arrays.equals(this.nextPageToken, readPublicIpsResponse.nextPageToken) - && Objects.equals(this.publicIps, readPublicIpsResponse.publicIps) - && Objects.equals(this.responseContext, readPublicIpsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), publicIps, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadPublicIpsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" publicIps: ").append(toIndentedString(publicIps)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("PublicIps"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadPublicIpsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadPublicIpsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadPublicIpsResponse is not found in" - + " the empty JSON string", - ReadPublicIpsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadPublicIpsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadPublicIpsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("PublicIps") != null && !jsonObj.get("PublicIps").isJsonNull()) { - JsonArray jsonArraypublicIps = jsonObj.getAsJsonArray("PublicIps"); - if (jsonArraypublicIps != null) { - // ensure the json data is an array - if (!jsonObj.get("PublicIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIps` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIps").toString())); - } - - // validate the optional field `PublicIps` (array) - for (int i = 0; i < jsonArraypublicIps.size(); i++) { - PublicIp.validateJsonObject(jsonArraypublicIps.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadPublicIpsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadPublicIpsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadPublicIpsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadPublicIpsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadPublicIpsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadPublicIpsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadPublicIpsResponse - * @throws IOException if the JSON string is invalid with respect to ReadPublicIpsResponse - */ - public static ReadPublicIpsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadPublicIpsResponse.class); - } - - /** - * Convert an instance of ReadPublicIpsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequest.java deleted file mode 100644 index 8c4477e2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadQuotasRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadQuotasRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersQuota filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadQuotasRequest() {} - - public ReadQuotasRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadQuotasRequest filters(FiltersQuota filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersQuota getFilters() { - return filters; - } - - public void setFilters(FiltersQuota filters) { - this.filters = filters; - } - - public ReadQuotasRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadQuotasRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadQuotasRequest readQuotasRequest = (ReadQuotasRequest) o; - return Objects.equals(this.dryRun, readQuotasRequest.dryRun) - && Objects.equals(this.filters, readQuotasRequest.filters) - && Arrays.equals(this.nextPageToken, readQuotasRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readQuotasRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadQuotasRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadQuotasRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadQuotasRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadQuotasRequest is not found in the" - + " empty JSON string", - ReadQuotasRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadQuotasRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadQuotasRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersQuota.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadQuotasRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadQuotasRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadQuotasRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadQuotasRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadQuotasRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadQuotasRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadQuotasRequest - * @throws IOException if the JSON string is invalid with respect to ReadQuotasRequest - */ - public static ReadQuotasRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadQuotasRequest.class); - } - - /** - * Convert an instance of ReadQuotasRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponse.java deleted file mode 100644 index f07729a4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadQuotasResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadQuotasResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_QUOTA_TYPES = "QuotaTypes"; - - @SerializedName(SERIALIZED_NAME_QUOTA_TYPES) - private List quotaTypes = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadQuotasResponse() {} - - public ReadQuotasResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadQuotasResponse quotaTypes(List quotaTypes) { - - this.quotaTypes = quotaTypes; - return this; - } - - public ReadQuotasResponse addQuotaTypesItem(QuotaTypes quotaTypesItem) { - if (this.quotaTypes == null) { - this.quotaTypes = new ArrayList<>(); - } - this.quotaTypes.add(quotaTypesItem); - return this; - } - - /** - * Information about one or more quotas. - * - * @return quotaTypes - */ - @javax.annotation.Nullable - public List getQuotaTypes() { - return quotaTypes; - } - - public void setQuotaTypes(List quotaTypes) { - this.quotaTypes = quotaTypes; - } - - public ReadQuotasResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadQuotasResponse readQuotasResponse = (ReadQuotasResponse) o; - return Arrays.equals(this.nextPageToken, readQuotasResponse.nextPageToken) - && Objects.equals(this.quotaTypes, readQuotasResponse.quotaTypes) - && Objects.equals(this.responseContext, readQuotasResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), quotaTypes, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadQuotasResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" quotaTypes: ").append(toIndentedString(quotaTypes)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("QuotaTypes"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadQuotasResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadQuotasResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadQuotasResponse is not found in" - + " the empty JSON string", - ReadQuotasResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadQuotasResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadQuotasResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("QuotaTypes") != null && !jsonObj.get("QuotaTypes").isJsonNull()) { - JsonArray jsonArrayquotaTypes = jsonObj.getAsJsonArray("QuotaTypes"); - if (jsonArrayquotaTypes != null) { - // ensure the json data is an array - if (!jsonObj.get("QuotaTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `QuotaTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("QuotaTypes").toString())); - } - - // validate the optional field `QuotaTypes` (array) - for (int i = 0; i < jsonArrayquotaTypes.size(); i++) { - QuotaTypes.validateJsonObject(jsonArrayquotaTypes.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadQuotasResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadQuotasResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadQuotasResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadQuotasResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadQuotasResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadQuotasResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadQuotasResponse - * @throws IOException if the JSON string is invalid with respect to ReadQuotasResponse - */ - public static ReadQuotasResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadQuotasResponse.class); - } - - /** - * Convert an instance of ReadQuotasResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequest.java deleted file mode 100644 index 7ca24a00..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadRegionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadRegionsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadRegionsRequest() {} - - public ReadRegionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadRegionsRequest readRegionsRequest = (ReadRegionsRequest) o; - return Objects.equals(this.dryRun, readRegionsRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadRegionsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadRegionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadRegionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadRegionsRequest is not found in" - + " the empty JSON string", - ReadRegionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadRegionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadRegionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadRegionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadRegionsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadRegionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadRegionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadRegionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadRegionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadRegionsRequest - * @throws IOException if the JSON string is invalid with respect to ReadRegionsRequest - */ - public static ReadRegionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadRegionsRequest.class); - } - - /** - * Convert an instance of ReadRegionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponse.java deleted file mode 100644 index 9d871988..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadRegionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadRegionsResponse { - public static final String SERIALIZED_NAME_REGIONS = "Regions"; - - @SerializedName(SERIALIZED_NAME_REGIONS) - private List regions = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadRegionsResponse() {} - - public ReadRegionsResponse regions(List regions) { - - this.regions = regions; - return this; - } - - public ReadRegionsResponse addRegionsItem(Region regionsItem) { - if (this.regions == null) { - this.regions = new ArrayList<>(); - } - this.regions.add(regionsItem); - return this; - } - - /** - * Information about one or more Regions. - * - * @return regions - */ - @javax.annotation.Nullable - public List getRegions() { - return regions; - } - - public void setRegions(List regions) { - this.regions = regions; - } - - public ReadRegionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadRegionsResponse readRegionsResponse = (ReadRegionsResponse) o; - return Objects.equals(this.regions, readRegionsResponse.regions) - && Objects.equals(this.responseContext, readRegionsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(regions, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadRegionsResponse {\n"); - sb.append(" regions: ").append(toIndentedString(regions)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Regions"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadRegionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadRegionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadRegionsResponse is not found in" - + " the empty JSON string", - ReadRegionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadRegionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadRegionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Regions") != null && !jsonObj.get("Regions").isJsonNull()) { - JsonArray jsonArrayregions = jsonObj.getAsJsonArray("Regions"); - if (jsonArrayregions != null) { - // ensure the json data is an array - if (!jsonObj.get("Regions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Regions` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Regions").toString())); - } - - // validate the optional field `Regions` (array) - for (int i = 0; i < jsonArrayregions.size(); i++) { - Region.validateJsonObject(jsonArrayregions.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadRegionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadRegionsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadRegionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadRegionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadRegionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadRegionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadRegionsResponse - * @throws IOException if the JSON string is invalid with respect to ReadRegionsResponse - */ - public static ReadRegionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadRegionsResponse.class); - } - - /** - * Convert an instance of ReadRegionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequest.java deleted file mode 100644 index d3833030..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadRouteTablesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadRouteTablesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersRouteTable filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadRouteTablesRequest() {} - - public ReadRouteTablesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadRouteTablesRequest filters(FiltersRouteTable filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersRouteTable getFilters() { - return filters; - } - - public void setFilters(FiltersRouteTable filters) { - this.filters = filters; - } - - public ReadRouteTablesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadRouteTablesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadRouteTablesRequest readRouteTablesRequest = (ReadRouteTablesRequest) o; - return Objects.equals(this.dryRun, readRouteTablesRequest.dryRun) - && Objects.equals(this.filters, readRouteTablesRequest.filters) - && Arrays.equals(this.nextPageToken, readRouteTablesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readRouteTablesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadRouteTablesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadRouteTablesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadRouteTablesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadRouteTablesRequest is not found" - + " in the empty JSON string", - ReadRouteTablesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadRouteTablesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadRouteTablesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersRouteTable.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadRouteTablesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadRouteTablesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadRouteTablesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadRouteTablesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadRouteTablesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadRouteTablesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadRouteTablesRequest - * @throws IOException if the JSON string is invalid with respect to ReadRouteTablesRequest - */ - public static ReadRouteTablesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadRouteTablesRequest.class); - } - - /** - * Convert an instance of ReadRouteTablesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponse.java deleted file mode 100644 index a4686aa9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadRouteTablesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadRouteTablesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLES = "RouteTables"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLES) - private List routeTables = null; - - public ReadRouteTablesResponse() {} - - public ReadRouteTablesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadRouteTablesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadRouteTablesResponse routeTables(List routeTables) { - - this.routeTables = routeTables; - return this; - } - - public ReadRouteTablesResponse addRouteTablesItem(RouteTable routeTablesItem) { - if (this.routeTables == null) { - this.routeTables = new ArrayList<>(); - } - this.routeTables.add(routeTablesItem); - return this; - } - - /** - * Information about one or more route tables. - * - * @return routeTables - */ - @javax.annotation.Nullable - public List getRouteTables() { - return routeTables; - } - - public void setRouteTables(List routeTables) { - this.routeTables = routeTables; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadRouteTablesResponse readRouteTablesResponse = (ReadRouteTablesResponse) o; - return Arrays.equals(this.nextPageToken, readRouteTablesResponse.nextPageToken) - && Objects.equals(this.responseContext, readRouteTablesResponse.responseContext) - && Objects.equals(this.routeTables, readRouteTablesResponse.routeTables); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, routeTables); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadRouteTablesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTables: ").append(toIndentedString(routeTables)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTables"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadRouteTablesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadRouteTablesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadRouteTablesResponse is not found" - + " in the empty JSON string", - ReadRouteTablesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadRouteTablesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadRouteTablesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("RouteTables") != null && !jsonObj.get("RouteTables").isJsonNull()) { - JsonArray jsonArrayrouteTables = jsonObj.getAsJsonArray("RouteTables"); - if (jsonArrayrouteTables != null) { - // ensure the json data is an array - if (!jsonObj.get("RouteTables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTables` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTables").toString())); - } - - // validate the optional field `RouteTables` (array) - for (int i = 0; i < jsonArrayrouteTables.size(); i++) { - RouteTable.validateJsonObject(jsonArrayrouteTables.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadRouteTablesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadRouteTablesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadRouteTablesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadRouteTablesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadRouteTablesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadRouteTablesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadRouteTablesResponse - * @throws IOException if the JSON string is invalid with respect to ReadRouteTablesResponse - */ - public static ReadRouteTablesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadRouteTablesResponse.class); - } - - /** - * Convert an instance of ReadRouteTablesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequest.java deleted file mode 100644 index 37e6926b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSecretAccessKeyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSecretAccessKeyRequest { - public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "AccessKeyId"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) - private String accessKeyId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadSecretAccessKeyRequest() {} - - public ReadSecretAccessKeyRequest accessKeyId(String accessKeyId) { - - this.accessKeyId = accessKeyId; - return this; - } - - /** - * The ID of the access key. - * - * @return accessKeyId - */ - @javax.annotation.Nonnull - public String getAccessKeyId() { - return accessKeyId; - } - - public void setAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - } - - public ReadSecretAccessKeyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSecretAccessKeyRequest readSecretAccessKeyRequest = (ReadSecretAccessKeyRequest) o; - return Objects.equals(this.accessKeyId, readSecretAccessKeyRequest.accessKeyId) - && Objects.equals(this.dryRun, readSecretAccessKeyRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeyId, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSecretAccessKeyRequest {\n"); - sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyId"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AccessKeyId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSecretAccessKeyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSecretAccessKeyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSecretAccessKeyRequest is not" - + " found in the empty JSON string", - ReadSecretAccessKeyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSecretAccessKeyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSecretAccessKeyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadSecretAccessKeyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("AccessKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeyId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSecretAccessKeyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSecretAccessKeyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSecretAccessKeyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSecretAccessKeyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSecretAccessKeyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSecretAccessKeyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSecretAccessKeyRequest - * @throws IOException if the JSON string is invalid with respect to ReadSecretAccessKeyRequest - */ - public static ReadSecretAccessKeyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSecretAccessKeyRequest.class); - } - - /** - * Convert an instance of ReadSecretAccessKeyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponse.java deleted file mode 100644 index 780ff3de..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSecretAccessKeyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSecretAccessKeyResponse { - public static final String SERIALIZED_NAME_ACCESS_KEY = "AccessKey"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY) - private AccessKeySecretKey accessKey; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadSecretAccessKeyResponse() {} - - public ReadSecretAccessKeyResponse accessKey(AccessKeySecretKey accessKey) { - - this.accessKey = accessKey; - return this; - } - - /** - * Get accessKey - * - * @return accessKey - */ - @javax.annotation.Nullable - public AccessKeySecretKey getAccessKey() { - return accessKey; - } - - public void setAccessKey(AccessKeySecretKey accessKey) { - this.accessKey = accessKey; - } - - public ReadSecretAccessKeyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSecretAccessKeyResponse readSecretAccessKeyResponse = (ReadSecretAccessKeyResponse) o; - return Objects.equals(this.accessKey, readSecretAccessKeyResponse.accessKey) - && Objects.equals( - this.responseContext, readSecretAccessKeyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(accessKey, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSecretAccessKeyResponse {\n"); - sb.append(" accessKey: ").append(toIndentedString(accessKey)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKey"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSecretAccessKeyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSecretAccessKeyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSecretAccessKeyResponse is not" - + " found in the empty JSON string", - ReadSecretAccessKeyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSecretAccessKeyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSecretAccessKeyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `AccessKey` - if (jsonObj.get("AccessKey") != null && !jsonObj.get("AccessKey").isJsonNull()) { - AccessKeySecretKey.validateJsonObject(jsonObj.getAsJsonObject("AccessKey")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSecretAccessKeyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSecretAccessKeyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSecretAccessKeyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSecretAccessKeyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSecretAccessKeyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSecretAccessKeyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSecretAccessKeyResponse - * @throws IOException if the JSON string is invalid with respect to ReadSecretAccessKeyResponse - */ - public static ReadSecretAccessKeyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSecretAccessKeyResponse.class); - } - - /** - * Convert an instance of ReadSecretAccessKeyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequest.java deleted file mode 100644 index 20eaf038..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSecurityGroupsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSecurityGroupsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersSecurityGroup filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadSecurityGroupsRequest() {} - - public ReadSecurityGroupsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadSecurityGroupsRequest filters(FiltersSecurityGroup filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersSecurityGroup getFilters() { - return filters; - } - - public void setFilters(FiltersSecurityGroup filters) { - this.filters = filters; - } - - public ReadSecurityGroupsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSecurityGroupsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSecurityGroupsRequest readSecurityGroupsRequest = (ReadSecurityGroupsRequest) o; - return Objects.equals(this.dryRun, readSecurityGroupsRequest.dryRun) - && Objects.equals(this.filters, readSecurityGroupsRequest.filters) - && Arrays.equals(this.nextPageToken, readSecurityGroupsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readSecurityGroupsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSecurityGroupsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSecurityGroupsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSecurityGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSecurityGroupsRequest is not" - + " found in the empty JSON string", - ReadSecurityGroupsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSecurityGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSecurityGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersSecurityGroup.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSecurityGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSecurityGroupsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSecurityGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSecurityGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSecurityGroupsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSecurityGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSecurityGroupsRequest - * @throws IOException if the JSON string is invalid with respect to ReadSecurityGroupsRequest - */ - public static ReadSecurityGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSecurityGroupsRequest.class); - } - - /** - * Convert an instance of ReadSecurityGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponse.java deleted file mode 100644 index ae42e86a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSecurityGroupsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSecurityGroupsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public ReadSecurityGroupsResponse() {} - - public ReadSecurityGroupsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSecurityGroupsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadSecurityGroupsResponse securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public ReadSecurityGroupsResponse addSecurityGroupsItem(SecurityGroup securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * Information about one or more security groups. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSecurityGroupsResponse readSecurityGroupsResponse = (ReadSecurityGroupsResponse) o; - return Arrays.equals(this.nextPageToken, readSecurityGroupsResponse.nextPageToken) - && Objects.equals(this.responseContext, readSecurityGroupsResponse.responseContext) - && Objects.equals(this.securityGroups, readSecurityGroupsResponse.securityGroups); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, securityGroups); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSecurityGroupsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("SecurityGroups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSecurityGroupsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSecurityGroupsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSecurityGroupsResponse is not" - + " found in the empty JSON string", - ReadSecurityGroupsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSecurityGroupsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSecurityGroupsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonNull()) { - JsonArray jsonArraysecurityGroups = jsonObj.getAsJsonArray("SecurityGroups"); - if (jsonArraysecurityGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - - // validate the optional field `SecurityGroups` (array) - for (int i = 0; i < jsonArraysecurityGroups.size(); i++) { - SecurityGroup.validateJsonObject( - jsonArraysecurityGroups.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSecurityGroupsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSecurityGroupsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSecurityGroupsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSecurityGroupsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSecurityGroupsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSecurityGroupsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSecurityGroupsResponse - * @throws IOException if the JSON string is invalid with respect to ReadSecurityGroupsResponse - */ - public static ReadSecurityGroupsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSecurityGroupsResponse.class); - } - - /** - * Convert an instance of ReadSecurityGroupsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequest.java deleted file mode 100644 index 0a8d8a1c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadServerCertificatesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadServerCertificatesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersServerCertificate filters; - - public ReadServerCertificatesRequest() {} - - public ReadServerCertificatesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadServerCertificatesRequest filters(FiltersServerCertificate filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersServerCertificate getFilters() { - return filters; - } - - public void setFilters(FiltersServerCertificate filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadServerCertificatesRequest readServerCertificatesRequest = - (ReadServerCertificatesRequest) o; - return Objects.equals(this.dryRun, readServerCertificatesRequest.dryRun) - && Objects.equals(this.filters, readServerCertificatesRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadServerCertificatesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadServerCertificatesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadServerCertificatesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadServerCertificatesRequest is not" - + " found in the empty JSON string", - ReadServerCertificatesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadServerCertificatesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadServerCertificatesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersServerCertificate.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadServerCertificatesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadServerCertificatesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadServerCertificatesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadServerCertificatesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadServerCertificatesRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadServerCertificatesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadServerCertificatesRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadServerCertificatesRequest - */ - public static ReadServerCertificatesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadServerCertificatesRequest.class); - } - - /** - * Convert an instance of ReadServerCertificatesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponse.java deleted file mode 100644 index b811d3c0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponse.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadServerCertificatesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadServerCertificatesResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATES = "ServerCertificates"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATES) - private List serverCertificates = null; - - public ReadServerCertificatesResponse() {} - - public ReadServerCertificatesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadServerCertificatesResponse serverCertificates( - List serverCertificates) { - - this.serverCertificates = serverCertificates; - return this; - } - - public ReadServerCertificatesResponse addServerCertificatesItem( - ServerCertificate serverCertificatesItem) { - if (this.serverCertificates == null) { - this.serverCertificates = new ArrayList<>(); - } - this.serverCertificates.add(serverCertificatesItem); - return this; - } - - /** - * Information about one or more server certificates. - * - * @return serverCertificates - */ - @javax.annotation.Nullable - public List getServerCertificates() { - return serverCertificates; - } - - public void setServerCertificates(List serverCertificates) { - this.serverCertificates = serverCertificates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadServerCertificatesResponse readServerCertificatesResponse = - (ReadServerCertificatesResponse) o; - return Objects.equals(this.responseContext, readServerCertificatesResponse.responseContext) - && Objects.equals( - this.serverCertificates, readServerCertificatesResponse.serverCertificates); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, serverCertificates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadServerCertificatesResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" serverCertificates: ") - .append(toIndentedString(serverCertificates)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("ServerCertificates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadServerCertificatesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadServerCertificatesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadServerCertificatesResponse is not" - + " found in the empty JSON string", - ReadServerCertificatesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadServerCertificatesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadServerCertificatesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("ServerCertificates") != null - && !jsonObj.get("ServerCertificates").isJsonNull()) { - JsonArray jsonArrayserverCertificates = jsonObj.getAsJsonArray("ServerCertificates"); - if (jsonArrayserverCertificates != null) { - // ensure the json data is an array - if (!jsonObj.get("ServerCertificates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServerCertificates` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("ServerCertificates").toString())); - } - - // validate the optional field `ServerCertificates` (array) - for (int i = 0; i < jsonArrayserverCertificates.size(); i++) { - ServerCertificate.validateJsonObject( - jsonArrayserverCertificates.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadServerCertificatesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadServerCertificatesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadServerCertificatesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadServerCertificatesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadServerCertificatesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadServerCertificatesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadServerCertificatesResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadServerCertificatesResponse - */ - public static ReadServerCertificatesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadServerCertificatesResponse.class); - } - - /** - * Convert an instance of ReadServerCertificatesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequest.java deleted file mode 100644 index ee8b7887..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequest.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSnapshotExportTasksRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSnapshotExportTasksRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersExportTask filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadSnapshotExportTasksRequest() {} - - public ReadSnapshotExportTasksRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadSnapshotExportTasksRequest filters(FiltersExportTask filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersExportTask getFilters() { - return filters; - } - - public void setFilters(FiltersExportTask filters) { - this.filters = filters; - } - - public ReadSnapshotExportTasksRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSnapshotExportTasksRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest = - (ReadSnapshotExportTasksRequest) o; - return Objects.equals(this.dryRun, readSnapshotExportTasksRequest.dryRun) - && Objects.equals(this.filters, readSnapshotExportTasksRequest.filters) - && Arrays.equals(this.nextPageToken, readSnapshotExportTasksRequest.nextPageToken) - && Objects.equals( - this.resultsPerPage, readSnapshotExportTasksRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSnapshotExportTasksRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadSnapshotExportTasksRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSnapshotExportTasksRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSnapshotExportTasksRequest is not" - + " found in the empty JSON string", - ReadSnapshotExportTasksRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSnapshotExportTasksRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSnapshotExportTasksRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersExportTask.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSnapshotExportTasksRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSnapshotExportTasksRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadSnapshotExportTasksRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSnapshotExportTasksRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSnapshotExportTasksRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSnapshotExportTasksRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSnapshotExportTasksRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadSnapshotExportTasksRequest - */ - public static ReadSnapshotExportTasksRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSnapshotExportTasksRequest.class); - } - - /** - * Convert an instance of ReadSnapshotExportTasksRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponse.java deleted file mode 100644 index 4edcfd2f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponse.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSnapshotExportTasksResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSnapshotExportTasksResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SNAPSHOT_EXPORT_TASKS = "SnapshotExportTasks"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_EXPORT_TASKS) - private List snapshotExportTasks = null; - - public ReadSnapshotExportTasksResponse() {} - - public ReadSnapshotExportTasksResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSnapshotExportTasksResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadSnapshotExportTasksResponse snapshotExportTasks( - List snapshotExportTasks) { - - this.snapshotExportTasks = snapshotExportTasks; - return this; - } - - public ReadSnapshotExportTasksResponse addSnapshotExportTasksItem( - SnapshotExportTask snapshotExportTasksItem) { - if (this.snapshotExportTasks == null) { - this.snapshotExportTasks = new ArrayList<>(); - } - this.snapshotExportTasks.add(snapshotExportTasksItem); - return this; - } - - /** - * Information about one or more snapshot export tasks. - * - * @return snapshotExportTasks - */ - @javax.annotation.Nullable - public List getSnapshotExportTasks() { - return snapshotExportTasks; - } - - public void setSnapshotExportTasks(List snapshotExportTasks) { - this.snapshotExportTasks = snapshotExportTasks; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSnapshotExportTasksResponse readSnapshotExportTasksResponse = - (ReadSnapshotExportTasksResponse) o; - return Arrays.equals(this.nextPageToken, readSnapshotExportTasksResponse.nextPageToken) - && Objects.equals( - this.responseContext, readSnapshotExportTasksResponse.responseContext) - && Objects.equals( - this.snapshotExportTasks, - readSnapshotExportTasksResponse.snapshotExportTasks); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, snapshotExportTasks); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSnapshotExportTasksResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" snapshotExportTasks: ") - .append(toIndentedString(snapshotExportTasks)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("SnapshotExportTasks"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadSnapshotExportTasksResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSnapshotExportTasksResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSnapshotExportTasksResponse is" - + " not found in the empty JSON string", - ReadSnapshotExportTasksResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSnapshotExportTasksResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSnapshotExportTasksResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("SnapshotExportTasks") != null - && !jsonObj.get("SnapshotExportTasks").isJsonNull()) { - JsonArray jsonArraysnapshotExportTasks = jsonObj.getAsJsonArray("SnapshotExportTasks"); - if (jsonArraysnapshotExportTasks != null) { - // ensure the json data is an array - if (!jsonObj.get("SnapshotExportTasks").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotExportTasks` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("SnapshotExportTasks").toString())); - } - - // validate the optional field `SnapshotExportTasks` (array) - for (int i = 0; i < jsonArraysnapshotExportTasks.size(); i++) { - SnapshotExportTask.validateJsonObject( - jsonArraysnapshotExportTasks.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSnapshotExportTasksResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSnapshotExportTasksResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadSnapshotExportTasksResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSnapshotExportTasksResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSnapshotExportTasksResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSnapshotExportTasksResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSnapshotExportTasksResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadSnapshotExportTasksResponse - */ - public static ReadSnapshotExportTasksResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSnapshotExportTasksResponse.class); - } - - /** - * Convert an instance of ReadSnapshotExportTasksResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequest.java deleted file mode 100644 index 73276dc5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSnapshotsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSnapshotsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersSnapshot filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadSnapshotsRequest() {} - - public ReadSnapshotsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadSnapshotsRequest filters(FiltersSnapshot filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersSnapshot getFilters() { - return filters; - } - - public void setFilters(FiltersSnapshot filters) { - this.filters = filters; - } - - public ReadSnapshotsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSnapshotsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSnapshotsRequest readSnapshotsRequest = (ReadSnapshotsRequest) o; - return Objects.equals(this.dryRun, readSnapshotsRequest.dryRun) - && Objects.equals(this.filters, readSnapshotsRequest.filters) - && Arrays.equals(this.nextPageToken, readSnapshotsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readSnapshotsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSnapshotsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSnapshotsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSnapshotsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSnapshotsRequest is not found in" - + " the empty JSON string", - ReadSnapshotsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSnapshotsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSnapshotsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersSnapshot.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSnapshotsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSnapshotsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSnapshotsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSnapshotsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSnapshotsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSnapshotsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSnapshotsRequest - * @throws IOException if the JSON string is invalid with respect to ReadSnapshotsRequest - */ - public static ReadSnapshotsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSnapshotsRequest.class); - } - - /** - * Convert an instance of ReadSnapshotsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponse.java deleted file mode 100644 index 1c38b15e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSnapshotsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSnapshotsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SNAPSHOTS = "Snapshots"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOTS) - private List snapshots = null; - - public ReadSnapshotsResponse() {} - - public ReadSnapshotsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSnapshotsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadSnapshotsResponse snapshots(List snapshots) { - - this.snapshots = snapshots; - return this; - } - - public ReadSnapshotsResponse addSnapshotsItem(Snapshot snapshotsItem) { - if (this.snapshots == null) { - this.snapshots = new ArrayList<>(); - } - this.snapshots.add(snapshotsItem); - return this; - } - - /** - * Information about one or more snapshots and their permissions. - * - * @return snapshots - */ - @javax.annotation.Nullable - public List getSnapshots() { - return snapshots; - } - - public void setSnapshots(List snapshots) { - this.snapshots = snapshots; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSnapshotsResponse readSnapshotsResponse = (ReadSnapshotsResponse) o; - return Arrays.equals(this.nextPageToken, readSnapshotsResponse.nextPageToken) - && Objects.equals(this.responseContext, readSnapshotsResponse.responseContext) - && Objects.equals(this.snapshots, readSnapshotsResponse.snapshots); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, snapshots); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSnapshotsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" snapshots: ").append(toIndentedString(snapshots)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Snapshots"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSnapshotsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSnapshotsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSnapshotsResponse is not found in" - + " the empty JSON string", - ReadSnapshotsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSnapshotsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSnapshotsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Snapshots") != null && !jsonObj.get("Snapshots").isJsonNull()) { - JsonArray jsonArraysnapshots = jsonObj.getAsJsonArray("Snapshots"); - if (jsonArraysnapshots != null) { - // ensure the json data is an array - if (!jsonObj.get("Snapshots").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Snapshots` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Snapshots").toString())); - } - - // validate the optional field `Snapshots` (array) - for (int i = 0; i < jsonArraysnapshots.size(); i++) { - Snapshot.validateJsonObject(jsonArraysnapshots.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSnapshotsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSnapshotsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSnapshotsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSnapshotsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSnapshotsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSnapshotsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSnapshotsResponse - * @throws IOException if the JSON string is invalid with respect to ReadSnapshotsResponse - */ - public static ReadSnapshotsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSnapshotsResponse.class); - } - - /** - * Convert an instance of ReadSnapshotsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequest.java deleted file mode 100644 index b2cb6104..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSubnetsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSubnetsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersSubnet filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadSubnetsRequest() {} - - public ReadSubnetsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadSubnetsRequest filters(FiltersSubnet filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersSubnet getFilters() { - return filters; - } - - public void setFilters(FiltersSubnet filters) { - this.filters = filters; - } - - public ReadSubnetsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSubnetsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSubnetsRequest readSubnetsRequest = (ReadSubnetsRequest) o; - return Objects.equals(this.dryRun, readSubnetsRequest.dryRun) - && Objects.equals(this.filters, readSubnetsRequest.filters) - && Arrays.equals(this.nextPageToken, readSubnetsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readSubnetsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSubnetsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSubnetsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSubnetsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSubnetsRequest is not found in" - + " the empty JSON string", - ReadSubnetsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSubnetsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSubnetsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersSubnet.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSubnetsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSubnetsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSubnetsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSubnetsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSubnetsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSubnetsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSubnetsRequest - * @throws IOException if the JSON string is invalid with respect to ReadSubnetsRequest - */ - public static ReadSubnetsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSubnetsRequest.class); - } - - /** - * Convert an instance of ReadSubnetsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponse.java deleted file mode 100644 index 5af26d39..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSubnetsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSubnetsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SUBNETS = "Subnets"; - - @SerializedName(SERIALIZED_NAME_SUBNETS) - private List subnets = null; - - public ReadSubnetsResponse() {} - - public ReadSubnetsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSubnetsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadSubnetsResponse subnets(List subnets) { - - this.subnets = subnets; - return this; - } - - public ReadSubnetsResponse addSubnetsItem(Subnet subnetsItem) { - if (this.subnets == null) { - this.subnets = new ArrayList<>(); - } - this.subnets.add(subnetsItem); - return this; - } - - /** - * Information about one or more Subnets. - * - * @return subnets - */ - @javax.annotation.Nullable - public List getSubnets() { - return subnets; - } - - public void setSubnets(List subnets) { - this.subnets = subnets; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSubnetsResponse readSubnetsResponse = (ReadSubnetsResponse) o; - return Arrays.equals(this.nextPageToken, readSubnetsResponse.nextPageToken) - && Objects.equals(this.responseContext, readSubnetsResponse.responseContext) - && Objects.equals(this.subnets, readSubnetsResponse.subnets); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, subnets); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSubnetsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" subnets: ").append(toIndentedString(subnets)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Subnets"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSubnetsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSubnetsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSubnetsResponse is not found in" - + " the empty JSON string", - ReadSubnetsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSubnetsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSubnetsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Subnets") != null && !jsonObj.get("Subnets").isJsonNull()) { - JsonArray jsonArraysubnets = jsonObj.getAsJsonArray("Subnets"); - if (jsonArraysubnets != null) { - // ensure the json data is an array - if (!jsonObj.get("Subnets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Subnets` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Subnets").toString())); - } - - // validate the optional field `Subnets` (array) - for (int i = 0; i < jsonArraysubnets.size(); i++) { - Subnet.validateJsonObject(jsonArraysubnets.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSubnetsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSubnetsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSubnetsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSubnetsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSubnetsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSubnetsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSubnetsResponse - * @throws IOException if the JSON string is invalid with respect to ReadSubnetsResponse - */ - public static ReadSubnetsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSubnetsResponse.class); - } - - /** - * Convert an instance of ReadSubnetsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequest.java deleted file mode 100644 index cf321066..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSubregionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSubregionsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersSubregion filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadSubregionsRequest() {} - - public ReadSubregionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadSubregionsRequest filters(FiltersSubregion filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersSubregion getFilters() { - return filters; - } - - public void setFilters(FiltersSubregion filters) { - this.filters = filters; - } - - public ReadSubregionsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSubregionsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSubregionsRequest readSubregionsRequest = (ReadSubregionsRequest) o; - return Objects.equals(this.dryRun, readSubregionsRequest.dryRun) - && Objects.equals(this.filters, readSubregionsRequest.filters) - && Arrays.equals(this.nextPageToken, readSubregionsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readSubregionsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSubregionsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSubregionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSubregionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSubregionsRequest is not found in" - + " the empty JSON string", - ReadSubregionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSubregionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSubregionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersSubregion.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSubregionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSubregionsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSubregionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSubregionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSubregionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSubregionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSubregionsRequest - * @throws IOException if the JSON string is invalid with respect to ReadSubregionsRequest - */ - public static ReadSubregionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSubregionsRequest.class); - } - - /** - * Convert an instance of ReadSubregionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponse.java deleted file mode 100644 index da446b5c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadSubregionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadSubregionsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SUBREGIONS = "Subregions"; - - @SerializedName(SERIALIZED_NAME_SUBREGIONS) - private List subregions = null; - - public ReadSubregionsResponse() {} - - public ReadSubregionsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadSubregionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadSubregionsResponse subregions(List subregions) { - - this.subregions = subregions; - return this; - } - - public ReadSubregionsResponse addSubregionsItem(Subregion subregionsItem) { - if (this.subregions == null) { - this.subregions = new ArrayList<>(); - } - this.subregions.add(subregionsItem); - return this; - } - - /** - * Information about one or more Subregions. - * - * @return subregions - */ - @javax.annotation.Nullable - public List getSubregions() { - return subregions; - } - - public void setSubregions(List subregions) { - this.subregions = subregions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadSubregionsResponse readSubregionsResponse = (ReadSubregionsResponse) o; - return Arrays.equals(this.nextPageToken, readSubregionsResponse.nextPageToken) - && Objects.equals(this.responseContext, readSubregionsResponse.responseContext) - && Objects.equals(this.subregions, readSubregionsResponse.subregions); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, subregions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadSubregionsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" subregions: ").append(toIndentedString(subregions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Subregions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadSubregionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadSubregionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadSubregionsResponse is not found" - + " in the empty JSON string", - ReadSubregionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadSubregionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadSubregionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Subregions") != null && !jsonObj.get("Subregions").isJsonNull()) { - JsonArray jsonArraysubregions = jsonObj.getAsJsonArray("Subregions"); - if (jsonArraysubregions != null) { - // ensure the json data is an array - if (!jsonObj.get("Subregions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Subregions` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Subregions").toString())); - } - - // validate the optional field `Subregions` (array) - for (int i = 0; i < jsonArraysubregions.size(); i++) { - Subregion.validateJsonObject(jsonArraysubregions.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadSubregionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadSubregionsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadSubregionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadSubregionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadSubregionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadSubregionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadSubregionsResponse - * @throws IOException if the JSON string is invalid with respect to ReadSubregionsResponse - */ - public static ReadSubregionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadSubregionsResponse.class); - } - - /** - * Convert an instance of ReadSubregionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequest.java deleted file mode 100644 index 0f6ca339..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadTagsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadTagsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersTag filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadTagsRequest() {} - - public ReadTagsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadTagsRequest filters(FiltersTag filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersTag getFilters() { - return filters; - } - - public void setFilters(FiltersTag filters) { - this.filters = filters; - } - - public ReadTagsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadTagsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadTagsRequest readTagsRequest = (ReadTagsRequest) o; - return Objects.equals(this.dryRun, readTagsRequest.dryRun) - && Objects.equals(this.filters, readTagsRequest.filters) - && Arrays.equals(this.nextPageToken, readTagsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readTagsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadTagsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadTagsRequest is not found in the" - + " empty JSON string", - ReadTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadTagsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersTag.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadTagsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadTagsRequest - * @throws IOException if the JSON string is invalid with respect to ReadTagsRequest - */ - public static ReadTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadTagsRequest.class); - } - - /** - * Convert an instance of ReadTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponse.java deleted file mode 100644 index 0a2b766c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadTagsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadTagsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public ReadTagsResponse() {} - - public ReadTagsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadTagsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadTagsResponse tags(List tags) { - - this.tags = tags; - return this; - } - - public ReadTagsResponse addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Information about one or more tags. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadTagsResponse readTagsResponse = (ReadTagsResponse) o; - return Arrays.equals(this.nextPageToken, readTagsResponse.nextPageToken) - && Objects.equals(this.responseContext, readTagsResponse.responseContext) - && Objects.equals(this.tags, readTagsResponse.tags); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadTagsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadTagsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadTagsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadTagsResponse is not found in the" - + " empty JSON string", - ReadTagsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadTagsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadTagsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadTagsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadTagsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadTagsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadTagsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadTagsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadTagsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadTagsResponse - * @throws IOException if the JSON string is invalid with respect to ReadTagsResponse - */ - public static ReadTagsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadTagsResponse.class); - } - - /** - * Convert an instance of ReadTagsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequest.java deleted file mode 100644 index 2561fb1d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequest.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupPoliciesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupPoliciesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public ReadUserGroupPoliciesRequest() {} - - public ReadUserGroupPoliciesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadUserGroupPoliciesRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of policies requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadUserGroupPoliciesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - public ReadUserGroupPoliciesRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public ReadUserGroupPoliciesRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest = - (ReadUserGroupPoliciesRequest) o; - return Objects.equals(this.dryRun, readUserGroupPoliciesRequest.dryRun) - && Objects.equals(this.firstItem, readUserGroupPoliciesRequest.firstItem) - && Objects.equals(this.resultsPerPage, readUserGroupPoliciesRequest.resultsPerPage) - && Objects.equals(this.userGroupName, readUserGroupPoliciesRequest.userGroupName) - && Objects.equals(this.userGroupPath, readUserGroupPoliciesRequest.userGroupPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, firstItem, resultsPerPage, userGroupName, userGroupPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupPoliciesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("FirstItem"); - openapiFields.add("ResultsPerPage"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadUserGroupPoliciesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupPoliciesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupPoliciesRequest is not" - + " found in the empty JSON string", - ReadUserGroupPoliciesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupPoliciesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupPoliciesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadUserGroupPoliciesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupPoliciesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupPoliciesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadUserGroupPoliciesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupPoliciesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupPoliciesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupPoliciesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupPoliciesRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadUserGroupPoliciesRequest - */ - public static ReadUserGroupPoliciesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupPoliciesRequest.class); - } - - /** - * Convert an instance of ReadUserGroupPoliciesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponse.java deleted file mode 100644 index 49e8d84b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponse.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupPoliciesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupPoliciesResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_MAX_RESULTS_TRUNCATED = "MaxResultsTruncated"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_TRUNCATED) - private Boolean maxResultsTruncated; - - public static final String SERIALIZED_NAME_POLICIES = "Policies"; - - @SerializedName(SERIALIZED_NAME_POLICIES) - private List policies = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadUserGroupPoliciesResponse() {} - - public ReadUserGroupPoliciesResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadUserGroupPoliciesResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadUserGroupPoliciesResponse maxResultsTruncated(Boolean maxResultsTruncated) { - - this.maxResultsTruncated = maxResultsTruncated; - return this; - } - - /** - * If true, indicates whether requested page size is more than allowed. - * - * @return maxResultsTruncated - */ - @javax.annotation.Nullable - public Boolean getMaxResultsTruncated() { - return maxResultsTruncated; - } - - public void setMaxResultsTruncated(Boolean maxResultsTruncated) { - this.maxResultsTruncated = maxResultsTruncated; - } - - public ReadUserGroupPoliciesResponse policies(List policies) { - - this.policies = policies; - return this; - } - - public ReadUserGroupPoliciesResponse addPoliciesItem(InlinePolicy policiesItem) { - if (this.policies == null) { - this.policies = new ArrayList<>(); - } - this.policies.add(policiesItem); - return this; - } - - /** - * A list of policies. - * - * @return policies - */ - @javax.annotation.Nullable - public List getPolicies() { - return policies; - } - - public void setPolicies(List policies) { - this.policies = policies; - } - - public ReadUserGroupPoliciesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupPoliciesResponse readUserGroupPoliciesResponse = - (ReadUserGroupPoliciesResponse) o; - return Objects.equals(this.hasMoreItems, readUserGroupPoliciesResponse.hasMoreItems) - && Objects.equals( - this.maxResultsLimit, readUserGroupPoliciesResponse.maxResultsLimit) - && Objects.equals( - this.maxResultsTruncated, readUserGroupPoliciesResponse.maxResultsTruncated) - && Objects.equals(this.policies, readUserGroupPoliciesResponse.policies) - && Objects.equals( - this.responseContext, readUserGroupPoliciesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash( - hasMoreItems, maxResultsLimit, maxResultsTruncated, policies, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupPoliciesResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" maxResultsTruncated: ") - .append(toIndentedString(maxResultsTruncated)) - .append("\n"); - sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("MaxResultsTruncated"); - openapiFields.add("Policies"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadUserGroupPoliciesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupPoliciesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupPoliciesResponse is not" - + " found in the empty JSON string", - ReadUserGroupPoliciesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupPoliciesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupPoliciesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("Policies") != null && !jsonObj.get("Policies").isJsonNull()) { - JsonArray jsonArraypolicies = jsonObj.getAsJsonArray("Policies"); - if (jsonArraypolicies != null) { - // ensure the json data is an array - if (!jsonObj.get("Policies").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Policies` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Policies").toString())); - } - - // validate the optional field `Policies` (array) - for (int i = 0; i < jsonArraypolicies.size(); i++) { - InlinePolicy.validateJsonObject(jsonArraypolicies.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupPoliciesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupPoliciesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadUserGroupPoliciesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupPoliciesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupPoliciesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupPoliciesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupPoliciesResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadUserGroupPoliciesResponse - */ - public static ReadUserGroupPoliciesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupPoliciesResponse.class); - } - - /** - * Convert an instance of ReadUserGroupPoliciesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequest.java deleted file mode 100644 index c3599a1e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_NAME = "PolicyName"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAME) - private String policyName; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public ReadUserGroupPolicyRequest() {} - - public ReadUserGroupPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadUserGroupPolicyRequest policyName(String policyName) { - - this.policyName = policyName; - return this; - } - - /** - * The name of the policy. - * - * @return policyName - */ - @javax.annotation.Nonnull - public String getPolicyName() { - return policyName; - } - - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - - public ReadUserGroupPolicyRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public ReadUserGroupPolicyRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupPolicyRequest readUserGroupPolicyRequest = (ReadUserGroupPolicyRequest) o; - return Objects.equals(this.dryRun, readUserGroupPolicyRequest.dryRun) - && Objects.equals(this.policyName, readUserGroupPolicyRequest.policyName) - && Objects.equals(this.userGroupName, readUserGroupPolicyRequest.userGroupName) - && Objects.equals(this.userGroupPath, readUserGroupPolicyRequest.userGroupPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyName, userGroupName, userGroupPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyName"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyName"); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupPolicyRequest is not" - + " found in the empty JSON string", - ReadUserGroupPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadUserGroupPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyName").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupPolicyRequest - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupPolicyRequest - */ - public static ReadUserGroupPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupPolicyRequest.class); - } - - /** - * Convert an instance of ReadUserGroupPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponse.java deleted file mode 100644 index 4dcd3978..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupPolicyResponse { - public static final String SERIALIZED_NAME_POLICY = "Policy"; - - @SerializedName(SERIALIZED_NAME_POLICY) - private InlinePolicy policy; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadUserGroupPolicyResponse() {} - - public ReadUserGroupPolicyResponse policy(InlinePolicy policy) { - - this.policy = policy; - return this; - } - - /** - * Get policy - * - * @return policy - */ - @javax.annotation.Nullable - public InlinePolicy getPolicy() { - return policy; - } - - public void setPolicy(InlinePolicy policy) { - this.policy = policy; - } - - public ReadUserGroupPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupPolicyResponse readUserGroupPolicyResponse = (ReadUserGroupPolicyResponse) o; - return Objects.equals(this.policy, readUserGroupPolicyResponse.policy) - && Objects.equals( - this.responseContext, readUserGroupPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(policy, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupPolicyResponse {\n"); - sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Policy"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupPolicyResponse is not" - + " found in the empty JSON string", - ReadUserGroupPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Policy` - if (jsonObj.get("Policy") != null && !jsonObj.get("Policy").isJsonNull()) { - InlinePolicy.validateJsonObject(jsonObj.getAsJsonObject("Policy")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupPolicyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupPolicyResponse - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupPolicyResponse - */ - public static ReadUserGroupPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupPolicyResponse.class); - } - - /** - * Convert an instance of ReadUserGroupPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequest.java deleted file mode 100644 index 71e5add2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public ReadUserGroupRequest() {} - - public ReadUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadUserGroupRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public ReadUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupRequest readUserGroupRequest = (ReadUserGroupRequest) o; - return Objects.equals(this.dryRun, readUserGroupRequest.dryRun) - && Objects.equals(this.path, readUserGroupRequest.path) - && Objects.equals(this.userGroupName, readUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, path, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Path"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupRequest is not found in" - + " the empty JSON string", - ReadUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupRequest - */ - public static ReadUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupRequest.class); - } - - /** - * Convert an instance of ReadUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponse.java deleted file mode 100644 index fcd2e861..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponse.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER_GROUP = "UserGroup"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP) - private UserGroup userGroup; - - public static final String SERIALIZED_NAME_USERS = "Users"; - - @SerializedName(SERIALIZED_NAME_USERS) - private List users = null; - - public ReadUserGroupResponse() {} - - public ReadUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadUserGroupResponse userGroup(UserGroup userGroup) { - - this.userGroup = userGroup; - return this; - } - - /** - * Get userGroup - * - * @return userGroup - */ - @javax.annotation.Nullable - public UserGroup getUserGroup() { - return userGroup; - } - - public void setUserGroup(UserGroup userGroup) { - this.userGroup = userGroup; - } - - public ReadUserGroupResponse users(List users) { - - this.users = users; - return this; - } - - public ReadUserGroupResponse addUsersItem(User usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); - } - this.users.add(usersItem); - return this; - } - - /** - * A list of EIM users. - * - * @return users - */ - @javax.annotation.Nullable - public List getUsers() { - return users; - } - - public void setUsers(List users) { - this.users = users; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupResponse readUserGroupResponse = (ReadUserGroupResponse) o; - return Objects.equals(this.responseContext, readUserGroupResponse.responseContext) - && Objects.equals(this.userGroup, readUserGroupResponse.userGroup) - && Objects.equals(this.users, readUserGroupResponse.users); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, userGroup, users); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" userGroup: ").append(toIndentedString(userGroup)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("UserGroup"); - openapiFields.add("Users"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupResponse is not found in" - + " the empty JSON string", - ReadUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `UserGroup` - if (jsonObj.get("UserGroup") != null && !jsonObj.get("UserGroup").isJsonNull()) { - UserGroup.validateJsonObject(jsonObj.getAsJsonObject("UserGroup")); - } - if (jsonObj.get("Users") != null && !jsonObj.get("Users").isJsonNull()) { - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("Users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("Users").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Users` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Users").toString())); - } - - // validate the optional field `Users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - User.validateJsonObject(jsonArrayusers.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupResponse - */ - public static ReadUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupResponse.class); - } - - /** - * Convert an instance of ReadUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequest.java deleted file mode 100644 index 4b050707..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequest.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupsPerUserRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupsPerUserRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public static final String SERIALIZED_NAME_USER_PATH = "UserPath"; - - @SerializedName(SERIALIZED_NAME_USER_PATH) - private String userPath; - - public ReadUserGroupsPerUserRequest() {} - - public ReadUserGroupsPerUserRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadUserGroupsPerUserRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public ReadUserGroupsPerUserRequest userPath(String userPath) { - - this.userPath = userPath; - return this; - } - - /** - * The path to the user (by default, `/`). - * - * @return userPath - */ - @javax.annotation.Nullable - public String getUserPath() { - return userPath; - } - - public void setUserPath(String userPath) { - this.userPath = userPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest = - (ReadUserGroupsPerUserRequest) o; - return Objects.equals(this.dryRun, readUserGroupsPerUserRequest.dryRun) - && Objects.equals(this.userName, readUserGroupsPerUserRequest.userName) - && Objects.equals(this.userPath, readUserGroupsPerUserRequest.userPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, userName, userPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupsPerUserRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append(" userPath: ").append(toIndentedString(userPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("UserName"); - openapiFields.add("UserPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadUserGroupsPerUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupsPerUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupsPerUserRequest is not" - + " found in the empty JSON string", - ReadUserGroupsPerUserRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupsPerUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupsPerUserRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadUserGroupsPerUserRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - if ((jsonObj.get("UserPath") != null && !jsonObj.get("UserPath").isJsonNull()) - && !jsonObj.get("UserPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupsPerUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupsPerUserRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadUserGroupsPerUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupsPerUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupsPerUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupsPerUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupsPerUserRequest - * @throws IOException if the JSON string is invalid with respect to - * ReadUserGroupsPerUserRequest - */ - public static ReadUserGroupsPerUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupsPerUserRequest.class); - } - - /** - * Convert an instance of ReadUserGroupsPerUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponse.java deleted file mode 100644 index c661e7fb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponse.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupsPerUserResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupsPerUserResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER_GROUPS = "UserGroups"; - - @SerializedName(SERIALIZED_NAME_USER_GROUPS) - private List userGroups = null; - - public ReadUserGroupsPerUserResponse() {} - - public ReadUserGroupsPerUserResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadUserGroupsPerUserResponse userGroups(List userGroups) { - - this.userGroups = userGroups; - return this; - } - - public ReadUserGroupsPerUserResponse addUserGroupsItem(UserGroup userGroupsItem) { - if (this.userGroups == null) { - this.userGroups = new ArrayList<>(); - } - this.userGroups.add(userGroupsItem); - return this; - } - - /** - * A list of user groups. - * - * @return userGroups - */ - @javax.annotation.Nullable - public List getUserGroups() { - return userGroups; - } - - public void setUserGroups(List userGroups) { - this.userGroups = userGroups; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupsPerUserResponse readUserGroupsPerUserResponse = - (ReadUserGroupsPerUserResponse) o; - return Objects.equals(this.responseContext, readUserGroupsPerUserResponse.responseContext) - && Objects.equals(this.userGroups, readUserGroupsPerUserResponse.userGroups); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, userGroups); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupsPerUserResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("UserGroups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * ReadUserGroupsPerUserResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupsPerUserResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupsPerUserResponse is not" - + " found in the empty JSON string", - ReadUserGroupsPerUserResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupsPerUserResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupsPerUserResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("UserGroups") != null && !jsonObj.get("UserGroups").isJsonNull()) { - JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("UserGroups"); - if (jsonArrayuserGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("UserGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroups").toString())); - } - - // validate the optional field `UserGroups` (array) - for (int i = 0; i < jsonArrayuserGroups.size(); i++) { - UserGroup.validateJsonObject(jsonArrayuserGroups.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupsPerUserResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupsPerUserResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ReadUserGroupsPerUserResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupsPerUserResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupsPerUserResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupsPerUserResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupsPerUserResponse - * @throws IOException if the JSON string is invalid with respect to - * ReadUserGroupsPerUserResponse - */ - public static ReadUserGroupsPerUserResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupsPerUserResponse.class); - } - - /** - * Convert an instance of ReadUserGroupsPerUserResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequest.java deleted file mode 100644 index ae5bb98e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersUserGroup filters; - - public static final String SERIALIZED_NAME_FIRST_ITEM = "FirstItem"; - - @SerializedName(SERIALIZED_NAME_FIRST_ITEM) - private Integer firstItem; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadUserGroupsRequest() {} - - public ReadUserGroupsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadUserGroupsRequest filters(FiltersUserGroup filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersUserGroup getFilters() { - return filters; - } - - public void setFilters(FiltersUserGroup filters) { - this.filters = filters; - } - - public ReadUserGroupsRequest firstItem(Integer firstItem) { - - this.firstItem = firstItem; - return this; - } - - /** - * The item starting the list of groups requested. - * - * @return firstItem - */ - @javax.annotation.Nullable - public Integer getFirstItem() { - return firstItem; - } - - public void setFirstItem(Integer firstItem) { - this.firstItem = firstItem; - } - - public ReadUserGroupsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of items that can be returned in a single response (by default, - * `100`). - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupsRequest readUserGroupsRequest = (ReadUserGroupsRequest) o; - return Objects.equals(this.dryRun, readUserGroupsRequest.dryRun) - && Objects.equals(this.filters, readUserGroupsRequest.filters) - && Objects.equals(this.firstItem, readUserGroupsRequest.firstItem) - && Objects.equals(this.resultsPerPage, readUserGroupsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, firstItem, resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstItem: ").append(toIndentedString(firstItem)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("FirstItem"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupsRequest is not found in" - + " the empty JSON string", - ReadUserGroupsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersUserGroup.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupsRequest - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupsRequest - */ - public static ReadUserGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupsRequest.class); - } - - /** - * Convert an instance of ReadUserGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponse.java deleted file mode 100644 index 3e1951f9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponse.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUserGroupsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUserGroupsResponse { - public static final String SERIALIZED_NAME_HAS_MORE_ITEMS = "HasMoreItems"; - - @SerializedName(SERIALIZED_NAME_HAS_MORE_ITEMS) - private Boolean hasMoreItems; - - public static final String SERIALIZED_NAME_MAX_RESULTS_LIMIT = "MaxResultsLimit"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_LIMIT) - private Integer maxResultsLimit; - - public static final String SERIALIZED_NAME_MAX_RESULTS_TRUNCATED = "MaxResultsTruncated"; - - @SerializedName(SERIALIZED_NAME_MAX_RESULTS_TRUNCATED) - private Boolean maxResultsTruncated; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER_GROUPS = "UserGroups"; - - @SerializedName(SERIALIZED_NAME_USER_GROUPS) - private List userGroups = null; - - public ReadUserGroupsResponse() {} - - public ReadUserGroupsResponse hasMoreItems(Boolean hasMoreItems) { - - this.hasMoreItems = hasMoreItems; - return this; - } - - /** - * If true, there are more items to return using the `FirstItem` parameter in a new - * request. - * - * @return hasMoreItems - */ - @javax.annotation.Nullable - public Boolean getHasMoreItems() { - return hasMoreItems; - } - - public void setHasMoreItems(Boolean hasMoreItems) { - this.hasMoreItems = hasMoreItems; - } - - public ReadUserGroupsResponse maxResultsLimit(Integer maxResultsLimit) { - - this.maxResultsLimit = maxResultsLimit; - return this; - } - - /** - * Indicates maximum results defined for the operation. - * - * @return maxResultsLimit - */ - @javax.annotation.Nullable - public Integer getMaxResultsLimit() { - return maxResultsLimit; - } - - public void setMaxResultsLimit(Integer maxResultsLimit) { - this.maxResultsLimit = maxResultsLimit; - } - - public ReadUserGroupsResponse maxResultsTruncated(Boolean maxResultsTruncated) { - - this.maxResultsTruncated = maxResultsTruncated; - return this; - } - - /** - * If true, indicates whether requested page size is more than allowed. - * - * @return maxResultsTruncated - */ - @javax.annotation.Nullable - public Boolean getMaxResultsTruncated() { - return maxResultsTruncated; - } - - public void setMaxResultsTruncated(Boolean maxResultsTruncated) { - this.maxResultsTruncated = maxResultsTruncated; - } - - public ReadUserGroupsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadUserGroupsResponse userGroups(List userGroups) { - - this.userGroups = userGroups; - return this; - } - - public ReadUserGroupsResponse addUserGroupsItem(UserGroup userGroupsItem) { - if (this.userGroups == null) { - this.userGroups = new ArrayList<>(); - } - this.userGroups.add(userGroupsItem); - return this; - } - - /** - * A list of user groups. - * - * @return userGroups - */ - @javax.annotation.Nullable - public List getUserGroups() { - return userGroups; - } - - public void setUserGroups(List userGroups) { - this.userGroups = userGroups; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUserGroupsResponse readUserGroupsResponse = (ReadUserGroupsResponse) o; - return Objects.equals(this.hasMoreItems, readUserGroupsResponse.hasMoreItems) - && Objects.equals(this.maxResultsLimit, readUserGroupsResponse.maxResultsLimit) - && Objects.equals( - this.maxResultsTruncated, readUserGroupsResponse.maxResultsTruncated) - && Objects.equals(this.responseContext, readUserGroupsResponse.responseContext) - && Objects.equals(this.userGroups, readUserGroupsResponse.userGroups); - } - - @Override - public int hashCode() { - return Objects.hash( - hasMoreItems, maxResultsLimit, maxResultsTruncated, responseContext, userGroups); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUserGroupsResponse {\n"); - sb.append(" hasMoreItems: ").append(toIndentedString(hasMoreItems)).append("\n"); - sb.append(" maxResultsLimit: ").append(toIndentedString(maxResultsLimit)).append("\n"); - sb.append(" maxResultsTruncated: ") - .append(toIndentedString(maxResultsTruncated)) - .append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("HasMoreItems"); - openapiFields.add("MaxResultsLimit"); - openapiFields.add("MaxResultsTruncated"); - openapiFields.add("ResponseContext"); - openapiFields.add("UserGroups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUserGroupsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUserGroupsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUserGroupsResponse is not found" - + " in the empty JSON string", - ReadUserGroupsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUserGroupsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUserGroupsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("UserGroups") != null && !jsonObj.get("UserGroups").isJsonNull()) { - JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("UserGroups"); - if (jsonArrayuserGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("UserGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroups").toString())); - } - - // validate the optional field `UserGroups` (array) - for (int i = 0; i < jsonArrayuserGroups.size(); i++) { - UserGroup.validateJsonObject(jsonArrayuserGroups.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUserGroupsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUserGroupsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUserGroupsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUserGroupsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUserGroupsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUserGroupsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUserGroupsResponse - * @throws IOException if the JSON string is invalid with respect to ReadUserGroupsResponse - */ - public static ReadUserGroupsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUserGroupsResponse.class); - } - - /** - * Convert an instance of ReadUserGroupsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequest.java deleted file mode 100644 index 68121670..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUsersRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUsersRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public ReadUsersRequest() {} - - public ReadUsersRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUsersRequest readUsersRequest = (ReadUsersRequest) o; - return Objects.equals(this.dryRun, readUsersRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUsersRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUsersRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUsersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUsersRequest is not found in the" - + " empty JSON string", - ReadUsersRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUsersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUsersRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUsersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUsersRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUsersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUsersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUsersRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUsersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUsersRequest - * @throws IOException if the JSON string is invalid with respect to ReadUsersRequest - */ - public static ReadUsersRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUsersRequest.class); - } - - /** - * Convert an instance of ReadUsersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponse.java deleted file mode 100644 index a42ae133..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadUsersResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadUsersResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USERS = "Users"; - - @SerializedName(SERIALIZED_NAME_USERS) - private List users = null; - - public ReadUsersResponse() {} - - public ReadUsersResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadUsersResponse users(List users) { - - this.users = users; - return this; - } - - public ReadUsersResponse addUsersItem(User usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); - } - this.users.add(usersItem); - return this; - } - - /** - * A list of EIM users. - * - * @return users - */ - @javax.annotation.Nullable - public List getUsers() { - return users; - } - - public void setUsers(List users) { - this.users = users; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadUsersResponse readUsersResponse = (ReadUsersResponse) o; - return Objects.equals(this.responseContext, readUsersResponse.responseContext) - && Objects.equals(this.users, readUsersResponse.users); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, users); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadUsersResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Users"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadUsersResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadUsersResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadUsersResponse is not found in the" - + " empty JSON string", - ReadUsersResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadUsersResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadUsersResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Users") != null && !jsonObj.get("Users").isJsonNull()) { - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("Users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("Users").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Users` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Users").toString())); - } - - // validate the optional field `Users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - User.validateJsonObject(jsonArrayusers.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadUsersResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadUsersResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadUsersResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadUsersResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadUsersResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadUsersResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadUsersResponse - * @throws IOException if the JSON string is invalid with respect to ReadUsersResponse - */ - public static ReadUsersResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadUsersResponse.class); - } - - /** - * Convert an instance of ReadUsersResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequest.java deleted file mode 100644 index 0a94c4a7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVirtualGatewaysRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVirtualGatewaysRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVirtualGateway filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVirtualGatewaysRequest() {} - - public ReadVirtualGatewaysRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVirtualGatewaysRequest filters(FiltersVirtualGateway filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVirtualGateway getFilters() { - return filters; - } - - public void setFilters(FiltersVirtualGateway filters) { - this.filters = filters; - } - - public ReadVirtualGatewaysRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVirtualGatewaysRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVirtualGatewaysRequest readVirtualGatewaysRequest = (ReadVirtualGatewaysRequest) o; - return Objects.equals(this.dryRun, readVirtualGatewaysRequest.dryRun) - && Objects.equals(this.filters, readVirtualGatewaysRequest.filters) - && Arrays.equals(this.nextPageToken, readVirtualGatewaysRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVirtualGatewaysRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVirtualGatewaysRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVirtualGatewaysRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVirtualGatewaysRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVirtualGatewaysRequest is not" - + " found in the empty JSON string", - ReadVirtualGatewaysRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVirtualGatewaysRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVirtualGatewaysRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVirtualGateway.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVirtualGatewaysRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVirtualGatewaysRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVirtualGatewaysRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVirtualGatewaysRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVirtualGatewaysRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVirtualGatewaysRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVirtualGatewaysRequest - * @throws IOException if the JSON string is invalid with respect to ReadVirtualGatewaysRequest - */ - public static ReadVirtualGatewaysRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVirtualGatewaysRequest.class); - } - - /** - * Convert an instance of ReadVirtualGatewaysRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponse.java deleted file mode 100644 index fae09f49..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponse.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVirtualGatewaysResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVirtualGatewaysResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAYS = "VirtualGateways"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAYS) - private List virtualGateways = null; - - public ReadVirtualGatewaysResponse() {} - - public ReadVirtualGatewaysResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVirtualGatewaysResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVirtualGatewaysResponse virtualGateways(List virtualGateways) { - - this.virtualGateways = virtualGateways; - return this; - } - - public ReadVirtualGatewaysResponse addVirtualGatewaysItem(VirtualGateway virtualGatewaysItem) { - if (this.virtualGateways == null) { - this.virtualGateways = new ArrayList<>(); - } - this.virtualGateways.add(virtualGatewaysItem); - return this; - } - - /** - * Information about one or more virtual gateways. - * - * @return virtualGateways - */ - @javax.annotation.Nullable - public List getVirtualGateways() { - return virtualGateways; - } - - public void setVirtualGateways(List virtualGateways) { - this.virtualGateways = virtualGateways; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVirtualGatewaysResponse readVirtualGatewaysResponse = (ReadVirtualGatewaysResponse) o; - return Arrays.equals(this.nextPageToken, readVirtualGatewaysResponse.nextPageToken) - && Objects.equals(this.responseContext, readVirtualGatewaysResponse.responseContext) - && Objects.equals( - this.virtualGateways, readVirtualGatewaysResponse.virtualGateways); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, virtualGateways); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVirtualGatewaysResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" virtualGateways: ").append(toIndentedString(virtualGateways)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("VirtualGateways"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVirtualGatewaysResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVirtualGatewaysResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVirtualGatewaysResponse is not" - + " found in the empty JSON string", - ReadVirtualGatewaysResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVirtualGatewaysResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVirtualGatewaysResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VirtualGateways") != null - && !jsonObj.get("VirtualGateways").isJsonNull()) { - JsonArray jsonArrayvirtualGateways = jsonObj.getAsJsonArray("VirtualGateways"); - if (jsonArrayvirtualGateways != null) { - // ensure the json data is an array - if (!jsonObj.get("VirtualGateways").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGateways` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGateways").toString())); - } - - // validate the optional field `VirtualGateways` (array) - for (int i = 0; i < jsonArrayvirtualGateways.size(); i++) { - VirtualGateway.validateJsonObject( - jsonArrayvirtualGateways.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVirtualGatewaysResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVirtualGatewaysResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVirtualGatewaysResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVirtualGatewaysResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVirtualGatewaysResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVirtualGatewaysResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVirtualGatewaysResponse - * @throws IOException if the JSON string is invalid with respect to ReadVirtualGatewaysResponse - */ - public static ReadVirtualGatewaysResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVirtualGatewaysResponse.class); - } - - /** - * Convert an instance of ReadVirtualGatewaysResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequest.java deleted file mode 100644 index 636128cf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmGroupsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmGroupsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVmGroup filters; - - public ReadVmGroupsRequest() {} - - public ReadVmGroupsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmGroupsRequest filters(FiltersVmGroup filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVmGroup getFilters() { - return filters; - } - - public void setFilters(FiltersVmGroup filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmGroupsRequest readVmGroupsRequest = (ReadVmGroupsRequest) o; - return Objects.equals(this.dryRun, readVmGroupsRequest.dryRun) - && Objects.equals(this.filters, readVmGroupsRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmGroupsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmGroupsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmGroupsRequest is not found in" - + " the empty JSON string", - ReadVmGroupsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVmGroup.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmGroupsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmGroupsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmGroupsRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmGroupsRequest - */ - public static ReadVmGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmGroupsRequest.class); - } - - /** - * Convert an instance of ReadVmGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponse.java deleted file mode 100644 index 7ce94a6b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmGroupsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmGroupsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_GROUPS = "VmGroups"; - - @SerializedName(SERIALIZED_NAME_VM_GROUPS) - private List vmGroups = null; - - public ReadVmGroupsResponse() {} - - public ReadVmGroupsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVmGroupsResponse vmGroups(List vmGroups) { - - this.vmGroups = vmGroups; - return this; - } - - public ReadVmGroupsResponse addVmGroupsItem(VmGroup vmGroupsItem) { - if (this.vmGroups == null) { - this.vmGroups = new ArrayList<>(); - } - this.vmGroups.add(vmGroupsItem); - return this; - } - - /** - * Get vmGroups - * - * @return vmGroups - */ - @javax.annotation.Nullable - public List getVmGroups() { - return vmGroups; - } - - public void setVmGroups(List vmGroups) { - this.vmGroups = vmGroups; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmGroupsResponse readVmGroupsResponse = (ReadVmGroupsResponse) o; - return Objects.equals(this.responseContext, readVmGroupsResponse.responseContext) - && Objects.equals(this.vmGroups, readVmGroupsResponse.vmGroups); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmGroups); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmGroupsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmGroups: ").append(toIndentedString(vmGroups)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmGroups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmGroupsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmGroupsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmGroupsResponse is not found in" - + " the empty JSON string", - ReadVmGroupsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmGroupsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmGroupsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VmGroups") != null && !jsonObj.get("VmGroups").isJsonNull()) { - JsonArray jsonArrayvmGroups = jsonObj.getAsJsonArray("VmGroups"); - if (jsonArrayvmGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("VmGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroups").toString())); - } - - // validate the optional field `VmGroups` (array) - for (int i = 0; i < jsonArrayvmGroups.size(); i++) { - VmGroup.validateJsonObject(jsonArrayvmGroups.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmGroupsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmGroupsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmGroupsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmGroupsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmGroupsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmGroupsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmGroupsResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmGroupsResponse - */ - public static ReadVmGroupsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmGroupsResponse.class); - } - - /** - * Convert an instance of ReadVmGroupsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequest.java deleted file mode 100644 index 84edbef5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmTemplatesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmTemplatesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVmTemplate filters; - - public ReadVmTemplatesRequest() {} - - public ReadVmTemplatesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmTemplatesRequest filters(FiltersVmTemplate filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVmTemplate getFilters() { - return filters; - } - - public void setFilters(FiltersVmTemplate filters) { - this.filters = filters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmTemplatesRequest readVmTemplatesRequest = (ReadVmTemplatesRequest) o; - return Objects.equals(this.dryRun, readVmTemplatesRequest.dryRun) - && Objects.equals(this.filters, readVmTemplatesRequest.filters); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmTemplatesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmTemplatesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmTemplatesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmTemplatesRequest is not found" - + " in the empty JSON string", - ReadVmTemplatesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmTemplatesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmTemplatesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVmTemplate.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmTemplatesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmTemplatesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmTemplatesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmTemplatesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmTemplatesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmTemplatesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmTemplatesRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmTemplatesRequest - */ - public static ReadVmTemplatesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmTemplatesRequest.class); - } - - /** - * Convert an instance of ReadVmTemplatesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponse.java deleted file mode 100644 index ff8272f3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponse.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmTemplatesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmTemplatesResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_TEMPLATES = "VmTemplates"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATES) - private List vmTemplates = null; - - public ReadVmTemplatesResponse() {} - - public ReadVmTemplatesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVmTemplatesResponse vmTemplates(List vmTemplates) { - - this.vmTemplates = vmTemplates; - return this; - } - - public ReadVmTemplatesResponse addVmTemplatesItem(VmTemplate vmTemplatesItem) { - if (this.vmTemplates == null) { - this.vmTemplates = new ArrayList<>(); - } - this.vmTemplates.add(vmTemplatesItem); - return this; - } - - /** - * Information about one or more VM templates. - * - * @return vmTemplates - */ - @javax.annotation.Nullable - public List getVmTemplates() { - return vmTemplates; - } - - public void setVmTemplates(List vmTemplates) { - this.vmTemplates = vmTemplates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmTemplatesResponse readVmTemplatesResponse = (ReadVmTemplatesResponse) o; - return Objects.equals(this.responseContext, readVmTemplatesResponse.responseContext) - && Objects.equals(this.vmTemplates, readVmTemplatesResponse.vmTemplates); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmTemplates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmTemplatesResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmTemplates: ").append(toIndentedString(vmTemplates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmTemplates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmTemplatesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmTemplatesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmTemplatesResponse is not found" - + " in the empty JSON string", - ReadVmTemplatesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmTemplatesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmTemplatesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VmTemplates") != null && !jsonObj.get("VmTemplates").isJsonNull()) { - JsonArray jsonArrayvmTemplates = jsonObj.getAsJsonArray("VmTemplates"); - if (jsonArrayvmTemplates != null) { - // ensure the json data is an array - if (!jsonObj.get("VmTemplates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplates").toString())); - } - - // validate the optional field `VmTemplates` (array) - for (int i = 0; i < jsonArrayvmTemplates.size(); i++) { - VmTemplate.validateJsonObject(jsonArrayvmTemplates.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmTemplatesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmTemplatesResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmTemplatesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmTemplatesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmTemplatesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmTemplatesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmTemplatesResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmTemplatesResponse - */ - public static ReadVmTemplatesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmTemplatesResponse.class); - } - - /** - * Convert an instance of ReadVmTemplatesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequest.java deleted file mode 100644 index f24d4576..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmTypesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmTypesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVmType filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVmTypesRequest() {} - - public ReadVmTypesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmTypesRequest filters(FiltersVmType filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVmType getFilters() { - return filters; - } - - public void setFilters(FiltersVmType filters) { - this.filters = filters; - } - - public ReadVmTypesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmTypesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmTypesRequest readVmTypesRequest = (ReadVmTypesRequest) o; - return Objects.equals(this.dryRun, readVmTypesRequest.dryRun) - && Objects.equals(this.filters, readVmTypesRequest.filters) - && Arrays.equals(this.nextPageToken, readVmTypesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVmTypesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmTypesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmTypesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmTypesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmTypesRequest is not found in" - + " the empty JSON string", - ReadVmTypesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmTypesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmTypesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVmType.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmTypesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmTypesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmTypesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmTypesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmTypesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmTypesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmTypesRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmTypesRequest - */ - public static ReadVmTypesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmTypesRequest.class); - } - - /** - * Convert an instance of ReadVmTypesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponse.java deleted file mode 100644 index f65163ae..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmTypesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmTypesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_TYPES = "VmTypes"; - - @SerializedName(SERIALIZED_NAME_VM_TYPES) - private List vmTypes = null; - - public ReadVmTypesResponse() {} - - public ReadVmTypesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmTypesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVmTypesResponse vmTypes(List vmTypes) { - - this.vmTypes = vmTypes; - return this; - } - - public ReadVmTypesResponse addVmTypesItem(VmType vmTypesItem) { - if (this.vmTypes == null) { - this.vmTypes = new ArrayList<>(); - } - this.vmTypes.add(vmTypesItem); - return this; - } - - /** - * Information about one or more VM types. - * - * @return vmTypes - */ - @javax.annotation.Nullable - public List getVmTypes() { - return vmTypes; - } - - public void setVmTypes(List vmTypes) { - this.vmTypes = vmTypes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmTypesResponse readVmTypesResponse = (ReadVmTypesResponse) o; - return Arrays.equals(this.nextPageToken, readVmTypesResponse.nextPageToken) - && Objects.equals(this.responseContext, readVmTypesResponse.responseContext) - && Objects.equals(this.vmTypes, readVmTypesResponse.vmTypes); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, vmTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmTypesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmTypes: ").append(toIndentedString(vmTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("VmTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmTypesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmTypesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmTypesResponse is not found in" - + " the empty JSON string", - ReadVmTypesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmTypesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmTypesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VmTypes") != null && !jsonObj.get("VmTypes").isJsonNull()) { - JsonArray jsonArrayvmTypes = jsonObj.getAsJsonArray("VmTypes"); - if (jsonArrayvmTypes != null) { - // ensure the json data is an array - if (!jsonObj.get("VmTypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTypes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmTypes").toString())); - } - - // validate the optional field `VmTypes` (array) - for (int i = 0; i < jsonArrayvmTypes.size(); i++) { - VmType.validateJsonObject(jsonArrayvmTypes.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmTypesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmTypesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmTypesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmTypesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmTypesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmTypesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmTypesResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmTypesResponse - */ - public static ReadVmTypesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmTypesResponse.class); - } - - /** - * Convert an instance of ReadVmTypesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequest.java deleted file mode 100644 index e9ec2152..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequest.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsHealthRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsHealthRequest { - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = null; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public ReadVmsHealthRequest() {} - - public ReadVmsHealthRequest backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public ReadVmsHealthRequest addBackendVmIdsItem(String backendVmIdsItem) { - if (this.backendVmIds == null) { - this.backendVmIds = new ArrayList<>(); - } - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs. - * - * @return backendVmIds - */ - @javax.annotation.Nullable - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public ReadVmsHealthRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmsHealthRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsHealthRequest readVmsHealthRequest = (ReadVmsHealthRequest) o; - return Objects.equals(this.backendVmIds, readVmsHealthRequest.backendVmIds) - && Objects.equals(this.dryRun, readVmsHealthRequest.dryRun) - && Objects.equals(this.loadBalancerName, readVmsHealthRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(backendVmIds, dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsHealthRequest {\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendVmIds"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsHealthRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsHealthRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsHealthRequest is not found in" - + " the empty JSON string", - ReadVmsHealthRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsHealthRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsHealthRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReadVmsHealthRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendVmIds") != null && !jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsHealthRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsHealthRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsHealthRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsHealthRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsHealthRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsHealthRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsHealthRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmsHealthRequest - */ - public static ReadVmsHealthRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsHealthRequest.class); - } - - /** - * Convert an instance of ReadVmsHealthRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponse.java deleted file mode 100644 index 4fb891f3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponse.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsHealthResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsHealthResponse { - public static final String SERIALIZED_NAME_BACKEND_VM_HEALTH = "BackendVmHealth"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_HEALTH) - private List backendVmHealth = null; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ReadVmsHealthResponse() {} - - public ReadVmsHealthResponse backendVmHealth(List backendVmHealth) { - - this.backendVmHealth = backendVmHealth; - return this; - } - - public ReadVmsHealthResponse addBackendVmHealthItem(BackendVmHealth backendVmHealthItem) { - if (this.backendVmHealth == null) { - this.backendVmHealth = new ArrayList<>(); - } - this.backendVmHealth.add(backendVmHealthItem); - return this; - } - - /** - * Information about the health of one or more backend VMs. - * - * @return backendVmHealth - */ - @javax.annotation.Nullable - public List getBackendVmHealth() { - return backendVmHealth; - } - - public void setBackendVmHealth(List backendVmHealth) { - this.backendVmHealth = backendVmHealth; - } - - public ReadVmsHealthResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsHealthResponse readVmsHealthResponse = (ReadVmsHealthResponse) o; - return Objects.equals(this.backendVmHealth, readVmsHealthResponse.backendVmHealth) - && Objects.equals(this.responseContext, readVmsHealthResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(backendVmHealth, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsHealthResponse {\n"); - sb.append(" backendVmHealth: ").append(toIndentedString(backendVmHealth)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendVmHealth"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsHealthResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsHealthResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsHealthResponse is not found in" - + " the empty JSON string", - ReadVmsHealthResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsHealthResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsHealthResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("BackendVmHealth") != null - && !jsonObj.get("BackendVmHealth").isJsonNull()) { - JsonArray jsonArraybackendVmHealth = jsonObj.getAsJsonArray("BackendVmHealth"); - if (jsonArraybackendVmHealth != null) { - // ensure the json data is an array - if (!jsonObj.get("BackendVmHealth").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmHealth` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("BackendVmHealth").toString())); - } - - // validate the optional field `BackendVmHealth` (array) - for (int i = 0; i < jsonArraybackendVmHealth.size(); i++) { - BackendVmHealth.validateJsonObject( - jsonArraybackendVmHealth.get(i).getAsJsonObject()); - } - ; - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsHealthResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsHealthResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsHealthResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsHealthResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsHealthResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsHealthResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsHealthResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmsHealthResponse - */ - public static ReadVmsHealthResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsHealthResponse.class); - } - - /** - * Convert an instance of ReadVmsHealthResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequest.java deleted file mode 100644 index 2884a37c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVm filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVmsRequest() {} - - public ReadVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmsRequest filters(FiltersVm filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVm getFilters() { - return filters; - } - - public void setFilters(FiltersVm filters) { - this.filters = filters; - } - - public ReadVmsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsRequest readVmsRequest = (ReadVmsRequest) o; - return Objects.equals(this.dryRun, readVmsRequest.dryRun) - && Objects.equals(this.filters, readVmsRequest.filters) - && Arrays.equals(this.nextPageToken, readVmsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVmsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsRequest is not found in the" - + " empty JSON string", - ReadVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVm.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmsRequest - */ - public static ReadVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsRequest.class); - } - - /** - * Convert an instance of ReadVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponse.java deleted file mode 100644 index 06e2ebe7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VMS = "Vms"; - - @SerializedName(SERIALIZED_NAME_VMS) - private List vms = null; - - public ReadVmsResponse() {} - - public ReadVmsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVmsResponse vms(List vms) { - - this.vms = vms; - return this; - } - - public ReadVmsResponse addVmsItem(Vm vmsItem) { - if (this.vms == null) { - this.vms = new ArrayList<>(); - } - this.vms.add(vmsItem); - return this; - } - - /** - * Information about one or more VMs. - * - * @return vms - */ - @javax.annotation.Nullable - public List getVms() { - return vms; - } - - public void setVms(List vms) { - this.vms = vms; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsResponse readVmsResponse = (ReadVmsResponse) o; - return Arrays.equals(this.nextPageToken, readVmsResponse.nextPageToken) - && Objects.equals(this.responseContext, readVmsResponse.responseContext) - && Objects.equals(this.vms, readVmsResponse.vms); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, vms); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vms: ").append(toIndentedString(vms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Vms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsResponse is not found in the" - + " empty JSON string", - ReadVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Vms") != null && !jsonObj.get("Vms").isJsonNull()) { - JsonArray jsonArrayvms = jsonObj.getAsJsonArray("Vms"); - if (jsonArrayvms != null) { - // ensure the json data is an array - if (!jsonObj.get("Vms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vms` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Vms").toString())); - } - - // validate the optional field `Vms` (array) - for (int i = 0; i < jsonArrayvms.size(); i++) { - Vm.validateJsonObject(jsonArrayvms.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmsResponse - */ - public static ReadVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsResponse.class); - } - - /** - * Convert an instance of ReadVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequest.java deleted file mode 100644 index d712b962..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequest.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsStateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsStateRequest { - public static final String SERIALIZED_NAME_ALL_VMS = "AllVms"; - - @SerializedName(SERIALIZED_NAME_ALL_VMS) - private Boolean allVms = false; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVmsState filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVmsStateRequest() {} - - public ReadVmsStateRequest allVms(Boolean allVms) { - - this.allVms = allVms; - return this; - } - - /** - * If true, includes the status of all VMs. By default or if set to false, only includes the - * status of running VMs. - * - * @return allVms - */ - @javax.annotation.Nullable - public Boolean getAllVms() { - return allVms; - } - - public void setAllVms(Boolean allVms) { - this.allVms = allVms; - } - - public ReadVmsStateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVmsStateRequest filters(FiltersVmsState filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVmsState getFilters() { - return filters; - } - - public void setFilters(FiltersVmsState filters) { - this.filters = filters; - } - - public ReadVmsStateRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmsStateRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsStateRequest readVmsStateRequest = (ReadVmsStateRequest) o; - return Objects.equals(this.allVms, readVmsStateRequest.allVms) - && Objects.equals(this.dryRun, readVmsStateRequest.dryRun) - && Objects.equals(this.filters, readVmsStateRequest.filters) - && Arrays.equals(this.nextPageToken, readVmsStateRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVmsStateRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash( - allVms, dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsStateRequest {\n"); - sb.append(" allVms: ").append(toIndentedString(allVms)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AllVms"); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsStateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsStateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsStateRequest is not found in" - + " the empty JSON string", - ReadVmsStateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsStateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsStateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVmsState.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsStateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsStateRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsStateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsStateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsStateRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsStateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsStateRequest - * @throws IOException if the JSON string is invalid with respect to ReadVmsStateRequest - */ - public static ReadVmsStateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsStateRequest.class); - } - - /** - * Convert an instance of ReadVmsStateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponse.java deleted file mode 100644 index a8da8c30..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVmsStateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVmsStateResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_STATES = "VmStates"; - - @SerializedName(SERIALIZED_NAME_VM_STATES) - private List vmStates = null; - - public ReadVmsStateResponse() {} - - public ReadVmsStateResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVmsStateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVmsStateResponse vmStates(List vmStates) { - - this.vmStates = vmStates; - return this; - } - - public ReadVmsStateResponse addVmStatesItem(VmStates vmStatesItem) { - if (this.vmStates == null) { - this.vmStates = new ArrayList<>(); - } - this.vmStates.add(vmStatesItem); - return this; - } - - /** - * Information about one or more VM states. - * - * @return vmStates - */ - @javax.annotation.Nullable - public List getVmStates() { - return vmStates; - } - - public void setVmStates(List vmStates) { - this.vmStates = vmStates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVmsStateResponse readVmsStateResponse = (ReadVmsStateResponse) o; - return Arrays.equals(this.nextPageToken, readVmsStateResponse.nextPageToken) - && Objects.equals(this.responseContext, readVmsStateResponse.responseContext) - && Objects.equals(this.vmStates, readVmsStateResponse.vmStates); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, vmStates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVmsStateResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmStates: ").append(toIndentedString(vmStates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("VmStates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVmsStateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVmsStateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVmsStateResponse is not found in" - + " the empty JSON string", - ReadVmsStateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVmsStateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVmsStateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VmStates") != null && !jsonObj.get("VmStates").isJsonNull()) { - JsonArray jsonArrayvmStates = jsonObj.getAsJsonArray("VmStates"); - if (jsonArrayvmStates != null) { - // ensure the json data is an array - if (!jsonObj.get("VmStates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmStates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("VmStates").toString())); - } - - // validate the optional field `VmStates` (array) - for (int i = 0; i < jsonArrayvmStates.size(); i++) { - VmStates.validateJsonObject(jsonArrayvmStates.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVmsStateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVmsStateResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVmsStateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVmsStateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVmsStateResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVmsStateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVmsStateResponse - * @throws IOException if the JSON string is invalid with respect to ReadVmsStateResponse - */ - public static ReadVmsStateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVmsStateResponse.class); - } - - /** - * Convert an instance of ReadVmsStateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequest.java deleted file mode 100644 index 4f42d803..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVolumesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVolumesRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVolume filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVolumesRequest() {} - - public ReadVolumesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVolumesRequest filters(FiltersVolume filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVolume getFilters() { - return filters; - } - - public void setFilters(FiltersVolume filters) { - this.filters = filters; - } - - public ReadVolumesRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVolumesRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVolumesRequest readVolumesRequest = (ReadVolumesRequest) o; - return Objects.equals(this.dryRun, readVolumesRequest.dryRun) - && Objects.equals(this.filters, readVolumesRequest.filters) - && Arrays.equals(this.nextPageToken, readVolumesRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVolumesRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVolumesRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVolumesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVolumesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVolumesRequest is not found in" - + " the empty JSON string", - ReadVolumesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVolumesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVolumesRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVolume.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVolumesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVolumesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVolumesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVolumesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVolumesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVolumesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVolumesRequest - * @throws IOException if the JSON string is invalid with respect to ReadVolumesRequest - */ - public static ReadVolumesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVolumesRequest.class); - } - - /** - * Convert an instance of ReadVolumesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponse.java deleted file mode 100644 index 37a37409..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVolumesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVolumesResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VOLUMES = "Volumes"; - - @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes = null; - - public ReadVolumesResponse() {} - - public ReadVolumesResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVolumesResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVolumesResponse volumes(List volumes) { - - this.volumes = volumes; - return this; - } - - public ReadVolumesResponse addVolumesItem(Volume volumesItem) { - if (this.volumes == null) { - this.volumes = new ArrayList<>(); - } - this.volumes.add(volumesItem); - return this; - } - - /** - * Information about one or more volumes. - * - * @return volumes - */ - @javax.annotation.Nullable - public List getVolumes() { - return volumes; - } - - public void setVolumes(List volumes) { - this.volumes = volumes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVolumesResponse readVolumesResponse = (ReadVolumesResponse) o; - return Arrays.equals(this.nextPageToken, readVolumesResponse.nextPageToken) - && Objects.equals(this.responseContext, readVolumesResponse.responseContext) - && Objects.equals(this.volumes, readVolumesResponse.volumes); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, volumes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVolumesResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("Volumes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVolumesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVolumesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVolumesResponse is not found in" - + " the empty JSON string", - ReadVolumesResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVolumesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVolumesResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Volumes") != null && !jsonObj.get("Volumes").isJsonNull()) { - JsonArray jsonArrayvolumes = jsonObj.getAsJsonArray("Volumes"); - if (jsonArrayvolumes != null) { - // ensure the json data is an array - if (!jsonObj.get("Volumes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Volumes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("Volumes").toString())); - } - - // validate the optional field `Volumes` (array) - for (int i = 0; i < jsonArrayvolumes.size(); i++) { - Volume.validateJsonObject(jsonArrayvolumes.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVolumesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVolumesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVolumesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVolumesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVolumesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVolumesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVolumesResponse - * @throws IOException if the JSON string is invalid with respect to ReadVolumesResponse - */ - public static ReadVolumesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVolumesResponse.class); - } - - /** - * Convert an instance of ReadVolumesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequest.java deleted file mode 100644 index 1e03e71a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVpnConnectionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVpnConnectionsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FILTERS = "Filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) - private FiltersVpnConnection filters; - - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESULTS_PER_PAGE = "ResultsPerPage"; - - @SerializedName(SERIALIZED_NAME_RESULTS_PER_PAGE) - private Integer resultsPerPage; - - public ReadVpnConnectionsRequest() {} - - public ReadVpnConnectionsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ReadVpnConnectionsRequest filters(FiltersVpnConnection filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * - * @return filters - */ - @javax.annotation.Nullable - public FiltersVpnConnection getFilters() { - return filters; - } - - public void setFilters(FiltersVpnConnection filters) { - this.filters = filters; - } - - public ReadVpnConnectionsRequest nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVpnConnectionsRequest resultsPerPage(Integer resultsPerPage) { - - this.resultsPerPage = resultsPerPage; - return this; - } - - /** - * The maximum number of logs returned in a single response (between `1`and - * `1000`, both included). By default, `100`. - * - * @return resultsPerPage - */ - @javax.annotation.Nullable - public Integer getResultsPerPage() { - return resultsPerPage; - } - - public void setResultsPerPage(Integer resultsPerPage) { - this.resultsPerPage = resultsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVpnConnectionsRequest readVpnConnectionsRequest = (ReadVpnConnectionsRequest) o; - return Objects.equals(this.dryRun, readVpnConnectionsRequest.dryRun) - && Objects.equals(this.filters, readVpnConnectionsRequest.filters) - && Arrays.equals(this.nextPageToken, readVpnConnectionsRequest.nextPageToken) - && Objects.equals(this.resultsPerPage, readVpnConnectionsRequest.resultsPerPage); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, filters, Arrays.hashCode(nextPageToken), resultsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVpnConnectionsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" resultsPerPage: ").append(toIndentedString(resultsPerPage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Filters"); - openapiFields.add("NextPageToken"); - openapiFields.add("ResultsPerPage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVpnConnectionsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVpnConnectionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVpnConnectionsRequest is not" - + " found in the empty JSON string", - ReadVpnConnectionsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVpnConnectionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVpnConnectionsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Filters` - if (jsonObj.get("Filters") != null && !jsonObj.get("Filters").isJsonNull()) { - FiltersVpnConnection.validateJsonObject(jsonObj.getAsJsonObject("Filters")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVpnConnectionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVpnConnectionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVpnConnectionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVpnConnectionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVpnConnectionsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVpnConnectionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVpnConnectionsRequest - * @throws IOException if the JSON string is invalid with respect to ReadVpnConnectionsRequest - */ - public static ReadVpnConnectionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVpnConnectionsRequest.class); - } - - /** - * Convert an instance of ReadVpnConnectionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponse.java deleted file mode 100644 index 2fed41b9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ReadVpnConnectionsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadVpnConnectionsResponse { - public static final String SERIALIZED_NAME_NEXT_PAGE_TOKEN = "NextPageToken"; - - @SerializedName(SERIALIZED_NAME_NEXT_PAGE_TOKEN) - private byte[] nextPageToken; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VPN_CONNECTIONS = "VpnConnections"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTIONS) - private List vpnConnections = null; - - public ReadVpnConnectionsResponse() {} - - public ReadVpnConnectionsResponse nextPageToken(byte[] nextPageToken) { - - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token to request the next page of results. Each token refers to a specific page. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public byte[] getNextPageToken() { - return nextPageToken; - } - - public void setNextPageToken(byte[] nextPageToken) { - this.nextPageToken = nextPageToken; - } - - public ReadVpnConnectionsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public ReadVpnConnectionsResponse vpnConnections(List vpnConnections) { - - this.vpnConnections = vpnConnections; - return this; - } - - public ReadVpnConnectionsResponse addVpnConnectionsItem(VpnConnection vpnConnectionsItem) { - if (this.vpnConnections == null) { - this.vpnConnections = new ArrayList<>(); - } - this.vpnConnections.add(vpnConnectionsItem); - return this; - } - - /** - * Information about one or more VPN connections. - * - * @return vpnConnections - */ - @javax.annotation.Nullable - public List getVpnConnections() { - return vpnConnections; - } - - public void setVpnConnections(List vpnConnections) { - this.vpnConnections = vpnConnections; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadVpnConnectionsResponse readVpnConnectionsResponse = (ReadVpnConnectionsResponse) o; - return Arrays.equals(this.nextPageToken, readVpnConnectionsResponse.nextPageToken) - && Objects.equals(this.responseContext, readVpnConnectionsResponse.responseContext) - && Objects.equals(this.vpnConnections, readVpnConnectionsResponse.vpnConnections); - } - - @Override - public int hashCode() { - return Objects.hash(Arrays.hashCode(nextPageToken), responseContext, vpnConnections); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadVpnConnectionsResponse {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vpnConnections: ").append(toIndentedString(vpnConnections)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NextPageToken"); - openapiFields.add("ResponseContext"); - openapiFields.add("VpnConnections"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadVpnConnectionsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReadVpnConnectionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReadVpnConnectionsResponse is not" - + " found in the empty JSON string", - ReadVpnConnectionsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadVpnConnectionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReadVpnConnectionsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("VpnConnections") != null && !jsonObj.get("VpnConnections").isJsonNull()) { - JsonArray jsonArrayvpnConnections = jsonObj.getAsJsonArray("VpnConnections"); - if (jsonArrayvpnConnections != null) { - // ensure the json data is an array - if (!jsonObj.get("VpnConnections").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnections` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnections").toString())); - } - - // validate the optional field `VpnConnections` (array) - for (int i = 0; i < jsonArrayvpnConnections.size(); i++) { - VpnConnection.validateJsonObject( - jsonArrayvpnConnections.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadVpnConnectionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadVpnConnectionsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReadVpnConnectionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadVpnConnectionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadVpnConnectionsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ReadVpnConnectionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadVpnConnectionsResponse - * @throws IOException if the JSON string is invalid with respect to ReadVpnConnectionsResponse - */ - public static ReadVpnConnectionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadVpnConnectionsResponse.class); - } - - /** - * Convert an instance of ReadVpnConnectionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequest.java deleted file mode 100644 index 191fa152..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RebootVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RebootVmsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = new ArrayList<>(); - - public RebootVmsRequest() {} - - public RebootVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public RebootVmsRequest vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public RebootVmsRequest addVmIdsItem(String vmIdsItem) { - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of the VMs you want to reboot. - * - * @return vmIds - */ - @javax.annotation.Nonnull - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RebootVmsRequest rebootVmsRequest = (RebootVmsRequest) o; - return Objects.equals(this.dryRun, rebootVmsRequest.dryRun) - && Objects.equals(this.vmIds, rebootVmsRequest.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RebootVmsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RebootVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RebootVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RebootVmsRequest is not found in the" - + " empty JSON string", - RebootVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RebootVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RebootVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RebootVmsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("VmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RebootVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RebootVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RebootVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RebootVmsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RebootVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RebootVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RebootVmsRequest - * @throws IOException if the JSON string is invalid with respect to RebootVmsRequest - */ - public static RebootVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RebootVmsRequest.class); - } - - /** - * Convert an instance of RebootVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponse.java deleted file mode 100644 index a8054a57..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RebootVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RebootVmsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public RebootVmsResponse() {} - - public RebootVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RebootVmsResponse rebootVmsResponse = (RebootVmsResponse) o; - return Objects.equals(this.responseContext, rebootVmsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RebootVmsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RebootVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RebootVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RebootVmsResponse is not found in the" - + " empty JSON string", - RebootVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RebootVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RebootVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RebootVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RebootVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RebootVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RebootVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RebootVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RebootVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RebootVmsResponse - * @throws IOException if the JSON string is invalid with respect to RebootVmsResponse - */ - public static RebootVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RebootVmsResponse.class); - } - - /** - * Convert an instance of RebootVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Region.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Region.java deleted file mode 100644 index 11272dbf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Region.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Region. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Region { - public static final String SERIALIZED_NAME_ENDPOINT = "Endpoint"; - - @SerializedName(SERIALIZED_NAME_ENDPOINT) - private String endpoint; - - public static final String SERIALIZED_NAME_REGION_NAME = "RegionName"; - - @SerializedName(SERIALIZED_NAME_REGION_NAME) - private String regionName; - - public Region() {} - - public Region endpoint(String endpoint) { - - this.endpoint = endpoint; - return this; - } - - /** - * The hostname of the gateway to access the Region. - * - * @return endpoint - */ - @javax.annotation.Nullable - public String getEndpoint() { - return endpoint; - } - - public void setEndpoint(String endpoint) { - this.endpoint = endpoint; - } - - public Region regionName(String regionName) { - - this.regionName = regionName; - return this; - } - - /** - * The administrative name of the Region. - * - * @return regionName - */ - @javax.annotation.Nullable - public String getRegionName() { - return regionName; - } - - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Region region = (Region) o; - return Objects.equals(this.endpoint, region.endpoint) - && Objects.equals(this.regionName, region.regionName); - } - - @Override - public int hashCode() { - return Objects.hash(endpoint, regionName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Region {\n"); - sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); - sb.append(" regionName: ").append(toIndentedString(regionName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Endpoint"); - openapiFields.add("RegionName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Region - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Region.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Region is not found in the empty JSON" - + " string", - Region.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Region.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Region`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Endpoint") != null && !jsonObj.get("Endpoint").isJsonNull()) - && !jsonObj.get("Endpoint").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Endpoint` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Endpoint").toString())); - } - if ((jsonObj.get("RegionName") != null && !jsonObj.get("RegionName").isJsonNull()) - && !jsonObj.get("RegionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RegionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RegionName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Region.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Region' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Region.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Region value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Region read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Region given an JSON string - * - * @param jsonString JSON string - * @return An instance of Region - * @throws IOException if the JSON string is invalid with respect to Region - */ - public static Region fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Region.class); - } - - /** - * Convert an instance of Region to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequest.java deleted file mode 100644 index 79cf6c47..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequest.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RegisterVmsInLoadBalancerRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RegisterVmsInLoadBalancerRequest { - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public RegisterVmsInLoadBalancerRequest() {} - - public RegisterVmsInLoadBalancerRequest backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public RegisterVmsInLoadBalancerRequest addBackendVmIdsItem(String backendVmIdsItem) { - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs.<br /> Specifying the same ID several times has no - * effect as each backend VM has equal weight. - * - * @return backendVmIds - */ - @javax.annotation.Nonnull - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public RegisterVmsInLoadBalancerRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public RegisterVmsInLoadBalancerRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest = - (RegisterVmsInLoadBalancerRequest) o; - return Objects.equals(this.backendVmIds, registerVmsInLoadBalancerRequest.backendVmIds) - && Objects.equals(this.dryRun, registerVmsInLoadBalancerRequest.dryRun) - && Objects.equals( - this.loadBalancerName, registerVmsInLoadBalancerRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(backendVmIds, dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RegisterVmsInLoadBalancerRequest {\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendVmIds"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("BackendVmIds"); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * RegisterVmsInLoadBalancerRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RegisterVmsInLoadBalancerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RegisterVmsInLoadBalancerRequest is" - + " not found in the empty JSON string", - RegisterVmsInLoadBalancerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RegisterVmsInLoadBalancerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RegisterVmsInLoadBalancerRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RegisterVmsInLoadBalancerRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("BackendVmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RegisterVmsInLoadBalancerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RegisterVmsInLoadBalancerRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RegisterVmsInLoadBalancerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RegisterVmsInLoadBalancerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RegisterVmsInLoadBalancerRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RegisterVmsInLoadBalancerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RegisterVmsInLoadBalancerRequest - * @throws IOException if the JSON string is invalid with respect to - * RegisterVmsInLoadBalancerRequest - */ - public static RegisterVmsInLoadBalancerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RegisterVmsInLoadBalancerRequest.class); - } - - /** - * Convert an instance of RegisterVmsInLoadBalancerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponse.java deleted file mode 100644 index 5e0b5a74..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponse.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RegisterVmsInLoadBalancerResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RegisterVmsInLoadBalancerResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public RegisterVmsInLoadBalancerResponse() {} - - public RegisterVmsInLoadBalancerResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RegisterVmsInLoadBalancerResponse registerVmsInLoadBalancerResponse = - (RegisterVmsInLoadBalancerResponse) o; - return Objects.equals( - this.responseContext, registerVmsInLoadBalancerResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RegisterVmsInLoadBalancerResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * RegisterVmsInLoadBalancerResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RegisterVmsInLoadBalancerResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RegisterVmsInLoadBalancerResponse is" - + " not found in the empty JSON string", - RegisterVmsInLoadBalancerResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RegisterVmsInLoadBalancerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RegisterVmsInLoadBalancerResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RegisterVmsInLoadBalancerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RegisterVmsInLoadBalancerResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RegisterVmsInLoadBalancerResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RegisterVmsInLoadBalancerResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RegisterVmsInLoadBalancerResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RegisterVmsInLoadBalancerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RegisterVmsInLoadBalancerResponse - * @throws IOException if the JSON string is invalid with respect to - * RegisterVmsInLoadBalancerResponse - */ - public static RegisterVmsInLoadBalancerResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RegisterVmsInLoadBalancerResponse.class); - } - - /** - * Convert an instance of RegisterVmsInLoadBalancerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequest.java deleted file mode 100644 index eb246225..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RejectNetPeeringRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RejectNetPeeringRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public RejectNetPeeringRequest() {} - - public RejectNetPeeringRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public RejectNetPeeringRequest netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of the Net peering you want to reject. - * - * @return netPeeringId - */ - @javax.annotation.Nonnull - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RejectNetPeeringRequest rejectNetPeeringRequest = (RejectNetPeeringRequest) o; - return Objects.equals(this.dryRun, rejectNetPeeringRequest.dryRun) - && Objects.equals(this.netPeeringId, rejectNetPeeringRequest.netPeeringId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netPeeringId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RejectNetPeeringRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetPeeringId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetPeeringId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RejectNetPeeringRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RejectNetPeeringRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RejectNetPeeringRequest is not found" - + " in the empty JSON string", - RejectNetPeeringRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RejectNetPeeringRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RejectNetPeeringRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RejectNetPeeringRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RejectNetPeeringRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RejectNetPeeringRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RejectNetPeeringRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RejectNetPeeringRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RejectNetPeeringRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RejectNetPeeringRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RejectNetPeeringRequest - * @throws IOException if the JSON string is invalid with respect to RejectNetPeeringRequest - */ - public static RejectNetPeeringRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RejectNetPeeringRequest.class); - } - - /** - * Convert an instance of RejectNetPeeringRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponse.java deleted file mode 100644 index 08228863..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RejectNetPeeringResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RejectNetPeeringResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public RejectNetPeeringResponse() {} - - public RejectNetPeeringResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RejectNetPeeringResponse rejectNetPeeringResponse = (RejectNetPeeringResponse) o; - return Objects.equals(this.responseContext, rejectNetPeeringResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RejectNetPeeringResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RejectNetPeeringResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RejectNetPeeringResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RejectNetPeeringResponse is not found" - + " in the empty JSON string", - RejectNetPeeringResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RejectNetPeeringResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RejectNetPeeringResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RejectNetPeeringResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RejectNetPeeringResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RejectNetPeeringResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RejectNetPeeringResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RejectNetPeeringResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RejectNetPeeringResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RejectNetPeeringResponse - * @throws IOException if the JSON string is invalid with respect to RejectNetPeeringResponse - */ - public static RejectNetPeeringResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RejectNetPeeringResponse.class); - } - - /** - * Convert an instance of RejectNetPeeringResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequest.java deleted file mode 100644 index 9d447f09..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequest.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RemoveUserFromUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RemoveUserFromUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public static final String SERIALIZED_NAME_USER_GROUP_PATH = "UserGroupPath"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_PATH) - private String userGroupPath; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public static final String SERIALIZED_NAME_USER_PATH = "UserPath"; - - @SerializedName(SERIALIZED_NAME_USER_PATH) - private String userPath; - - public RemoveUserFromUserGroupRequest() {} - - public RemoveUserFromUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public RemoveUserFromUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to remove the user from. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - public RemoveUserFromUserGroupRequest userGroupPath(String userGroupPath) { - - this.userGroupPath = userGroupPath; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return userGroupPath - */ - @javax.annotation.Nullable - public String getUserGroupPath() { - return userGroupPath; - } - - public void setUserGroupPath(String userGroupPath) { - this.userGroupPath = userGroupPath; - } - - public RemoveUserFromUserGroupRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user you want to remove from the group. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public RemoveUserFromUserGroupRequest userPath(String userPath) { - - this.userPath = userPath; - return this; - } - - /** - * The path to the user (by default, `/`). - * - * @return userPath - */ - @javax.annotation.Nullable - public String getUserPath() { - return userPath; - } - - public void setUserPath(String userPath) { - this.userPath = userPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest = - (RemoveUserFromUserGroupRequest) o; - return Objects.equals(this.dryRun, removeUserFromUserGroupRequest.dryRun) - && Objects.equals(this.userGroupName, removeUserFromUserGroupRequest.userGroupName) - && Objects.equals(this.userGroupPath, removeUserFromUserGroupRequest.userGroupPath) - && Objects.equals(this.userName, removeUserFromUserGroupRequest.userName) - && Objects.equals(this.userPath, removeUserFromUserGroupRequest.userPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, userGroupName, userGroupPath, userName, userPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RemoveUserFromUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append(" userGroupPath: ").append(toIndentedString(userGroupPath)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append(" userPath: ").append(toIndentedString(userPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("UserGroupName"); - openapiFields.add("UserGroupPath"); - openapiFields.add("UserName"); - openapiFields.add("UserPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * RemoveUserFromUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RemoveUserFromUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RemoveUserFromUserGroupRequest is not" - + " found in the empty JSON string", - RemoveUserFromUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RemoveUserFromUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RemoveUserFromUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RemoveUserFromUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - if ((jsonObj.get("UserGroupPath") != null && !jsonObj.get("UserGroupPath").isJsonNull()) - && !jsonObj.get("UserGroupPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupPath").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - if ((jsonObj.get("UserPath") != null && !jsonObj.get("UserPath").isJsonNull()) - && !jsonObj.get("UserPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RemoveUserFromUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RemoveUserFromUserGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RemoveUserFromUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RemoveUserFromUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RemoveUserFromUserGroupRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RemoveUserFromUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RemoveUserFromUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to - * RemoveUserFromUserGroupRequest - */ - public static RemoveUserFromUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RemoveUserFromUserGroupRequest.class); - } - - /** - * Convert an instance of RemoveUserFromUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponse.java deleted file mode 100644 index 9dee3a13..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** RemoveUserFromUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RemoveUserFromUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public RemoveUserFromUserGroupResponse() {} - - public RemoveUserFromUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RemoveUserFromUserGroupResponse removeUserFromUserGroupResponse = - (RemoveUserFromUserGroupResponse) o; - return Objects.equals( - this.responseContext, removeUserFromUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RemoveUserFromUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * RemoveUserFromUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RemoveUserFromUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RemoveUserFromUserGroupResponse is" - + " not found in the empty JSON string", - RemoveUserFromUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RemoveUserFromUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RemoveUserFromUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RemoveUserFromUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RemoveUserFromUserGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RemoveUserFromUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RemoveUserFromUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RemoveUserFromUserGroupResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RemoveUserFromUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RemoveUserFromUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * RemoveUserFromUserGroupResponse - */ - public static RemoveUserFromUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RemoveUserFromUserGroupResponse.class); - } - - /** - * Convert an instance of RemoveUserFromUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTag.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTag.java deleted file mode 100644 index 34d568bf..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTag.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the tag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResourceLoadBalancerTag { - public static final String SERIALIZED_NAME_KEY = "Key"; - - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public ResourceLoadBalancerTag() {} - - public ResourceLoadBalancerTag key(String key) { - - this.key = key; - return this; - } - - /** - * The key of the tag, with a minimum of 1 character. - * - * @return key - */ - @javax.annotation.Nonnull - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResourceLoadBalancerTag resourceLoadBalancerTag = (ResourceLoadBalancerTag) o; - return Objects.equals(this.key, resourceLoadBalancerTag.key); - } - - @Override - public int hashCode() { - return Objects.hash(key); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResourceLoadBalancerTag {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Key"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Key"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResourceLoadBalancerTag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ResourceLoadBalancerTag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResourceLoadBalancerTag is not found" - + " in the empty JSON string", - ResourceLoadBalancerTag.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ResourceLoadBalancerTag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResourceLoadBalancerTag` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResourceLoadBalancerTag.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Key").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResourceLoadBalancerTag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResourceLoadBalancerTag' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResourceLoadBalancerTag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResourceLoadBalancerTag value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResourceLoadBalancerTag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResourceLoadBalancerTag given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResourceLoadBalancerTag - * @throws IOException if the JSON string is invalid with respect to ResourceLoadBalancerTag - */ - public static ResourceLoadBalancerTag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResourceLoadBalancerTag.class); - } - - /** - * Convert an instance of ResourceLoadBalancerTag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceTag.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceTag.java deleted file mode 100644 index 7cca3856..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResourceTag.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the tag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResourceTag { - public static final String SERIALIZED_NAME_KEY = "Key"; - - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_VALUE = "Value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public ResourceTag() {} - - public ResourceTag key(String key) { - - this.key = key; - return this; - } - - /** - * The key of the tag, with a minimum of 1 character. - * - * @return key - */ - @javax.annotation.Nonnull - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public ResourceTag value(String value) { - - this.value = value; - return this; - } - - /** - * The value of the tag, between 0 and 255 characters. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResourceTag resourceTag = (ResourceTag) o; - return Objects.equals(this.key, resourceTag.key) - && Objects.equals(this.value, resourceTag.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResourceTag {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Key"); - openapiFields.add("Value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Key"); - openapiRequiredFields.add("Value"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResourceTag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ResourceTag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResourceTag is not found in the empty" - + " JSON string", - ResourceTag.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ResourceTag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResourceTag` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResourceTag.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Key").toString())); - } - if (!jsonObj.get("Value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResourceTag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResourceTag' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResourceTag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResourceTag value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResourceTag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResourceTag given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResourceTag - * @throws IOException if the JSON string is invalid with respect to ResourceTag - */ - public static ResourceTag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResourceTag.class); - } - - /** - * Convert an instance of ResourceTag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResponseContext.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResponseContext.java deleted file mode 100644 index 6df72b5e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ResponseContext.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the context of the response. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResponseContext { - public static final String SERIALIZED_NAME_REQUEST_ID = "RequestId"; - - @SerializedName(SERIALIZED_NAME_REQUEST_ID) - private String requestId; - - public ResponseContext() {} - - public ResponseContext requestId(String requestId) { - - this.requestId = requestId; - return this; - } - - /** - * The ID of the request. - * - * @return requestId - */ - @javax.annotation.Nullable - public String getRequestId() { - return requestId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseContext responseContext = (ResponseContext) o; - return Objects.equals(this.requestId, responseContext.requestId); - } - - @Override - public int hashCode() { - return Objects.hash(requestId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseContext {\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("RequestId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResponseContext - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ResponseContext.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseContext is not found in the" - + " empty JSON string", - ResponseContext.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ResponseContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseContext` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("RequestId") != null && !jsonObj.get("RequestId").isJsonNull()) - && !jsonObj.get("RequestId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RequestId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RequestId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseContext.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseContext' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseContext.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseContext value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseContext - * @throws IOException if the JSON string is invalid with respect to ResponseContext - */ - public static ResponseContext fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseContext.class); - } - - /** - * Convert an instance of ResponseContext to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Route.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Route.java deleted file mode 100644 index fbec00d1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Route.java +++ /dev/null @@ -1,576 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the route. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Route { - public static final String SERIALIZED_NAME_CREATION_METHOD = "CreationMethod"; - - @SerializedName(SERIALIZED_NAME_CREATION_METHOD) - private String creationMethod; - - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DESTINATION_SERVICE_ID = "DestinationServiceId"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_SERVICE_ID) - private String destinationServiceId; - - public static final String SERIALIZED_NAME_GATEWAY_ID = "GatewayId"; - - @SerializedName(SERIALIZED_NAME_GATEWAY_ID) - private String gatewayId; - - public static final String SERIALIZED_NAME_NAT_SERVICE_ID = "NatServiceId"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_ID) - private String natServiceId; - - public static final String SERIALIZED_NAME_NET_ACCESS_POINT_ID = "NetAccessPointId"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT_ID) - private String netAccessPointId; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_VM_ACCOUNT_ID = "VmAccountId"; - - @SerializedName(SERIALIZED_NAME_VM_ACCOUNT_ID) - private String vmAccountId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public Route() {} - - public Route creationMethod(String creationMethod) { - - this.creationMethod = creationMethod; - return this; - } - - /** - * The method used to create the route. - * - * @return creationMethod - */ - @javax.annotation.Nullable - public String getCreationMethod() { - return creationMethod; - } - - public void setCreationMethod(String creationMethod) { - this.creationMethod = creationMethod; - } - - public Route destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The IP range used for the destination match, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return destinationIpRange - */ - @javax.annotation.Nullable - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public Route destinationServiceId(String destinationServiceId) { - - this.destinationServiceId = destinationServiceId; - return this; - } - - /** - * The ID of the OUTSCALE service. - * - * @return destinationServiceId - */ - @javax.annotation.Nullable - public String getDestinationServiceId() { - return destinationServiceId; - } - - public void setDestinationServiceId(String destinationServiceId) { - this.destinationServiceId = destinationServiceId; - } - - public Route gatewayId(String gatewayId) { - - this.gatewayId = gatewayId; - return this; - } - - /** - * The ID of the Internet service or virtual gateway attached to the Net. - * - * @return gatewayId - */ - @javax.annotation.Nullable - public String getGatewayId() { - return gatewayId; - } - - public void setGatewayId(String gatewayId) { - this.gatewayId = gatewayId; - } - - public Route natServiceId(String natServiceId) { - - this.natServiceId = natServiceId; - return this; - } - - /** - * The ID of a NAT service attached to the Net. - * - * @return natServiceId - */ - @javax.annotation.Nullable - public String getNatServiceId() { - return natServiceId; - } - - public void setNatServiceId(String natServiceId) { - this.natServiceId = natServiceId; - } - - public Route netAccessPointId(String netAccessPointId) { - - this.netAccessPointId = netAccessPointId; - return this; - } - - /** - * The ID of the Net access point. - * - * @return netAccessPointId - */ - @javax.annotation.Nullable - public String getNetAccessPointId() { - return netAccessPointId; - } - - public void setNetAccessPointId(String netAccessPointId) { - this.netAccessPointId = netAccessPointId; - } - - public Route netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of the Net peering. - * - * @return netPeeringId - */ - @javax.annotation.Nullable - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - public Route nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC. - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public Route state(String state) { - - this.state = state; - return this; - } - - /** - * The state of a route in the route table (always `active`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Route vmAccountId(String vmAccountId) { - - this.vmAccountId = vmAccountId; - return this; - } - - /** - * The account ID of the owner of the VM. - * - * @return vmAccountId - */ - @javax.annotation.Nullable - public String getVmAccountId() { - return vmAccountId; - } - - public void setVmAccountId(String vmAccountId) { - this.vmAccountId = vmAccountId; - } - - public Route vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of a VM specified in a route in the table. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Route route = (Route) o; - return Objects.equals(this.creationMethod, route.creationMethod) - && Objects.equals(this.destinationIpRange, route.destinationIpRange) - && Objects.equals(this.destinationServiceId, route.destinationServiceId) - && Objects.equals(this.gatewayId, route.gatewayId) - && Objects.equals(this.natServiceId, route.natServiceId) - && Objects.equals(this.netAccessPointId, route.netAccessPointId) - && Objects.equals(this.netPeeringId, route.netPeeringId) - && Objects.equals(this.nicId, route.nicId) - && Objects.equals(this.state, route.state) - && Objects.equals(this.vmAccountId, route.vmAccountId) - && Objects.equals(this.vmId, route.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - creationMethod, - destinationIpRange, - destinationServiceId, - gatewayId, - natServiceId, - netAccessPointId, - netPeeringId, - nicId, - state, - vmAccountId, - vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Route {\n"); - sb.append(" creationMethod: ").append(toIndentedString(creationMethod)).append("\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" destinationServiceId: ") - .append(toIndentedString(destinationServiceId)) - .append("\n"); - sb.append(" gatewayId: ").append(toIndentedString(gatewayId)).append("\n"); - sb.append(" natServiceId: ").append(toIndentedString(natServiceId)).append("\n"); - sb.append(" netAccessPointId: ").append(toIndentedString(netAccessPointId)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" vmAccountId: ").append(toIndentedString(vmAccountId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationMethod"); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DestinationServiceId"); - openapiFields.add("GatewayId"); - openapiFields.add("NatServiceId"); - openapiFields.add("NetAccessPointId"); - openapiFields.add("NetPeeringId"); - openapiFields.add("NicId"); - openapiFields.add("State"); - openapiFields.add("VmAccountId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Route - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Route.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Route is not found in the empty JSON" - + " string", - Route.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Route.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Route`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("CreationMethod") != null && !jsonObj.get("CreationMethod").isJsonNull()) - && !jsonObj.get("CreationMethod").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CreationMethod` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("CreationMethod").toString())); - } - if ((jsonObj.get("DestinationIpRange") != null - && !jsonObj.get("DestinationIpRange").isJsonNull()) - && !jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if ((jsonObj.get("DestinationServiceId") != null - && !jsonObj.get("DestinationServiceId").isJsonNull()) - && !jsonObj.get("DestinationServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationServiceId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("DestinationServiceId").toString())); - } - if ((jsonObj.get("GatewayId") != null && !jsonObj.get("GatewayId").isJsonNull()) - && !jsonObj.get("GatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `GatewayId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("GatewayId").toString())); - } - if ((jsonObj.get("NatServiceId") != null && !jsonObj.get("NatServiceId").isJsonNull()) - && !jsonObj.get("NatServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NatServiceId").toString())); - } - if ((jsonObj.get("NetAccessPointId") != null - && !jsonObj.get("NetAccessPointId").isJsonNull()) - && !jsonObj.get("NetAccessPointId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPointId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("NetAccessPointId").toString())); - } - if ((jsonObj.get("NetPeeringId") != null && !jsonObj.get("NetPeeringId").isJsonNull()) - && !jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("VmAccountId") != null && !jsonObj.get("VmAccountId").isJsonNull()) - && !jsonObj.get("VmAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmAccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmAccountId").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Route.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Route' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Route.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Route value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Route read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Route given an JSON string - * - * @param jsonString JSON string - * @return An instance of Route - * @throws IOException if the JSON string is invalid with respect to Route - */ - public static Route fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Route.class); - } - - /** - * Convert an instance of Route to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteLight.java deleted file mode 100644 index f3b554f4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteLight.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the route. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RouteLight { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_ROUTE_TYPE = "RouteType"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TYPE) - private String routeType; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public RouteLight() {} - - public RouteLight destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The IP range used for the destination match, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return destinationIpRange - */ - @javax.annotation.Nullable - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public RouteLight routeType(String routeType) { - - this.routeType = routeType; - return this; - } - - /** - * The type of route (always `static`). - * - * @return routeType - */ - @javax.annotation.Nullable - public String getRouteType() { - return routeType; - } - - public void setRouteType(String routeType) { - this.routeType = routeType; - } - - public RouteLight state(String state) { - - this.state = state; - return this; - } - - /** - * The current state of the static route (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RouteLight routeLight = (RouteLight) o; - return Objects.equals(this.destinationIpRange, routeLight.destinationIpRange) - && Objects.equals(this.routeType, routeLight.routeType) - && Objects.equals(this.state, routeLight.state); - } - - @Override - public int hashCode() { - return Objects.hash(destinationIpRange, routeType, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RouteLight {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" routeType: ").append(toIndentedString(routeType)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("RouteType"); - openapiFields.add("State"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RouteLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RouteLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RouteLight is not found in the empty" - + " JSON string", - RouteLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RouteLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RouteLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("DestinationIpRange") != null - && !jsonObj.get("DestinationIpRange").isJsonNull()) - && !jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if ((jsonObj.get("RouteType") != null && !jsonObj.get("RouteType").isJsonNull()) - && !jsonObj.get("RouteType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteType").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RouteLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RouteLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RouteLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RouteLight value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RouteLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RouteLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of RouteLight - * @throws IOException if the JSON string is invalid with respect to RouteLight - */ - public static RouteLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RouteLight.class); - } - - /** - * Convert an instance of RouteLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGateway.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGateway.java deleted file mode 100644 index 772f5e83..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGateway.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the route propagating virtual gateway. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RoutePropagatingVirtualGateway { - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public RoutePropagatingVirtualGateway() {} - - public RoutePropagatingVirtualGateway virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nullable - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RoutePropagatingVirtualGateway routePropagatingVirtualGateway = - (RoutePropagatingVirtualGateway) o; - return Objects.equals( - this.virtualGatewayId, routePropagatingVirtualGateway.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash(virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RoutePropagatingVirtualGateway {\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * RoutePropagatingVirtualGateway - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RoutePropagatingVirtualGateway.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RoutePropagatingVirtualGateway is not" - + " found in the empty JSON string", - RoutePropagatingVirtualGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RoutePropagatingVirtualGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RoutePropagatingVirtualGateway` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("VirtualGatewayId") != null - && !jsonObj.get("VirtualGatewayId").isJsonNull()) - && !jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RoutePropagatingVirtualGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RoutePropagatingVirtualGateway' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(RoutePropagatingVirtualGateway.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RoutePropagatingVirtualGateway value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RoutePropagatingVirtualGateway read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RoutePropagatingVirtualGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of RoutePropagatingVirtualGateway - * @throws IOException if the JSON string is invalid with respect to - * RoutePropagatingVirtualGateway - */ - public static RoutePropagatingVirtualGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RoutePropagatingVirtualGateway.class); - } - - /** - * Convert an instance of RoutePropagatingVirtualGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteTable.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteTable.java deleted file mode 100644 index 670e3ef9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/RouteTable.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the route table. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RouteTable { - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLES = "LinkRouteTables"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLES) - private List linkRouteTables = null; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_ROUTE_PROPAGATING_VIRTUAL_GATEWAYS = - "RoutePropagatingVirtualGateways"; - - @SerializedName(SERIALIZED_NAME_ROUTE_PROPAGATING_VIRTUAL_GATEWAYS) - private List routePropagatingVirtualGateways = null; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_ROUTES = "Routes"; - - @SerializedName(SERIALIZED_NAME_ROUTES) - private List routes = null; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public RouteTable() {} - - public RouteTable linkRouteTables(List linkRouteTables) { - - this.linkRouteTables = linkRouteTables; - return this; - } - - public RouteTable addLinkRouteTablesItem(LinkRouteTable linkRouteTablesItem) { - if (this.linkRouteTables == null) { - this.linkRouteTables = new ArrayList<>(); - } - this.linkRouteTables.add(linkRouteTablesItem); - return this; - } - - /** - * One or more associations between the route table and Subnets. - * - * @return linkRouteTables - */ - @javax.annotation.Nullable - public List getLinkRouteTables() { - return linkRouteTables; - } - - public void setLinkRouteTables(List linkRouteTables) { - this.linkRouteTables = linkRouteTables; - } - - public RouteTable netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the route table. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public RouteTable routePropagatingVirtualGateways( - List routePropagatingVirtualGateways) { - - this.routePropagatingVirtualGateways = routePropagatingVirtualGateways; - return this; - } - - public RouteTable addRoutePropagatingVirtualGatewaysItem( - RoutePropagatingVirtualGateway routePropagatingVirtualGatewaysItem) { - if (this.routePropagatingVirtualGateways == null) { - this.routePropagatingVirtualGateways = new ArrayList<>(); - } - this.routePropagatingVirtualGateways.add(routePropagatingVirtualGatewaysItem); - return this; - } - - /** - * Information about virtual gateways propagating routes. - * - * @return routePropagatingVirtualGateways - */ - @javax.annotation.Nullable - public List getRoutePropagatingVirtualGateways() { - return routePropagatingVirtualGateways; - } - - public void setRoutePropagatingVirtualGateways( - List routePropagatingVirtualGateways) { - this.routePropagatingVirtualGateways = routePropagatingVirtualGateways; - } - - public RouteTable routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table. - * - * @return routeTableId - */ - @javax.annotation.Nullable - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public RouteTable routes(List routes) { - - this.routes = routes; - return this; - } - - public RouteTable addRoutesItem(Route routesItem) { - if (this.routes == null) { - this.routes = new ArrayList<>(); - } - this.routes.add(routesItem); - return this; - } - - /** - * One or more routes in the route table. - * - * @return routes - */ - @javax.annotation.Nullable - public List getRoutes() { - return routes; - } - - public void setRoutes(List routes) { - this.routes = routes; - } - - public RouteTable tags(List tags) { - - this.tags = tags; - return this; - } - - public RouteTable addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the route table. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RouteTable routeTable = (RouteTable) o; - return Objects.equals(this.linkRouteTables, routeTable.linkRouteTables) - && Objects.equals(this.netId, routeTable.netId) - && Objects.equals( - this.routePropagatingVirtualGateways, - routeTable.routePropagatingVirtualGateways) - && Objects.equals(this.routeTableId, routeTable.routeTableId) - && Objects.equals(this.routes, routeTable.routes) - && Objects.equals(this.tags, routeTable.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - linkRouteTables, - netId, - routePropagatingVirtualGateways, - routeTableId, - routes, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RouteTable {\n"); - sb.append(" linkRouteTables: ").append(toIndentedString(linkRouteTables)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" routePropagatingVirtualGateways: ") - .append(toIndentedString(routePropagatingVirtualGateways)) - .append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" routes: ").append(toIndentedString(routes)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkRouteTables"); - openapiFields.add("NetId"); - openapiFields.add("RoutePropagatingVirtualGateways"); - openapiFields.add("RouteTableId"); - openapiFields.add("Routes"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RouteTable - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RouteTable.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RouteTable is not found in the empty" - + " JSON string", - RouteTable.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RouteTable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RouteTable` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("LinkRouteTables") != null - && !jsonObj.get("LinkRouteTables").isJsonNull()) { - JsonArray jsonArraylinkRouteTables = jsonObj.getAsJsonArray("LinkRouteTables"); - if (jsonArraylinkRouteTables != null) { - // ensure the json data is an array - if (!jsonObj.get("LinkRouteTables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTables` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTables").toString())); - } - - // validate the optional field `LinkRouteTables` (array) - for (int i = 0; i < jsonArraylinkRouteTables.size(); i++) { - LinkRouteTable.validateJsonObject( - jsonArraylinkRouteTables.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (jsonObj.get("RoutePropagatingVirtualGateways") != null - && !jsonObj.get("RoutePropagatingVirtualGateways").isJsonNull()) { - JsonArray jsonArrayroutePropagatingVirtualGateways = - jsonObj.getAsJsonArray("RoutePropagatingVirtualGateways"); - if (jsonArrayroutePropagatingVirtualGateways != null) { - // ensure the json data is an array - if (!jsonObj.get("RoutePropagatingVirtualGateways").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RoutePropagatingVirtualGateways` to be an" - + " array in the JSON string but got `%s`", - jsonObj.get("RoutePropagatingVirtualGateways").toString())); - } - - // validate the optional field `RoutePropagatingVirtualGateways` (array) - for (int i = 0; i < jsonArrayroutePropagatingVirtualGateways.size(); i++) { - RoutePropagatingVirtualGateway.validateJsonObject( - jsonArrayroutePropagatingVirtualGateways.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("RouteTableId") != null && !jsonObj.get("RouteTableId").isJsonNull()) - && !jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if (jsonObj.get("Routes") != null && !jsonObj.get("Routes").isJsonNull()) { - JsonArray jsonArrayroutes = jsonObj.getAsJsonArray("Routes"); - if (jsonArrayroutes != null) { - // ensure the json data is an array - if (!jsonObj.get("Routes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Routes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Routes").toString())); - } - - // validate the optional field `Routes` (array) - for (int i = 0; i < jsonArrayroutes.size(); i++) { - Route.validateJsonObject(jsonArrayroutes.get(i).getAsJsonObject()); - } - ; - } - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RouteTable.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RouteTable' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RouteTable.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RouteTable value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RouteTable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RouteTable given an JSON string - * - * @param jsonString JSON string - * @return An instance of RouteTable - * @throws IOException if the JSON string is invalid with respect to RouteTable - */ - public static RouteTable fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RouteTable.class); - } - - /** - * Convert an instance of RouteTable to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequest.java deleted file mode 100644 index 4082d5a9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequest.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ScaleDownVmGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ScaleDownVmGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_GROUP_ID = "VmGroupId"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_ID) - private String vmGroupId; - - public static final String SERIALIZED_NAME_VM_SUBTRACTION = "VmSubtraction"; - - @SerializedName(SERIALIZED_NAME_VM_SUBTRACTION) - private Integer vmSubtraction; - - public ScaleDownVmGroupRequest() {} - - public ScaleDownVmGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ScaleDownVmGroupRequest vmGroupId(String vmGroupId) { - - this.vmGroupId = vmGroupId; - return this; - } - - /** - * The ID of the VM group you want to scale down. - * - * @return vmGroupId - */ - @javax.annotation.Nonnull - public String getVmGroupId() { - return vmGroupId; - } - - public void setVmGroupId(String vmGroupId) { - this.vmGroupId = vmGroupId; - } - - public ScaleDownVmGroupRequest vmSubtraction(Integer vmSubtraction) { - - this.vmSubtraction = vmSubtraction; - return this; - } - - /** - * The number of VMs you want to delete from the VM group. - * - * @return vmSubtraction - */ - @javax.annotation.Nonnull - public Integer getVmSubtraction() { - return vmSubtraction; - } - - public void setVmSubtraction(Integer vmSubtraction) { - this.vmSubtraction = vmSubtraction; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleDownVmGroupRequest scaleDownVmGroupRequest = (ScaleDownVmGroupRequest) o; - return Objects.equals(this.dryRun, scaleDownVmGroupRequest.dryRun) - && Objects.equals(this.vmGroupId, scaleDownVmGroupRequest.vmGroupId) - && Objects.equals(this.vmSubtraction, scaleDownVmGroupRequest.vmSubtraction); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmGroupId, vmSubtraction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleDownVmGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmGroupId: ").append(toIndentedString(vmGroupId)).append("\n"); - sb.append(" vmSubtraction: ").append(toIndentedString(vmSubtraction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmGroupId"); - openapiFields.add("VmSubtraction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmGroupId"); - openapiRequiredFields.add("VmSubtraction"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ScaleDownVmGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ScaleDownVmGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ScaleDownVmGroupRequest is not found" - + " in the empty JSON string", - ScaleDownVmGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ScaleDownVmGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ScaleDownVmGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ScaleDownVmGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ScaleDownVmGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ScaleDownVmGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ScaleDownVmGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ScaleDownVmGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ScaleDownVmGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ScaleDownVmGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ScaleDownVmGroupRequest - * @throws IOException if the JSON string is invalid with respect to ScaleDownVmGroupRequest - */ - public static ScaleDownVmGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ScaleDownVmGroupRequest.class); - } - - /** - * Convert an instance of ScaleDownVmGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponse.java deleted file mode 100644 index a682db18..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ScaleDownVmGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ScaleDownVmGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ScaleDownVmGroupResponse() {} - - public ScaleDownVmGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleDownVmGroupResponse scaleDownVmGroupResponse = (ScaleDownVmGroupResponse) o; - return Objects.equals(this.responseContext, scaleDownVmGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleDownVmGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ScaleDownVmGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ScaleDownVmGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ScaleDownVmGroupResponse is not found" - + " in the empty JSON string", - ScaleDownVmGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ScaleDownVmGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ScaleDownVmGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ScaleDownVmGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ScaleDownVmGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ScaleDownVmGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ScaleDownVmGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ScaleDownVmGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ScaleDownVmGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ScaleDownVmGroupResponse - * @throws IOException if the JSON string is invalid with respect to ScaleDownVmGroupResponse - */ - public static ScaleDownVmGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ScaleDownVmGroupResponse.class); - } - - /** - * Convert an instance of ScaleDownVmGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequest.java deleted file mode 100644 index 6e86d5fd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ScaleUpVmGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ScaleUpVmGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_ADDITION = "VmAddition"; - - @SerializedName(SERIALIZED_NAME_VM_ADDITION) - private Integer vmAddition; - - public static final String SERIALIZED_NAME_VM_GROUP_ID = "VmGroupId"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_ID) - private String vmGroupId; - - public ScaleUpVmGroupRequest() {} - - public ScaleUpVmGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public ScaleUpVmGroupRequest vmAddition(Integer vmAddition) { - - this.vmAddition = vmAddition; - return this; - } - - /** - * The number of VMs you want to add to the VM group. - * - * @return vmAddition - */ - @javax.annotation.Nonnull - public Integer getVmAddition() { - return vmAddition; - } - - public void setVmAddition(Integer vmAddition) { - this.vmAddition = vmAddition; - } - - public ScaleUpVmGroupRequest vmGroupId(String vmGroupId) { - - this.vmGroupId = vmGroupId; - return this; - } - - /** - * The ID of the VM group you want to scale up. - * - * @return vmGroupId - */ - @javax.annotation.Nonnull - public String getVmGroupId() { - return vmGroupId; - } - - public void setVmGroupId(String vmGroupId) { - this.vmGroupId = vmGroupId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleUpVmGroupRequest scaleUpVmGroupRequest = (ScaleUpVmGroupRequest) o; - return Objects.equals(this.dryRun, scaleUpVmGroupRequest.dryRun) - && Objects.equals(this.vmAddition, scaleUpVmGroupRequest.vmAddition) - && Objects.equals(this.vmGroupId, scaleUpVmGroupRequest.vmGroupId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmAddition, vmGroupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleUpVmGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmAddition: ").append(toIndentedString(vmAddition)).append("\n"); - sb.append(" vmGroupId: ").append(toIndentedString(vmGroupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmAddition"); - openapiFields.add("VmGroupId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmAddition"); - openapiRequiredFields.add("VmGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ScaleUpVmGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ScaleUpVmGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ScaleUpVmGroupRequest is not found in" - + " the empty JSON string", - ScaleUpVmGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ScaleUpVmGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ScaleUpVmGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ScaleUpVmGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VmGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ScaleUpVmGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ScaleUpVmGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ScaleUpVmGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ScaleUpVmGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ScaleUpVmGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ScaleUpVmGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ScaleUpVmGroupRequest - * @throws IOException if the JSON string is invalid with respect to ScaleUpVmGroupRequest - */ - public static ScaleUpVmGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ScaleUpVmGroupRequest.class); - } - - /** - * Convert an instance of ScaleUpVmGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponse.java deleted file mode 100644 index 57da076a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** ScaleUpVmGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ScaleUpVmGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public ScaleUpVmGroupResponse() {} - - public ScaleUpVmGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScaleUpVmGroupResponse scaleUpVmGroupResponse = (ScaleUpVmGroupResponse) o; - return Objects.equals(this.responseContext, scaleUpVmGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleUpVmGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ScaleUpVmGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ScaleUpVmGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ScaleUpVmGroupResponse is not found" - + " in the empty JSON string", - ScaleUpVmGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ScaleUpVmGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ScaleUpVmGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ScaleUpVmGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ScaleUpVmGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ScaleUpVmGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ScaleUpVmGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ScaleUpVmGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ScaleUpVmGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ScaleUpVmGroupResponse - * @throws IOException if the JSON string is invalid with respect to ScaleUpVmGroupResponse - */ - public static ScaleUpVmGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ScaleUpVmGroupResponse.class); - } - - /** - * Convert an instance of ScaleUpVmGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroup.java deleted file mode 100644 index 1a050b6b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroup.java +++ /dev/null @@ -1,522 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the security group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SecurityGroup { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_INBOUND_RULES = "InboundRules"; - - @SerializedName(SERIALIZED_NAME_INBOUND_RULES) - private List inboundRules = null; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_OUTBOUND_RULES = "OutboundRules"; - - @SerializedName(SERIALIZED_NAME_OUTBOUND_RULES) - private List outboundRules = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public SecurityGroup() {} - - public SecurityGroup accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID that has been granted permission. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public SecurityGroup description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the security group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public SecurityGroup inboundRules(List inboundRules) { - - this.inboundRules = inboundRules; - return this; - } - - public SecurityGroup addInboundRulesItem(SecurityGroupRule inboundRulesItem) { - if (this.inboundRules == null) { - this.inboundRules = new ArrayList<>(); - } - this.inboundRules.add(inboundRulesItem); - return this; - } - - /** - * The inbound rules associated with the security group. - * - * @return inboundRules - */ - @javax.annotation.Nullable - public List getInboundRules() { - return inboundRules; - } - - public void setInboundRules(List inboundRules) { - this.inboundRules = inboundRules; - } - - public SecurityGroup netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net for the security group. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public SecurityGroup outboundRules(List outboundRules) { - - this.outboundRules = outboundRules; - return this; - } - - public SecurityGroup addOutboundRulesItem(SecurityGroupRule outboundRulesItem) { - if (this.outboundRules == null) { - this.outboundRules = new ArrayList<>(); - } - this.outboundRules.add(outboundRulesItem); - return this; - } - - /** - * The outbound rules associated with the security group. - * - * @return outboundRules - */ - @javax.annotation.Nullable - public List getOutboundRules() { - return outboundRules; - } - - public void setOutboundRules(List outboundRules) { - this.outboundRules = outboundRules; - } - - public SecurityGroup securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of the security group. - * - * @return securityGroupId - */ - @javax.annotation.Nullable - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public SecurityGroup securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * The name of the security group. - * - * @return securityGroupName - */ - @javax.annotation.Nullable - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - public SecurityGroup tags(List tags) { - - this.tags = tags; - return this; - } - - public SecurityGroup addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the security group. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityGroup securityGroup = (SecurityGroup) o; - return Objects.equals(this.accountId, securityGroup.accountId) - && Objects.equals(this.description, securityGroup.description) - && Objects.equals(this.inboundRules, securityGroup.inboundRules) - && Objects.equals(this.netId, securityGroup.netId) - && Objects.equals(this.outboundRules, securityGroup.outboundRules) - && Objects.equals(this.securityGroupId, securityGroup.securityGroupId) - && Objects.equals(this.securityGroupName, securityGroup.securityGroupName) - && Objects.equals(this.tags, securityGroup.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - description, - inboundRules, - netId, - outboundRules, - securityGroupId, - securityGroupName, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityGroup {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" inboundRules: ").append(toIndentedString(inboundRules)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" outboundRules: ").append(toIndentedString(outboundRules)).append("\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("Description"); - openapiFields.add("InboundRules"); - openapiFields.add("NetId"); - openapiFields.add("OutboundRules"); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupName"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SecurityGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SecurityGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SecurityGroup is not found in the" - + " empty JSON string", - SecurityGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SecurityGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SecurityGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (jsonObj.get("InboundRules") != null && !jsonObj.get("InboundRules").isJsonNull()) { - JsonArray jsonArrayinboundRules = jsonObj.getAsJsonArray("InboundRules"); - if (jsonArrayinboundRules != null) { - // ensure the json data is an array - if (!jsonObj.get("InboundRules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InboundRules` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("InboundRules").toString())); - } - - // validate the optional field `InboundRules` (array) - for (int i = 0; i < jsonArrayinboundRules.size(); i++) { - SecurityGroupRule.validateJsonObject( - jsonArrayinboundRules.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (jsonObj.get("OutboundRules") != null && !jsonObj.get("OutboundRules").isJsonNull()) { - JsonArray jsonArrayoutboundRules = jsonObj.getAsJsonArray("OutboundRules"); - if (jsonArrayoutboundRules != null) { - // ensure the json data is an array - if (!jsonObj.get("OutboundRules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutboundRules` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("OutboundRules").toString())); - } - - // validate the optional field `OutboundRules` (array) - for (int i = 0; i < jsonArrayoutboundRules.size(); i++) { - SecurityGroupRule.validateJsonObject( - jsonArrayoutboundRules.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("SecurityGroupId") != null && !jsonObj.get("SecurityGroupId").isJsonNull()) - && !jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupName") != null - && !jsonObj.get("SecurityGroupName").isJsonNull()) - && !jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SecurityGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SecurityGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SecurityGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SecurityGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SecurityGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SecurityGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of SecurityGroup - * @throws IOException if the JSON string is invalid with respect to SecurityGroup - */ - public static SecurityGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SecurityGroup.class); - } - - /** - * Convert an instance of SecurityGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLight.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLight.java deleted file mode 100644 index 3d396fa6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLight.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the security group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SecurityGroupLight { - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public SecurityGroupLight() {} - - public SecurityGroupLight securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of the security group. - * - * @return securityGroupId - */ - @javax.annotation.Nullable - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public SecurityGroupLight securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * The name of the security group. - * - * @return securityGroupName - */ - @javax.annotation.Nullable - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityGroupLight securityGroupLight = (SecurityGroupLight) o; - return Objects.equals(this.securityGroupId, securityGroupLight.securityGroupId) - && Objects.equals(this.securityGroupName, securityGroupLight.securityGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(securityGroupId, securityGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityGroupLight {\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SecurityGroupLight - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SecurityGroupLight.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SecurityGroupLight is not found in" - + " the empty JSON string", - SecurityGroupLight.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SecurityGroupLight.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SecurityGroupLight` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("SecurityGroupId") != null && !jsonObj.get("SecurityGroupId").isJsonNull()) - && !jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupName") != null - && !jsonObj.get("SecurityGroupName").isJsonNull()) - && !jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SecurityGroupLight.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SecurityGroupLight' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SecurityGroupLight.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SecurityGroupLight value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SecurityGroupLight read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SecurityGroupLight given an JSON string - * - * @param jsonString JSON string - * @return An instance of SecurityGroupLight - * @throws IOException if the JSON string is invalid with respect to SecurityGroupLight - */ - public static SecurityGroupLight fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SecurityGroupLight.class); - } - - /** - * Convert an instance of SecurityGroupLight to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRule.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRule.java deleted file mode 100644 index 17d38b49..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRule.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the security group rule. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SecurityGroupRule { - public static final String SERIALIZED_NAME_FROM_PORT_RANGE = "FromPortRange"; - - @SerializedName(SERIALIZED_NAME_FROM_PORT_RANGE) - private Integer fromPortRange; - - public static final String SERIALIZED_NAME_IP_PROTOCOL = "IpProtocol"; - - @SerializedName(SERIALIZED_NAME_IP_PROTOCOL) - private String ipProtocol; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS_MEMBERS = "SecurityGroupsMembers"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS_MEMBERS) - private List securityGroupsMembers = null; - - public static final String SERIALIZED_NAME_SERVICE_IDS = "ServiceIds"; - - @SerializedName(SERIALIZED_NAME_SERVICE_IDS) - private List serviceIds = null; - - public static final String SERIALIZED_NAME_TO_PORT_RANGE = "ToPortRange"; - - @SerializedName(SERIALIZED_NAME_TO_PORT_RANGE) - private Integer toPortRange; - - public SecurityGroupRule() {} - - public SecurityGroupRule fromPortRange(Integer fromPortRange) { - - this.fromPortRange = fromPortRange; - return this; - } - - /** - * The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. - * - * @return fromPortRange - */ - @javax.annotation.Nullable - public Integer getFromPortRange() { - return fromPortRange; - } - - public void setFromPortRange(Integer fromPortRange) { - this.fromPortRange = fromPortRange; - } - - public SecurityGroupRule ipProtocol(String ipProtocol) { - - this.ipProtocol = ipProtocol; - return this; - } - - /** - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` - * for all protocols). By default, `-1`. In a Net, this can also be an IP protocol - * number. For more information, see the [IANA.org - * website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). - * - * @return ipProtocol - */ - @javax.annotation.Nullable - public String getIpProtocol() { - return ipProtocol; - } - - public void setIpProtocol(String ipProtocol) { - this.ipProtocol = ipProtocol; - } - - public SecurityGroupRule ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public SecurityGroupRule addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * One or more IP ranges for the security group rules, in CIDR notation (for example, - * `10.0.0.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - public SecurityGroupRule securityGroupsMembers( - List securityGroupsMembers) { - - this.securityGroupsMembers = securityGroupsMembers; - return this; - } - - public SecurityGroupRule addSecurityGroupsMembersItem( - SecurityGroupsMember securityGroupsMembersItem) { - if (this.securityGroupsMembers == null) { - this.securityGroupsMembers = new ArrayList<>(); - } - this.securityGroupsMembers.add(securityGroupsMembersItem); - return this; - } - - /** - * Information about one or more source or destination security groups. - * - * @return securityGroupsMembers - */ - @javax.annotation.Nullable - public List getSecurityGroupsMembers() { - return securityGroupsMembers; - } - - public void setSecurityGroupsMembers(List securityGroupsMembers) { - this.securityGroupsMembers = securityGroupsMembers; - } - - public SecurityGroupRule serviceIds(List serviceIds) { - - this.serviceIds = serviceIds; - return this; - } - - public SecurityGroupRule addServiceIdsItem(String serviceIdsItem) { - if (this.serviceIds == null) { - this.serviceIds = new ArrayList<>(); - } - this.serviceIds.add(serviceIdsItem); - return this; - } - - /** - * One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE - * services. For more information, see - * [ReadNetAccessPointServices](#readnetaccesspointservices). - * - * @return serviceIds - */ - @javax.annotation.Nullable - public List getServiceIds() { - return serviceIds; - } - - public void setServiceIds(List serviceIds) { - this.serviceIds = serviceIds; - } - - public SecurityGroupRule toPortRange(Integer toPortRange) { - - this.toPortRange = toPortRange; - return this; - } - - /** - * The end of the port range for the TCP and UDP protocols, or an ICMP code number. - * - * @return toPortRange - */ - @javax.annotation.Nullable - public Integer getToPortRange() { - return toPortRange; - } - - public void setToPortRange(Integer toPortRange) { - this.toPortRange = toPortRange; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityGroupRule securityGroupRule = (SecurityGroupRule) o; - return Objects.equals(this.fromPortRange, securityGroupRule.fromPortRange) - && Objects.equals(this.ipProtocol, securityGroupRule.ipProtocol) - && Objects.equals(this.ipRanges, securityGroupRule.ipRanges) - && Objects.equals( - this.securityGroupsMembers, securityGroupRule.securityGroupsMembers) - && Objects.equals(this.serviceIds, securityGroupRule.serviceIds) - && Objects.equals(this.toPortRange, securityGroupRule.toPortRange); - } - - @Override - public int hashCode() { - return Objects.hash( - fromPortRange, - ipProtocol, - ipRanges, - securityGroupsMembers, - serviceIds, - toPortRange); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityGroupRule {\n"); - sb.append(" fromPortRange: ").append(toIndentedString(fromPortRange)).append("\n"); - sb.append(" ipProtocol: ").append(toIndentedString(ipProtocol)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" securityGroupsMembers: ") - .append(toIndentedString(securityGroupsMembers)) - .append("\n"); - sb.append(" serviceIds: ").append(toIndentedString(serviceIds)).append("\n"); - sb.append(" toPortRange: ").append(toIndentedString(toPortRange)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FromPortRange"); - openapiFields.add("IpProtocol"); - openapiFields.add("IpRanges"); - openapiFields.add("SecurityGroupsMembers"); - openapiFields.add("ServiceIds"); - openapiFields.add("ToPortRange"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SecurityGroupRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SecurityGroupRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SecurityGroupRule is not found in the" - + " empty JSON string", - SecurityGroupRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SecurityGroupRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SecurityGroupRule` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("IpProtocol") != null && !jsonObj.get("IpProtocol").isJsonNull()) - && !jsonObj.get("IpProtocol").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpProtocol` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpProtocol").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - if (jsonObj.get("SecurityGroupsMembers") != null - && !jsonObj.get("SecurityGroupsMembers").isJsonNull()) { - JsonArray jsonArraysecurityGroupsMembers = - jsonObj.getAsJsonArray("SecurityGroupsMembers"); - if (jsonArraysecurityGroupsMembers != null) { - // ensure the json data is an array - if (!jsonObj.get("SecurityGroupsMembers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupsMembers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("SecurityGroupsMembers").toString())); - } - - // validate the optional field `SecurityGroupsMembers` (array) - for (int i = 0; i < jsonArraysecurityGroupsMembers.size(); i++) { - SecurityGroupsMember.validateJsonObject( - jsonArraysecurityGroupsMembers.get(i).getAsJsonObject()); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ServiceIds") != null && !jsonObj.get("ServiceIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("ServiceIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SecurityGroupRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SecurityGroupRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SecurityGroupRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SecurityGroupRule value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SecurityGroupRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SecurityGroupRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of SecurityGroupRule - * @throws IOException if the JSON string is invalid with respect to SecurityGroupRule - */ - public static SecurityGroupRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SecurityGroupRule.class); - } - - /** - * Convert an instance of SecurityGroupRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMember.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMember.java deleted file mode 100644 index 548d161f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMember.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about a source or destination security group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SecurityGroupsMember { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_ID = "SecurityGroupId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID) - private String securityGroupId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public SecurityGroupsMember() {} - - public SecurityGroupsMember accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID that owns the source or destination security group. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public SecurityGroupsMember securityGroupId(String securityGroupId) { - - this.securityGroupId = securityGroupId; - return this; - } - - /** - * The ID of a source or destination security group that you want to link to the security group - * of the rule. - * - * @return securityGroupId - */ - @javax.annotation.Nullable - public String getSecurityGroupId() { - return securityGroupId; - } - - public void setSecurityGroupId(String securityGroupId) { - this.securityGroupId = securityGroupId; - } - - public SecurityGroupsMember securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * (Public Cloud only) The name of a source or destination security group that you want to link - * to the security group of the rule. - * - * @return securityGroupName - */ - @javax.annotation.Nullable - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityGroupsMember securityGroupsMember = (SecurityGroupsMember) o; - return Objects.equals(this.accountId, securityGroupsMember.accountId) - && Objects.equals(this.securityGroupId, securityGroupsMember.securityGroupId) - && Objects.equals(this.securityGroupName, securityGroupsMember.securityGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, securityGroupId, securityGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityGroupsMember {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("SecurityGroupId"); - openapiFields.add("SecurityGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SecurityGroupsMember - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SecurityGroupsMember.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SecurityGroupsMember is not found in" - + " the empty JSON string", - SecurityGroupsMember.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SecurityGroupsMember.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SecurityGroupsMember` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("SecurityGroupId") != null && !jsonObj.get("SecurityGroupId").isJsonNull()) - && !jsonObj.get("SecurityGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupId").toString())); - } - if ((jsonObj.get("SecurityGroupName") != null - && !jsonObj.get("SecurityGroupName").isJsonNull()) - && !jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SecurityGroupsMember.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SecurityGroupsMember' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SecurityGroupsMember.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SecurityGroupsMember value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SecurityGroupsMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SecurityGroupsMember given an JSON string - * - * @param jsonString JSON string - * @return An instance of SecurityGroupsMember - * @throws IOException if the JSON string is invalid with respect to SecurityGroupsMember - */ - public static SecurityGroupsMember fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SecurityGroupsMember.class); - } - - /** - * Convert an instance of SecurityGroupsMember to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificate.java deleted file mode 100644 index 01c48f2f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificate.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the server certificate. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ServerCertificate { - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private LocalDate expirationDate; - - public static final String SERIALIZED_NAME_ID = "Id"; - - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ORN = "Orn"; - - @SerializedName(SERIALIZED_NAME_ORN) - private String orn; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_UPLOAD_DATE = "UploadDate"; - - @SerializedName(SERIALIZED_NAME_UPLOAD_DATE) - private LocalDate uploadDate; - - public ServerCertificate() {} - - public ServerCertificate expirationDate(LocalDate expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date on which the server certificate expires. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public LocalDate getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(LocalDate expirationDate) { - this.expirationDate = expirationDate; - } - - public ServerCertificate id(String id) { - - this.id = id; - return this; - } - - /** - * The ID of the server certificate. - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ServerCertificate name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the server certificate. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ServerCertificate orn(String orn) { - - this.orn = orn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see - * [Resource Identifiers > OUTSCALE Resource Names - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). - * - * @return orn - */ - @javax.annotation.Nullable - public String getOrn() { - return orn; - } - - public void setOrn(String orn) { - this.orn = orn; - } - - public ServerCertificate path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the server certificate. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public ServerCertificate uploadDate(LocalDate uploadDate) { - - this.uploadDate = uploadDate; - return this; - } - - /** - * The date on which the server certificate has been uploaded. - * - * @return uploadDate - */ - @javax.annotation.Nullable - public LocalDate getUploadDate() { - return uploadDate; - } - - public void setUploadDate(LocalDate uploadDate) { - this.uploadDate = uploadDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ServerCertificate serverCertificate = (ServerCertificate) o; - return Objects.equals(this.expirationDate, serverCertificate.expirationDate) - && Objects.equals(this.id, serverCertificate.id) - && Objects.equals(this.name, serverCertificate.name) - && Objects.equals(this.orn, serverCertificate.orn) - && Objects.equals(this.path, serverCertificate.path) - && Objects.equals(this.uploadDate, serverCertificate.uploadDate); - } - - @Override - public int hashCode() { - return Objects.hash(expirationDate, id, name, orn, path, uploadDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ServerCertificate {\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" orn: ").append(toIndentedString(orn)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" uploadDate: ").append(toIndentedString(uploadDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ExpirationDate"); - openapiFields.add("Id"); - openapiFields.add("Name"); - openapiFields.add("Orn"); - openapiFields.add("Path"); - openapiFields.add("UploadDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ServerCertificate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ServerCertificate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ServerCertificate is not found in the" - + " empty JSON string", - ServerCertificate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ServerCertificate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ServerCertificate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Id") != null && !jsonObj.get("Id").isJsonNull()) - && !jsonObj.get("Id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("Id").toString())); - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if ((jsonObj.get("Orn") != null && !jsonObj.get("Orn").isJsonNull()) - && !jsonObj.get("Orn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Orn` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Orn").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ServerCertificate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ServerCertificate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ServerCertificate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ServerCertificate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ServerCertificate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ServerCertificate given an JSON string - * - * @param jsonString JSON string - * @return An instance of ServerCertificate - * @throws IOException if the JSON string is invalid with respect to ServerCertificate - */ - public static ServerCertificate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ServerCertificate.class); - } - - /** - * Convert an instance of ServerCertificate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Service.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Service.java deleted file mode 100644 index ecea83dd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Service.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the service. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Service { - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public static final String SERIALIZED_NAME_SERVICE_ID = "ServiceId"; - - @SerializedName(SERIALIZED_NAME_SERVICE_ID) - private String serviceId; - - public static final String SERIALIZED_NAME_SERVICE_NAME = "ServiceName"; - - @SerializedName(SERIALIZED_NAME_SERVICE_NAME) - private String serviceName; - - public Service() {} - - public Service ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public Service addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * The list of network prefixes used by the service, in CIDR notation. - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - public Service serviceId(String serviceId) { - - this.serviceId = serviceId; - return this; - } - - /** - * The ID of the service. - * - * @return serviceId - */ - @javax.annotation.Nullable - public String getServiceId() { - return serviceId; - } - - public void setServiceId(String serviceId) { - this.serviceId = serviceId; - } - - public Service serviceName(String serviceName) { - - this.serviceName = serviceName; - return this; - } - - /** - * The name of the service. - * - * @return serviceName - */ - @javax.annotation.Nullable - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Service service = (Service) o; - return Objects.equals(this.ipRanges, service.ipRanges) - && Objects.equals(this.serviceId, service.serviceId) - && Objects.equals(this.serviceName, service.serviceName); - } - - @Override - public int hashCode() { - return Objects.hash(ipRanges, serviceId, serviceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Service {\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" serviceId: ").append(toIndentedString(serviceId)).append("\n"); - sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("IpRanges"); - openapiFields.add("ServiceId"); - openapiFields.add("ServiceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Service - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Service.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Service is not found in the empty" - + " JSON string", - Service.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Service.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Service`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - if ((jsonObj.get("ServiceId") != null && !jsonObj.get("ServiceId").isJsonNull()) - && !jsonObj.get("ServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ServiceId").toString())); - } - if ((jsonObj.get("ServiceName") != null && !jsonObj.get("ServiceName").isJsonNull()) - && !jsonObj.get("ServiceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServiceName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ServiceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Service.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Service' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Service.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Service value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Service read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Service given an JSON string - * - * @param jsonString JSON string - * @return An instance of Service - * @throws IOException if the JSON string is invalid with respect to Service - */ - public static Service fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Service.class); - } - - /** - * Convert an instance of Service to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequest.java deleted file mode 100644 index 111ab404..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequest.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** SetDefaultPolicyVersionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SetDefaultPolicyVersionRequest { - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_VERSION_ID = "VersionId"; - - @SerializedName(SERIALIZED_NAME_VERSION_ID) - private String versionId; - - public SetDefaultPolicyVersionRequest() {} - - public SetDefaultPolicyVersionRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public SetDefaultPolicyVersionRequest versionId(String versionId) { - - this.versionId = versionId; - return this; - } - - /** - * The ID of the version. - * - * @return versionId - */ - @javax.annotation.Nonnull - public String getVersionId() { - return versionId; - } - - public void setVersionId(String versionId) { - this.versionId = versionId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest = - (SetDefaultPolicyVersionRequest) o; - return Objects.equals(this.policyOrn, setDefaultPolicyVersionRequest.policyOrn) - && Objects.equals(this.versionId, setDefaultPolicyVersionRequest.versionId); - } - - @Override - public int hashCode() { - return Objects.hash(policyOrn, versionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetDefaultPolicyVersionRequest {\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("PolicyOrn"); - openapiFields.add("VersionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("VersionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * SetDefaultPolicyVersionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SetDefaultPolicyVersionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SetDefaultPolicyVersionRequest is not" - + " found in the empty JSON string", - SetDefaultPolicyVersionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SetDefaultPolicyVersionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SetDefaultPolicyVersionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SetDefaultPolicyVersionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("VersionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VersionId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VersionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetDefaultPolicyVersionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetDefaultPolicyVersionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(SetDefaultPolicyVersionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SetDefaultPolicyVersionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetDefaultPolicyVersionRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SetDefaultPolicyVersionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetDefaultPolicyVersionRequest - * @throws IOException if the JSON string is invalid with respect to - * SetDefaultPolicyVersionRequest - */ - public static SetDefaultPolicyVersionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetDefaultPolicyVersionRequest.class); - } - - /** - * Convert an instance of SetDefaultPolicyVersionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponse.java deleted file mode 100644 index d5b03db2..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** SetDefaultPolicyVersionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SetDefaultPolicyVersionResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public SetDefaultPolicyVersionResponse() {} - - public SetDefaultPolicyVersionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetDefaultPolicyVersionResponse setDefaultPolicyVersionResponse = - (SetDefaultPolicyVersionResponse) o; - return Objects.equals( - this.responseContext, setDefaultPolicyVersionResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetDefaultPolicyVersionResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * SetDefaultPolicyVersionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SetDefaultPolicyVersionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SetDefaultPolicyVersionResponse is" - + " not found in the empty JSON string", - SetDefaultPolicyVersionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SetDefaultPolicyVersionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SetDefaultPolicyVersionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetDefaultPolicyVersionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetDefaultPolicyVersionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(SetDefaultPolicyVersionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SetDefaultPolicyVersionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetDefaultPolicyVersionResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SetDefaultPolicyVersionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetDefaultPolicyVersionResponse - * @throws IOException if the JSON string is invalid with respect to - * SetDefaultPolicyVersionResponse - */ - public static SetDefaultPolicyVersionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetDefaultPolicyVersionResponse.class); - } - - /** - * Convert an instance of SetDefaultPolicyVersionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Snapshot.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Snapshot.java deleted file mode 100644 index 239944a9..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Snapshot.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the snapshot. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Snapshot { - public static final String SERIALIZED_NAME_ACCOUNT_ALIAS = "AccountAlias"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ALIAS) - private String accountAlias; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME = - "PermissionsToCreateVolume"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME) - private PermissionsOnResource permissionsToCreateVolume; - - public static final String SERIALIZED_NAME_PROGRESS = "Progress"; - - @SerializedName(SERIALIZED_NAME_PROGRESS) - private Integer progress; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public static final String SERIALIZED_NAME_VOLUME_SIZE = "VolumeSize"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZE) - private Integer volumeSize; - - public Snapshot() {} - - public Snapshot accountAlias(String accountAlias) { - - this.accountAlias = accountAlias; - return this; - } - - /** - * The account alias of the owner of the snapshot. - * - * @return accountAlias - */ - @javax.annotation.Nullable - public String getAccountAlias() { - return accountAlias; - } - - public void setAccountAlias(String accountAlias) { - this.accountAlias = accountAlias; - } - - public Snapshot accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the snapshot. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public Snapshot creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the snapshot was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public Snapshot description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the snapshot. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Snapshot permissionsToCreateVolume(PermissionsOnResource permissionsToCreateVolume) { - - this.permissionsToCreateVolume = permissionsToCreateVolume; - return this; - } - - /** - * Get permissionsToCreateVolume - * - * @return permissionsToCreateVolume - */ - @javax.annotation.Nullable - public PermissionsOnResource getPermissionsToCreateVolume() { - return permissionsToCreateVolume; - } - - public void setPermissionsToCreateVolume(PermissionsOnResource permissionsToCreateVolume) { - this.permissionsToCreateVolume = permissionsToCreateVolume; - } - - public Snapshot progress(Integer progress) { - - this.progress = progress; - return this; - } - - /** - * The progress of the snapshot, as a percentage. - * - * @return progress - */ - @javax.annotation.Nullable - public Integer getProgress() { - return progress; - } - - public void setProgress(Integer progress) { - this.progress = progress; - } - - public Snapshot snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot. - * - * @return snapshotId - */ - @javax.annotation.Nullable - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - public Snapshot state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the snapshot (`in-queue` \\| `pending` \\| - * `completed` \\| `error` \\| `deleting`)). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Snapshot tags(List tags) { - - this.tags = tags; - return this; - } - - public Snapshot addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the snapshot. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Snapshot volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume used to create the snapshot. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - public Snapshot volumeSize(Integer volumeSize) { - - this.volumeSize = volumeSize; - return this; - } - - /** - * The size of the volume used to create the snapshot, in gibibytes (GiB). - * - * @return volumeSize - */ - @javax.annotation.Nullable - public Integer getVolumeSize() { - return volumeSize; - } - - public void setVolumeSize(Integer volumeSize) { - this.volumeSize = volumeSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Snapshot snapshot = (Snapshot) o; - return Objects.equals(this.accountAlias, snapshot.accountAlias) - && Objects.equals(this.accountId, snapshot.accountId) - && Objects.equals(this.creationDate, snapshot.creationDate) - && Objects.equals(this.description, snapshot.description) - && Objects.equals( - this.permissionsToCreateVolume, snapshot.permissionsToCreateVolume) - && Objects.equals(this.progress, snapshot.progress) - && Objects.equals(this.snapshotId, snapshot.snapshotId) - && Objects.equals(this.state, snapshot.state) - && Objects.equals(this.tags, snapshot.tags) - && Objects.equals(this.volumeId, snapshot.volumeId) - && Objects.equals(this.volumeSize, snapshot.volumeSize); - } - - @Override - public int hashCode() { - return Objects.hash( - accountAlias, - accountId, - creationDate, - description, - permissionsToCreateVolume, - progress, - snapshotId, - state, - tags, - volumeId, - volumeSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Snapshot {\n"); - sb.append(" accountAlias: ").append(toIndentedString(accountAlias)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" permissionsToCreateVolume: ") - .append(toIndentedString(permissionsToCreateVolume)) - .append("\n"); - sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append(" volumeSize: ").append(toIndentedString(volumeSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountAlias"); - openapiFields.add("AccountId"); - openapiFields.add("CreationDate"); - openapiFields.add("Description"); - openapiFields.add("PermissionsToCreateVolume"); - openapiFields.add("Progress"); - openapiFields.add("SnapshotId"); - openapiFields.add("State"); - openapiFields.add("Tags"); - openapiFields.add("VolumeId"); - openapiFields.add("VolumeSize"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Snapshot - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Snapshot.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Snapshot is not found in the empty" - + " JSON string", - Snapshot.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Snapshot.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Snapshot` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountAlias") != null && !jsonObj.get("AccountAlias").isJsonNull()) - && !jsonObj.get("AccountAlias").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountAlias` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountAlias").toString())); - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // validate the optional field `PermissionsToCreateVolume` - if (jsonObj.get("PermissionsToCreateVolume") != null - && !jsonObj.get("PermissionsToCreateVolume").isJsonNull()) { - PermissionsOnResource.validateJsonObject( - jsonObj.getAsJsonObject("PermissionsToCreateVolume")); - } - if ((jsonObj.get("SnapshotId") != null && !jsonObj.get("SnapshotId").isJsonNull()) - && !jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Snapshot.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Snapshot' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Snapshot.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Snapshot value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Snapshot read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Snapshot given an JSON string - * - * @param jsonString JSON string - * @return An instance of Snapshot - * @throws IOException if the JSON string is invalid with respect to Snapshot - */ - public static Snapshot fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Snapshot.class); - } - - /** - * Convert an instance of Snapshot to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTask.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTask.java deleted file mode 100644 index c418421a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTask.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the snapshot export task. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SnapshotExportTask { - public static final String SERIALIZED_NAME_COMMENT = "Comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public static final String SERIALIZED_NAME_OSU_EXPORT = "OsuExport"; - - @SerializedName(SERIALIZED_NAME_OSU_EXPORT) - private OsuExportSnapshotExportTask osuExport; - - public static final String SERIALIZED_NAME_PROGRESS = "Progress"; - - @SerializedName(SERIALIZED_NAME_PROGRESS) - private Integer progress; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_TASK_ID = "TaskId"; - - @SerializedName(SERIALIZED_NAME_TASK_ID) - private String taskId; - - public SnapshotExportTask() {} - - public SnapshotExportTask comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * If the snapshot export task fails, an error message appears. - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public SnapshotExportTask osuExport(OsuExportSnapshotExportTask osuExport) { - - this.osuExport = osuExport; - return this; - } - - /** - * Get osuExport - * - * @return osuExport - */ - @javax.annotation.Nullable - public OsuExportSnapshotExportTask getOsuExport() { - return osuExport; - } - - public void setOsuExport(OsuExportSnapshotExportTask osuExport) { - this.osuExport = osuExport; - } - - public SnapshotExportTask progress(Integer progress) { - - this.progress = progress; - return this; - } - - /** - * The progress of the snapshot export task, as a percentage. - * - * @return progress - */ - @javax.annotation.Nullable - public Integer getProgress() { - return progress; - } - - public void setProgress(Integer progress) { - this.progress = progress; - } - - public SnapshotExportTask snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot to be exported. - * - * @return snapshotId - */ - @javax.annotation.Nullable - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - public SnapshotExportTask state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the snapshot export task (`pending` \\| `active` \\| - * `completed` \\| `failed`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public SnapshotExportTask tags(List tags) { - - this.tags = tags; - return this; - } - - public SnapshotExportTask addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the snapshot export task. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public SnapshotExportTask taskId(String taskId) { - - this.taskId = taskId; - return this; - } - - /** - * The ID of the snapshot export task. - * - * @return taskId - */ - @javax.annotation.Nullable - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnapshotExportTask snapshotExportTask = (SnapshotExportTask) o; - return Objects.equals(this.comment, snapshotExportTask.comment) - && Objects.equals(this.osuExport, snapshotExportTask.osuExport) - && Objects.equals(this.progress, snapshotExportTask.progress) - && Objects.equals(this.snapshotId, snapshotExportTask.snapshotId) - && Objects.equals(this.state, snapshotExportTask.state) - && Objects.equals(this.tags, snapshotExportTask.tags) - && Objects.equals(this.taskId, snapshotExportTask.taskId); - } - - @Override - public int hashCode() { - return Objects.hash(comment, osuExport, progress, snapshotId, state, tags, taskId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotExportTask {\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" osuExport: ").append(toIndentedString(osuExport)).append("\n"); - sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Comment"); - openapiFields.add("OsuExport"); - openapiFields.add("Progress"); - openapiFields.add("SnapshotId"); - openapiFields.add("State"); - openapiFields.add("Tags"); - openapiFields.add("TaskId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SnapshotExportTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SnapshotExportTask.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SnapshotExportTask is not found in" - + " the empty JSON string", - SnapshotExportTask.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SnapshotExportTask.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SnapshotExportTask` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Comment") != null && !jsonObj.get("Comment").isJsonNull()) - && !jsonObj.get("Comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Comment").toString())); - } - // validate the optional field `OsuExport` - if (jsonObj.get("OsuExport") != null && !jsonObj.get("OsuExport").isJsonNull()) { - OsuExportSnapshotExportTask.validateJsonObject(jsonObj.getAsJsonObject("OsuExport")); - } - if ((jsonObj.get("SnapshotId") != null && !jsonObj.get("SnapshotId").isJsonNull()) - && !jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("TaskId") != null && !jsonObj.get("TaskId").isJsonNull()) - && !jsonObj.get("TaskId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TaskId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("TaskId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SnapshotExportTask.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SnapshotExportTask' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SnapshotExportTask.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SnapshotExportTask value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SnapshotExportTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SnapshotExportTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of SnapshotExportTask - * @throws IOException if the JSON string is invalid with respect to SnapshotExportTask - */ - public static SnapshotExportTask fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SnapshotExportTask.class); - } - - /** - * Convert an instance of SnapshotExportTask to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceNet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceNet.java deleted file mode 100644 index 91e3a685..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceNet.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the source Net. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SourceNet { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public SourceNet() {} - - public SourceNet accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * The account ID of the owner of the source Net. - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public SourceNet ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range for the source Net, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public SourceNet netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the source Net. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SourceNet sourceNet = (SourceNet) o; - return Objects.equals(this.accountId, sourceNet.accountId) - && Objects.equals(this.ipRange, sourceNet.ipRange) - && Objects.equals(this.netId, sourceNet.netId); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, ipRange, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SourceNet {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("IpRange"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SourceNet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SourceNet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SourceNet is not found in the empty" - + " JSON string", - SourceNet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SourceNet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SourceNet` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("AccountId") != null && !jsonObj.get("AccountId").isJsonNull()) - && !jsonObj.get("AccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccountId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccountId").toString())); - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SourceNet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SourceNet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SourceNet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SourceNet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SourceNet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SourceNet given an JSON string - * - * @param jsonString JSON string - * @return An instance of SourceNet - * @throws IOException if the JSON string is invalid with respect to SourceNet - */ - public static SourceNet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SourceNet.class); - } - - /** - * Convert an instance of SourceNet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroup.java deleted file mode 100644 index 435c6ae5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroup.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** - * Information about the source security group of the load balancer, which you can use as part of - * your inbound rules for your registered VMs.<br /> To only allow traffic from load - * balancers, add a security group rule that specifies this source security group as the inbound - * source. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SourceSecurityGroup { - public static final String SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID = "SecurityGroupAccountId"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ACCOUNT_ID) - private String securityGroupAccountId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_NAME = "SecurityGroupName"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_NAME) - private String securityGroupName; - - public SourceSecurityGroup() {} - - public SourceSecurityGroup securityGroupAccountId(String securityGroupAccountId) { - - this.securityGroupAccountId = securityGroupAccountId; - return this; - } - - /** - * The account ID of the owner of the security group. - * - * @return securityGroupAccountId - */ - @javax.annotation.Nullable - public String getSecurityGroupAccountId() { - return securityGroupAccountId; - } - - public void setSecurityGroupAccountId(String securityGroupAccountId) { - this.securityGroupAccountId = securityGroupAccountId; - } - - public SourceSecurityGroup securityGroupName(String securityGroupName) { - - this.securityGroupName = securityGroupName; - return this; - } - - /** - * The name of the security group. - * - * @return securityGroupName - */ - @javax.annotation.Nullable - public String getSecurityGroupName() { - return securityGroupName; - } - - public void setSecurityGroupName(String securityGroupName) { - this.securityGroupName = securityGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SourceSecurityGroup sourceSecurityGroup = (SourceSecurityGroup) o; - return Objects.equals( - this.securityGroupAccountId, sourceSecurityGroup.securityGroupAccountId) - && Objects.equals(this.securityGroupName, sourceSecurityGroup.securityGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(securityGroupAccountId, securityGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SourceSecurityGroup {\n"); - sb.append(" securityGroupAccountId: ") - .append(toIndentedString(securityGroupAccountId)) - .append("\n"); - sb.append(" securityGroupName: ") - .append(toIndentedString(securityGroupName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("SecurityGroupAccountId"); - openapiFields.add("SecurityGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SourceSecurityGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SourceSecurityGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SourceSecurityGroup is not found in" - + " the empty JSON string", - SourceSecurityGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SourceSecurityGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SourceSecurityGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("SecurityGroupAccountId") != null - && !jsonObj.get("SecurityGroupAccountId").isJsonNull()) - && !jsonObj.get("SecurityGroupAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupAccountId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("SecurityGroupAccountId").toString())); - } - if ((jsonObj.get("SecurityGroupName") != null - && !jsonObj.get("SecurityGroupName").isJsonNull()) - && !jsonObj.get("SecurityGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SourceSecurityGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SourceSecurityGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SourceSecurityGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SourceSecurityGroup value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SourceSecurityGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SourceSecurityGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of SourceSecurityGroup - * @throws IOException if the JSON string is invalid with respect to SourceSecurityGroup - */ - public static SourceSecurityGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SourceSecurityGroup.class); - } - - /** - * Convert an instance of SourceSecurityGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequest.java deleted file mode 100644 index 757f9672..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** StartVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StartVmsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = new ArrayList<>(); - - public StartVmsRequest() {} - - public StartVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public StartVmsRequest vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public StartVmsRequest addVmIdsItem(String vmIdsItem) { - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nonnull - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartVmsRequest startVmsRequest = (StartVmsRequest) o; - return Objects.equals(this.dryRun, startVmsRequest.dryRun) - && Objects.equals(this.vmIds, startVmsRequest.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StartVmsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StartVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StartVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StartVmsRequest is not found in the" - + " empty JSON string", - StartVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StartVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StartVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StartVmsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("VmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StartVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StartVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(StartVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, StartVmsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StartVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StartVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of StartVmsRequest - * @throws IOException if the JSON string is invalid with respect to StartVmsRequest - */ - public static StartVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StartVmsRequest.class); - } - - /** - * Convert an instance of StartVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponse.java deleted file mode 100644 index 40436214..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** StartVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StartVmsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VMS = "Vms"; - - @SerializedName(SERIALIZED_NAME_VMS) - private List vms = null; - - public StartVmsResponse() {} - - public StartVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public StartVmsResponse vms(List vms) { - - this.vms = vms; - return this; - } - - public StartVmsResponse addVmsItem(VmState vmsItem) { - if (this.vms == null) { - this.vms = new ArrayList<>(); - } - this.vms.add(vmsItem); - return this; - } - - /** - * Information about one or more started VMs. - * - * @return vms - */ - @javax.annotation.Nullable - public List getVms() { - return vms; - } - - public void setVms(List vms) { - this.vms = vms; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartVmsResponse startVmsResponse = (StartVmsResponse) o; - return Objects.equals(this.responseContext, startVmsResponse.responseContext) - && Objects.equals(this.vms, startVmsResponse.vms); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vms); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StartVmsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vms: ").append(toIndentedString(vms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Vms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StartVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StartVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StartVmsResponse is not found in the" - + " empty JSON string", - StartVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StartVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StartVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Vms") != null && !jsonObj.get("Vms").isJsonNull()) { - JsonArray jsonArrayvms = jsonObj.getAsJsonArray("Vms"); - if (jsonArrayvms != null) { - // ensure the json data is an array - if (!jsonObj.get("Vms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vms` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Vms").toString())); - } - - // validate the optional field `Vms` (array) - for (int i = 0; i < jsonArrayvms.size(); i++) { - VmState.validateJsonObject(jsonArrayvms.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StartVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StartVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(StartVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, StartVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StartVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StartVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StartVmsResponse - * @throws IOException if the JSON string is invalid with respect to StartVmsResponse - */ - public static StartVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StartVmsResponse.class); - } - - /** - * Convert an instance of StartVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StateComment.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/StateComment.java deleted file mode 100644 index 6f902282..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StateComment.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the change of state. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StateComment { - public static final String SERIALIZED_NAME_STATE_CODE = "StateCode"; - - @SerializedName(SERIALIZED_NAME_STATE_CODE) - private String stateCode; - - public static final String SERIALIZED_NAME_STATE_MESSAGE = "StateMessage"; - - @SerializedName(SERIALIZED_NAME_STATE_MESSAGE) - private String stateMessage; - - public StateComment() {} - - public StateComment stateCode(String stateCode) { - - this.stateCode = stateCode; - return this; - } - - /** - * The code of the change of state. - * - * @return stateCode - */ - @javax.annotation.Nullable - public String getStateCode() { - return stateCode; - } - - public void setStateCode(String stateCode) { - this.stateCode = stateCode; - } - - public StateComment stateMessage(String stateMessage) { - - this.stateMessage = stateMessage; - return this; - } - - /** - * A message explaining the change of state. - * - * @return stateMessage - */ - @javax.annotation.Nullable - public String getStateMessage() { - return stateMessage; - } - - public void setStateMessage(String stateMessage) { - this.stateMessage = stateMessage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StateComment stateComment = (StateComment) o; - return Objects.equals(this.stateCode, stateComment.stateCode) - && Objects.equals(this.stateMessage, stateComment.stateMessage); - } - - @Override - public int hashCode() { - return Objects.hash(stateCode, stateMessage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StateComment {\n"); - sb.append(" stateCode: ").append(toIndentedString(stateCode)).append("\n"); - sb.append(" stateMessage: ").append(toIndentedString(stateMessage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("StateCode"); - openapiFields.add("StateMessage"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StateComment - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StateComment.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StateComment is not found in the" - + " empty JSON string", - StateComment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StateComment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StateComment` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("StateCode") != null && !jsonObj.get("StateCode").isJsonNull()) - && !jsonObj.get("StateCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateCode").toString())); - } - if ((jsonObj.get("StateMessage") != null && !jsonObj.get("StateMessage").isJsonNull()) - && !jsonObj.get("StateMessage").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateMessage` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateMessage").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StateComment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StateComment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(StateComment.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, StateComment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StateComment read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StateComment given an JSON string - * - * @param jsonString JSON string - * @return An instance of StateComment - * @throws IOException if the JSON string is invalid with respect to StateComment - */ - public static StateComment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StateComment.class); - } - - /** - * Convert an instance of StateComment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequest.java deleted file mode 100644 index 4534c1f5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** StopVmsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopVmsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FORCE_STOP = "ForceStop"; - - @SerializedName(SERIALIZED_NAME_FORCE_STOP) - private Boolean forceStop; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = new ArrayList<>(); - - public StopVmsRequest() {} - - public StopVmsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public StopVmsRequest forceStop(Boolean forceStop) { - - this.forceStop = forceStop; - return this; - } - - /** - * Forces the VM to stop. - * - * @return forceStop - */ - @javax.annotation.Nullable - public Boolean getForceStop() { - return forceStop; - } - - public void setForceStop(Boolean forceStop) { - this.forceStop = forceStop; - } - - public StopVmsRequest vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public StopVmsRequest addVmIdsItem(String vmIdsItem) { - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * One or more IDs of VMs. - * - * @return vmIds - */ - @javax.annotation.Nonnull - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopVmsRequest stopVmsRequest = (StopVmsRequest) o; - return Objects.equals(this.dryRun, stopVmsRequest.dryRun) - && Objects.equals(this.forceStop, stopVmsRequest.forceStop) - && Objects.equals(this.vmIds, stopVmsRequest.vmIds); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, forceStop, vmIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopVmsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" forceStop: ").append(toIndentedString(forceStop)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ForceStop"); - openapiFields.add("VmIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StopVmsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StopVmsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StopVmsRequest is not found in the" - + " empty JSON string", - StopVmsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StopVmsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StopVmsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopVmsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the required json array is present - if (jsonObj.get("VmIds") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopVmsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopVmsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(StopVmsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, StopVmsRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopVmsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StopVmsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopVmsRequest - * @throws IOException if the JSON string is invalid with respect to StopVmsRequest - */ - public static StopVmsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopVmsRequest.class); - } - - /** - * Convert an instance of StopVmsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponse.java deleted file mode 100644 index 230def4d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** StopVmsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopVmsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VMS = "Vms"; - - @SerializedName(SERIALIZED_NAME_VMS) - private List vms = null; - - public StopVmsResponse() {} - - public StopVmsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public StopVmsResponse vms(List vms) { - - this.vms = vms; - return this; - } - - public StopVmsResponse addVmsItem(VmState vmsItem) { - if (this.vms == null) { - this.vms = new ArrayList<>(); - } - this.vms.add(vmsItem); - return this; - } - - /** - * Information about one or more stopped VMs. - * - * @return vms - */ - @javax.annotation.Nullable - public List getVms() { - return vms; - } - - public void setVms(List vms) { - this.vms = vms; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopVmsResponse stopVmsResponse = (StopVmsResponse) o; - return Objects.equals(this.responseContext, stopVmsResponse.responseContext) - && Objects.equals(this.vms, stopVmsResponse.vms); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vms); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopVmsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vms: ").append(toIndentedString(vms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Vms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StopVmsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StopVmsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in StopVmsResponse is not found in the" - + " empty JSON string", - StopVmsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StopVmsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `StopVmsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - if (jsonObj.get("Vms") != null && !jsonObj.get("Vms").isJsonNull()) { - JsonArray jsonArrayvms = jsonObj.getAsJsonArray("Vms"); - if (jsonArrayvms != null) { - // ensure the json data is an array - if (!jsonObj.get("Vms").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Vms` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Vms").toString())); - } - - // validate the optional field `Vms` (array) - for (int i = 0; i < jsonArrayvms.size(); i++) { - VmState.validateJsonObject(jsonArrayvms.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopVmsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopVmsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(StopVmsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, StopVmsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopVmsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of StopVmsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopVmsResponse - * @throws IOException if the JSON string is invalid with respect to StopVmsResponse - */ - public static StopVmsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopVmsResponse.class); - } - - /** - * Convert an instance of StopVmsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subnet.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subnet.java deleted file mode 100644 index 2034b477..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subnet.java +++ /dev/null @@ -1,469 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Subnet. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Subnet { - public static final String SERIALIZED_NAME_AVAILABLE_IPS_COUNT = "AvailableIpsCount"; - - @SerializedName(SERIALIZED_NAME_AVAILABLE_IPS_COUNT) - private Integer availableIpsCount; - - public static final String SERIALIZED_NAME_IP_RANGE = "IpRange"; - - @SerializedName(SERIALIZED_NAME_IP_RANGE) - private String ipRange; - - public static final String SERIALIZED_NAME_MAP_PUBLIC_IP_ON_LAUNCH = "MapPublicIpOnLaunch"; - - @SerializedName(SERIALIZED_NAME_MAP_PUBLIC_IP_ON_LAUNCH) - private Boolean mapPublicIpOnLaunch; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public Subnet() {} - - public Subnet availableIpsCount(Integer availableIpsCount) { - - this.availableIpsCount = availableIpsCount; - return this; - } - - /** - * The number of available IPs in the Subnets. - * - * @return availableIpsCount - */ - @javax.annotation.Nullable - public Integer getAvailableIpsCount() { - return availableIpsCount; - } - - public void setAvailableIpsCount(Integer availableIpsCount) { - this.availableIpsCount = availableIpsCount; - } - - public Subnet ipRange(String ipRange) { - - this.ipRange = ipRange; - return this; - } - - /** - * The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`). - * - * @return ipRange - */ - @javax.annotation.Nullable - public String getIpRange() { - return ipRange; - } - - public void setIpRange(String ipRange) { - this.ipRange = ipRange; - } - - public Subnet mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { - - this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; - return this; - } - - /** - * If true, a public IP is assigned to the network interface cards (NICs) created in the - * specified Subnet. - * - * @return mapPublicIpOnLaunch - */ - @javax.annotation.Nullable - public Boolean getMapPublicIpOnLaunch() { - return mapPublicIpOnLaunch; - } - - public void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { - this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; - } - - public Subnet netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net in which the Subnet is. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public Subnet state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the Subnet (`pending` \\| `available` \\| - * `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Subnet subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public Subnet subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion in which the Subnet is located. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public Subnet tags(List tags) { - - this.tags = tags; - return this; - } - - public Subnet addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the Subnet. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Subnet subnet = (Subnet) o; - return Objects.equals(this.availableIpsCount, subnet.availableIpsCount) - && Objects.equals(this.ipRange, subnet.ipRange) - && Objects.equals(this.mapPublicIpOnLaunch, subnet.mapPublicIpOnLaunch) - && Objects.equals(this.netId, subnet.netId) - && Objects.equals(this.state, subnet.state) - && Objects.equals(this.subnetId, subnet.subnetId) - && Objects.equals(this.subregionName, subnet.subregionName) - && Objects.equals(this.tags, subnet.tags); - } - - @Override - public int hashCode() { - return Objects.hash( - availableIpsCount, - ipRange, - mapPublicIpOnLaunch, - netId, - state, - subnetId, - subregionName, - tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Subnet {\n"); - sb.append(" availableIpsCount: ") - .append(toIndentedString(availableIpsCount)) - .append("\n"); - sb.append(" ipRange: ").append(toIndentedString(ipRange)).append("\n"); - sb.append(" mapPublicIpOnLaunch: ") - .append(toIndentedString(mapPublicIpOnLaunch)) - .append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AvailableIpsCount"); - openapiFields.add("IpRange"); - openapiFields.add("MapPublicIpOnLaunch"); - openapiFields.add("NetId"); - openapiFields.add("State"); - openapiFields.add("SubnetId"); - openapiFields.add("SubregionName"); - openapiFields.add("Tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Subnet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Subnet.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Subnet is not found in the empty JSON" - + " string", - Subnet.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Subnet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Subnet`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("IpRange") != null && !jsonObj.get("IpRange").isJsonNull()) - && !jsonObj.get("IpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRange` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("IpRange").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Subnet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Subnet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Subnet.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Subnet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Subnet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Subnet given an JSON string - * - * @param jsonString JSON string - * @return An instance of Subnet - * @throws IOException if the JSON string is invalid with respect to Subnet - */ - public static Subnet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Subnet.class); - } - - /** - * Convert an instance of Subnet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subregion.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subregion.java deleted file mode 100644 index 8c9b9031..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Subregion.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the Subregion. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Subregion { - public static final String SERIALIZED_NAME_LOCATION_CODE = "LocationCode"; - - @SerializedName(SERIALIZED_NAME_LOCATION_CODE) - private String locationCode; - - public static final String SERIALIZED_NAME_REGION_NAME = "RegionName"; - - @SerializedName(SERIALIZED_NAME_REGION_NAME) - private String regionName; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public Subregion() {} - - public Subregion locationCode(String locationCode) { - - this.locationCode = locationCode; - return this; - } - - /** - * The location code of the Subregion. - * - * @return locationCode - */ - @javax.annotation.Nullable - public String getLocationCode() { - return locationCode; - } - - public void setLocationCode(String locationCode) { - this.locationCode = locationCode; - } - - public Subregion regionName(String regionName) { - - this.regionName = regionName; - return this; - } - - /** - * The name of the Region containing the Subregion. - * - * @return regionName - */ - @javax.annotation.Nullable - public String getRegionName() { - return regionName; - } - - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - public Subregion state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the Subregion. - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Subregion subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Subregion subregion = (Subregion) o; - return Objects.equals(this.locationCode, subregion.locationCode) - && Objects.equals(this.regionName, subregion.regionName) - && Objects.equals(this.state, subregion.state) - && Objects.equals(this.subregionName, subregion.subregionName); - } - - @Override - public int hashCode() { - return Objects.hash(locationCode, regionName, state, subregionName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Subregion {\n"); - sb.append(" locationCode: ").append(toIndentedString(locationCode)).append("\n"); - sb.append(" regionName: ").append(toIndentedString(regionName)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LocationCode"); - openapiFields.add("RegionName"); - openapiFields.add("State"); - openapiFields.add("SubregionName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Subregion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Subregion.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Subregion is not found in the empty" - + " JSON string", - Subregion.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Subregion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Subregion` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LocationCode") != null && !jsonObj.get("LocationCode").isJsonNull()) - && !jsonObj.get("LocationCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LocationCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LocationCode").toString())); - } - if ((jsonObj.get("RegionName") != null && !jsonObj.get("RegionName").isJsonNull()) - && !jsonObj.get("RegionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RegionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RegionName").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Subregion.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Subregion' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Subregion.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Subregion value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Subregion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Subregion given an JSON string - * - * @param jsonString JSON string - * @return An instance of Subregion - * @throws IOException if the JSON string is invalid with respect to Subregion - */ - public static Subregion fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Subregion.class); - } - - /** - * Convert an instance of Subregion to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Tag.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Tag.java deleted file mode 100644 index ee304831..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Tag.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the tag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Tag { - public static final String SERIALIZED_NAME_KEY = "Key"; - - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_RESOURCE_ID = "ResourceId"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_ID) - private String resourceId; - - public static final String SERIALIZED_NAME_RESOURCE_TYPE = "ResourceType"; - - @SerializedName(SERIALIZED_NAME_RESOURCE_TYPE) - private String resourceType; - - public static final String SERIALIZED_NAME_VALUE = "Value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public Tag() {} - - public Tag key(String key) { - - this.key = key; - return this; - } - - /** - * The key of the tag, with a minimum of 1 character. - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public Tag resourceId(String resourceId) { - - this.resourceId = resourceId; - return this; - } - - /** - * The ID of the resource. - * - * @return resourceId - */ - @javax.annotation.Nullable - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - public Tag resourceType(String resourceType) { - - this.resourceType = resourceType; - return this; - } - - /** - * The type of the resource. - * - * @return resourceType - */ - @javax.annotation.Nullable - public String getResourceType() { - return resourceType; - } - - public void setResourceType(String resourceType) { - this.resourceType = resourceType; - } - - public Tag value(String value) { - - this.value = value; - return this; - } - - /** - * The value of the tag, between 0 and 255 characters. - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.key, tag.key) - && Objects.equals(this.resourceId, tag.resourceId) - && Objects.equals(this.resourceType, tag.resourceType) - && Objects.equals(this.value, tag.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, resourceId, resourceType, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); - sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Key"); - openapiFields.add("ResourceId"); - openapiFields.add("ResourceType"); - openapiFields.add("Value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Tag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Tag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Tag is not found in the empty JSON" - + " string", - Tag.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Tag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Tag`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Key") != null && !jsonObj.get("Key").isJsonNull()) - && !jsonObj.get("Key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Key").toString())); - } - if ((jsonObj.get("ResourceId") != null && !jsonObj.get("ResourceId").isJsonNull()) - && !jsonObj.get("ResourceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ResourceId").toString())); - } - if ((jsonObj.get("ResourceType") != null && !jsonObj.get("ResourceType").isJsonNull()) - && !jsonObj.get("ResourceType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ResourceType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ResourceType").toString())); - } - if ((jsonObj.get("Value") != null && !jsonObj.get("Value").isJsonNull()) - && !jsonObj.get("Value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Tag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Tag' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Tag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Tag value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Tag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Tag given an JSON string - * - * @param jsonString JSON string - * @return An instance of Tag - * @throws IOException if the JSON string is invalid with respect to Tag - */ - public static Tag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Tag.class); - } - - /** - * Convert an instance of Tag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequest.java deleted file mode 100644 index 69405263..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkFlexibleGpuRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkFlexibleGpuRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_ID = "FlexibleGpuId"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_ID) - private String flexibleGpuId; - - public UnlinkFlexibleGpuRequest() {} - - public UnlinkFlexibleGpuRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkFlexibleGpuRequest flexibleGpuId(String flexibleGpuId) { - - this.flexibleGpuId = flexibleGpuId; - return this; - } - - /** - * The ID of the fGPU you want to detach from your VM. - * - * @return flexibleGpuId - */ - @javax.annotation.Nonnull - public String getFlexibleGpuId() { - return flexibleGpuId; - } - - public void setFlexibleGpuId(String flexibleGpuId) { - this.flexibleGpuId = flexibleGpuId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest = (UnlinkFlexibleGpuRequest) o; - return Objects.equals(this.dryRun, unlinkFlexibleGpuRequest.dryRun) - && Objects.equals(this.flexibleGpuId, unlinkFlexibleGpuRequest.flexibleGpuId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, flexibleGpuId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkFlexibleGpuRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flexibleGpuId: ").append(toIndentedString(flexibleGpuId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("FlexibleGpuId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("FlexibleGpuId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkFlexibleGpuRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkFlexibleGpuRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkFlexibleGpuRequest is not found" - + " in the empty JSON string", - UnlinkFlexibleGpuRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkFlexibleGpuRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkFlexibleGpuRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkFlexibleGpuRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("FlexibleGpuId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpuId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkFlexibleGpuRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkFlexibleGpuRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkFlexibleGpuRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkFlexibleGpuRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkFlexibleGpuRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkFlexibleGpuRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkFlexibleGpuRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkFlexibleGpuRequest - */ - public static UnlinkFlexibleGpuRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkFlexibleGpuRequest.class); - } - - /** - * Convert an instance of UnlinkFlexibleGpuRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponse.java deleted file mode 100644 index b46a58c7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkFlexibleGpuResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkFlexibleGpuResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkFlexibleGpuResponse() {} - - public UnlinkFlexibleGpuResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkFlexibleGpuResponse unlinkFlexibleGpuResponse = (UnlinkFlexibleGpuResponse) o; - return Objects.equals(this.responseContext, unlinkFlexibleGpuResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkFlexibleGpuResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkFlexibleGpuResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkFlexibleGpuResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkFlexibleGpuResponse is not" - + " found in the empty JSON string", - UnlinkFlexibleGpuResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkFlexibleGpuResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkFlexibleGpuResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkFlexibleGpuResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkFlexibleGpuResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkFlexibleGpuResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkFlexibleGpuResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkFlexibleGpuResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkFlexibleGpuResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkFlexibleGpuResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkFlexibleGpuResponse - */ - public static UnlinkFlexibleGpuResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkFlexibleGpuResponse.class); - } - - /** - * Convert an instance of UnlinkFlexibleGpuResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequest.java deleted file mode 100644 index a757b052..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkInternetServiceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkInternetServiceRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_INTERNET_SERVICE_ID = "InternetServiceId"; - - @SerializedName(SERIALIZED_NAME_INTERNET_SERVICE_ID) - private String internetServiceId; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public UnlinkInternetServiceRequest() {} - - public UnlinkInternetServiceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkInternetServiceRequest internetServiceId(String internetServiceId) { - - this.internetServiceId = internetServiceId; - return this; - } - - /** - * The ID of the Internet service you want to detach. - * - * @return internetServiceId - */ - @javax.annotation.Nonnull - public String getInternetServiceId() { - return internetServiceId; - } - - public void setInternetServiceId(String internetServiceId) { - this.internetServiceId = internetServiceId; - } - - public UnlinkInternetServiceRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net from which you want to detach the Internet service. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkInternetServiceRequest unlinkInternetServiceRequest = - (UnlinkInternetServiceRequest) o; - return Objects.equals(this.dryRun, unlinkInternetServiceRequest.dryRun) - && Objects.equals( - this.internetServiceId, unlinkInternetServiceRequest.internetServiceId) - && Objects.equals(this.netId, unlinkInternetServiceRequest.netId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, internetServiceId, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkInternetServiceRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" internetServiceId: ") - .append(toIndentedString(internetServiceId)) - .append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("InternetServiceId"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("InternetServiceId"); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkInternetServiceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkInternetServiceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkInternetServiceRequest is not" - + " found in the empty JSON string", - UnlinkInternetServiceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkInternetServiceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkInternetServiceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkInternetServiceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("InternetServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `InternetServiceId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("InternetServiceId").toString())); - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkInternetServiceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkInternetServiceRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkInternetServiceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkInternetServiceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkInternetServiceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkInternetServiceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkInternetServiceRequest - * @throws IOException if the JSON string is invalid with respect to - * UnlinkInternetServiceRequest - */ - public static UnlinkInternetServiceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkInternetServiceRequest.class); - } - - /** - * Convert an instance of UnlinkInternetServiceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponse.java deleted file mode 100644 index 8ff55f37..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponse.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkInternetServiceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkInternetServiceResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkInternetServiceResponse() {} - - public UnlinkInternetServiceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkInternetServiceResponse unlinkInternetServiceResponse = - (UnlinkInternetServiceResponse) o; - return Objects.equals(this.responseContext, unlinkInternetServiceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkInternetServiceResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkInternetServiceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkInternetServiceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkInternetServiceResponse is not" - + " found in the empty JSON string", - UnlinkInternetServiceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkInternetServiceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkInternetServiceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkInternetServiceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkInternetServiceResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkInternetServiceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkInternetServiceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkInternetServiceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkInternetServiceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkInternetServiceResponse - * @throws IOException if the JSON string is invalid with respect to - * UnlinkInternetServiceResponse - */ - public static UnlinkInternetServiceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkInternetServiceResponse.class); - } - - /** - * Convert an instance of UnlinkInternetServiceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequest.java deleted file mode 100644 index 85f40ae3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequest.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkLoadBalancerBackendMachinesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkLoadBalancerBackendMachinesRequest { - public static final String SERIALIZED_NAME_BACKEND_IPS = "BackendIps"; - - @SerializedName(SERIALIZED_NAME_BACKEND_IPS) - private List backendIps = null; - - public static final String SERIALIZED_NAME_BACKEND_VM_IDS = "BackendVmIds"; - - @SerializedName(SERIALIZED_NAME_BACKEND_VM_IDS) - private List backendVmIds = null; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public UnlinkLoadBalancerBackendMachinesRequest() {} - - public UnlinkLoadBalancerBackendMachinesRequest backendIps(List backendIps) { - - this.backendIps = backendIps; - return this; - } - - public UnlinkLoadBalancerBackendMachinesRequest addBackendIpsItem(String backendIpsItem) { - if (this.backendIps == null) { - this.backendIps = new ArrayList<>(); - } - this.backendIps.add(backendIpsItem); - return this; - } - - /** - * One or more public IPs of backend VMs. - * - * @return backendIps - */ - @javax.annotation.Nullable - public List getBackendIps() { - return backendIps; - } - - public void setBackendIps(List backendIps) { - this.backendIps = backendIps; - } - - public UnlinkLoadBalancerBackendMachinesRequest backendVmIds(List backendVmIds) { - - this.backendVmIds = backendVmIds; - return this; - } - - public UnlinkLoadBalancerBackendMachinesRequest addBackendVmIdsItem(String backendVmIdsItem) { - if (this.backendVmIds == null) { - this.backendVmIds = new ArrayList<>(); - } - this.backendVmIds.add(backendVmIdsItem); - return this; - } - - /** - * One or more IDs of backend VMs. - * - * @return backendVmIds - */ - @javax.annotation.Nullable - public List getBackendVmIds() { - return backendVmIds; - } - - public void setBackendVmIds(List backendVmIds) { - this.backendVmIds = backendVmIds; - } - - public UnlinkLoadBalancerBackendMachinesRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkLoadBalancerBackendMachinesRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest = - (UnlinkLoadBalancerBackendMachinesRequest) o; - return Objects.equals(this.backendIps, unlinkLoadBalancerBackendMachinesRequest.backendIps) - && Objects.equals( - this.backendVmIds, unlinkLoadBalancerBackendMachinesRequest.backendVmIds) - && Objects.equals(this.dryRun, unlinkLoadBalancerBackendMachinesRequest.dryRun) - && Objects.equals( - this.loadBalancerName, - unlinkLoadBalancerBackendMachinesRequest.loadBalancerName); - } - - @Override - public int hashCode() { - return Objects.hash(backendIps, backendVmIds, dryRun, loadBalancerName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkLoadBalancerBackendMachinesRequest {\n"); - sb.append(" backendIps: ").append(toIndentedString(backendIps)).append("\n"); - sb.append(" backendVmIds: ").append(toIndentedString(backendVmIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BackendIps"); - openapiFields.add("BackendVmIds"); - openapiFields.add("DryRun"); - openapiFields.add("LoadBalancerName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkLoadBalancerBackendMachinesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkLoadBalancerBackendMachinesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " UnlinkLoadBalancerBackendMachinesRequest is not found in" - + " the empty JSON string", - UnlinkLoadBalancerBackendMachinesRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkLoadBalancerBackendMachinesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkLoadBalancerBackendMachinesRequest` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : - UnlinkLoadBalancerBackendMachinesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendIps") != null && !jsonObj.get("BackendIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("BackendIps").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("BackendVmIds") != null && !jsonObj.get("BackendVmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BackendVmIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("BackendVmIds").toString())); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkLoadBalancerBackendMachinesRequest.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'UnlinkLoadBalancerBackendMachinesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkLoadBalancerBackendMachinesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UnlinkLoadBalancerBackendMachinesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkLoadBalancerBackendMachinesRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkLoadBalancerBackendMachinesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkLoadBalancerBackendMachinesRequest - * @throws IOException if the JSON string is invalid with respect to - * UnlinkLoadBalancerBackendMachinesRequest - */ - public static UnlinkLoadBalancerBackendMachinesRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkLoadBalancerBackendMachinesRequest.class); - } - - /** - * Convert an instance of UnlinkLoadBalancerBackendMachinesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponse.java deleted file mode 100644 index a2689026..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponse.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkLoadBalancerBackendMachinesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkLoadBalancerBackendMachinesResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkLoadBalancerBackendMachinesResponse() {} - - public UnlinkLoadBalancerBackendMachinesResponse responseContext( - ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkLoadBalancerBackendMachinesResponse unlinkLoadBalancerBackendMachinesResponse = - (UnlinkLoadBalancerBackendMachinesResponse) o; - return Objects.equals( - this.responseContext, unlinkLoadBalancerBackendMachinesResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkLoadBalancerBackendMachinesResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkLoadBalancerBackendMachinesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkLoadBalancerBackendMachinesResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " UnlinkLoadBalancerBackendMachinesResponse is not found in" - + " the empty JSON string", - UnlinkLoadBalancerBackendMachinesResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkLoadBalancerBackendMachinesResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkLoadBalancerBackendMachinesResponse` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkLoadBalancerBackendMachinesResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'UnlinkLoadBalancerBackendMachinesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkLoadBalancerBackendMachinesResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UnlinkLoadBalancerBackendMachinesResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkLoadBalancerBackendMachinesResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkLoadBalancerBackendMachinesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkLoadBalancerBackendMachinesResponse - * @throws IOException if the JSON string is invalid with respect to - * UnlinkLoadBalancerBackendMachinesResponse - */ - public static UnlinkLoadBalancerBackendMachinesResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkLoadBalancerBackendMachinesResponse.class); - } - - /** - * Convert an instance of UnlinkLoadBalancerBackendMachinesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequest.java deleted file mode 100644 index 60519951..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequest.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkManagedPolicyFromUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkManagedPolicyFromUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public UnlinkManagedPolicyFromUserGroupRequest() {} - - public UnlinkManagedPolicyFromUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkManagedPolicyFromUserGroupRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public UnlinkManagedPolicyFromUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to unlink the policy from. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest = - (UnlinkManagedPolicyFromUserGroupRequest) o; - return Objects.equals(this.dryRun, unlinkManagedPolicyFromUserGroupRequest.dryRun) - && Objects.equals(this.policyOrn, unlinkManagedPolicyFromUserGroupRequest.policyOrn) - && Objects.equals( - this.userGroupName, unlinkManagedPolicyFromUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyOrn, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkManagedPolicyFromUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyOrn"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkManagedPolicyFromUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkManagedPolicyFromUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " UnlinkManagedPolicyFromUserGroupRequest is not found in" - + " the empty JSON string", - UnlinkManagedPolicyFromUserGroupRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkManagedPolicyFromUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkManagedPolicyFromUserGroupRequest` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkManagedPolicyFromUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkManagedPolicyFromUserGroupRequest.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes 'UnlinkManagedPolicyFromUserGroupRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkManagedPolicyFromUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UnlinkManagedPolicyFromUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkManagedPolicyFromUserGroupRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkManagedPolicyFromUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkManagedPolicyFromUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to - * UnlinkManagedPolicyFromUserGroupRequest - */ - public static UnlinkManagedPolicyFromUserGroupRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkManagedPolicyFromUserGroupRequest.class); - } - - /** - * Convert an instance of UnlinkManagedPolicyFromUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponse.java deleted file mode 100644 index a9db2cf7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponse.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkManagedPolicyFromUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkManagedPolicyFromUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkManagedPolicyFromUserGroupResponse() {} - - public UnlinkManagedPolicyFromUserGroupResponse responseContext( - ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkManagedPolicyFromUserGroupResponse unlinkManagedPolicyFromUserGroupResponse = - (UnlinkManagedPolicyFromUserGroupResponse) o; - return Objects.equals( - this.responseContext, unlinkManagedPolicyFromUserGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkManagedPolicyFromUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkManagedPolicyFromUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkManagedPolicyFromUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " UnlinkManagedPolicyFromUserGroupResponse is not found in" - + " the empty JSON string", - UnlinkManagedPolicyFromUserGroupResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkManagedPolicyFromUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkManagedPolicyFromUserGroupResponse` properties." - + " JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkManagedPolicyFromUserGroupResponse.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'UnlinkManagedPolicyFromUserGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkManagedPolicyFromUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UnlinkManagedPolicyFromUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkManagedPolicyFromUserGroupResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkManagedPolicyFromUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkManagedPolicyFromUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * UnlinkManagedPolicyFromUserGroupResponse - */ - public static UnlinkManagedPolicyFromUserGroupResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkManagedPolicyFromUserGroupResponse.class); - } - - /** - * Convert an instance of UnlinkManagedPolicyFromUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequest.java deleted file mode 100644 index 3de1cedd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkNicRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkNicRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LINK_NIC_ID = "LinkNicId"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC_ID) - private String linkNicId; - - public UnlinkNicRequest() {} - - public UnlinkNicRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkNicRequest linkNicId(String linkNicId) { - - this.linkNicId = linkNicId; - return this; - } - - /** - * The ID of the attachment operation. - * - * @return linkNicId - */ - @javax.annotation.Nonnull - public String getLinkNicId() { - return linkNicId; - } - - public void setLinkNicId(String linkNicId) { - this.linkNicId = linkNicId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkNicRequest unlinkNicRequest = (UnlinkNicRequest) o; - return Objects.equals(this.dryRun, unlinkNicRequest.dryRun) - && Objects.equals(this.linkNicId, unlinkNicRequest.linkNicId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, linkNicId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkNicRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" linkNicId: ").append(toIndentedString(linkNicId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LinkNicId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LinkNicId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkNicRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkNicRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkNicRequest is not found in the" - + " empty JSON string", - UnlinkNicRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkNicRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkNicRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkNicRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LinkNicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkNicId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LinkNicId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkNicRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkNicRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkNicRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkNicRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkNicRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkNicRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkNicRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkNicRequest - */ - public static UnlinkNicRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkNicRequest.class); - } - - /** - * Convert an instance of UnlinkNicRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponse.java deleted file mode 100644 index a5c5cfd3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkNicResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkNicResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkNicResponse() {} - - public UnlinkNicResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkNicResponse unlinkNicResponse = (UnlinkNicResponse) o; - return Objects.equals(this.responseContext, unlinkNicResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkNicResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkNicResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkNicResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkNicResponse is not found in the" - + " empty JSON string", - UnlinkNicResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkNicResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkNicResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkNicResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkNicResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkNicResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkNicResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkNicResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkNicResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkNicResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkNicResponse - */ - public static UnlinkNicResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkNicResponse.class); - } - - /** - * Convert an instance of UnlinkNicResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequest.java deleted file mode 100644 index e2421509..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_POLICY_ORN = "PolicyOrn"; - - @SerializedName(SERIALIZED_NAME_POLICY_ORN) - private String policyOrn; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public UnlinkPolicyRequest() {} - - public UnlinkPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkPolicyRequest policyOrn(String policyOrn) { - - this.policyOrn = policyOrn; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return policyOrn - */ - @javax.annotation.Nonnull - public String getPolicyOrn() { - return policyOrn; - } - - public void setPolicyOrn(String policyOrn) { - this.policyOrn = policyOrn; - } - - public UnlinkPolicyRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the user you want to detach the policy from. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPolicyRequest unlinkPolicyRequest = (UnlinkPolicyRequest) o; - return Objects.equals(this.dryRun, unlinkPolicyRequest.dryRun) - && Objects.equals(this.policyOrn, unlinkPolicyRequest.policyOrn) - && Objects.equals(this.userName, unlinkPolicyRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, policyOrn, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" policyOrn: ").append(toIndentedString(policyOrn)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PolicyOrn"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PolicyOrn"); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPolicyRequest is not found in" - + " the empty JSON string", - UnlinkPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("PolicyOrn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyOrn` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PolicyOrn").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPolicyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPolicyRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkPolicyRequest - */ - public static UnlinkPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPolicyRequest.class); - } - - /** - * Convert an instance of UnlinkPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponse.java deleted file mode 100644 index c14e91d0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPolicyResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkPolicyResponse() {} - - public UnlinkPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPolicyResponse unlinkPolicyResponse = (UnlinkPolicyResponse) o; - return Objects.equals(this.responseContext, unlinkPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPolicyResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPolicyResponse is not found in" - + " the empty JSON string", - UnlinkPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPolicyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPolicyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPolicyResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkPolicyResponse - */ - public static UnlinkPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPolicyResponse.class); - } - - /** - * Convert an instance of UnlinkPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequest.java deleted file mode 100644 index a35e6c12..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPrivateIpsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPrivateIpsRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_PRIVATE_IPS = "PrivateIps"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IPS) - private List privateIps = new ArrayList<>(); - - public UnlinkPrivateIpsRequest() {} - - public UnlinkPrivateIpsRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkPrivateIpsRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC. - * - * @return nicId - */ - @javax.annotation.Nonnull - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public UnlinkPrivateIpsRequest privateIps(List privateIps) { - - this.privateIps = privateIps; - return this; - } - - public UnlinkPrivateIpsRequest addPrivateIpsItem(String privateIpsItem) { - this.privateIps.add(privateIpsItem); - return this; - } - - /** - * One or more secondary private IPs you want to unassign from the NIC. - * - * @return privateIps - */ - @javax.annotation.Nonnull - public List getPrivateIps() { - return privateIps; - } - - public void setPrivateIps(List privateIps) { - this.privateIps = privateIps; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest = (UnlinkPrivateIpsRequest) o; - return Objects.equals(this.dryRun, unlinkPrivateIpsRequest.dryRun) - && Objects.equals(this.nicId, unlinkPrivateIpsRequest.nicId) - && Objects.equals(this.privateIps, unlinkPrivateIpsRequest.privateIps); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, nicId, privateIps); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPrivateIpsRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" privateIps: ").append(toIndentedString(privateIps)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NicId"); - openapiFields.add("PrivateIps"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NicId"); - openapiRequiredFields.add("PrivateIps"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPrivateIpsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPrivateIpsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPrivateIpsRequest is not found" - + " in the empty JSON string", - UnlinkPrivateIpsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPrivateIpsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPrivateIpsRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkPrivateIpsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - // ensure the required json array is present - if (jsonObj.get("PrivateIps") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("PrivateIps").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIps` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("PrivateIps").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPrivateIpsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPrivateIpsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPrivateIpsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPrivateIpsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPrivateIpsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPrivateIpsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPrivateIpsRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkPrivateIpsRequest - */ - public static UnlinkPrivateIpsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPrivateIpsRequest.class); - } - - /** - * Convert an instance of UnlinkPrivateIpsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponse.java deleted file mode 100644 index be4c053a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPrivateIpsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPrivateIpsResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkPrivateIpsResponse() {} - - public UnlinkPrivateIpsResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPrivateIpsResponse unlinkPrivateIpsResponse = (UnlinkPrivateIpsResponse) o; - return Objects.equals(this.responseContext, unlinkPrivateIpsResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPrivateIpsResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPrivateIpsResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPrivateIpsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPrivateIpsResponse is not found" - + " in the empty JSON string", - UnlinkPrivateIpsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPrivateIpsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPrivateIpsResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPrivateIpsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPrivateIpsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPrivateIpsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPrivateIpsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPrivateIpsResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPrivateIpsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPrivateIpsResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkPrivateIpsResponse - */ - public static UnlinkPrivateIpsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPrivateIpsResponse.class); - } - - /** - * Convert an instance of UnlinkPrivateIpsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequest.java deleted file mode 100644 index 5e28b7ca..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequest.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPublicIpRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPublicIpRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LINK_PUBLIC_IP_ID = "LinkPublicIpId"; - - @SerializedName(SERIALIZED_NAME_LINK_PUBLIC_IP_ID) - private String linkPublicIpId; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public UnlinkPublicIpRequest() {} - - public UnlinkPublicIpRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkPublicIpRequest linkPublicIpId(String linkPublicIpId) { - - this.linkPublicIpId = linkPublicIpId; - return this; - } - - /** - * The ID representing the association of the public IP with the VM or the NIC. This parameter - * is required unless you use the `PublicIp` parameter. - * - * @return linkPublicIpId - */ - @javax.annotation.Nullable - public String getLinkPublicIpId() { - return linkPublicIpId; - } - - public void setLinkPublicIpId(String linkPublicIpId) { - this.linkPublicIpId = linkPublicIpId; - } - - public UnlinkPublicIpRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP. This parameter is required unless you use the `LinkPublicIpId` - * parameter. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPublicIpRequest unlinkPublicIpRequest = (UnlinkPublicIpRequest) o; - return Objects.equals(this.dryRun, unlinkPublicIpRequest.dryRun) - && Objects.equals(this.linkPublicIpId, unlinkPublicIpRequest.linkPublicIpId) - && Objects.equals(this.publicIp, unlinkPublicIpRequest.publicIp); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, linkPublicIpId, publicIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPublicIpRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" linkPublicIpId: ").append(toIndentedString(linkPublicIpId)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LinkPublicIpId"); - openapiFields.add("PublicIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPublicIpRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPublicIpRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPublicIpRequest is not found in" - + " the empty JSON string", - UnlinkPublicIpRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPublicIpRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPublicIpRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkPublicIpId") != null && !jsonObj.get("LinkPublicIpId").isJsonNull()) - && !jsonObj.get("LinkPublicIpId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkPublicIpId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkPublicIpId").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPublicIpRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPublicIpRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPublicIpRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPublicIpRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPublicIpRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPublicIpRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPublicIpRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkPublicIpRequest - */ - public static UnlinkPublicIpRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPublicIpRequest.class); - } - - /** - * Convert an instance of UnlinkPublicIpRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponse.java deleted file mode 100644 index 0d25a8bb..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkPublicIpResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkPublicIpResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkPublicIpResponse() {} - - public UnlinkPublicIpResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkPublicIpResponse unlinkPublicIpResponse = (UnlinkPublicIpResponse) o; - return Objects.equals(this.responseContext, unlinkPublicIpResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkPublicIpResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkPublicIpResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkPublicIpResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkPublicIpResponse is not found" - + " in the empty JSON string", - UnlinkPublicIpResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkPublicIpResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkPublicIpResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkPublicIpResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkPublicIpResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkPublicIpResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkPublicIpResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkPublicIpResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkPublicIpResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkPublicIpResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkPublicIpResponse - */ - public static UnlinkPublicIpResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkPublicIpResponse.class); - } - - /** - * Convert an instance of UnlinkPublicIpResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequest.java deleted file mode 100644 index 705cb39b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkRouteTableRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkRouteTableRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_ID = "LinkRouteTableId"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_ID) - private String linkRouteTableId; - - public UnlinkRouteTableRequest() {} - - public UnlinkRouteTableRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkRouteTableRequest linkRouteTableId(String linkRouteTableId) { - - this.linkRouteTableId = linkRouteTableId; - return this; - } - - /** - * The ID of the association between the route table and the Subnet. - * - * @return linkRouteTableId - */ - @javax.annotation.Nonnull - public String getLinkRouteTableId() { - return linkRouteTableId; - } - - public void setLinkRouteTableId(String linkRouteTableId) { - this.linkRouteTableId = linkRouteTableId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkRouteTableRequest unlinkRouteTableRequest = (UnlinkRouteTableRequest) o; - return Objects.equals(this.dryRun, unlinkRouteTableRequest.dryRun) - && Objects.equals(this.linkRouteTableId, unlinkRouteTableRequest.linkRouteTableId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, linkRouteTableId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkRouteTableRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" linkRouteTableId: ").append(toIndentedString(linkRouteTableId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LinkRouteTableId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LinkRouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkRouteTableRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkRouteTableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkRouteTableRequest is not found" - + " in the empty JSON string", - UnlinkRouteTableRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkRouteTableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkRouteTableRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkRouteTableRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LinkRouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTableId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkRouteTableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkRouteTableRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkRouteTableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkRouteTableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkRouteTableRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkRouteTableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkRouteTableRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkRouteTableRequest - */ - public static UnlinkRouteTableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkRouteTableRequest.class); - } - - /** - * Convert an instance of UnlinkRouteTableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponse.java deleted file mode 100644 index 34b3bcca..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponse.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkRouteTableResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkRouteTableResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkRouteTableResponse() {} - - public UnlinkRouteTableResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkRouteTableResponse unlinkRouteTableResponse = (UnlinkRouteTableResponse) o; - return Objects.equals(this.responseContext, unlinkRouteTableResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkRouteTableResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkRouteTableResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkRouteTableResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkRouteTableResponse is not found" - + " in the empty JSON string", - UnlinkRouteTableResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkRouteTableResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkRouteTableResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkRouteTableResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkRouteTableResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkRouteTableResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkRouteTableResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkRouteTableResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkRouteTableResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkRouteTableResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkRouteTableResponse - */ - public static UnlinkRouteTableResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkRouteTableResponse.class); - } - - /** - * Convert an instance of UnlinkRouteTableResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequest.java deleted file mode 100644 index ae904afc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequest.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkVirtualGatewayRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkVirtualGatewayRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public UnlinkVirtualGatewayRequest() {} - - public UnlinkVirtualGatewayRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkVirtualGatewayRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net from which you want to detach the virtual gateway. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public UnlinkVirtualGatewayRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest = (UnlinkVirtualGatewayRequest) o; - return Objects.equals(this.dryRun, unlinkVirtualGatewayRequest.dryRun) - && Objects.equals(this.netId, unlinkVirtualGatewayRequest.netId) - && Objects.equals( - this.virtualGatewayId, unlinkVirtualGatewayRequest.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, netId, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkVirtualGatewayRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetId"); - openapiRequiredFields.add("VirtualGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkVirtualGatewayRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkVirtualGatewayRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkVirtualGatewayRequest is not" - + " found in the empty JSON string", - UnlinkVirtualGatewayRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkVirtualGatewayRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkVirtualGatewayRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkVirtualGatewayRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkVirtualGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkVirtualGatewayRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkVirtualGatewayRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkVirtualGatewayRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkVirtualGatewayRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkVirtualGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkVirtualGatewayRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkVirtualGatewayRequest - */ - public static UnlinkVirtualGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkVirtualGatewayRequest.class); - } - - /** - * Convert an instance of UnlinkVirtualGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponse.java deleted file mode 100644 index 89b44cc1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponse.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkVirtualGatewayResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkVirtualGatewayResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkVirtualGatewayResponse() {} - - public UnlinkVirtualGatewayResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkVirtualGatewayResponse unlinkVirtualGatewayResponse = - (UnlinkVirtualGatewayResponse) o; - return Objects.equals(this.responseContext, unlinkVirtualGatewayResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkVirtualGatewayResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UnlinkVirtualGatewayResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkVirtualGatewayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkVirtualGatewayResponse is not" - + " found in the empty JSON string", - UnlinkVirtualGatewayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkVirtualGatewayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkVirtualGatewayResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkVirtualGatewayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkVirtualGatewayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnlinkVirtualGatewayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkVirtualGatewayResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkVirtualGatewayResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkVirtualGatewayResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkVirtualGatewayResponse - * @throws IOException if the JSON string is invalid with respect to - * UnlinkVirtualGatewayResponse - */ - public static UnlinkVirtualGatewayResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkVirtualGatewayResponse.class); - } - - /** - * Convert an instance of UnlinkVirtualGatewayResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequest.java deleted file mode 100644 index 633a3681..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkVolumeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkVolumeRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FORCE_UNLINK = "ForceUnlink"; - - @SerializedName(SERIALIZED_NAME_FORCE_UNLINK) - private Boolean forceUnlink; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public UnlinkVolumeRequest() {} - - public UnlinkVolumeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UnlinkVolumeRequest forceUnlink(Boolean forceUnlink) { - - this.forceUnlink = forceUnlink; - return this; - } - - /** - * Forces the detachment of the volume in case of previous failure. Important: This action may - * damage your data or file systems. - * - * @return forceUnlink - */ - @javax.annotation.Nullable - public Boolean getForceUnlink() { - return forceUnlink; - } - - public void setForceUnlink(Boolean forceUnlink) { - this.forceUnlink = forceUnlink; - } - - public UnlinkVolumeRequest volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume you want to detach. - * - * @return volumeId - */ - @javax.annotation.Nonnull - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkVolumeRequest unlinkVolumeRequest = (UnlinkVolumeRequest) o; - return Objects.equals(this.dryRun, unlinkVolumeRequest.dryRun) - && Objects.equals(this.forceUnlink, unlinkVolumeRequest.forceUnlink) - && Objects.equals(this.volumeId, unlinkVolumeRequest.volumeId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, forceUnlink, volumeId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkVolumeRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" forceUnlink: ").append(toIndentedString(forceUnlink)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("ForceUnlink"); - openapiFields.add("VolumeId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VolumeId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkVolumeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkVolumeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkVolumeRequest is not found in" - + " the empty JSON string", - UnlinkVolumeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkVolumeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkVolumeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnlinkVolumeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkVolumeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkVolumeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkVolumeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkVolumeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkVolumeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkVolumeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkVolumeRequest - * @throws IOException if the JSON string is invalid with respect to UnlinkVolumeRequest - */ - public static UnlinkVolumeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkVolumeRequest.class); - } - - /** - * Convert an instance of UnlinkVolumeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponse.java deleted file mode 100644 index 51d1693d..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UnlinkVolumeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnlinkVolumeResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UnlinkVolumeResponse() {} - - public UnlinkVolumeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnlinkVolumeResponse unlinkVolumeResponse = (UnlinkVolumeResponse) o; - return Objects.equals(this.responseContext, unlinkVolumeResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnlinkVolumeResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnlinkVolumeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnlinkVolumeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnlinkVolumeResponse is not found in" - + " the empty JSON string", - UnlinkVolumeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnlinkVolumeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnlinkVolumeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnlinkVolumeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnlinkVolumeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnlinkVolumeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnlinkVolumeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnlinkVolumeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnlinkVolumeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnlinkVolumeResponse - * @throws IOException if the JSON string is invalid with respect to UnlinkVolumeResponse - */ - public static UnlinkVolumeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnlinkVolumeResponse.class); - } - - /** - * Convert an instance of UnlinkVolumeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequest.java deleted file mode 100644 index e4af9655..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequest.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateAccessKeyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateAccessKeyRequest { - public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "AccessKeyId"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) - private String accessKeyId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "ExpirationDate"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private OffsetDateTime expirationDate; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public UpdateAccessKeyRequest() {} - - public UpdateAccessKeyRequest accessKeyId(String accessKeyId) { - - this.accessKeyId = accessKeyId; - return this; - } - - /** - * The ID of the access key. - * - * @return accessKeyId - */ - @javax.annotation.Nonnull - public String getAccessKeyId() { - return accessKeyId; - } - - public void setAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - } - - public UpdateAccessKeyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateAccessKeyRequest expirationDate(OffsetDateTime expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * The date and time, or the date, at which you want the access key to expire, in ISO 8601 - * format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). If not - * specified, the access key is set to not expire. - * - * @return expirationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - } - - public UpdateAccessKeyRequest state(String state) { - - this.state = state; - return this; - } - - /** - * The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set to - * `ACTIVE`, the access key is enabled and can be used to send requests. When set to - * `INACTIVE`, the access key is disabled. - * - * @return state - */ - @javax.annotation.Nonnull - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public UpdateAccessKeyRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user that the access key you want to modify is associated with. If you do - * not specify a user name, this action modifies the access key of the user who sends the - * request (which can be the root account). - * - * @return userName - */ - @javax.annotation.Nullable - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateAccessKeyRequest updateAccessKeyRequest = (UpdateAccessKeyRequest) o; - return Objects.equals(this.accessKeyId, updateAccessKeyRequest.accessKeyId) - && Objects.equals(this.dryRun, updateAccessKeyRequest.dryRun) - && Objects.equals(this.expirationDate, updateAccessKeyRequest.expirationDate) - && Objects.equals(this.state, updateAccessKeyRequest.state) - && Objects.equals(this.userName, updateAccessKeyRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(accessKeyId, dryRun, expirationDate, state, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateAccessKeyRequest {\n"); - sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKeyId"); - openapiFields.add("DryRun"); - openapiFields.add("ExpirationDate"); - openapiFields.add("State"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AccessKeyId"); - openapiRequiredFields.add("State"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAccessKeyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAccessKeyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateAccessKeyRequest is not found" - + " in the empty JSON string", - UpdateAccessKeyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateAccessKeyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateAccessKeyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateAccessKeyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("AccessKeyId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AccessKeyId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("AccessKeyId").toString())); - } - if (!jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("UserName") != null && !jsonObj.get("UserName").isJsonNull()) - && !jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateAccessKeyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateAccessKeyRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateAccessKeyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateAccessKeyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateAccessKeyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateAccessKeyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAccessKeyRequest - * @throws IOException if the JSON string is invalid with respect to UpdateAccessKeyRequest - */ - public static UpdateAccessKeyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateAccessKeyRequest.class); - } - - /** - * Convert an instance of UpdateAccessKeyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponse.java deleted file mode 100644 index 6ed521df..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateAccessKeyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateAccessKeyResponse { - public static final String SERIALIZED_NAME_ACCESS_KEY = "AccessKey"; - - @SerializedName(SERIALIZED_NAME_ACCESS_KEY) - private AccessKey accessKey; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateAccessKeyResponse() {} - - public UpdateAccessKeyResponse accessKey(AccessKey accessKey) { - - this.accessKey = accessKey; - return this; - } - - /** - * Get accessKey - * - * @return accessKey - */ - @javax.annotation.Nullable - public AccessKey getAccessKey() { - return accessKey; - } - - public void setAccessKey(AccessKey accessKey) { - this.accessKey = accessKey; - } - - public UpdateAccessKeyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateAccessKeyResponse updateAccessKeyResponse = (UpdateAccessKeyResponse) o; - return Objects.equals(this.accessKey, updateAccessKeyResponse.accessKey) - && Objects.equals(this.responseContext, updateAccessKeyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(accessKey, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateAccessKeyResponse {\n"); - sb.append(" accessKey: ").append(toIndentedString(accessKey)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessKey"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAccessKeyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAccessKeyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateAccessKeyResponse is not found" - + " in the empty JSON string", - UpdateAccessKeyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateAccessKeyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateAccessKeyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `AccessKey` - if (jsonObj.get("AccessKey") != null && !jsonObj.get("AccessKey").isJsonNull()) { - AccessKey.validateJsonObject(jsonObj.getAsJsonObject("AccessKey")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateAccessKeyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateAccessKeyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateAccessKeyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateAccessKeyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateAccessKeyResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateAccessKeyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAccessKeyResponse - * @throws IOException if the JSON string is invalid with respect to UpdateAccessKeyResponse - */ - public static UpdateAccessKeyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateAccessKeyResponse.class); - } - - /** - * Convert an instance of UpdateAccessKeyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequest.java deleted file mode 100644 index d6bc1f56..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequest.java +++ /dev/null @@ -1,687 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateAccountRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateAccountRequest { - public static final String SERIALIZED_NAME_ADDITIONAL_EMAILS = "AdditionalEmails"; - - @SerializedName(SERIALIZED_NAME_ADDITIONAL_EMAILS) - private List additionalEmails = null; - - public static final String SERIALIZED_NAME_CITY = "City"; - - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "CompanyName"; - - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTRY = "Country"; - - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_EMAIL = "Email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_FIRST_NAME = "FirstName"; - - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_JOB_TITLE = "JobTitle"; - - @SerializedName(SERIALIZED_NAME_JOB_TITLE) - private String jobTitle; - - public static final String SERIALIZED_NAME_LAST_NAME = "LastName"; - - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_MOBILE_NUMBER = "MobileNumber"; - - @SerializedName(SERIALIZED_NAME_MOBILE_NUMBER) - private String mobileNumber; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "PhoneNumber"; - - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_STATE_PROVINCE = "StateProvince"; - - @SerializedName(SERIALIZED_NAME_STATE_PROVINCE) - private String stateProvince; - - public static final String SERIALIZED_NAME_VAT_NUMBER = "VatNumber"; - - @SerializedName(SERIALIZED_NAME_VAT_NUMBER) - private String vatNumber; - - public static final String SERIALIZED_NAME_ZIP_CODE = "ZipCode"; - - @SerializedName(SERIALIZED_NAME_ZIP_CODE) - private String zipCode; - - public UpdateAccountRequest() {} - - public UpdateAccountRequest additionalEmails(List additionalEmails) { - - this.additionalEmails = additionalEmails; - return this; - } - - public UpdateAccountRequest addAdditionalEmailsItem(String additionalEmailsItem) { - if (this.additionalEmails == null) { - this.additionalEmails = new ArrayList<>(); - } - this.additionalEmails.add(additionalEmailsItem); - return this; - } - - /** - * One or more additional email addresses for the account. These addresses are used for - * notifications only. If you already have a list of additional emails registered, you cannot - * add to it, only replace it. To remove all registered additional emails, specify an empty - * list. - * - * @return additionalEmails - */ - @javax.annotation.Nullable - public List getAdditionalEmails() { - return additionalEmails; - } - - public void setAdditionalEmails(List additionalEmails) { - this.additionalEmails = additionalEmails; - } - - public UpdateAccountRequest city(String city) { - - this.city = city; - return this; - } - - /** - * The new city of the account owner. - * - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public UpdateAccountRequest companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * The new name of the company for the account. - * - * @return companyName - */ - @javax.annotation.Nullable - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - public UpdateAccountRequest country(String country) { - - this.country = country; - return this; - } - - /** - * The new country of the account owner. - * - * @return country - */ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public UpdateAccountRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateAccountRequest email(String email) { - - this.email = email; - return this; - } - - /** - * The main email address for the account. This address is used for your credentials and - * notifications. - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public UpdateAccountRequest firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * The new first name of the account owner. - * - * @return firstName - */ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public UpdateAccountRequest jobTitle(String jobTitle) { - - this.jobTitle = jobTitle; - return this; - } - - /** - * The new job title of the account owner. - * - * @return jobTitle - */ - @javax.annotation.Nullable - public String getJobTitle() { - return jobTitle; - } - - public void setJobTitle(String jobTitle) { - this.jobTitle = jobTitle; - } - - public UpdateAccountRequest lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * The new last name of the account owner. - * - * @return lastName - */ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public UpdateAccountRequest mobileNumber(String mobileNumber) { - - this.mobileNumber = mobileNumber; - return this; - } - - /** - * The new mobile phone number of the account owner. - * - * @return mobileNumber - */ - @javax.annotation.Nullable - public String getMobileNumber() { - return mobileNumber; - } - - public void setMobileNumber(String mobileNumber) { - this.mobileNumber = mobileNumber; - } - - public UpdateAccountRequest phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * The new landline phone number of the account owner. - * - * @return phoneNumber - */ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - public UpdateAccountRequest stateProvince(String stateProvince) { - - this.stateProvince = stateProvince; - return this; - } - - /** - * The new state/province of the account owner. - * - * @return stateProvince - */ - @javax.annotation.Nullable - public String getStateProvince() { - return stateProvince; - } - - public void setStateProvince(String stateProvince) { - this.stateProvince = stateProvince; - } - - public UpdateAccountRequest vatNumber(String vatNumber) { - - this.vatNumber = vatNumber; - return this; - } - - /** - * The new value added tax (VAT) number for the account. - * - * @return vatNumber - */ - @javax.annotation.Nullable - public String getVatNumber() { - return vatNumber; - } - - public void setVatNumber(String vatNumber) { - this.vatNumber = vatNumber; - } - - public UpdateAccountRequest zipCode(String zipCode) { - - this.zipCode = zipCode; - return this; - } - - /** - * The new ZIP code of the city. - * - * @return zipCode - */ - @javax.annotation.Nullable - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateAccountRequest updateAccountRequest = (UpdateAccountRequest) o; - return Objects.equals(this.additionalEmails, updateAccountRequest.additionalEmails) - && Objects.equals(this.city, updateAccountRequest.city) - && Objects.equals(this.companyName, updateAccountRequest.companyName) - && Objects.equals(this.country, updateAccountRequest.country) - && Objects.equals(this.dryRun, updateAccountRequest.dryRun) - && Objects.equals(this.email, updateAccountRequest.email) - && Objects.equals(this.firstName, updateAccountRequest.firstName) - && Objects.equals(this.jobTitle, updateAccountRequest.jobTitle) - && Objects.equals(this.lastName, updateAccountRequest.lastName) - && Objects.equals(this.mobileNumber, updateAccountRequest.mobileNumber) - && Objects.equals(this.phoneNumber, updateAccountRequest.phoneNumber) - && Objects.equals(this.stateProvince, updateAccountRequest.stateProvince) - && Objects.equals(this.vatNumber, updateAccountRequest.vatNumber) - && Objects.equals(this.zipCode, updateAccountRequest.zipCode); - } - - @Override - public int hashCode() { - return Objects.hash( - additionalEmails, - city, - companyName, - country, - dryRun, - email, - firstName, - jobTitle, - lastName, - mobileNumber, - phoneNumber, - stateProvince, - vatNumber, - zipCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateAccountRequest {\n"); - sb.append(" additionalEmails: ").append(toIndentedString(additionalEmails)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" mobileNumber: ").append(toIndentedString(mobileNumber)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" stateProvince: ").append(toIndentedString(stateProvince)).append("\n"); - sb.append(" vatNumber: ").append(toIndentedString(vatNumber)).append("\n"); - sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AdditionalEmails"); - openapiFields.add("City"); - openapiFields.add("CompanyName"); - openapiFields.add("Country"); - openapiFields.add("DryRun"); - openapiFields.add("Email"); - openapiFields.add("FirstName"); - openapiFields.add("JobTitle"); - openapiFields.add("LastName"); - openapiFields.add("MobileNumber"); - openapiFields.add("PhoneNumber"); - openapiFields.add("StateProvince"); - openapiFields.add("VatNumber"); - openapiFields.add("ZipCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAccountRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAccountRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateAccountRequest is not found in" - + " the empty JSON string", - UpdateAccountRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateAccountRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AdditionalEmails") != null - && !jsonObj.get("AdditionalEmails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AdditionalEmails` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AdditionalEmails").toString())); - } - if ((jsonObj.get("City") != null && !jsonObj.get("City").isJsonNull()) - && !jsonObj.get("City").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `City` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("City").toString())); - } - if ((jsonObj.get("CompanyName") != null && !jsonObj.get("CompanyName").isJsonNull()) - && !jsonObj.get("CompanyName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CompanyName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CompanyName").toString())); - } - if ((jsonObj.get("Country") != null && !jsonObj.get("Country").isJsonNull()) - && !jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Country` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Country").toString())); - } - if ((jsonObj.get("Email") != null && !jsonObj.get("Email").isJsonNull()) - && !jsonObj.get("Email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Email").toString())); - } - if ((jsonObj.get("FirstName") != null && !jsonObj.get("FirstName").isJsonNull()) - && !jsonObj.get("FirstName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FirstName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FirstName").toString())); - } - if ((jsonObj.get("JobTitle") != null && !jsonObj.get("JobTitle").isJsonNull()) - && !jsonObj.get("JobTitle").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `JobTitle` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("JobTitle").toString())); - } - if ((jsonObj.get("LastName") != null && !jsonObj.get("LastName").isJsonNull()) - && !jsonObj.get("LastName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LastName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("LastName").toString())); - } - if ((jsonObj.get("MobileNumber") != null && !jsonObj.get("MobileNumber").isJsonNull()) - && !jsonObj.get("MobileNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MobileNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("MobileNumber").toString())); - } - if ((jsonObj.get("PhoneNumber") != null && !jsonObj.get("PhoneNumber").isJsonNull()) - && !jsonObj.get("PhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PhoneNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PhoneNumber").toString())); - } - if ((jsonObj.get("StateProvince") != null && !jsonObj.get("StateProvince").isJsonNull()) - && !jsonObj.get("StateProvince").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateProvince` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateProvince").toString())); - } - if ((jsonObj.get("VatNumber") != null && !jsonObj.get("VatNumber").isJsonNull()) - && !jsonObj.get("VatNumber").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VatNumber` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VatNumber").toString())); - } - if ((jsonObj.get("ZipCode") != null && !jsonObj.get("ZipCode").isJsonNull()) - && !jsonObj.get("ZipCode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ZipCode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ZipCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateAccountRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateAccountRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateAccountRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateAccountRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateAccountRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAccountRequest - * @throws IOException if the JSON string is invalid with respect to UpdateAccountRequest - */ - public static UpdateAccountRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateAccountRequest.class); - } - - /** - * Convert an instance of UpdateAccountRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponse.java deleted file mode 100644 index 9ac291aa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateAccountResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateAccountResponse { - public static final String SERIALIZED_NAME_ACCOUNT = "Account"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Account account; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateAccountResponse() {} - - public UpdateAccountResponse account(Account account) { - - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nullable - public Account getAccount() { - return account; - } - - public void setAccount(Account account) { - this.account = account; - } - - public UpdateAccountResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateAccountResponse updateAccountResponse = (UpdateAccountResponse) o; - return Objects.equals(this.account, updateAccountResponse.account) - && Objects.equals(this.responseContext, updateAccountResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(account, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateAccountResponse {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Account"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAccountResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAccountResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateAccountResponse is not found in" - + " the empty JSON string", - UpdateAccountResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateAccountResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateAccountResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Account` - if (jsonObj.get("Account") != null && !jsonObj.get("Account").isJsonNull()) { - Account.validateJsonObject(jsonObj.getAsJsonObject("Account")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateAccountResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateAccountResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateAccountResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateAccountResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateAccountResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateAccountResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAccountResponse - * @throws IOException if the JSON string is invalid with respect to UpdateAccountResponse - */ - public static UpdateAccountResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateAccountResponse.class); - } - - /** - * Convert an instance of UpdateAccountResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequest.java deleted file mode 100644 index d8c12cae..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateApiAccessPolicyRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApiAccessPolicyRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_MAX_ACCESS_KEY_EXPIRATION_SECONDS = - "MaxAccessKeyExpirationSeconds"; - - @SerializedName(SERIALIZED_NAME_MAX_ACCESS_KEY_EXPIRATION_SECONDS) - private Long maxAccessKeyExpirationSeconds; - - public static final String SERIALIZED_NAME_REQUIRE_TRUSTED_ENV = "RequireTrustedEnv"; - - @SerializedName(SERIALIZED_NAME_REQUIRE_TRUSTED_ENV) - private Boolean requireTrustedEnv; - - public UpdateApiAccessPolicyRequest() {} - - public UpdateApiAccessPolicyRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateApiAccessPolicyRequest maxAccessKeyExpirationSeconds( - Long maxAccessKeyExpirationSeconds) { - - this.maxAccessKeyExpirationSeconds = maxAccessKeyExpirationSeconds; - return this; - } - - /** - * The maximum possible lifetime for your access keys, in seconds (between `0` and - * `3153600000`, both included). If set to `O`, your access keys can have - * unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access - * keys must have an expiration date. This value must be greater than the remaining lifetime of - * each access key of your account. - * - * @return maxAccessKeyExpirationSeconds - */ - @javax.annotation.Nonnull - public Long getMaxAccessKeyExpirationSeconds() { - return maxAccessKeyExpirationSeconds; - } - - public void setMaxAccessKeyExpirationSeconds(Long maxAccessKeyExpirationSeconds) { - this.maxAccessKeyExpirationSeconds = maxAccessKeyExpirationSeconds; - } - - public UpdateApiAccessPolicyRequest requireTrustedEnv(Boolean requireTrustedEnv) { - - this.requireTrustedEnv = requireTrustedEnv; - return this; - } - - /** - * If true, a trusted session is activated, provided that you specify the - * `MaxAccessKeyExpirationSeconds` parameter with a value greater than - * `0`.<br /> Enabling this will require you and all your users to log in to - * Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, - * see [About Authentication > Multi-Factor - * Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_factor_authentication). - * - * @return requireTrustedEnv - */ - @javax.annotation.Nonnull - public Boolean getRequireTrustedEnv() { - return requireTrustedEnv; - } - - public void setRequireTrustedEnv(Boolean requireTrustedEnv) { - this.requireTrustedEnv = requireTrustedEnv; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest = - (UpdateApiAccessPolicyRequest) o; - return Objects.equals(this.dryRun, updateApiAccessPolicyRequest.dryRun) - && Objects.equals( - this.maxAccessKeyExpirationSeconds, - updateApiAccessPolicyRequest.maxAccessKeyExpirationSeconds) - && Objects.equals( - this.requireTrustedEnv, updateApiAccessPolicyRequest.requireTrustedEnv); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, maxAccessKeyExpirationSeconds, requireTrustedEnv); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApiAccessPolicyRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" maxAccessKeyExpirationSeconds: ") - .append(toIndentedString(maxAccessKeyExpirationSeconds)) - .append("\n"); - sb.append(" requireTrustedEnv: ") - .append(toIndentedString(requireTrustedEnv)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("MaxAccessKeyExpirationSeconds"); - openapiFields.add("RequireTrustedEnv"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("MaxAccessKeyExpirationSeconds"); - openapiRequiredFields.add("RequireTrustedEnv"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateApiAccessPolicyRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateApiAccessPolicyRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateApiAccessPolicyRequest is not" - + " found in the empty JSON string", - UpdateApiAccessPolicyRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateApiAccessPolicyRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateApiAccessPolicyRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateApiAccessPolicyRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApiAccessPolicyRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApiAccessPolicyRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateApiAccessPolicyRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApiAccessPolicyRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateApiAccessPolicyRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateApiAccessPolicyRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApiAccessPolicyRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateApiAccessPolicyRequest - */ - public static UpdateApiAccessPolicyRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApiAccessPolicyRequest.class); - } - - /** - * Convert an instance of UpdateApiAccessPolicyRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponse.java deleted file mode 100644 index d0f1f92e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponse.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateApiAccessPolicyResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApiAccessPolicyResponse { - public static final String SERIALIZED_NAME_API_ACCESS_POLICY = "ApiAccessPolicy"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_POLICY) - private ApiAccessPolicy apiAccessPolicy; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateApiAccessPolicyResponse() {} - - public UpdateApiAccessPolicyResponse apiAccessPolicy(ApiAccessPolicy apiAccessPolicy) { - - this.apiAccessPolicy = apiAccessPolicy; - return this; - } - - /** - * Get apiAccessPolicy - * - * @return apiAccessPolicy - */ - @javax.annotation.Nullable - public ApiAccessPolicy getApiAccessPolicy() { - return apiAccessPolicy; - } - - public void setApiAccessPolicy(ApiAccessPolicy apiAccessPolicy) { - this.apiAccessPolicy = apiAccessPolicy; - } - - public UpdateApiAccessPolicyResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApiAccessPolicyResponse updateApiAccessPolicyResponse = - (UpdateApiAccessPolicyResponse) o; - return Objects.equals(this.apiAccessPolicy, updateApiAccessPolicyResponse.apiAccessPolicy) - && Objects.equals( - this.responseContext, updateApiAccessPolicyResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessPolicy, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApiAccessPolicyResponse {\n"); - sb.append(" apiAccessPolicy: ").append(toIndentedString(apiAccessPolicy)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessPolicy"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateApiAccessPolicyResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateApiAccessPolicyResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateApiAccessPolicyResponse is not" - + " found in the empty JSON string", - UpdateApiAccessPolicyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateApiAccessPolicyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateApiAccessPolicyResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ApiAccessPolicy` - if (jsonObj.get("ApiAccessPolicy") != null - && !jsonObj.get("ApiAccessPolicy").isJsonNull()) { - ApiAccessPolicy.validateJsonObject(jsonObj.getAsJsonObject("ApiAccessPolicy")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApiAccessPolicyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApiAccessPolicyResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateApiAccessPolicyResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApiAccessPolicyResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateApiAccessPolicyResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateApiAccessPolicyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApiAccessPolicyResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateApiAccessPolicyResponse - */ - public static UpdateApiAccessPolicyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApiAccessPolicyResponse.class); - } - - /** - * Convert an instance of UpdateApiAccessPolicyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequest.java deleted file mode 100644 index ee07e760..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateApiAccessRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApiAccessRuleRequest { - public static final String SERIALIZED_NAME_API_ACCESS_RULE_ID = "ApiAccessRuleId"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE_ID) - private String apiAccessRuleId; - - public static final String SERIALIZED_NAME_CA_IDS = "CaIds"; - - @SerializedName(SERIALIZED_NAME_CA_IDS) - private List caIds = null; - - public static final String SERIALIZED_NAME_CNS = "Cns"; - - @SerializedName(SERIALIZED_NAME_CNS) - private List cns = null; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IP_RANGES = "IpRanges"; - - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges = null; - - public UpdateApiAccessRuleRequest() {} - - public UpdateApiAccessRuleRequest apiAccessRuleId(String apiAccessRuleId) { - - this.apiAccessRuleId = apiAccessRuleId; - return this; - } - - /** - * The ID of the API access rule you want to update. - * - * @return apiAccessRuleId - */ - @javax.annotation.Nonnull - public String getApiAccessRuleId() { - return apiAccessRuleId; - } - - public void setApiAccessRuleId(String apiAccessRuleId) { - this.apiAccessRuleId = apiAccessRuleId; - } - - public UpdateApiAccessRuleRequest caIds(List caIds) { - - this.caIds = caIds; - return this; - } - - public UpdateApiAccessRuleRequest addCaIdsItem(String caIdsItem) { - if (this.caIds == null) { - this.caIds = new ArrayList<>(); - } - this.caIds.add(caIdsItem); - return this; - } - - /** - * One or more IDs of Client Certificate Authorities (CAs). - * - * @return caIds - */ - @javax.annotation.Nullable - public List getCaIds() { - return caIds; - } - - public void setCaIds(List caIds) { - this.caIds = caIds; - } - - public UpdateApiAccessRuleRequest cns(List cns) { - - this.cns = cns; - return this; - } - - public UpdateApiAccessRuleRequest addCnsItem(String cnsItem) { - if (this.cns == null) { - this.cns = new ArrayList<>(); - } - this.cns.add(cnsItem); - return this; - } - - /** - * One or more Client Certificate Common Names (CNs). - * - * @return cns - */ - @javax.annotation.Nullable - public List getCns() { - return cns; - } - - public void setCns(List cns) { - this.cns = cns; - } - - public UpdateApiAccessRuleRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A new description for the API access rule. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateApiAccessRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateApiAccessRuleRequest ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public UpdateApiAccessRuleRequest addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). - * - * @return ipRanges - */ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApiAccessRuleRequest updateApiAccessRuleRequest = (UpdateApiAccessRuleRequest) o; - return Objects.equals(this.apiAccessRuleId, updateApiAccessRuleRequest.apiAccessRuleId) - && Objects.equals(this.caIds, updateApiAccessRuleRequest.caIds) - && Objects.equals(this.cns, updateApiAccessRuleRequest.cns) - && Objects.equals(this.description, updateApiAccessRuleRequest.description) - && Objects.equals(this.dryRun, updateApiAccessRuleRequest.dryRun) - && Objects.equals(this.ipRanges, updateApiAccessRuleRequest.ipRanges); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRuleId, caIds, cns, description, dryRun, ipRanges); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApiAccessRuleRequest {\n"); - sb.append(" apiAccessRuleId: ").append(toIndentedString(apiAccessRuleId)).append("\n"); - sb.append(" caIds: ").append(toIndentedString(caIds)).append("\n"); - sb.append(" cns: ").append(toIndentedString(cns)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRuleId"); - openapiFields.add("CaIds"); - openapiFields.add("Cns"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("IpRanges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ApiAccessRuleId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateApiAccessRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateApiAccessRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateApiAccessRuleRequest is not" - + " found in the empty JSON string", - UpdateApiAccessRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateApiAccessRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateApiAccessRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateApiAccessRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("ApiAccessRuleId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ApiAccessRuleId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ApiAccessRuleId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("CaIds") != null && !jsonObj.get("CaIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("CaIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("Cns") != null && !jsonObj.get("Cns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Cns` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("Cns").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("IpRanges") != null && !jsonObj.get("IpRanges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `IpRanges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("IpRanges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApiAccessRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApiAccessRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateApiAccessRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApiAccessRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateApiAccessRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateApiAccessRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApiAccessRuleRequest - * @throws IOException if the JSON string is invalid with respect to UpdateApiAccessRuleRequest - */ - public static UpdateApiAccessRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApiAccessRuleRequest.class); - } - - /** - * Convert an instance of UpdateApiAccessRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponse.java deleted file mode 100644 index 1b06f4c3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateApiAccessRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApiAccessRuleResponse { - public static final String SERIALIZED_NAME_API_ACCESS_RULE = "ApiAccessRule"; - - @SerializedName(SERIALIZED_NAME_API_ACCESS_RULE) - private ApiAccessRule apiAccessRule; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateApiAccessRuleResponse() {} - - public UpdateApiAccessRuleResponse apiAccessRule(ApiAccessRule apiAccessRule) { - - this.apiAccessRule = apiAccessRule; - return this; - } - - /** - * Get apiAccessRule - * - * @return apiAccessRule - */ - @javax.annotation.Nullable - public ApiAccessRule getApiAccessRule() { - return apiAccessRule; - } - - public void setApiAccessRule(ApiAccessRule apiAccessRule) { - this.apiAccessRule = apiAccessRule; - } - - public UpdateApiAccessRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApiAccessRuleResponse updateApiAccessRuleResponse = (UpdateApiAccessRuleResponse) o; - return Objects.equals(this.apiAccessRule, updateApiAccessRuleResponse.apiAccessRule) - && Objects.equals( - this.responseContext, updateApiAccessRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(apiAccessRule, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApiAccessRuleResponse {\n"); - sb.append(" apiAccessRule: ").append(toIndentedString(apiAccessRule)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ApiAccessRule"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateApiAccessRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateApiAccessRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateApiAccessRuleResponse is not" - + " found in the empty JSON string", - UpdateApiAccessRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateApiAccessRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateApiAccessRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ApiAccessRule` - if (jsonObj.get("ApiAccessRule") != null && !jsonObj.get("ApiAccessRule").isJsonNull()) { - ApiAccessRule.validateJsonObject(jsonObj.getAsJsonObject("ApiAccessRule")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApiAccessRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApiAccessRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateApiAccessRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApiAccessRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateApiAccessRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateApiAccessRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApiAccessRuleResponse - * @throws IOException if the JSON string is invalid with respect to UpdateApiAccessRuleResponse - */ - public static UpdateApiAccessRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApiAccessRuleResponse.class); - } - - /** - * Convert an instance of UpdateApiAccessRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequest.java deleted file mode 100644 index 0ff61c7b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateCaRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCaRequest { - public static final String SERIALIZED_NAME_CA_ID = "CaId"; - - @SerializedName(SERIALIZED_NAME_CA_ID) - private String caId; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public UpdateCaRequest() {} - - public UpdateCaRequest caId(String caId) { - - this.caId = caId; - return this; - } - - /** - * The ID of the CA. - * - * @return caId - */ - @javax.annotation.Nonnull - public String getCaId() { - return caId; - } - - public void setCaId(String caId) { - this.caId = caId; - } - - public UpdateCaRequest description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the CA. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateCaRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCaRequest updateCaRequest = (UpdateCaRequest) o; - return Objects.equals(this.caId, updateCaRequest.caId) - && Objects.equals(this.description, updateCaRequest.description) - && Objects.equals(this.dryRun, updateCaRequest.dryRun); - } - - @Override - public int hashCode() { - return Objects.hash(caId, description, dryRun); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCaRequest {\n"); - sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CaId"); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CaId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateCaRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateCaRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateCaRequest is not found in the" - + " empty JSON string", - UpdateCaRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateCaRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateCaRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCaRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("CaId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CaId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("CaId").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCaRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCaRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateCaRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCaRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCaRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCaRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCaRequest - * @throws IOException if the JSON string is invalid with respect to UpdateCaRequest - */ - public static UpdateCaRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCaRequest.class); - } - - /** - * Convert an instance of UpdateCaRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponse.java deleted file mode 100644 index ed084eaa..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateCaResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCaResponse { - public static final String SERIALIZED_NAME_CA = "Ca"; - - @SerializedName(SERIALIZED_NAME_CA) - private Ca ca; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateCaResponse() {} - - public UpdateCaResponse ca(Ca ca) { - - this.ca = ca; - return this; - } - - /** - * Get ca - * - * @return ca - */ - @javax.annotation.Nullable - public Ca getCa() { - return ca; - } - - public void setCa(Ca ca) { - this.ca = ca; - } - - public UpdateCaResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCaResponse updateCaResponse = (UpdateCaResponse) o; - return Objects.equals(this.ca, updateCaResponse.ca) - && Objects.equals(this.responseContext, updateCaResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(ca, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCaResponse {\n"); - sb.append(" ca: ").append(toIndentedString(ca)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Ca"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateCaResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateCaResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateCaResponse is not found in the" - + " empty JSON string", - UpdateCaResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateCaResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateCaResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Ca` - if (jsonObj.get("Ca") != null && !jsonObj.get("Ca").isJsonNull()) { - Ca.validateJsonObject(jsonObj.getAsJsonObject("Ca")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCaResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCaResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateCaResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCaResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCaResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCaResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCaResponse - * @throws IOException if the JSON string is invalid with respect to UpdateCaResponse - */ - public static UpdateCaResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCaResponse.class); - } - - /** - * Convert an instance of UpdateCaResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequest.java deleted file mode 100644 index 91395d74..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateDedicatedGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDedicatedGroupRequest { - public static final String SERIALIZED_NAME_DEDICATED_GROUP_ID = "DedicatedGroupId"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP_ID) - private String dedicatedGroupId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public UpdateDedicatedGroupRequest() {} - - public UpdateDedicatedGroupRequest dedicatedGroupId(String dedicatedGroupId) { - - this.dedicatedGroupId = dedicatedGroupId; - return this; - } - - /** - * The ID of the dedicated group you want to update. - * - * @return dedicatedGroupId - */ - @javax.annotation.Nonnull - public String getDedicatedGroupId() { - return dedicatedGroupId; - } - - public void setDedicatedGroupId(String dedicatedGroupId) { - this.dedicatedGroupId = dedicatedGroupId; - } - - public UpdateDedicatedGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateDedicatedGroupRequest name(String name) { - - this.name = name; - return this; - } - - /** - * The new name of the dedicated group. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDedicatedGroupRequest updateDedicatedGroupRequest = (UpdateDedicatedGroupRequest) o; - return Objects.equals(this.dedicatedGroupId, updateDedicatedGroupRequest.dedicatedGroupId) - && Objects.equals(this.dryRun, updateDedicatedGroupRequest.dryRun) - && Objects.equals(this.name, updateDedicatedGroupRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(dedicatedGroupId, dryRun, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDedicatedGroupRequest {\n"); - sb.append(" dedicatedGroupId: ").append(toIndentedString(dedicatedGroupId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DedicatedGroupId"); - openapiFields.add("DryRun"); - openapiFields.add("Name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DedicatedGroupId"); - openapiRequiredFields.add("Name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateDedicatedGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateDedicatedGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateDedicatedGroupRequest is not" - + " found in the empty JSON string", - UpdateDedicatedGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateDedicatedGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateDedicatedGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateDedicatedGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DedicatedGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DedicatedGroupId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DedicatedGroupId").toString())); - } - if (!jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDedicatedGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDedicatedGroupRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateDedicatedGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDedicatedGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDedicatedGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDedicatedGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDedicatedGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateDedicatedGroupRequest - */ - public static UpdateDedicatedGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDedicatedGroupRequest.class); - } - - /** - * Convert an instance of UpdateDedicatedGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponse.java deleted file mode 100644 index a209d8b1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateDedicatedGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDedicatedGroupResponse { - public static final String SERIALIZED_NAME_DEDICATED_GROUP = "DedicatedGroup"; - - @SerializedName(SERIALIZED_NAME_DEDICATED_GROUP) - private DedicatedGroup dedicatedGroup; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateDedicatedGroupResponse() {} - - public UpdateDedicatedGroupResponse dedicatedGroup(DedicatedGroup dedicatedGroup) { - - this.dedicatedGroup = dedicatedGroup; - return this; - } - - /** - * Get dedicatedGroup - * - * @return dedicatedGroup - */ - @javax.annotation.Nullable - public DedicatedGroup getDedicatedGroup() { - return dedicatedGroup; - } - - public void setDedicatedGroup(DedicatedGroup dedicatedGroup) { - this.dedicatedGroup = dedicatedGroup; - } - - public UpdateDedicatedGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDedicatedGroupResponse updateDedicatedGroupResponse = - (UpdateDedicatedGroupResponse) o; - return Objects.equals(this.dedicatedGroup, updateDedicatedGroupResponse.dedicatedGroup) - && Objects.equals( - this.responseContext, updateDedicatedGroupResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(dedicatedGroup, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDedicatedGroupResponse {\n"); - sb.append(" dedicatedGroup: ").append(toIndentedString(dedicatedGroup)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DedicatedGroup"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateDedicatedGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateDedicatedGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateDedicatedGroupResponse is not" - + " found in the empty JSON string", - UpdateDedicatedGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateDedicatedGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateDedicatedGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DedicatedGroup` - if (jsonObj.get("DedicatedGroup") != null && !jsonObj.get("DedicatedGroup").isJsonNull()) { - DedicatedGroup.validateJsonObject(jsonObj.getAsJsonObject("DedicatedGroup")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDedicatedGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDedicatedGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateDedicatedGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDedicatedGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDedicatedGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDedicatedGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDedicatedGroupResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateDedicatedGroupResponse - */ - public static UpdateDedicatedGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDedicatedGroupResponse.class); - } - - /** - * Convert an instance of UpdateDedicatedGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequest.java deleted file mode 100644 index 1c29b7cc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequest.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateDirectLinkInterfaceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDirectLinkInterfaceRequest { - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID = "DirectLinkInterfaceId"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE_ID) - private String directLinkInterfaceId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - /** - * The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always - * `1500`). - */ - @JsonAdapter(MtuEnum.Adapter.class) - public enum MtuEnum { - NUMBER_1500(1500); - - private Integer value; - - MtuEnum(Integer value) { - this.value = value; - } - - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MtuEnum fromValue(Integer value) { - for (MtuEnum b : MtuEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MtuEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MtuEnum read(final JsonReader jsonReader) throws IOException { - Integer value = jsonReader.nextInt(); - return MtuEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_MTU = "Mtu"; - - @SerializedName(SERIALIZED_NAME_MTU) - private MtuEnum mtu; - - public UpdateDirectLinkInterfaceRequest() {} - - public UpdateDirectLinkInterfaceRequest directLinkInterfaceId(String directLinkInterfaceId) { - - this.directLinkInterfaceId = directLinkInterfaceId; - return this; - } - - /** - * The ID of the DirectLink interface you want to update. - * - * @return directLinkInterfaceId - */ - @javax.annotation.Nonnull - public String getDirectLinkInterfaceId() { - return directLinkInterfaceId; - } - - public void setDirectLinkInterfaceId(String directLinkInterfaceId) { - this.directLinkInterfaceId = directLinkInterfaceId; - } - - public UpdateDirectLinkInterfaceRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateDirectLinkInterfaceRequest mtu(MtuEnum mtu) { - - this.mtu = mtu; - return this; - } - - /** - * The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always - * `1500`). - * - * @return mtu - */ - @javax.annotation.Nonnull - public MtuEnum getMtu() { - return mtu; - } - - public void setMtu(MtuEnum mtu) { - this.mtu = mtu; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest = - (UpdateDirectLinkInterfaceRequest) o; - return Objects.equals( - this.directLinkInterfaceId, - updateDirectLinkInterfaceRequest.directLinkInterfaceId) - && Objects.equals(this.dryRun, updateDirectLinkInterfaceRequest.dryRun) - && Objects.equals(this.mtu, updateDirectLinkInterfaceRequest.mtu); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkInterfaceId, dryRun, mtu); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDirectLinkInterfaceRequest {\n"); - sb.append(" directLinkInterfaceId: ") - .append(toIndentedString(directLinkInterfaceId)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" mtu: ").append(toIndentedString(mtu)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkInterfaceId"); - openapiFields.add("DryRun"); - openapiFields.add("Mtu"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DirectLinkInterfaceId"); - openapiRequiredFields.add("Mtu"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateDirectLinkInterfaceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateDirectLinkInterfaceRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateDirectLinkInterfaceRequest is" - + " not found in the empty JSON string", - UpdateDirectLinkInterfaceRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateDirectLinkInterfaceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateDirectLinkInterfaceRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateDirectLinkInterfaceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DirectLinkInterfaceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DirectLinkInterfaceId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("DirectLinkInterfaceId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDirectLinkInterfaceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDirectLinkInterfaceRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateDirectLinkInterfaceRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDirectLinkInterfaceRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDirectLinkInterfaceRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDirectLinkInterfaceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDirectLinkInterfaceRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateDirectLinkInterfaceRequest - */ - public static UpdateDirectLinkInterfaceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDirectLinkInterfaceRequest.class); - } - - /** - * Convert an instance of UpdateDirectLinkInterfaceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponse.java deleted file mode 100644 index 9dba2e9f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponse.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateDirectLinkInterfaceResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDirectLinkInterfaceResponse { - public static final String SERIALIZED_NAME_DIRECT_LINK_INTERFACE = "DirectLinkInterface"; - - @SerializedName(SERIALIZED_NAME_DIRECT_LINK_INTERFACE) - private DirectLinkInterfaces directLinkInterface; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateDirectLinkInterfaceResponse() {} - - public UpdateDirectLinkInterfaceResponse directLinkInterface( - DirectLinkInterfaces directLinkInterface) { - - this.directLinkInterface = directLinkInterface; - return this; - } - - /** - * Get directLinkInterface - * - * @return directLinkInterface - */ - @javax.annotation.Nullable - public DirectLinkInterfaces getDirectLinkInterface() { - return directLinkInterface; - } - - public void setDirectLinkInterface(DirectLinkInterfaces directLinkInterface) { - this.directLinkInterface = directLinkInterface; - } - - public UpdateDirectLinkInterfaceResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDirectLinkInterfaceResponse updateDirectLinkInterfaceResponse = - (UpdateDirectLinkInterfaceResponse) o; - return Objects.equals( - this.directLinkInterface, - updateDirectLinkInterfaceResponse.directLinkInterface) - && Objects.equals( - this.responseContext, updateDirectLinkInterfaceResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(directLinkInterface, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDirectLinkInterfaceResponse {\n"); - sb.append(" directLinkInterface: ") - .append(toIndentedString(directLinkInterface)) - .append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DirectLinkInterface"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateDirectLinkInterfaceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateDirectLinkInterfaceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateDirectLinkInterfaceResponse is" - + " not found in the empty JSON string", - UpdateDirectLinkInterfaceResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateDirectLinkInterfaceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateDirectLinkInterfaceResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `DirectLinkInterface` - if (jsonObj.get("DirectLinkInterface") != null - && !jsonObj.get("DirectLinkInterface").isJsonNull()) { - DirectLinkInterfaces.validateJsonObject(jsonObj.getAsJsonObject("DirectLinkInterface")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDirectLinkInterfaceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDirectLinkInterfaceResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateDirectLinkInterfaceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDirectLinkInterfaceResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDirectLinkInterfaceResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDirectLinkInterfaceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDirectLinkInterfaceResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateDirectLinkInterfaceResponse - */ - public static UpdateDirectLinkInterfaceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDirectLinkInterfaceResponse.class); - } - - /** - * Convert an instance of UpdateDirectLinkInterfaceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequest.java deleted file mode 100644 index e0ef90ab..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateFlexibleGpuRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateFlexibleGpuRequest { - public static final String SERIALIZED_NAME_DELETE_ON_VM_DELETION = "DeleteOnVmDeletion"; - - @SerializedName(SERIALIZED_NAME_DELETE_ON_VM_DELETION) - private Boolean deleteOnVmDeletion; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_FLEXIBLE_GPU_ID = "FlexibleGpuId"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU_ID) - private String flexibleGpuId; - - public UpdateFlexibleGpuRequest() {} - - public UpdateFlexibleGpuRequest deleteOnVmDeletion(Boolean deleteOnVmDeletion) { - - this.deleteOnVmDeletion = deleteOnVmDeletion; - return this; - } - - /** - * If true, the fGPU is deleted when the VM is terminated. - * - * @return deleteOnVmDeletion - */ - @javax.annotation.Nullable - public Boolean getDeleteOnVmDeletion() { - return deleteOnVmDeletion; - } - - public void setDeleteOnVmDeletion(Boolean deleteOnVmDeletion) { - this.deleteOnVmDeletion = deleteOnVmDeletion; - } - - public UpdateFlexibleGpuRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateFlexibleGpuRequest flexibleGpuId(String flexibleGpuId) { - - this.flexibleGpuId = flexibleGpuId; - return this; - } - - /** - * The ID of the fGPU you want to modify. - * - * @return flexibleGpuId - */ - @javax.annotation.Nonnull - public String getFlexibleGpuId() { - return flexibleGpuId; - } - - public void setFlexibleGpuId(String flexibleGpuId) { - this.flexibleGpuId = flexibleGpuId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateFlexibleGpuRequest updateFlexibleGpuRequest = (UpdateFlexibleGpuRequest) o; - return Objects.equals(this.deleteOnVmDeletion, updateFlexibleGpuRequest.deleteOnVmDeletion) - && Objects.equals(this.dryRun, updateFlexibleGpuRequest.dryRun) - && Objects.equals(this.flexibleGpuId, updateFlexibleGpuRequest.flexibleGpuId); - } - - @Override - public int hashCode() { - return Objects.hash(deleteOnVmDeletion, dryRun, flexibleGpuId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateFlexibleGpuRequest {\n"); - sb.append(" deleteOnVmDeletion: ") - .append(toIndentedString(deleteOnVmDeletion)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" flexibleGpuId: ").append(toIndentedString(flexibleGpuId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DeleteOnVmDeletion"); - openapiFields.add("DryRun"); - openapiFields.add("FlexibleGpuId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("FlexibleGpuId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateFlexibleGpuRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateFlexibleGpuRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateFlexibleGpuRequest is not found" - + " in the empty JSON string", - UpdateFlexibleGpuRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateFlexibleGpuRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateFlexibleGpuRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateFlexibleGpuRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("FlexibleGpuId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `FlexibleGpuId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("FlexibleGpuId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateFlexibleGpuRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateFlexibleGpuRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateFlexibleGpuRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateFlexibleGpuRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateFlexibleGpuRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateFlexibleGpuRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateFlexibleGpuRequest - * @throws IOException if the JSON string is invalid with respect to UpdateFlexibleGpuRequest - */ - public static UpdateFlexibleGpuRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateFlexibleGpuRequest.class); - } - - /** - * Convert an instance of UpdateFlexibleGpuRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponse.java deleted file mode 100644 index eacb96f8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateFlexibleGpuResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateFlexibleGpuResponse { - public static final String SERIALIZED_NAME_FLEXIBLE_GPU = "FlexibleGpu"; - - @SerializedName(SERIALIZED_NAME_FLEXIBLE_GPU) - private FlexibleGpu flexibleGpu; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateFlexibleGpuResponse() {} - - public UpdateFlexibleGpuResponse flexibleGpu(FlexibleGpu flexibleGpu) { - - this.flexibleGpu = flexibleGpu; - return this; - } - - /** - * Get flexibleGpu - * - * @return flexibleGpu - */ - @javax.annotation.Nullable - public FlexibleGpu getFlexibleGpu() { - return flexibleGpu; - } - - public void setFlexibleGpu(FlexibleGpu flexibleGpu) { - this.flexibleGpu = flexibleGpu; - } - - public UpdateFlexibleGpuResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateFlexibleGpuResponse updateFlexibleGpuResponse = (UpdateFlexibleGpuResponse) o; - return Objects.equals(this.flexibleGpu, updateFlexibleGpuResponse.flexibleGpu) - && Objects.equals(this.responseContext, updateFlexibleGpuResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(flexibleGpu, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateFlexibleGpuResponse {\n"); - sb.append(" flexibleGpu: ").append(toIndentedString(flexibleGpu)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("FlexibleGpu"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateFlexibleGpuResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateFlexibleGpuResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateFlexibleGpuResponse is not" - + " found in the empty JSON string", - UpdateFlexibleGpuResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateFlexibleGpuResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateFlexibleGpuResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `FlexibleGpu` - if (jsonObj.get("FlexibleGpu") != null && !jsonObj.get("FlexibleGpu").isJsonNull()) { - FlexibleGpu.validateJsonObject(jsonObj.getAsJsonObject("FlexibleGpu")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateFlexibleGpuResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateFlexibleGpuResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateFlexibleGpuResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateFlexibleGpuResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateFlexibleGpuResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateFlexibleGpuResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateFlexibleGpuResponse - * @throws IOException if the JSON string is invalid with respect to UpdateFlexibleGpuResponse - */ - public static UpdateFlexibleGpuResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateFlexibleGpuResponse.class); - } - - /** - * Convert an instance of UpdateFlexibleGpuResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequest.java deleted file mode 100644 index 7e25d883..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateImageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateImageRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH = "PermissionsToLaunch"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_LAUNCH) - private PermissionsOnResourceCreation permissionsToLaunch; - - public UpdateImageRequest() {} - - public UpdateImageRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A new description for the image. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateImageRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateImageRequest imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI you want to modify. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public UpdateImageRequest permissionsToLaunch( - PermissionsOnResourceCreation permissionsToLaunch) { - - this.permissionsToLaunch = permissionsToLaunch; - return this; - } - - /** - * Get permissionsToLaunch - * - * @return permissionsToLaunch - */ - @javax.annotation.Nullable - public PermissionsOnResourceCreation getPermissionsToLaunch() { - return permissionsToLaunch; - } - - public void setPermissionsToLaunch(PermissionsOnResourceCreation permissionsToLaunch) { - this.permissionsToLaunch = permissionsToLaunch; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateImageRequest updateImageRequest = (UpdateImageRequest) o; - return Objects.equals(this.description, updateImageRequest.description) - && Objects.equals(this.dryRun, updateImageRequest.dryRun) - && Objects.equals(this.imageId, updateImageRequest.imageId) - && Objects.equals(this.permissionsToLaunch, updateImageRequest.permissionsToLaunch); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, imageId, permissionsToLaunch); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateImageRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" permissionsToLaunch: ") - .append(toIndentedString(permissionsToLaunch)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("ImageId"); - openapiFields.add("PermissionsToLaunch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ImageId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateImageRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateImageRequest is not found in" - + " the empty JSON string", - UpdateImageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateImageRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateImageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - // validate the optional field `PermissionsToLaunch` - if (jsonObj.get("PermissionsToLaunch") != null - && !jsonObj.get("PermissionsToLaunch").isJsonNull()) { - PermissionsOnResourceCreation.validateJsonObject( - jsonObj.getAsJsonObject("PermissionsToLaunch")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateImageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateImageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateImageRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateImageRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateImageRequest - * @throws IOException if the JSON string is invalid with respect to UpdateImageRequest - */ - public static UpdateImageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateImageRequest.class); - } - - /** - * Convert an instance of UpdateImageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponse.java deleted file mode 100644 index 9f3f5ba6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateImageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateImageResponse { - public static final String SERIALIZED_NAME_IMAGE = "Image"; - - @SerializedName(SERIALIZED_NAME_IMAGE) - private Image image; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateImageResponse() {} - - public UpdateImageResponse image(Image image) { - - this.image = image; - return this; - } - - /** - * Get image - * - * @return image - */ - @javax.annotation.Nullable - public Image getImage() { - return image; - } - - public void setImage(Image image) { - this.image = image; - } - - public UpdateImageResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateImageResponse updateImageResponse = (UpdateImageResponse) o; - return Objects.equals(this.image, updateImageResponse.image) - && Objects.equals(this.responseContext, updateImageResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(image, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateImageResponse {\n"); - sb.append(" image: ").append(toIndentedString(image)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Image"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateImageResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateImageResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateImageResponse is not found in" - + " the empty JSON string", - UpdateImageResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateImageResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateImageResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Image` - if (jsonObj.get("Image") != null && !jsonObj.get("Image").isJsonNull()) { - Image.validateJsonObject(jsonObj.getAsJsonObject("Image")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateImageResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateImageResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateImageResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateImageResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateImageResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateImageResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateImageResponse - * @throws IOException if the JSON string is invalid with respect to UpdateImageResponse - */ - public static UpdateImageResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateImageResponse.class); - } - - /** - * Convert an instance of UpdateImageResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequest.java deleted file mode 100644 index 37eca0db..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequest.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateListenerRuleRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateListenerRuleRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_HOST_PATTERN = "HostPattern"; - - @SerializedName(SERIALIZED_NAME_HOST_PATTERN) - private String hostPattern; - - public static final String SERIALIZED_NAME_LISTENER_RULE_NAME = "ListenerRuleName"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE_NAME) - private String listenerRuleName; - - public static final String SERIALIZED_NAME_PATH_PATTERN = "PathPattern"; - - @SerializedName(SERIALIZED_NAME_PATH_PATTERN) - private String pathPattern; - - public UpdateListenerRuleRequest() {} - - public UpdateListenerRuleRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateListenerRuleRequest hostPattern(String hostPattern) { - - this.hostPattern = hostPattern; - return this; - } - - /** - * A host-name pattern for the rule, with a maximum length of 128 characters. This host-name - * pattern supports maximum three wildcards, and must not contain any special characters except - * [-.?]. - * - * @return hostPattern - */ - @javax.annotation.Nullable - public String getHostPattern() { - return hostPattern; - } - - public void setHostPattern(String hostPattern) { - this.hostPattern = hostPattern; - } - - public UpdateListenerRuleRequest listenerRuleName(String listenerRuleName) { - - this.listenerRuleName = listenerRuleName; - return this; - } - - /** - * The name of the listener rule. - * - * @return listenerRuleName - */ - @javax.annotation.Nonnull - public String getListenerRuleName() { - return listenerRuleName; - } - - public void setListenerRuleName(String listenerRuleName) { - this.listenerRuleName = listenerRuleName; - } - - public UpdateListenerRuleRequest pathPattern(String pathPattern) { - - this.pathPattern = pathPattern; - return this; - } - - /** - * A path pattern for the rule, with a maximum length of 128 characters. This path pattern - * supports maximum three wildcards, and must not contain any special characters except - * [_-.$/~&quot;'@:+?]. - * - * @return pathPattern - */ - @javax.annotation.Nullable - public String getPathPattern() { - return pathPattern; - } - - public void setPathPattern(String pathPattern) { - this.pathPattern = pathPattern; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateListenerRuleRequest updateListenerRuleRequest = (UpdateListenerRuleRequest) o; - return Objects.equals(this.dryRun, updateListenerRuleRequest.dryRun) - && Objects.equals(this.hostPattern, updateListenerRuleRequest.hostPattern) - && Objects.equals(this.listenerRuleName, updateListenerRuleRequest.listenerRuleName) - && Objects.equals(this.pathPattern, updateListenerRuleRequest.pathPattern); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, hostPattern, listenerRuleName, pathPattern); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateListenerRuleRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" hostPattern: ").append(toIndentedString(hostPattern)).append("\n"); - sb.append(" listenerRuleName: ").append(toIndentedString(listenerRuleName)).append("\n"); - sb.append(" pathPattern: ").append(toIndentedString(pathPattern)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("HostPattern"); - openapiFields.add("ListenerRuleName"); - openapiFields.add("PathPattern"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ListenerRuleName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateListenerRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateListenerRuleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateListenerRuleRequest is not" - + " found in the empty JSON string", - UpdateListenerRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateListenerRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateListenerRuleRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateListenerRuleRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("HostPattern") != null && !jsonObj.get("HostPattern").isJsonNull()) - && !jsonObj.get("HostPattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `HostPattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("HostPattern").toString())); - } - if (!jsonObj.get("ListenerRuleName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ListenerRuleName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ListenerRuleName").toString())); - } - if ((jsonObj.get("PathPattern") != null && !jsonObj.get("PathPattern").isJsonNull()) - && !jsonObj.get("PathPattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PathPattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PathPattern").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateListenerRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateListenerRuleRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateListenerRuleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateListenerRuleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateListenerRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateListenerRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateListenerRuleRequest - * @throws IOException if the JSON string is invalid with respect to UpdateListenerRuleRequest - */ - public static UpdateListenerRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateListenerRuleRequest.class); - } - - /** - * Convert an instance of UpdateListenerRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponse.java deleted file mode 100644 index a7ecd4ed..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateListenerRuleResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateListenerRuleResponse { - public static final String SERIALIZED_NAME_LISTENER_RULE = "ListenerRule"; - - @SerializedName(SERIALIZED_NAME_LISTENER_RULE) - private ListenerRule listenerRule; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateListenerRuleResponse() {} - - public UpdateListenerRuleResponse listenerRule(ListenerRule listenerRule) { - - this.listenerRule = listenerRule; - return this; - } - - /** - * Get listenerRule - * - * @return listenerRule - */ - @javax.annotation.Nullable - public ListenerRule getListenerRule() { - return listenerRule; - } - - public void setListenerRule(ListenerRule listenerRule) { - this.listenerRule = listenerRule; - } - - public UpdateListenerRuleResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateListenerRuleResponse updateListenerRuleResponse = (UpdateListenerRuleResponse) o; - return Objects.equals(this.listenerRule, updateListenerRuleResponse.listenerRule) - && Objects.equals(this.responseContext, updateListenerRuleResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(listenerRule, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateListenerRuleResponse {\n"); - sb.append(" listenerRule: ").append(toIndentedString(listenerRule)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ListenerRule"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateListenerRuleResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateListenerRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateListenerRuleResponse is not" - + " found in the empty JSON string", - UpdateListenerRuleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateListenerRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateListenerRuleResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ListenerRule` - if (jsonObj.get("ListenerRule") != null && !jsonObj.get("ListenerRule").isJsonNull()) { - ListenerRule.validateJsonObject(jsonObj.getAsJsonObject("ListenerRule")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateListenerRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateListenerRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateListenerRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateListenerRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateListenerRuleResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateListenerRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateListenerRuleResponse - * @throws IOException if the JSON string is invalid with respect to UpdateListenerRuleResponse - */ - public static UpdateListenerRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateListenerRuleResponse.class); - } - - /** - * Convert an instance of UpdateListenerRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequest.java deleted file mode 100644 index d722c4d5..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequest.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateLoadBalancerRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateLoadBalancerRequest { - public static final String SERIALIZED_NAME_ACCESS_LOG = "AccessLog"; - - @SerializedName(SERIALIZED_NAME_ACCESS_LOG) - private AccessLog accessLog; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_HEALTH_CHECK = "HealthCheck"; - - @SerializedName(SERIALIZED_NAME_HEALTH_CHECK) - private HealthCheck healthCheck; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_NAME = "LoadBalancerName"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_NAME) - private String loadBalancerName; - - public static final String SERIALIZED_NAME_LOAD_BALANCER_PORT = "LoadBalancerPort"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_PORT) - private Integer loadBalancerPort; - - public static final String SERIALIZED_NAME_POLICY_NAMES = "PolicyNames"; - - @SerializedName(SERIALIZED_NAME_POLICY_NAMES) - private List policyNames = null; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_SECURED_COOKIES = "SecuredCookies"; - - @SerializedName(SERIALIZED_NAME_SECURED_COOKIES) - private Boolean securedCookies; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATE_ID = "ServerCertificateId"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATE_ID) - private String serverCertificateId; - - public UpdateLoadBalancerRequest() {} - - public UpdateLoadBalancerRequest accessLog(AccessLog accessLog) { - - this.accessLog = accessLog; - return this; - } - - /** - * Get accessLog - * - * @return accessLog - */ - @javax.annotation.Nullable - public AccessLog getAccessLog() { - return accessLog; - } - - public void setAccessLog(AccessLog accessLog) { - this.accessLog = accessLog; - } - - public UpdateLoadBalancerRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateLoadBalancerRequest healthCheck(HealthCheck healthCheck) { - - this.healthCheck = healthCheck; - return this; - } - - /** - * Get healthCheck - * - * @return healthCheck - */ - @javax.annotation.Nullable - public HealthCheck getHealthCheck() { - return healthCheck; - } - - public void setHealthCheck(HealthCheck healthCheck) { - this.healthCheck = healthCheck; - } - - public UpdateLoadBalancerRequest loadBalancerName(String loadBalancerName) { - - this.loadBalancerName = loadBalancerName; - return this; - } - - /** - * The name of the load balancer. - * - * @return loadBalancerName - */ - @javax.annotation.Nonnull - public String getLoadBalancerName() { - return loadBalancerName; - } - - public void setLoadBalancerName(String loadBalancerName) { - this.loadBalancerName = loadBalancerName; - } - - public UpdateLoadBalancerRequest loadBalancerPort(Integer loadBalancerPort) { - - this.loadBalancerPort = loadBalancerPort; - return this; - } - - /** - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). This parameter is required if you want to update the - * server certificate. - * - * @return loadBalancerPort - */ - @javax.annotation.Nullable - public Integer getLoadBalancerPort() { - return loadBalancerPort; - } - - public void setLoadBalancerPort(Integer loadBalancerPort) { - this.loadBalancerPort = loadBalancerPort; - } - - public UpdateLoadBalancerRequest policyNames(List policyNames) { - - this.policyNames = policyNames; - return this; - } - - public UpdateLoadBalancerRequest addPolicyNamesItem(String policyNamesItem) { - if (this.policyNames == null) { - this.policyNames = new ArrayList<>(); - } - this.policyNames.add(policyNamesItem); - return this; - } - - /** - * The name of the policy you want to enable for the listener. - * - * @return policyNames - */ - @javax.annotation.Nullable - public List getPolicyNames() { - return policyNames; - } - - public void setPolicyNames(List policyNames) { - this.policyNames = policyNames; - } - - public UpdateLoadBalancerRequest publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * (internet-facing only) The public IP you want to associate with the load balancer. The former - * public IP of the load balancer is then disassociated. If you specify an empty string and the - * former public IP belonged to you, it is disassociated and replaced by a public IP owned by - * 3DS OUTSCALE. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public UpdateLoadBalancerRequest securedCookies(Boolean securedCookies) { - - this.securedCookies = securedCookies; - return this; - } - - /** - * If true, secure cookies are enabled for the load balancer. - * - * @return securedCookies - */ - @javax.annotation.Nullable - public Boolean getSecuredCookies() { - return securedCookies; - } - - public void setSecuredCookies(Boolean securedCookies) { - this.securedCookies = securedCookies; - } - - public UpdateLoadBalancerRequest securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public UpdateLoadBalancerRequest addSecurityGroupsItem(String securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * (Net only) One or more IDs of security groups you want to assign to the load balancer. You - * need to specify the already assigned security groups that you want to keep along with the new - * ones you are assigning. If the list is empty, the default security group of the Net is - * assigned to the load balancer. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public UpdateLoadBalancerRequest serverCertificateId(String serverCertificateId) { - - this.serverCertificateId = serverCertificateId; - return this; - } - - /** - * The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see - * [Resource Identifiers > OUTSCALE Resource Names - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_names_orns). - * If this parameter is specified, you must also specify the `LoadBalancerPort` - * parameter. - * - * @return serverCertificateId - */ - @javax.annotation.Nullable - public String getServerCertificateId() { - return serverCertificateId; - } - - public void setServerCertificateId(String serverCertificateId) { - this.serverCertificateId = serverCertificateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateLoadBalancerRequest updateLoadBalancerRequest = (UpdateLoadBalancerRequest) o; - return Objects.equals(this.accessLog, updateLoadBalancerRequest.accessLog) - && Objects.equals(this.dryRun, updateLoadBalancerRequest.dryRun) - && Objects.equals(this.healthCheck, updateLoadBalancerRequest.healthCheck) - && Objects.equals(this.loadBalancerName, updateLoadBalancerRequest.loadBalancerName) - && Objects.equals(this.loadBalancerPort, updateLoadBalancerRequest.loadBalancerPort) - && Objects.equals(this.policyNames, updateLoadBalancerRequest.policyNames) - && Objects.equals(this.publicIp, updateLoadBalancerRequest.publicIp) - && Objects.equals(this.securedCookies, updateLoadBalancerRequest.securedCookies) - && Objects.equals(this.securityGroups, updateLoadBalancerRequest.securityGroups) - && Objects.equals( - this.serverCertificateId, updateLoadBalancerRequest.serverCertificateId); - } - - @Override - public int hashCode() { - return Objects.hash( - accessLog, - dryRun, - healthCheck, - loadBalancerName, - loadBalancerPort, - policyNames, - publicIp, - securedCookies, - securityGroups, - serverCertificateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateLoadBalancerRequest {\n"); - sb.append(" accessLog: ").append(toIndentedString(accessLog)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" healthCheck: ").append(toIndentedString(healthCheck)).append("\n"); - sb.append(" loadBalancerName: ").append(toIndentedString(loadBalancerName)).append("\n"); - sb.append(" loadBalancerPort: ").append(toIndentedString(loadBalancerPort)).append("\n"); - sb.append(" policyNames: ").append(toIndentedString(policyNames)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" securedCookies: ").append(toIndentedString(securedCookies)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" serverCertificateId: ") - .append(toIndentedString(serverCertificateId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccessLog"); - openapiFields.add("DryRun"); - openapiFields.add("HealthCheck"); - openapiFields.add("LoadBalancerName"); - openapiFields.add("LoadBalancerPort"); - openapiFields.add("PolicyNames"); - openapiFields.add("PublicIp"); - openapiFields.add("SecuredCookies"); - openapiFields.add("SecurityGroups"); - openapiFields.add("ServerCertificateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LoadBalancerName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateLoadBalancerRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateLoadBalancerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateLoadBalancerRequest is not" - + " found in the empty JSON string", - UpdateLoadBalancerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateLoadBalancerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateLoadBalancerRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateLoadBalancerRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the optional field `AccessLog` - if (jsonObj.get("AccessLog") != null && !jsonObj.get("AccessLog").isJsonNull()) { - AccessLog.validateJsonObject(jsonObj.getAsJsonObject("AccessLog")); - } - // validate the optional field `HealthCheck` - if (jsonObj.get("HealthCheck") != null && !jsonObj.get("HealthCheck").isJsonNull()) { - HealthCheck.validateJsonObject(jsonObj.getAsJsonObject("HealthCheck")); - } - if (!jsonObj.get("LoadBalancerName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LoadBalancerName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LoadBalancerName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("PolicyNames") != null && !jsonObj.get("PolicyNames").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PolicyNames` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("PolicyNames").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - if ((jsonObj.get("ServerCertificateId") != null - && !jsonObj.get("ServerCertificateId").isJsonNull()) - && !jsonObj.get("ServerCertificateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ServerCertificateId` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("ServerCertificateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateLoadBalancerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateLoadBalancerRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateLoadBalancerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateLoadBalancerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateLoadBalancerRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateLoadBalancerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateLoadBalancerRequest - * @throws IOException if the JSON string is invalid with respect to UpdateLoadBalancerRequest - */ - public static UpdateLoadBalancerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateLoadBalancerRequest.class); - } - - /** - * Convert an instance of UpdateLoadBalancerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponse.java deleted file mode 100644 index 6f35dc78..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateLoadBalancerResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateLoadBalancerResponse { - public static final String SERIALIZED_NAME_LOAD_BALANCER = "LoadBalancer"; - - @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) - private LoadBalancer loadBalancer; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateLoadBalancerResponse() {} - - public UpdateLoadBalancerResponse loadBalancer(LoadBalancer loadBalancer) { - - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get loadBalancer - * - * @return loadBalancer - */ - @javax.annotation.Nullable - public LoadBalancer getLoadBalancer() { - return loadBalancer; - } - - public void setLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - } - - public UpdateLoadBalancerResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateLoadBalancerResponse updateLoadBalancerResponse = (UpdateLoadBalancerResponse) o; - return Objects.equals(this.loadBalancer, updateLoadBalancerResponse.loadBalancer) - && Objects.equals(this.responseContext, updateLoadBalancerResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(loadBalancer, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateLoadBalancerResponse {\n"); - sb.append(" loadBalancer: ").append(toIndentedString(loadBalancer)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LoadBalancer"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateLoadBalancerResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateLoadBalancerResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateLoadBalancerResponse is not" - + " found in the empty JSON string", - UpdateLoadBalancerResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateLoadBalancerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateLoadBalancerResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `LoadBalancer` - if (jsonObj.get("LoadBalancer") != null && !jsonObj.get("LoadBalancer").isJsonNull()) { - LoadBalancer.validateJsonObject(jsonObj.getAsJsonObject("LoadBalancer")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateLoadBalancerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateLoadBalancerResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateLoadBalancerResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateLoadBalancerResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateLoadBalancerResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateLoadBalancerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateLoadBalancerResponse - * @throws IOException if the JSON string is invalid with respect to UpdateLoadBalancerResponse - */ - public static UpdateLoadBalancerResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateLoadBalancerResponse.class); - } - - /** - * Convert an instance of UpdateLoadBalancerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequest.java deleted file mode 100644 index 8cc91c2b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequest.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNetAccessPointRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNetAccessPointRequest { - public static final String SERIALIZED_NAME_ADD_ROUTE_TABLE_IDS = "AddRouteTableIds"; - - @SerializedName(SERIALIZED_NAME_ADD_ROUTE_TABLE_IDS) - private List addRouteTableIds = null; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ACCESS_POINT_ID = "NetAccessPointId"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT_ID) - private String netAccessPointId; - - public static final String SERIALIZED_NAME_REMOVE_ROUTE_TABLE_IDS = "RemoveRouteTableIds"; - - @SerializedName(SERIALIZED_NAME_REMOVE_ROUTE_TABLE_IDS) - private List removeRouteTableIds = null; - - public UpdateNetAccessPointRequest() {} - - public UpdateNetAccessPointRequest addRouteTableIds(List addRouteTableIds) { - - this.addRouteTableIds = addRouteTableIds; - return this; - } - - public UpdateNetAccessPointRequest addAddRouteTableIdsItem(String addRouteTableIdsItem) { - if (this.addRouteTableIds == null) { - this.addRouteTableIds = new ArrayList<>(); - } - this.addRouteTableIds.add(addRouteTableIdsItem); - return this; - } - - /** - * One or more IDs of route tables to associate with the specified Net access point. - * - * @return addRouteTableIds - */ - @javax.annotation.Nullable - public List getAddRouteTableIds() { - return addRouteTableIds; - } - - public void setAddRouteTableIds(List addRouteTableIds) { - this.addRouteTableIds = addRouteTableIds; - } - - public UpdateNetAccessPointRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateNetAccessPointRequest netAccessPointId(String netAccessPointId) { - - this.netAccessPointId = netAccessPointId; - return this; - } - - /** - * The ID of the Net access point. - * - * @return netAccessPointId - */ - @javax.annotation.Nonnull - public String getNetAccessPointId() { - return netAccessPointId; - } - - public void setNetAccessPointId(String netAccessPointId) { - this.netAccessPointId = netAccessPointId; - } - - public UpdateNetAccessPointRequest removeRouteTableIds(List removeRouteTableIds) { - - this.removeRouteTableIds = removeRouteTableIds; - return this; - } - - public UpdateNetAccessPointRequest addRemoveRouteTableIdsItem(String removeRouteTableIdsItem) { - if (this.removeRouteTableIds == null) { - this.removeRouteTableIds = new ArrayList<>(); - } - this.removeRouteTableIds.add(removeRouteTableIdsItem); - return this; - } - - /** - * One or more IDs of route tables to disassociate from the specified Net access point. - * - * @return removeRouteTableIds - */ - @javax.annotation.Nullable - public List getRemoveRouteTableIds() { - return removeRouteTableIds; - } - - public void setRemoveRouteTableIds(List removeRouteTableIds) { - this.removeRouteTableIds = removeRouteTableIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNetAccessPointRequest updateNetAccessPointRequest = (UpdateNetAccessPointRequest) o; - return Objects.equals(this.addRouteTableIds, updateNetAccessPointRequest.addRouteTableIds) - && Objects.equals(this.dryRun, updateNetAccessPointRequest.dryRun) - && Objects.equals( - this.netAccessPointId, updateNetAccessPointRequest.netAccessPointId) - && Objects.equals( - this.removeRouteTableIds, updateNetAccessPointRequest.removeRouteTableIds); - } - - @Override - public int hashCode() { - return Objects.hash(addRouteTableIds, dryRun, netAccessPointId, removeRouteTableIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNetAccessPointRequest {\n"); - sb.append(" addRouteTableIds: ").append(toIndentedString(addRouteTableIds)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netAccessPointId: ").append(toIndentedString(netAccessPointId)).append("\n"); - sb.append(" removeRouteTableIds: ") - .append(toIndentedString(removeRouteTableIds)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AddRouteTableIds"); - openapiFields.add("DryRun"); - openapiFields.add("NetAccessPointId"); - openapiFields.add("RemoveRouteTableIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NetAccessPointId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateNetAccessPointRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNetAccessPointRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNetAccessPointRequest is not" - + " found in the empty JSON string", - UpdateNetAccessPointRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNetAccessPointRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNetAccessPointRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateNetAccessPointRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("AddRouteTableIds") != null - && !jsonObj.get("AddRouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `AddRouteTableIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("AddRouteTableIds").toString())); - } - if (!jsonObj.get("NetAccessPointId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetAccessPointId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("NetAccessPointId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("RemoveRouteTableIds") != null - && !jsonObj.get("RemoveRouteTableIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RemoveRouteTableIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("RemoveRouteTableIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNetAccessPointRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNetAccessPointRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateNetAccessPointRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNetAccessPointRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNetAccessPointRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNetAccessPointRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNetAccessPointRequest - * @throws IOException if the JSON string is invalid with respect to UpdateNetAccessPointRequest - */ - public static UpdateNetAccessPointRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNetAccessPointRequest.class); - } - - /** - * Convert an instance of UpdateNetAccessPointRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponse.java deleted file mode 100644 index c19e5fe3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNetAccessPointResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNetAccessPointResponse { - public static final String SERIALIZED_NAME_NET_ACCESS_POINT = "NetAccessPoint"; - - @SerializedName(SERIALIZED_NAME_NET_ACCESS_POINT) - private NetAccessPoint netAccessPoint; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateNetAccessPointResponse() {} - - public UpdateNetAccessPointResponse netAccessPoint(NetAccessPoint netAccessPoint) { - - this.netAccessPoint = netAccessPoint; - return this; - } - - /** - * Get netAccessPoint - * - * @return netAccessPoint - */ - @javax.annotation.Nullable - public NetAccessPoint getNetAccessPoint() { - return netAccessPoint; - } - - public void setNetAccessPoint(NetAccessPoint netAccessPoint) { - this.netAccessPoint = netAccessPoint; - } - - public UpdateNetAccessPointResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNetAccessPointResponse updateNetAccessPointResponse = - (UpdateNetAccessPointResponse) o; - return Objects.equals(this.netAccessPoint, updateNetAccessPointResponse.netAccessPoint) - && Objects.equals( - this.responseContext, updateNetAccessPointResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(netAccessPoint, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNetAccessPointResponse {\n"); - sb.append(" netAccessPoint: ").append(toIndentedString(netAccessPoint)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("NetAccessPoint"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateNetAccessPointResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNetAccessPointResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNetAccessPointResponse is not" - + " found in the empty JSON string", - UpdateNetAccessPointResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNetAccessPointResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNetAccessPointResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `NetAccessPoint` - if (jsonObj.get("NetAccessPoint") != null && !jsonObj.get("NetAccessPoint").isJsonNull()) { - NetAccessPoint.validateJsonObject(jsonObj.getAsJsonObject("NetAccessPoint")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNetAccessPointResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNetAccessPointResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateNetAccessPointResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNetAccessPointResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNetAccessPointResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNetAccessPointResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNetAccessPointResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateNetAccessPointResponse - */ - public static UpdateNetAccessPointResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNetAccessPointResponse.class); - } - - /** - * Convert an instance of UpdateNetAccessPointResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequest.java deleted file mode 100644 index 7d9e8242..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNetRequest { - public static final String SERIALIZED_NAME_DHCP_OPTIONS_SET_ID = "DhcpOptionsSetId"; - - @SerializedName(SERIALIZED_NAME_DHCP_OPTIONS_SET_ID) - private String dhcpOptionsSetId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public UpdateNetRequest() {} - - public UpdateNetRequest dhcpOptionsSetId(String dhcpOptionsSetId) { - - this.dhcpOptionsSetId = dhcpOptionsSetId; - return this; - } - - /** - * The ID of the DHCP options set (or `default` if you want to associate the default - * one). - * - * @return dhcpOptionsSetId - */ - @javax.annotation.Nonnull - public String getDhcpOptionsSetId() { - return dhcpOptionsSetId; - } - - public void setDhcpOptionsSetId(String dhcpOptionsSetId) { - this.dhcpOptionsSetId = dhcpOptionsSetId; - } - - public UpdateNetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateNetRequest netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net. - * - * @return netId - */ - @javax.annotation.Nonnull - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNetRequest updateNetRequest = (UpdateNetRequest) o; - return Objects.equals(this.dhcpOptionsSetId, updateNetRequest.dhcpOptionsSetId) - && Objects.equals(this.dryRun, updateNetRequest.dryRun) - && Objects.equals(this.netId, updateNetRequest.netId); - } - - @Override - public int hashCode() { - return Objects.hash(dhcpOptionsSetId, dryRun, netId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNetRequest {\n"); - sb.append(" dhcpOptionsSetId: ").append(toIndentedString(dhcpOptionsSetId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DhcpOptionsSetId"); - openapiFields.add("DryRun"); - openapiFields.add("NetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DhcpOptionsSetId"); - openapiRequiredFields.add("NetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateNetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNetRequest is not found in the" - + " empty JSON string", - UpdateNetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateNetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DhcpOptionsSetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DhcpOptionsSetId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DhcpOptionsSetId").toString())); - } - if (!jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateNetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNetRequest - * @throws IOException if the JSON string is invalid with respect to UpdateNetRequest - */ - public static UpdateNetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNetRequest.class); - } - - /** - * Convert an instance of UpdateNetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponse.java deleted file mode 100644 index 0f502bbd..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNetResponse { - public static final String SERIALIZED_NAME_NET = "Net"; - - @SerializedName(SERIALIZED_NAME_NET) - private Net net; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateNetResponse() {} - - public UpdateNetResponse net(Net net) { - - this.net = net; - return this; - } - - /** - * Get net - * - * @return net - */ - @javax.annotation.Nullable - public Net getNet() { - return net; - } - - public void setNet(Net net) { - this.net = net; - } - - public UpdateNetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNetResponse updateNetResponse = (UpdateNetResponse) o; - return Objects.equals(this.net, updateNetResponse.net) - && Objects.equals(this.responseContext, updateNetResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(net, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNetResponse {\n"); - sb.append(" net: ").append(toIndentedString(net)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Net"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateNetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNetResponse is not found in the" - + " empty JSON string", - UpdateNetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Net` - if (jsonObj.get("Net") != null && !jsonObj.get("Net").isJsonNull()) { - Net.validateJsonObject(jsonObj.getAsJsonObject("Net")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateNetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNetResponse - * @throws IOException if the JSON string is invalid with respect to UpdateNetResponse - */ - public static UpdateNetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNetResponse.class); - } - - /** - * Convert an instance of UpdateNetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequest.java deleted file mode 100644 index 4db41a94..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequest.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNicRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNicRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LINK_NIC = "LinkNic"; - - @SerializedName(SERIALIZED_NAME_LINK_NIC) - private LinkNicToUpdate linkNic; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public UpdateNicRequest() {} - - public UpdateNicRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A new description for the NIC. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateNicRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateNicRequest linkNic(LinkNicToUpdate linkNic) { - - this.linkNic = linkNic; - return this; - } - - /** - * Get linkNic - * - * @return linkNic - */ - @javax.annotation.Nullable - public LinkNicToUpdate getLinkNic() { - return linkNic; - } - - public void setLinkNic(LinkNicToUpdate linkNic) { - this.linkNic = linkNic; - } - - public UpdateNicRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of the NIC you want to modify. - * - * @return nicId - */ - @javax.annotation.Nonnull - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public UpdateNicRequest securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public UpdateNicRequest addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the NIC.<br /> You must specify at least one - * group, even if you use the default security group in the Net. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNicRequest updateNicRequest = (UpdateNicRequest) o; - return Objects.equals(this.description, updateNicRequest.description) - && Objects.equals(this.dryRun, updateNicRequest.dryRun) - && Objects.equals(this.linkNic, updateNicRequest.linkNic) - && Objects.equals(this.nicId, updateNicRequest.nicId) - && Objects.equals(this.securityGroupIds, updateNicRequest.securityGroupIds); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, linkNic, nicId, securityGroupIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNicRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" linkNic: ").append(toIndentedString(linkNic)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("LinkNic"); - openapiFields.add("NicId"); - openapiFields.add("SecurityGroupIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("NicId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateNicRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNicRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNicRequest is not found in the" - + " empty JSON string", - UpdateNicRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNicRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNicRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateNicRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - // validate the optional field `LinkNic` - if (jsonObj.get("LinkNic") != null && !jsonObj.get("LinkNic").isJsonNull()) { - LinkNicToUpdate.validateJsonObject(jsonObj.getAsJsonObject("LinkNic")); - } - if (!jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNicRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNicRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateNicRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNicRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNicRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNicRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNicRequest - * @throws IOException if the JSON string is invalid with respect to UpdateNicRequest - */ - public static UpdateNicRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNicRequest.class); - } - - /** - * Convert an instance of UpdateNicRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponse.java deleted file mode 100644 index fb136060..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateNicResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateNicResponse { - public static final String SERIALIZED_NAME_NIC = "Nic"; - - @SerializedName(SERIALIZED_NAME_NIC) - private Nic nic; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateNicResponse() {} - - public UpdateNicResponse nic(Nic nic) { - - this.nic = nic; - return this; - } - - /** - * Get nic - * - * @return nic - */ - @javax.annotation.Nullable - public Nic getNic() { - return nic; - } - - public void setNic(Nic nic) { - this.nic = nic; - } - - public UpdateNicResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateNicResponse updateNicResponse = (UpdateNicResponse) o; - return Objects.equals(this.nic, updateNicResponse.nic) - && Objects.equals(this.responseContext, updateNicResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(nic, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateNicResponse {\n"); - sb.append(" nic: ").append(toIndentedString(nic)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Nic"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateNicResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateNicResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateNicResponse is not found in the" - + " empty JSON string", - UpdateNicResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateNicResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateNicResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Nic` - if (jsonObj.get("Nic") != null && !jsonObj.get("Nic").isJsonNull()) { - Nic.validateJsonObject(jsonObj.getAsJsonObject("Nic")); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateNicResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateNicResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateNicResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateNicResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateNicResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateNicResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateNicResponse - * @throws IOException if the JSON string is invalid with respect to UpdateNicResponse - */ - public static UpdateNicResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateNicResponse.class); - } - - /** - * Convert an instance of UpdateNicResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequest.java deleted file mode 100644 index 781a7273..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRoutePropagationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRoutePropagationRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_ENABLE = "Enable"; - - @SerializedName(SERIALIZED_NAME_ENABLE) - private Boolean enable; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public UpdateRoutePropagationRequest() {} - - public UpdateRoutePropagationRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateRoutePropagationRequest enable(Boolean enable) { - - this.enable = enable; - return this; - } - - /** - * If true, a virtual gateway can propagate routes to a specified route table of a Net. If - * false, the propagation is disabled. - * - * @return enable - */ - @javax.annotation.Nonnull - public Boolean getEnable() { - return enable; - } - - public void setEnable(Boolean enable) { - this.enable = enable; - } - - public UpdateRoutePropagationRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public UpdateRoutePropagationRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nonnull - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRoutePropagationRequest updateRoutePropagationRequest = - (UpdateRoutePropagationRequest) o; - return Objects.equals(this.dryRun, updateRoutePropagationRequest.dryRun) - && Objects.equals(this.enable, updateRoutePropagationRequest.enable) - && Objects.equals(this.routeTableId, updateRoutePropagationRequest.routeTableId) - && Objects.equals( - this.virtualGatewayId, updateRoutePropagationRequest.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, enable, routeTableId, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRoutePropagationRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" enable: ").append(toIndentedString(enable)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Enable"); - openapiFields.add("RouteTableId"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Enable"); - openapiRequiredFields.add("RouteTableId"); - openapiRequiredFields.add("VirtualGatewayId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateRoutePropagationRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRoutePropagationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRoutePropagationRequest is not" - + " found in the empty JSON string", - UpdateRoutePropagationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRoutePropagationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRoutePropagationRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateRoutePropagationRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if (!jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRoutePropagationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRoutePropagationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateRoutePropagationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRoutePropagationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRoutePropagationRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRoutePropagationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRoutePropagationRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateRoutePropagationRequest - */ - public static UpdateRoutePropagationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRoutePropagationRequest.class); - } - - /** - * Convert an instance of UpdateRoutePropagationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponse.java deleted file mode 100644 index 653c303c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRoutePropagationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRoutePropagationResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLE = "RouteTable"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE) - private RouteTable routeTable; - - public UpdateRoutePropagationResponse() {} - - public UpdateRoutePropagationResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateRoutePropagationResponse routeTable(RouteTable routeTable) { - - this.routeTable = routeTable; - return this; - } - - /** - * Get routeTable - * - * @return routeTable - */ - @javax.annotation.Nullable - public RouteTable getRouteTable() { - return routeTable; - } - - public void setRouteTable(RouteTable routeTable) { - this.routeTable = routeTable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRoutePropagationResponse updateRoutePropagationResponse = - (UpdateRoutePropagationResponse) o; - return Objects.equals(this.responseContext, updateRoutePropagationResponse.responseContext) - && Objects.equals(this.routeTable, updateRoutePropagationResponse.routeTable); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, routeTable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRoutePropagationResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTable: ").append(toIndentedString(routeTable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateRoutePropagationResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRoutePropagationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRoutePropagationResponse is not" - + " found in the empty JSON string", - UpdateRoutePropagationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRoutePropagationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRoutePropagationResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `RouteTable` - if (jsonObj.get("RouteTable") != null && !jsonObj.get("RouteTable").isJsonNull()) { - RouteTable.validateJsonObject(jsonObj.getAsJsonObject("RouteTable")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRoutePropagationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRoutePropagationResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateRoutePropagationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRoutePropagationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRoutePropagationResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRoutePropagationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRoutePropagationResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateRoutePropagationResponse - */ - public static UpdateRoutePropagationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRoutePropagationResponse.class); - } - - /** - * Convert an instance of UpdateRoutePropagationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequest.java deleted file mode 100644 index 20294a4b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequest.java +++ /dev/null @@ -1,463 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRouteRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRouteRequest { - public static final String SERIALIZED_NAME_DESTINATION_IP_RANGE = "DestinationIpRange"; - - @SerializedName(SERIALIZED_NAME_DESTINATION_IP_RANGE) - private String destinationIpRange; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_GATEWAY_ID = "GatewayId"; - - @SerializedName(SERIALIZED_NAME_GATEWAY_ID) - private String gatewayId; - - public static final String SERIALIZED_NAME_NAT_SERVICE_ID = "NatServiceId"; - - @SerializedName(SERIALIZED_NAME_NAT_SERVICE_ID) - private String natServiceId; - - public static final String SERIALIZED_NAME_NET_PEERING_ID = "NetPeeringId"; - - @SerializedName(SERIALIZED_NAME_NET_PEERING_ID) - private String netPeeringId; - - public static final String SERIALIZED_NAME_NIC_ID = "NicId"; - - @SerializedName(SERIALIZED_NAME_NIC_ID) - private String nicId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public UpdateRouteRequest() {} - - public UpdateRouteRequest destinationIpRange(String destinationIpRange) { - - this.destinationIpRange = destinationIpRange; - return this; - } - - /** - * The IP range used for the destination match, in CIDR notation (for example, - * `10.0.0.0/24`). - * - * @return destinationIpRange - */ - @javax.annotation.Nonnull - public String getDestinationIpRange() { - return destinationIpRange; - } - - public void setDestinationIpRange(String destinationIpRange) { - this.destinationIpRange = destinationIpRange; - } - - public UpdateRouteRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateRouteRequest gatewayId(String gatewayId) { - - this.gatewayId = gatewayId; - return this; - } - - /** - * The ID of an Internet service or virtual gateway attached to your Net. - * - * @return gatewayId - */ - @javax.annotation.Nullable - public String getGatewayId() { - return gatewayId; - } - - public void setGatewayId(String gatewayId) { - this.gatewayId = gatewayId; - } - - public UpdateRouteRequest natServiceId(String natServiceId) { - - this.natServiceId = natServiceId; - return this; - } - - /** - * The ID of a NAT service. - * - * @return natServiceId - */ - @javax.annotation.Nullable - public String getNatServiceId() { - return natServiceId; - } - - public void setNatServiceId(String natServiceId) { - this.natServiceId = natServiceId; - } - - public UpdateRouteRequest netPeeringId(String netPeeringId) { - - this.netPeeringId = netPeeringId; - return this; - } - - /** - * The ID of a Net peering. - * - * @return netPeeringId - */ - @javax.annotation.Nullable - public String getNetPeeringId() { - return netPeeringId; - } - - public void setNetPeeringId(String netPeeringId) { - this.netPeeringId = netPeeringId; - } - - public UpdateRouteRequest nicId(String nicId) { - - this.nicId = nicId; - return this; - } - - /** - * The ID of a network interface card (NIC). - * - * @return nicId - */ - @javax.annotation.Nullable - public String getNicId() { - return nicId; - } - - public void setNicId(String nicId) { - this.nicId = nicId; - } - - public UpdateRouteRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the route table. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - public UpdateRouteRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of a NAT VM in your Net. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRouteRequest updateRouteRequest = (UpdateRouteRequest) o; - return Objects.equals(this.destinationIpRange, updateRouteRequest.destinationIpRange) - && Objects.equals(this.dryRun, updateRouteRequest.dryRun) - && Objects.equals(this.gatewayId, updateRouteRequest.gatewayId) - && Objects.equals(this.natServiceId, updateRouteRequest.natServiceId) - && Objects.equals(this.netPeeringId, updateRouteRequest.netPeeringId) - && Objects.equals(this.nicId, updateRouteRequest.nicId) - && Objects.equals(this.routeTableId, updateRouteRequest.routeTableId) - && Objects.equals(this.vmId, updateRouteRequest.vmId); - } - - @Override - public int hashCode() { - return Objects.hash( - destinationIpRange, - dryRun, - gatewayId, - natServiceId, - netPeeringId, - nicId, - routeTableId, - vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRouteRequest {\n"); - sb.append(" destinationIpRange: ") - .append(toIndentedString(destinationIpRange)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" gatewayId: ").append(toIndentedString(gatewayId)).append("\n"); - sb.append(" natServiceId: ").append(toIndentedString(natServiceId)).append("\n"); - sb.append(" netPeeringId: ").append(toIndentedString(netPeeringId)).append("\n"); - sb.append(" nicId: ").append(toIndentedString(nicId)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DestinationIpRange"); - openapiFields.add("DryRun"); - openapiFields.add("GatewayId"); - openapiFields.add("NatServiceId"); - openapiFields.add("NetPeeringId"); - openapiFields.add("NicId"); - openapiFields.add("RouteTableId"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("DestinationIpRange"); - openapiRequiredFields.add("RouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateRouteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRouteRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRouteRequest is not found in" - + " the empty JSON string", - UpdateRouteRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRouteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRouteRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateRouteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("DestinationIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `DestinationIpRange` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("DestinationIpRange").toString())); - } - if ((jsonObj.get("GatewayId") != null && !jsonObj.get("GatewayId").isJsonNull()) - && !jsonObj.get("GatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `GatewayId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("GatewayId").toString())); - } - if ((jsonObj.get("NatServiceId") != null && !jsonObj.get("NatServiceId").isJsonNull()) - && !jsonObj.get("NatServiceId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NatServiceId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NatServiceId").toString())); - } - if ((jsonObj.get("NetPeeringId") != null && !jsonObj.get("NetPeeringId").isJsonNull()) - && !jsonObj.get("NetPeeringId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetPeeringId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NetPeeringId").toString())); - } - if ((jsonObj.get("NicId") != null && !jsonObj.get("NicId").isJsonNull()) - && !jsonObj.get("NicId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NicId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NicId").toString())); - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRouteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRouteRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateRouteRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRouteRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRouteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRouteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRouteRequest - * @throws IOException if the JSON string is invalid with respect to UpdateRouteRequest - */ - public static UpdateRouteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRouteRequest.class); - } - - /** - * Convert an instance of UpdateRouteRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponse.java deleted file mode 100644 index 1dcc1822..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRouteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRouteResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_ROUTE_TABLE = "RouteTable"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE) - private RouteTable routeTable; - - public UpdateRouteResponse() {} - - public UpdateRouteResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateRouteResponse routeTable(RouteTable routeTable) { - - this.routeTable = routeTable; - return this; - } - - /** - * Get routeTable - * - * @return routeTable - */ - @javax.annotation.Nullable - public RouteTable getRouteTable() { - return routeTable; - } - - public void setRouteTable(RouteTable routeTable) { - this.routeTable = routeTable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRouteResponse updateRouteResponse = (UpdateRouteResponse) o; - return Objects.equals(this.responseContext, updateRouteResponse.responseContext) - && Objects.equals(this.routeTable, updateRouteResponse.routeTable); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, routeTable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRouteResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" routeTable: ").append(toIndentedString(routeTable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("RouteTable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateRouteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRouteResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRouteResponse is not found in" - + " the empty JSON string", - UpdateRouteResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRouteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRouteResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `RouteTable` - if (jsonObj.get("RouteTable") != null && !jsonObj.get("RouteTable").isJsonNull()) { - RouteTable.validateJsonObject(jsonObj.getAsJsonObject("RouteTable")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRouteResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRouteResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateRouteResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRouteResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRouteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRouteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRouteResponse - * @throws IOException if the JSON string is invalid with respect to UpdateRouteResponse - */ - public static UpdateRouteResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRouteResponse.class); - } - - /** - * Convert an instance of UpdateRouteResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequest.java deleted file mode 100644 index 081b3660..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequest.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRouteTableLinkRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRouteTableLinkRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_ID = "LinkRouteTableId"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_ID) - private String linkRouteTableId; - - public static final String SERIALIZED_NAME_ROUTE_TABLE_ID = "RouteTableId"; - - @SerializedName(SERIALIZED_NAME_ROUTE_TABLE_ID) - private String routeTableId; - - public UpdateRouteTableLinkRequest() {} - - public UpdateRouteTableLinkRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateRouteTableLinkRequest linkRouteTableId(String linkRouteTableId) { - - this.linkRouteTableId = linkRouteTableId; - return this; - } - - /** - * The ID of the current route table link. - * - * @return linkRouteTableId - */ - @javax.annotation.Nonnull - public String getLinkRouteTableId() { - return linkRouteTableId; - } - - public void setLinkRouteTableId(String linkRouteTableId) { - this.linkRouteTableId = linkRouteTableId; - } - - public UpdateRouteTableLinkRequest routeTableId(String routeTableId) { - - this.routeTableId = routeTableId; - return this; - } - - /** - * The ID of the new route table to associate with the Subnet. - * - * @return routeTableId - */ - @javax.annotation.Nonnull - public String getRouteTableId() { - return routeTableId; - } - - public void setRouteTableId(String routeTableId) { - this.routeTableId = routeTableId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRouteTableLinkRequest updateRouteTableLinkRequest = (UpdateRouteTableLinkRequest) o; - return Objects.equals(this.dryRun, updateRouteTableLinkRequest.dryRun) - && Objects.equals( - this.linkRouteTableId, updateRouteTableLinkRequest.linkRouteTableId) - && Objects.equals(this.routeTableId, updateRouteTableLinkRequest.routeTableId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, linkRouteTableId, routeTableId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRouteTableLinkRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" linkRouteTableId: ").append(toIndentedString(linkRouteTableId)).append("\n"); - sb.append(" routeTableId: ").append(toIndentedString(routeTableId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("LinkRouteTableId"); - openapiFields.add("RouteTableId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("LinkRouteTableId"); - openapiRequiredFields.add("RouteTableId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateRouteTableLinkRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRouteTableLinkRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRouteTableLinkRequest is not" - + " found in the empty JSON string", - UpdateRouteTableLinkRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRouteTableLinkRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRouteTableLinkRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateRouteTableLinkRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("LinkRouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTableId").toString())); - } - if (!jsonObj.get("RouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RouteTableId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("RouteTableId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRouteTableLinkRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRouteTableLinkRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateRouteTableLinkRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRouteTableLinkRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRouteTableLinkRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRouteTableLinkRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRouteTableLinkRequest - * @throws IOException if the JSON string is invalid with respect to UpdateRouteTableLinkRequest - */ - public static UpdateRouteTableLinkRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRouteTableLinkRequest.class); - } - - /** - * Convert an instance of UpdateRouteTableLinkRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponse.java deleted file mode 100644 index 5cecc4a4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponse.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateRouteTableLinkResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateRouteTableLinkResponse { - public static final String SERIALIZED_NAME_LINK_ROUTE_TABLE_ID = "LinkRouteTableId"; - - @SerializedName(SERIALIZED_NAME_LINK_ROUTE_TABLE_ID) - private String linkRouteTableId; - - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public UpdateRouteTableLinkResponse() {} - - public UpdateRouteTableLinkResponse linkRouteTableId(String linkRouteTableId) { - - this.linkRouteTableId = linkRouteTableId; - return this; - } - - /** - * The ID of the association between the route table and the Subnet. - * - * @return linkRouteTableId - */ - @javax.annotation.Nullable - public String getLinkRouteTableId() { - return linkRouteTableId; - } - - public void setLinkRouteTableId(String linkRouteTableId) { - this.linkRouteTableId = linkRouteTableId; - } - - public UpdateRouteTableLinkResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRouteTableLinkResponse updateRouteTableLinkResponse = - (UpdateRouteTableLinkResponse) o; - return Objects.equals(this.linkRouteTableId, updateRouteTableLinkResponse.linkRouteTableId) - && Objects.equals( - this.responseContext, updateRouteTableLinkResponse.responseContext); - } - - @Override - public int hashCode() { - return Objects.hash(linkRouteTableId, responseContext); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRouteTableLinkResponse {\n"); - sb.append(" linkRouteTableId: ").append(toIndentedString(linkRouteTableId)).append("\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("LinkRouteTableId"); - openapiFields.add("ResponseContext"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateRouteTableLinkResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateRouteTableLinkResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRouteTableLinkResponse is not" - + " found in the empty JSON string", - UpdateRouteTableLinkResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateRouteTableLinkResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRouteTableLinkResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("LinkRouteTableId") != null - && !jsonObj.get("LinkRouteTableId").isJsonNull()) - && !jsonObj.get("LinkRouteTableId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkRouteTableId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("LinkRouteTableId").toString())); - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRouteTableLinkResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRouteTableLinkResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateRouteTableLinkResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRouteTableLinkResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRouteTableLinkResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRouteTableLinkResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRouteTableLinkResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateRouteTableLinkResponse - */ - public static UpdateRouteTableLinkResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRouteTableLinkResponse.class); - } - - /** - * Convert an instance of UpdateRouteTableLinkResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequest.java deleted file mode 100644 index c91738b1..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequest.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateServerCertificateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateServerCertificateRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NEW_NAME = "NewName"; - - @SerializedName(SERIALIZED_NAME_NEW_NAME) - private String newName; - - public static final String SERIALIZED_NAME_NEW_PATH = "NewPath"; - - @SerializedName(SERIALIZED_NAME_NEW_PATH) - private String newPath; - - public UpdateServerCertificateRequest() {} - - public UpdateServerCertificateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateServerCertificateRequest name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the server certificate you want to modify. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public UpdateServerCertificateRequest newName(String newName) { - - this.newName = newName; - return this; - } - - /** - * A new name for the server certificate. - * - * @return newName - */ - @javax.annotation.Nullable - public String getNewName() { - return newName; - } - - public void setNewName(String newName) { - this.newName = newName; - } - - public UpdateServerCertificateRequest newPath(String newPath) { - - this.newPath = newPath; - return this; - } - - /** - * A new path for the server certificate. - * - * @return newPath - */ - @javax.annotation.Nullable - public String getNewPath() { - return newPath; - } - - public void setNewPath(String newPath) { - this.newPath = newPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateServerCertificateRequest updateServerCertificateRequest = - (UpdateServerCertificateRequest) o; - return Objects.equals(this.dryRun, updateServerCertificateRequest.dryRun) - && Objects.equals(this.name, updateServerCertificateRequest.name) - && Objects.equals(this.newName, updateServerCertificateRequest.newName) - && Objects.equals(this.newPath, updateServerCertificateRequest.newPath); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, name, newName, newPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateServerCertificateRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" newName: ").append(toIndentedString(newName)).append("\n"); - sb.append(" newPath: ").append(toIndentedString(newPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Name"); - openapiFields.add("NewName"); - openapiFields.add("NewPath"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("Name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateServerCertificateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateServerCertificateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateServerCertificateRequest is not" - + " found in the empty JSON string", - UpdateServerCertificateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateServerCertificateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateServerCertificateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateServerCertificateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if ((jsonObj.get("NewName") != null && !jsonObj.get("NewName").isJsonNull()) - && !jsonObj.get("NewName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NewName").toString())); - } - if ((jsonObj.get("NewPath") != null && !jsonObj.get("NewPath").isJsonNull()) - && !jsonObj.get("NewPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NewPath").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateServerCertificateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateServerCertificateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateServerCertificateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateServerCertificateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateServerCertificateRequest read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateServerCertificateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateServerCertificateRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateServerCertificateRequest - */ - public static UpdateServerCertificateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateServerCertificateRequest.class); - } - - /** - * Convert an instance of UpdateServerCertificateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponse.java deleted file mode 100644 index 6e181217..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponse.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateServerCertificateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateServerCertificateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SERVER_CERTIFICATE = "ServerCertificate"; - - @SerializedName(SERIALIZED_NAME_SERVER_CERTIFICATE) - private ServerCertificate serverCertificate; - - public UpdateServerCertificateResponse() {} - - public UpdateServerCertificateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateServerCertificateResponse serverCertificate(ServerCertificate serverCertificate) { - - this.serverCertificate = serverCertificate; - return this; - } - - /** - * Get serverCertificate - * - * @return serverCertificate - */ - @javax.annotation.Nullable - public ServerCertificate getServerCertificate() { - return serverCertificate; - } - - public void setServerCertificate(ServerCertificate serverCertificate) { - this.serverCertificate = serverCertificate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateServerCertificateResponse updateServerCertificateResponse = - (UpdateServerCertificateResponse) o; - return Objects.equals(this.responseContext, updateServerCertificateResponse.responseContext) - && Objects.equals( - this.serverCertificate, updateServerCertificateResponse.serverCertificate); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, serverCertificate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateServerCertificateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" serverCertificate: ") - .append(toIndentedString(serverCertificate)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("ServerCertificate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to - * UpdateServerCertificateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateServerCertificateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateServerCertificateResponse is" - + " not found in the empty JSON string", - UpdateServerCertificateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateServerCertificateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateServerCertificateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `ServerCertificate` - if (jsonObj.get("ServerCertificate") != null - && !jsonObj.get("ServerCertificate").isJsonNull()) { - ServerCertificate.validateJsonObject(jsonObj.getAsJsonObject("ServerCertificate")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateServerCertificateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateServerCertificateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateServerCertificateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateServerCertificateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateServerCertificateResponse read(JsonReader in) - throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateServerCertificateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateServerCertificateResponse - * @throws IOException if the JSON string is invalid with respect to - * UpdateServerCertificateResponse - */ - public static UpdateServerCertificateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateServerCertificateResponse.class); - } - - /** - * Convert an instance of UpdateServerCertificateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequest.java deleted file mode 100644 index c2a17567..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateSnapshotRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateSnapshotRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME = - "PermissionsToCreateVolume"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS_TO_CREATE_VOLUME) - private PermissionsOnResourceCreation permissionsToCreateVolume; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public UpdateSnapshotRequest() {} - - public UpdateSnapshotRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateSnapshotRequest permissionsToCreateVolume( - PermissionsOnResourceCreation permissionsToCreateVolume) { - - this.permissionsToCreateVolume = permissionsToCreateVolume; - return this; - } - - /** - * Get permissionsToCreateVolume - * - * @return permissionsToCreateVolume - */ - @javax.annotation.Nonnull - public PermissionsOnResourceCreation getPermissionsToCreateVolume() { - return permissionsToCreateVolume; - } - - public void setPermissionsToCreateVolume( - PermissionsOnResourceCreation permissionsToCreateVolume) { - this.permissionsToCreateVolume = permissionsToCreateVolume; - } - - public UpdateSnapshotRequest snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The ID of the snapshot. - * - * @return snapshotId - */ - @javax.annotation.Nonnull - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSnapshotRequest updateSnapshotRequest = (UpdateSnapshotRequest) o; - return Objects.equals(this.dryRun, updateSnapshotRequest.dryRun) - && Objects.equals( - this.permissionsToCreateVolume, - updateSnapshotRequest.permissionsToCreateVolume) - && Objects.equals(this.snapshotId, updateSnapshotRequest.snapshotId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, permissionsToCreateVolume, snapshotId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSnapshotRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" permissionsToCreateVolume: ") - .append(toIndentedString(permissionsToCreateVolume)) - .append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("PermissionsToCreateVolume"); - openapiFields.add("SnapshotId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("PermissionsToCreateVolume"); - openapiRequiredFields.add("SnapshotId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateSnapshotRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateSnapshotRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateSnapshotRequest is not found in" - + " the empty JSON string", - UpdateSnapshotRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateSnapshotRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateSnapshotRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateSnapshotRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - // validate the required field `PermissionsToCreateVolume` - PermissionsOnResourceCreation.validateJsonObject( - jsonObj.getAsJsonObject("PermissionsToCreateVolume")); - if (!jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateSnapshotRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateSnapshotRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateSnapshotRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateSnapshotRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateSnapshotRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateSnapshotRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateSnapshotRequest - * @throws IOException if the JSON string is invalid with respect to UpdateSnapshotRequest - */ - public static UpdateSnapshotRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateSnapshotRequest.class); - } - - /** - * Convert an instance of UpdateSnapshotRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponse.java deleted file mode 100644 index 88084f77..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateSnapshotResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateSnapshotResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SNAPSHOT = "Snapshot"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT) - private Snapshot snapshot; - - public UpdateSnapshotResponse() {} - - public UpdateSnapshotResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateSnapshotResponse snapshot(Snapshot snapshot) { - - this.snapshot = snapshot; - return this; - } - - /** - * Get snapshot - * - * @return snapshot - */ - @javax.annotation.Nullable - public Snapshot getSnapshot() { - return snapshot; - } - - public void setSnapshot(Snapshot snapshot) { - this.snapshot = snapshot; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSnapshotResponse updateSnapshotResponse = (UpdateSnapshotResponse) o; - return Objects.equals(this.responseContext, updateSnapshotResponse.responseContext) - && Objects.equals(this.snapshot, updateSnapshotResponse.snapshot); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, snapshot); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSnapshotResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" snapshot: ").append(toIndentedString(snapshot)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Snapshot"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateSnapshotResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateSnapshotResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateSnapshotResponse is not found" - + " in the empty JSON string", - UpdateSnapshotResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateSnapshotResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateSnapshotResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Snapshot` - if (jsonObj.get("Snapshot") != null && !jsonObj.get("Snapshot").isJsonNull()) { - Snapshot.validateJsonObject(jsonObj.getAsJsonObject("Snapshot")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateSnapshotResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateSnapshotResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateSnapshotResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateSnapshotResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateSnapshotResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateSnapshotResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateSnapshotResponse - * @throws IOException if the JSON string is invalid with respect to UpdateSnapshotResponse - */ - public static UpdateSnapshotResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateSnapshotResponse.class); - } - - /** - * Convert an instance of UpdateSnapshotResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequest.java deleted file mode 100644 index e11c57f7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequest.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateSubnetRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateSubnetRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_MAP_PUBLIC_IP_ON_LAUNCH = "MapPublicIpOnLaunch"; - - @SerializedName(SERIALIZED_NAME_MAP_PUBLIC_IP_ON_LAUNCH) - private Boolean mapPublicIpOnLaunch; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public UpdateSubnetRequest() {} - - public UpdateSubnetRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateSubnetRequest mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { - - this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; - return this; - } - - /** - * If true, a public IP is assigned to the network interface cards (NICs) created in the - * specified Subnet. - * - * @return mapPublicIpOnLaunch - */ - @javax.annotation.Nonnull - public Boolean getMapPublicIpOnLaunch() { - return mapPublicIpOnLaunch; - } - - public void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) { - this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; - } - - public UpdateSubnetRequest subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet. - * - * @return subnetId - */ - @javax.annotation.Nonnull - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSubnetRequest updateSubnetRequest = (UpdateSubnetRequest) o; - return Objects.equals(this.dryRun, updateSubnetRequest.dryRun) - && Objects.equals(this.mapPublicIpOnLaunch, updateSubnetRequest.mapPublicIpOnLaunch) - && Objects.equals(this.subnetId, updateSubnetRequest.subnetId); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, mapPublicIpOnLaunch, subnetId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSubnetRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" mapPublicIpOnLaunch: ") - .append(toIndentedString(mapPublicIpOnLaunch)) - .append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("MapPublicIpOnLaunch"); - openapiFields.add("SubnetId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("MapPublicIpOnLaunch"); - openapiRequiredFields.add("SubnetId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateSubnetRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateSubnetRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateSubnetRequest is not found in" - + " the empty JSON string", - UpdateSubnetRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateSubnetRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateSubnetRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateSubnetRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateSubnetRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateSubnetRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateSubnetRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateSubnetRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateSubnetRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateSubnetRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateSubnetRequest - * @throws IOException if the JSON string is invalid with respect to UpdateSubnetRequest - */ - public static UpdateSubnetRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateSubnetRequest.class); - } - - /** - * Convert an instance of UpdateSubnetRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponse.java deleted file mode 100644 index fc435a32..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateSubnetResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateSubnetResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_SUBNET = "Subnet"; - - @SerializedName(SERIALIZED_NAME_SUBNET) - private Subnet subnet; - - public UpdateSubnetResponse() {} - - public UpdateSubnetResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateSubnetResponse subnet(Subnet subnet) { - - this.subnet = subnet; - return this; - } - - /** - * Get subnet - * - * @return subnet - */ - @javax.annotation.Nullable - public Subnet getSubnet() { - return subnet; - } - - public void setSubnet(Subnet subnet) { - this.subnet = subnet; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSubnetResponse updateSubnetResponse = (UpdateSubnetResponse) o; - return Objects.equals(this.responseContext, updateSubnetResponse.responseContext) - && Objects.equals(this.subnet, updateSubnetResponse.subnet); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, subnet); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSubnetResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" subnet: ").append(toIndentedString(subnet)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Subnet"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateSubnetResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateSubnetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateSubnetResponse is not found in" - + " the empty JSON string", - UpdateSubnetResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateSubnetResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateSubnetResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Subnet` - if (jsonObj.get("Subnet") != null && !jsonObj.get("Subnet").isJsonNull()) { - Subnet.validateJsonObject(jsonObj.getAsJsonObject("Subnet")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateSubnetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateSubnetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateSubnetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateSubnetResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateSubnetResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateSubnetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateSubnetResponse - * @throws IOException if the JSON string is invalid with respect to UpdateSubnetResponse - */ - public static UpdateSubnetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateSubnetResponse.class); - } - - /** - * Convert an instance of UpdateSubnetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequest.java deleted file mode 100644 index 689b3cbc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequest.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateUserGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUserGroupRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NEW_PATH = "NewPath"; - - @SerializedName(SERIALIZED_NAME_NEW_PATH) - private String newPath; - - public static final String SERIALIZED_NAME_NEW_USER_GROUP_NAME = "NewUserGroupName"; - - @SerializedName(SERIALIZED_NAME_NEW_USER_GROUP_NAME) - private String newUserGroupName; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_GROUP_NAME = "UserGroupName"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_NAME) - private String userGroupName; - - public UpdateUserGroupRequest() {} - - public UpdateUserGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateUserGroupRequest newPath(String newPath) { - - this.newPath = newPath; - return this; - } - - /** - * A new path for the group. If not specified, it is set to a slash (`/`). - * - * @return newPath - */ - @javax.annotation.Nullable - public String getNewPath() { - return newPath; - } - - public void setNewPath(String newPath) { - this.newPath = newPath; - } - - public UpdateUserGroupRequest newUserGroupName(String newUserGroupName) { - - this.newUserGroupName = newUserGroupName; - return this; - } - - /** - * A new name for the user group. - * - * @return newUserGroupName - */ - @javax.annotation.Nullable - public String getNewUserGroupName() { - return newUserGroupName; - } - - public void setNewUserGroupName(String newUserGroupName) { - this.newUserGroupName = newUserGroupName; - } - - public UpdateUserGroupRequest path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the group. If not specified, it is set to a slash (`/`). - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public UpdateUserGroupRequest userGroupName(String userGroupName) { - - this.userGroupName = userGroupName; - return this; - } - - /** - * The name of the group you want to update. - * - * @return userGroupName - */ - @javax.annotation.Nonnull - public String getUserGroupName() { - return userGroupName; - } - - public void setUserGroupName(String userGroupName) { - this.userGroupName = userGroupName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserGroupRequest updateUserGroupRequest = (UpdateUserGroupRequest) o; - return Objects.equals(this.dryRun, updateUserGroupRequest.dryRun) - && Objects.equals(this.newPath, updateUserGroupRequest.newPath) - && Objects.equals(this.newUserGroupName, updateUserGroupRequest.newUserGroupName) - && Objects.equals(this.path, updateUserGroupRequest.path) - && Objects.equals(this.userGroupName, updateUserGroupRequest.userGroupName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, newPath, newUserGroupName, path, userGroupName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserGroupRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" newPath: ").append(toIndentedString(newPath)).append("\n"); - sb.append(" newUserGroupName: ").append(toIndentedString(newUserGroupName)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userGroupName: ").append(toIndentedString(userGroupName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NewPath"); - openapiFields.add("NewUserGroupName"); - openapiFields.add("Path"); - openapiFields.add("UserGroupName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserGroupName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserGroupRequest is not found" - + " in the empty JSON string", - UpdateUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateUserGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("NewPath") != null && !jsonObj.get("NewPath").isJsonNull()) - && !jsonObj.get("NewPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NewPath").toString())); - } - if ((jsonObj.get("NewUserGroupName") != null - && !jsonObj.get("NewUserGroupName").isJsonNull()) - && !jsonObj.get("NewUserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewUserGroupName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("NewUserGroupName").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if (!jsonObj.get("UserGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserGroupRequest - */ - public static UpdateUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserGroupRequest.class); - } - - /** - * Convert an instance of UpdateUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponse.java deleted file mode 100644 index 5b9188e6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponse.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateUserGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUserGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER_GROUP = "UserGroup"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP) - private UserGroup userGroup; - - public static final String SERIALIZED_NAME_USERS = "Users"; - - @SerializedName(SERIALIZED_NAME_USERS) - private List users = null; - - public UpdateUserGroupResponse() {} - - public UpdateUserGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateUserGroupResponse userGroup(UserGroup userGroup) { - - this.userGroup = userGroup; - return this; - } - - /** - * Get userGroup - * - * @return userGroup - */ - @javax.annotation.Nullable - public UserGroup getUserGroup() { - return userGroup; - } - - public void setUserGroup(UserGroup userGroup) { - this.userGroup = userGroup; - } - - public UpdateUserGroupResponse users(List users) { - - this.users = users; - return this; - } - - public UpdateUserGroupResponse addUsersItem(User usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); - } - this.users.add(usersItem); - return this; - } - - /** - * A list of EIM users. - * - * @return users - */ - @javax.annotation.Nullable - public List getUsers() { - return users; - } - - public void setUsers(List users) { - this.users = users; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserGroupResponse updateUserGroupResponse = (UpdateUserGroupResponse) o; - return Objects.equals(this.responseContext, updateUserGroupResponse.responseContext) - && Objects.equals(this.userGroup, updateUserGroupResponse.userGroup) - && Objects.equals(this.users, updateUserGroupResponse.users); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, userGroup, users); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" userGroup: ").append(toIndentedString(userGroup)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("UserGroup"); - openapiFields.add("Users"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserGroupResponse is not found" - + " in the empty JSON string", - UpdateUserGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateUserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `UserGroup` - if (jsonObj.get("UserGroup") != null && !jsonObj.get("UserGroup").isJsonNull()) { - UserGroup.validateJsonObject(jsonObj.getAsJsonObject("UserGroup")); - } - if (jsonObj.get("Users") != null && !jsonObj.get("Users").isJsonNull()) { - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("Users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("Users").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Users` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Users").toString())); - } - - // validate the optional field `Users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - User.validateJsonObject(jsonArrayusers.get(i).getAsJsonObject()); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserGroupResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserGroupResponse - * @throws IOException if the JSON string is invalid with respect to UpdateUserGroupResponse - */ - public static UpdateUserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserGroupResponse.class); - } - - /** - * Convert an instance of UpdateUserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequest.java deleted file mode 100644 index 57e834f8..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequest.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateUserRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUserRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_NEW_PATH = "NewPath"; - - @SerializedName(SERIALIZED_NAME_NEW_PATH) - private String newPath; - - public static final String SERIALIZED_NAME_NEW_USER_NAME = "NewUserName"; - - @SerializedName(SERIALIZED_NAME_NEW_USER_NAME) - private String newUserName; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public UpdateUserRequest() {} - - public UpdateUserRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateUserRequest newPath(String newPath) { - - this.newPath = newPath; - return this; - } - - /** - * A new path for the EIM user. - * - * @return newPath - */ - @javax.annotation.Nullable - public String getNewPath() { - return newPath; - } - - public void setNewPath(String newPath) { - this.newPath = newPath; - } - - public UpdateUserRequest newUserName(String newUserName) { - - this.newUserName = newUserName; - return this; - } - - /** - * A new name for the EIM user. - * - * @return newUserName - */ - @javax.annotation.Nullable - public String getNewUserName() { - return newUserName; - } - - public void setNewUserName(String newUserName) { - this.newUserName = newUserName; - } - - public UpdateUserRequest userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user you want to modify. - * - * @return userName - */ - @javax.annotation.Nonnull - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserRequest updateUserRequest = (UpdateUserRequest) o; - return Objects.equals(this.dryRun, updateUserRequest.dryRun) - && Objects.equals(this.newPath, updateUserRequest.newPath) - && Objects.equals(this.newUserName, updateUserRequest.newUserName) - && Objects.equals(this.userName, updateUserRequest.userName); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, newPath, newUserName, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" newPath: ").append(toIndentedString(newPath)).append("\n"); - sb.append(" newUserName: ").append(toIndentedString(newUserName)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("NewPath"); - openapiFields.add("NewUserName"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("UserName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserRequest is not found in the" - + " empty JSON string", - UpdateUserRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateUserRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("NewPath") != null && !jsonObj.get("NewPath").isJsonNull()) - && !jsonObj.get("NewPath").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewPath` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NewPath").toString())); - } - if ((jsonObj.get("NewUserName") != null && !jsonObj.get("NewUserName").isJsonNull()) - && !jsonObj.get("NewUserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NewUserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("NewUserName").toString())); - } - if (!jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest - */ - public static UpdateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserRequest.class); - } - - /** - * Convert an instance of UpdateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponse.java deleted file mode 100644 index 78ae37c7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateUserResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUserResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_USER = "User"; - - @SerializedName(SERIALIZED_NAME_USER) - private User user; - - public UpdateUserResponse() {} - - public UpdateUserResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateUserResponse user(User user) { - - this.user = user; - return this; - } - - /** - * Get user - * - * @return user - */ - @javax.annotation.Nullable - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserResponse updateUserResponse = (UpdateUserResponse) o; - return Objects.equals(this.responseContext, updateUserResponse.responseContext) - && Objects.equals(this.user, updateUserResponse.user); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, user); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("User"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserResponse is not found in" - + " the empty JSON string", - UpdateUserResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateUserResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `User` - if (jsonObj.get("User") != null && !jsonObj.get("User").isJsonNull()) { - User.validateJsonObject(jsonObj.getAsJsonObject("User")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUserResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserResponse - * @throws IOException if the JSON string is invalid with respect to UpdateUserResponse - */ - public static UpdateUserResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserResponse.class); - } - - /** - * Convert an instance of UpdateUserResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequest.java deleted file mode 100644 index 34a28fa3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequest.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmGroupRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_GROUP_ID = "VmGroupId"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_ID) - private String vmGroupId; - - public static final String SERIALIZED_NAME_VM_GROUP_NAME = "VmGroupName"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_NAME) - private String vmGroupName; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public UpdateVmGroupRequest() {} - - public UpdateVmGroupRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A new description for the VM group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateVmGroupRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateVmGroupRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public UpdateVmGroupRequest addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * New tags for your VM group. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public UpdateVmGroupRequest vmGroupId(String vmGroupId) { - - this.vmGroupId = vmGroupId; - return this; - } - - /** - * The ID of the VM group you want to update. - * - * @return vmGroupId - */ - @javax.annotation.Nonnull - public String getVmGroupId() { - return vmGroupId; - } - - public void setVmGroupId(String vmGroupId) { - this.vmGroupId = vmGroupId; - } - - public UpdateVmGroupRequest vmGroupName(String vmGroupName) { - - this.vmGroupName = vmGroupName; - return this; - } - - /** - * A new name for your VM group. - * - * @return vmGroupName - */ - @javax.annotation.Nullable - public String getVmGroupName() { - return vmGroupName; - } - - public void setVmGroupName(String vmGroupName) { - this.vmGroupName = vmGroupName; - } - - public UpdateVmGroupRequest vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * A new VM template ID for your VM group. - * - * @return vmTemplateId - */ - @javax.annotation.Nullable - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmGroupRequest updateVmGroupRequest = (UpdateVmGroupRequest) o; - return Objects.equals(this.description, updateVmGroupRequest.description) - && Objects.equals(this.dryRun, updateVmGroupRequest.dryRun) - && Objects.equals(this.tags, updateVmGroupRequest.tags) - && Objects.equals(this.vmGroupId, updateVmGroupRequest.vmGroupId) - && Objects.equals(this.vmGroupName, updateVmGroupRequest.vmGroupName) - && Objects.equals(this.vmTemplateId, updateVmGroupRequest.vmTemplateId); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, tags, vmGroupId, vmGroupName, vmTemplateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmGroupRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmGroupId: ").append(toIndentedString(vmGroupId)).append("\n"); - sb.append(" vmGroupName: ").append(toIndentedString(vmGroupName)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("Tags"); - openapiFields.add("VmGroupId"); - openapiFields.add("VmGroupName"); - openapiFields.add("VmTemplateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmGroupId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmGroupRequest is not found in" - + " the empty JSON string", - UpdateVmGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmGroupRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVmGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (!jsonObj.get("VmGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupId").toString())); - } - if ((jsonObj.get("VmGroupName") != null && !jsonObj.get("VmGroupName").isJsonNull()) - && !jsonObj.get("VmGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupName").toString())); - } - if ((jsonObj.get("VmTemplateId") != null && !jsonObj.get("VmTemplateId").isJsonNull()) - && !jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVmGroupRequest - */ - public static UpdateVmGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmGroupRequest.class); - } - - /** - * Convert an instance of UpdateVmGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponse.java deleted file mode 100644 index 2bb14652..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmGroupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmGroupResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_GROUP = "VmGroup"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP) - private VmGroup vmGroup; - - public UpdateVmGroupResponse() {} - - public UpdateVmGroupResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateVmGroupResponse vmGroup(VmGroup vmGroup) { - - this.vmGroup = vmGroup; - return this; - } - - /** - * Get vmGroup - * - * @return vmGroup - */ - @javax.annotation.Nullable - public VmGroup getVmGroup() { - return vmGroup; - } - - public void setVmGroup(VmGroup vmGroup) { - this.vmGroup = vmGroup; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmGroupResponse updateVmGroupResponse = (UpdateVmGroupResponse) o; - return Objects.equals(this.responseContext, updateVmGroupResponse.responseContext) - && Objects.equals(this.vmGroup, updateVmGroupResponse.vmGroup); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmGroup); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmGroupResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmGroup: ").append(toIndentedString(vmGroup)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmGroup"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmGroupResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmGroupResponse is not found in" - + " the empty JSON string", - UpdateVmGroupResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmGroupResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VmGroup` - if (jsonObj.get("VmGroup") != null && !jsonObj.get("VmGroup").isJsonNull()) { - VmGroup.validateJsonObject(jsonObj.getAsJsonObject("VmGroup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmGroupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmGroupResponse - * @throws IOException if the JSON string is invalid with respect to UpdateVmGroupResponse - */ - public static UpdateVmGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmGroupResponse.class); - } - - /** - * Convert an instance of UpdateVmGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequest.java deleted file mode 100644 index 953187b0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequest.java +++ /dev/null @@ -1,722 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmRequest { - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS = "BlockDeviceMappings"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS) - private List blockDeviceMappings = null; - - public static final String SERIALIZED_NAME_BSU_OPTIMIZED = "BsuOptimized"; - - @SerializedName(SERIALIZED_NAME_BSU_OPTIMIZED) - private Boolean bsuOptimized; - - public static final String SERIALIZED_NAME_DELETION_PROTECTION = "DeletionProtection"; - - @SerializedName(SERIALIZED_NAME_DELETION_PROTECTION) - private Boolean deletionProtection; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED = "IsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED) - private Boolean isSourceDestChecked; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_NESTED_VIRTUALIZATION = "NestedVirtualization"; - - @SerializedName(SERIALIZED_NAME_NESTED_VIRTUALIZATION) - private Boolean nestedVirtualization; - - /** - * The performance of the VM (`medium` \\| `high` \\| `highest`). - */ - @JsonAdapter(PerformanceEnum.Adapter.class) - public enum PerformanceEnum { - MEDIUM("medium"), - - HIGH("high"), - - HIGHEST("highest"); - - private String value; - - PerformanceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PerformanceEnum fromValue(String value) { - for (PerformanceEnum b : PerformanceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PerformanceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PerformanceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PerformanceEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERFORMANCE = "Performance"; - - @SerializedName(SERIALIZED_NAME_PERFORMANCE) - private PerformanceEnum performance; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - public static final String SERIALIZED_NAME_USER_DATA = "UserData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) - private String userData; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public static final String SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR = - "VmInitiatedShutdownBehavior"; - - @SerializedName(SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR) - private String vmInitiatedShutdownBehavior; - - public static final String SERIALIZED_NAME_VM_TYPE = "VmType"; - - @SerializedName(SERIALIZED_NAME_VM_TYPE) - private String vmType; - - public UpdateVmRequest() {} - - public UpdateVmRequest blockDeviceMappings( - List blockDeviceMappings) { - - this.blockDeviceMappings = blockDeviceMappings; - return this; - } - - public UpdateVmRequest addBlockDeviceMappingsItem( - BlockDeviceMappingVmUpdate blockDeviceMappingsItem) { - if (this.blockDeviceMappings == null) { - this.blockDeviceMappings = new ArrayList<>(); - } - this.blockDeviceMappings.add(blockDeviceMappingsItem); - return this; - } - - /** - * One or more block device mappings of the VM. - * - * @return blockDeviceMappings - */ - @javax.annotation.Nullable - public List getBlockDeviceMappings() { - return blockDeviceMappings; - } - - public void setBlockDeviceMappings(List blockDeviceMappings) { - this.blockDeviceMappings = blockDeviceMappings; - } - - public UpdateVmRequest bsuOptimized(Boolean bsuOptimized) { - - this.bsuOptimized = bsuOptimized; - return this; - } - - /** - * This parameter is not available. It is present in our API for the sake of historical - * compatibility with AWS. - * - * @return bsuOptimized - */ - @javax.annotation.Nullable - public Boolean getBsuOptimized() { - return bsuOptimized; - } - - public void setBsuOptimized(Boolean bsuOptimized) { - this.bsuOptimized = bsuOptimized; - } - - public UpdateVmRequest deletionProtection(Boolean deletionProtection) { - - this.deletionProtection = deletionProtection; - return this; - } - - /** - * If true, you cannot delete the VM unless you change this parameter back to false. - * - * @return deletionProtection - */ - @javax.annotation.Nullable - public Boolean getDeletionProtection() { - return deletionProtection; - } - - public void setDeletionProtection(Boolean deletionProtection) { - this.deletionProtection = deletionProtection; - } - - public UpdateVmRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateVmRequest isSourceDestChecked(Boolean isSourceDestChecked) { - - this.isSourceDestChecked = isSourceDestChecked; - return this; - } - - /** - * (Net only) If true, the source/destination check is enabled. If false, it is disabled. - * - * @return isSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestChecked() { - return isSourceDestChecked; - } - - public void setIsSourceDestChecked(Boolean isSourceDestChecked) { - this.isSourceDestChecked = isSourceDestChecked; - } - - public UpdateVmRequest keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of a keypair you want to associate with the VM.<br /> When you replace the - * keypair of a VM with another one, the metadata of the VM is modified to reflect the new - * public key, but the replacement is still not effective in the operating system of the VM. To - * complete the replacement and effectively apply the new keypair, you need to perform other - * actions inside the VM. For more information, see [Modifying the Keypair of a - * VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a-VM.html). - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public UpdateVmRequest nestedVirtualization(Boolean nestedVirtualization) { - - this.nestedVirtualization = nestedVirtualization; - return this; - } - - /** - * (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled. - * - * @return nestedVirtualization - */ - @javax.annotation.Nullable - public Boolean getNestedVirtualization() { - return nestedVirtualization; - } - - public void setNestedVirtualization(Boolean nestedVirtualization) { - this.nestedVirtualization = nestedVirtualization; - } - - public UpdateVmRequest performance(PerformanceEnum performance) { - - this.performance = performance; - return this; - } - - /** - * The performance of the VM (`medium` \\| `high` \\| `highest`). - * - * @return performance - */ - @javax.annotation.Nullable - public PerformanceEnum getPerformance() { - return performance; - } - - public void setPerformance(PerformanceEnum performance) { - this.performance = performance; - } - - public UpdateVmRequest securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public UpdateVmRequest addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the VM. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public UpdateVmRequest userData(String userData) { - - this.userData = userData; - return this; - } - - /** - * The Base64-encoded MIME user data, limited to 500 kibibytes (KiB). - * - * @return userData - */ - @javax.annotation.Nullable - public String getUserData() { - return userData; - } - - public void setUserData(String userData) { - this.userData = userData; - } - - public UpdateVmRequest vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nonnull - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - public UpdateVmRequest vmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - return this; - } - - /** - * The VM behavior when you stop it. If set to `stop`, the VM stops. If set to - * `restart`, the VM stops then automatically restarts. If set to - * `terminate`, the VM stops and is terminated. - * - * @return vmInitiatedShutdownBehavior - */ - @javax.annotation.Nullable - public String getVmInitiatedShutdownBehavior() { - return vmInitiatedShutdownBehavior; - } - - public void setVmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - } - - public UpdateVmRequest vmType(String vmType) { - - this.vmType = vmType; - return this; - } - - /** - * The type of VM. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * - * @return vmType - */ - @javax.annotation.Nullable - public String getVmType() { - return vmType; - } - - public void setVmType(String vmType) { - this.vmType = vmType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmRequest updateVmRequest = (UpdateVmRequest) o; - return Objects.equals(this.blockDeviceMappings, updateVmRequest.blockDeviceMappings) - && Objects.equals(this.bsuOptimized, updateVmRequest.bsuOptimized) - && Objects.equals(this.deletionProtection, updateVmRequest.deletionProtection) - && Objects.equals(this.dryRun, updateVmRequest.dryRun) - && Objects.equals(this.isSourceDestChecked, updateVmRequest.isSourceDestChecked) - && Objects.equals(this.keypairName, updateVmRequest.keypairName) - && Objects.equals(this.nestedVirtualization, updateVmRequest.nestedVirtualization) - && Objects.equals(this.performance, updateVmRequest.performance) - && Objects.equals(this.securityGroupIds, updateVmRequest.securityGroupIds) - && Objects.equals(this.userData, updateVmRequest.userData) - && Objects.equals(this.vmId, updateVmRequest.vmId) - && Objects.equals( - this.vmInitiatedShutdownBehavior, - updateVmRequest.vmInitiatedShutdownBehavior) - && Objects.equals(this.vmType, updateVmRequest.vmType); - } - - @Override - public int hashCode() { - return Objects.hash( - blockDeviceMappings, - bsuOptimized, - deletionProtection, - dryRun, - isSourceDestChecked, - keypairName, - nestedVirtualization, - performance, - securityGroupIds, - userData, - vmId, - vmInitiatedShutdownBehavior, - vmType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmRequest {\n"); - sb.append(" blockDeviceMappings: ") - .append(toIndentedString(blockDeviceMappings)) - .append("\n"); - sb.append(" bsuOptimized: ").append(toIndentedString(bsuOptimized)).append("\n"); - sb.append(" deletionProtection: ") - .append(toIndentedString(deletionProtection)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" isSourceDestChecked: ") - .append(toIndentedString(isSourceDestChecked)) - .append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" nestedVirtualization: ") - .append(toIndentedString(nestedVirtualization)) - .append("\n"); - sb.append(" performance: ").append(toIndentedString(performance)).append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append(" vmInitiatedShutdownBehavior: ") - .append(toIndentedString(vmInitiatedShutdownBehavior)) - .append("\n"); - sb.append(" vmType: ").append(toIndentedString(vmType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BlockDeviceMappings"); - openapiFields.add("BsuOptimized"); - openapiFields.add("DeletionProtection"); - openapiFields.add("DryRun"); - openapiFields.add("IsSourceDestChecked"); - openapiFields.add("KeypairName"); - openapiFields.add("NestedVirtualization"); - openapiFields.add("Performance"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("UserData"); - openapiFields.add("VmId"); - openapiFields.add("VmInitiatedShutdownBehavior"); - openapiFields.add("VmType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmRequest is not found in the" - + " empty JSON string", - UpdateVmRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVmRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (jsonObj.get("BlockDeviceMappings") != null - && !jsonObj.get("BlockDeviceMappings").isJsonNull()) { - JsonArray jsonArrayblockDeviceMappings = jsonObj.getAsJsonArray("BlockDeviceMappings"); - if (jsonArrayblockDeviceMappings != null) { - // ensure the json data is an array - if (!jsonObj.get("BlockDeviceMappings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappings` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappings").toString())); - } - - // validate the optional field `BlockDeviceMappings` (array) - for (int i = 0; i < jsonArrayblockDeviceMappings.size(); i++) { - BlockDeviceMappingVmUpdate.validateJsonObject( - jsonArrayblockDeviceMappings.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if ((jsonObj.get("Performance") != null && !jsonObj.get("Performance").isJsonNull()) - && !jsonObj.get("Performance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Performance` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Performance").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - if ((jsonObj.get("UserData") != null && !jsonObj.get("UserData").isJsonNull()) - && !jsonObj.get("UserData").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserData` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserData").toString())); - } - if (!jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - if ((jsonObj.get("VmInitiatedShutdownBehavior") != null - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonNull()) - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmInitiatedShutdownBehavior` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("VmInitiatedShutdownBehavior").toString())); - } - if ((jsonObj.get("VmType") != null && !jsonObj.get("VmType").isJsonNull()) - && !jsonObj.get("VmType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmType` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVmRequest - */ - public static UpdateVmRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmRequest.class); - } - - /** - * Convert an instance of UpdateVmRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponse.java deleted file mode 100644 index 6f1df5c0..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM = "Vm"; - - @SerializedName(SERIALIZED_NAME_VM) - private Vm vm; - - public UpdateVmResponse() {} - - public UpdateVmResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateVmResponse vm(Vm vm) { - - this.vm = vm; - return this; - } - - /** - * Get vm - * - * @return vm - */ - @javax.annotation.Nullable - public Vm getVm() { - return vm; - } - - public void setVm(Vm vm) { - this.vm = vm; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmResponse updateVmResponse = (UpdateVmResponse) o; - return Objects.equals(this.responseContext, updateVmResponse.responseContext) - && Objects.equals(this.vm, updateVmResponse.vm); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vm); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vm: ").append(toIndentedString(vm)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Vm"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmResponse is not found in the" - + " empty JSON string", - UpdateVmResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Vm` - if (jsonObj.get("Vm") != null && !jsonObj.get("Vm").isJsonNull()) { - Vm.validateJsonObject(jsonObj.getAsJsonObject("Vm")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmResponse - * @throws IOException if the JSON string is invalid with respect to UpdateVmResponse - */ - public static UpdateVmResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmResponse.class); - } - - /** - * Convert an instance of UpdateVmResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequest.java deleted file mode 100644 index 5f08383a..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequest.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmTemplateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmTemplateRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_NAME = "VmTemplateName"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_NAME) - private String vmTemplateName; - - public UpdateVmTemplateRequest() {} - - public UpdateVmTemplateRequest description(String description) { - - this.description = description; - return this; - } - - /** - * A new description for the VM template. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UpdateVmTemplateRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateVmTemplateRequest tags(List tags) { - - this.tags = tags; - return this; - } - - public UpdateVmTemplateRequest addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * New tags for your VM template. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public UpdateVmTemplateRequest vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * The ID of the VM template you want to update. - * - * @return vmTemplateId - */ - @javax.annotation.Nonnull - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - public UpdateVmTemplateRequest vmTemplateName(String vmTemplateName) { - - this.vmTemplateName = vmTemplateName; - return this; - } - - /** - * A new name for your VM template. - * - * @return vmTemplateName - */ - @javax.annotation.Nullable - public String getVmTemplateName() { - return vmTemplateName; - } - - public void setVmTemplateName(String vmTemplateName) { - this.vmTemplateName = vmTemplateName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmTemplateRequest updateVmTemplateRequest = (UpdateVmTemplateRequest) o; - return Objects.equals(this.description, updateVmTemplateRequest.description) - && Objects.equals(this.dryRun, updateVmTemplateRequest.dryRun) - && Objects.equals(this.tags, updateVmTemplateRequest.tags) - && Objects.equals(this.vmTemplateId, updateVmTemplateRequest.vmTemplateId) - && Objects.equals(this.vmTemplateName, updateVmTemplateRequest.vmTemplateName); - } - - @Override - public int hashCode() { - return Objects.hash(description, dryRun, tags, vmTemplateId, vmTemplateName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmTemplateRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append(" vmTemplateName: ").append(toIndentedString(vmTemplateName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Description"); - openapiFields.add("DryRun"); - openapiFields.add("Tags"); - openapiFields.add("VmTemplateId"); - openapiFields.add("VmTemplateName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VmTemplateId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmTemplateRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmTemplateRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmTemplateRequest is not found" - + " in the empty JSON string", - UpdateVmTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmTemplateRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVmTemplateRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (!jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - if ((jsonObj.get("VmTemplateName") != null && !jsonObj.get("VmTemplateName").isJsonNull()) - && !jsonObj.get("VmTemplateName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VmTemplateName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmTemplateRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmTemplateRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmTemplateRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmTemplateRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmTemplateRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVmTemplateRequest - */ - public static UpdateVmTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmTemplateRequest.class); - } - - /** - * Convert an instance of UpdateVmTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponse.java deleted file mode 100644 index 872bb20f..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVmTemplateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVmTemplateResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VM_TEMPLATE = "VmTemplate"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE) - private VmTemplate vmTemplate; - - public UpdateVmTemplateResponse() {} - - public UpdateVmTemplateResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateVmTemplateResponse vmTemplate(VmTemplate vmTemplate) { - - this.vmTemplate = vmTemplate; - return this; - } - - /** - * Get vmTemplate - * - * @return vmTemplate - */ - @javax.annotation.Nullable - public VmTemplate getVmTemplate() { - return vmTemplate; - } - - public void setVmTemplate(VmTemplate vmTemplate) { - this.vmTemplate = vmTemplate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVmTemplateResponse updateVmTemplateResponse = (UpdateVmTemplateResponse) o; - return Objects.equals(this.responseContext, updateVmTemplateResponse.responseContext) - && Objects.equals(this.vmTemplate, updateVmTemplateResponse.vmTemplate); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vmTemplate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVmTemplateResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vmTemplate: ").append(toIndentedString(vmTemplate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VmTemplate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVmTemplateResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVmTemplateResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVmTemplateResponse is not found" - + " in the empty JSON string", - UpdateVmTemplateResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVmTemplateResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVmTemplateResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VmTemplate` - if (jsonObj.get("VmTemplate") != null && !jsonObj.get("VmTemplate").isJsonNull()) { - VmTemplate.validateJsonObject(jsonObj.getAsJsonObject("VmTemplate")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVmTemplateResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVmTemplateResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVmTemplateResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVmTemplateResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVmTemplateResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVmTemplateResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVmTemplateResponse - * @throws IOException if the JSON string is invalid with respect to UpdateVmTemplateResponse - */ - public static UpdateVmTemplateResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVmTemplateResponse.class); - } - - /** - * Convert an instance of UpdateVmTemplateResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequest.java deleted file mode 100644 index 0ed89cd6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequest.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVolumeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVolumeRequest { - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_IOPS = "Iops"; - - @SerializedName(SERIALIZED_NAME_IOPS) - private Integer iops; - - public static final String SERIALIZED_NAME_SIZE = "Size"; - - @SerializedName(SERIALIZED_NAME_SIZE) - private Integer size; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public static final String SERIALIZED_NAME_VOLUME_TYPE = "VolumeType"; - - @SerializedName(SERIALIZED_NAME_VOLUME_TYPE) - private String volumeType; - - public UpdateVolumeRequest() {} - - public UpdateVolumeRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateVolumeRequest iops(Integer iops) { - - this.iops = iops; - return this; - } - - /** - * **Cold volume**: the new number of I/O operations per second (IOPS). This parameter can be - * specified only if you update an `io1` volume or if you change the type of the - * volume for an `io1`. This modification is instantaneous. <br /> **Hot - * volume**: the new number of I/O operations per second (IOPS). This parameter can be specified - * only if you update an `io1` volume. This modification is not instantaneous. <br - * /><br /> The maximum number of IOPS allowed for `io1` volumes is - * `13000` with a maximum performance ratio of 300 IOPS per gibibyte. - * - * @return iops - */ - @javax.annotation.Nullable - public Integer getIops() { - return iops; - } - - public void setIops(Integer iops) { - this.iops = iops; - } - - public UpdateVolumeRequest size(Integer size) { - - this.size = size; - return this; - } - - /** - * **Cold volume**: the new size of the volume, in gibibytes (GiB). This value must be equal to - * or greater than the current size of the volume. This modification is not instantaneous. - * <br /> **Hot volume**: you cannot change the size of a hot volume. - * - * @return size - */ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public UpdateVolumeRequest volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume you want to update. - * - * @return volumeId - */ - @javax.annotation.Nonnull - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - public UpdateVolumeRequest volumeType(String volumeType) { - - this.volumeType = volumeType; - return this; - } - - /** - * **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| - * `gp2`). This modification is instantaneous. If you update to an `io1` - * volume, you must also specify the `Iops` parameter.<br /> **Hot volume**: you - * cannot change the type of a hot volume. - * - * @return volumeType - */ - @javax.annotation.Nullable - public String getVolumeType() { - return volumeType; - } - - public void setVolumeType(String volumeType) { - this.volumeType = volumeType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVolumeRequest updateVolumeRequest = (UpdateVolumeRequest) o; - return Objects.equals(this.dryRun, updateVolumeRequest.dryRun) - && Objects.equals(this.iops, updateVolumeRequest.iops) - && Objects.equals(this.size, updateVolumeRequest.size) - && Objects.equals(this.volumeId, updateVolumeRequest.volumeId) - && Objects.equals(this.volumeType, updateVolumeRequest.volumeType); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, iops, size, volumeId, volumeType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVolumeRequest {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" iops: ").append(toIndentedString(iops)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append(" volumeType: ").append(toIndentedString(volumeType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("DryRun"); - openapiFields.add("Iops"); - openapiFields.add("Size"); - openapiFields.add("VolumeId"); - openapiFields.add("VolumeType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VolumeId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVolumeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVolumeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVolumeRequest is not found in" - + " the empty JSON string", - UpdateVolumeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVolumeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVolumeRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVolumeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - if ((jsonObj.get("VolumeType") != null && !jsonObj.get("VolumeType").isJsonNull()) - && !jsonObj.get("VolumeType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVolumeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVolumeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVolumeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVolumeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVolumeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVolumeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVolumeRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVolumeRequest - */ - public static UpdateVolumeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVolumeRequest.class); - } - - /** - * Convert an instance of UpdateVolumeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponse.java deleted file mode 100644 index 2d71efe7..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVolumeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVolumeResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VOLUME = "Volume"; - - @SerializedName(SERIALIZED_NAME_VOLUME) - private Volume volume; - - public UpdateVolumeResponse() {} - - public UpdateVolumeResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateVolumeResponse volume(Volume volume) { - - this.volume = volume; - return this; - } - - /** - * Get volume - * - * @return volume - */ - @javax.annotation.Nullable - public Volume getVolume() { - return volume; - } - - public void setVolume(Volume volume) { - this.volume = volume; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVolumeResponse updateVolumeResponse = (UpdateVolumeResponse) o; - return Objects.equals(this.responseContext, updateVolumeResponse.responseContext) - && Objects.equals(this.volume, updateVolumeResponse.volume); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, volume); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVolumeResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" volume: ").append(toIndentedString(volume)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("Volume"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVolumeResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVolumeResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVolumeResponse is not found in" - + " the empty JSON string", - UpdateVolumeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVolumeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVolumeResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `Volume` - if (jsonObj.get("Volume") != null && !jsonObj.get("Volume").isJsonNull()) { - Volume.validateJsonObject(jsonObj.getAsJsonObject("Volume")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVolumeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVolumeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVolumeResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVolumeResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVolumeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVolumeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVolumeResponse - * @throws IOException if the JSON string is invalid with respect to UpdateVolumeResponse - */ - public static UpdateVolumeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVolumeResponse.class); - } - - /** - * Convert an instance of UpdateVolumeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequest.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequest.java deleted file mode 100644 index 7b41d8fc..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequest.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVpnConnectionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVpnConnectionRequest { - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_ID = "ClientGatewayId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_ID) - private String clientGatewayId; - - public static final String SERIALIZED_NAME_DRY_RUN = "DryRun"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_ID = "VpnConnectionId"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_ID) - private String vpnConnectionId; - - public static final String SERIALIZED_NAME_VPN_OPTIONS = "VpnOptions"; - - @SerializedName(SERIALIZED_NAME_VPN_OPTIONS) - private VpnOptions vpnOptions; - - public UpdateVpnConnectionRequest() {} - - public UpdateVpnConnectionRequest clientGatewayId(String clientGatewayId) { - - this.clientGatewayId = clientGatewayId; - return this; - } - - /** - * The ID of the client gateway. - * - * @return clientGatewayId - */ - @javax.annotation.Nullable - public String getClientGatewayId() { - return clientGatewayId; - } - - public void setClientGatewayId(String clientGatewayId) { - this.clientGatewayId = clientGatewayId; - } - - public UpdateVpnConnectionRequest dryRun(Boolean dryRun) { - - this.dryRun = dryRun; - return this; - } - - /** - * If true, checks whether you have the required permissions to perform the action. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - public UpdateVpnConnectionRequest virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nullable - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - public UpdateVpnConnectionRequest vpnConnectionId(String vpnConnectionId) { - - this.vpnConnectionId = vpnConnectionId; - return this; - } - - /** - * The ID of the VPN connection you want to modify. - * - * @return vpnConnectionId - */ - @javax.annotation.Nonnull - public String getVpnConnectionId() { - return vpnConnectionId; - } - - public void setVpnConnectionId(String vpnConnectionId) { - this.vpnConnectionId = vpnConnectionId; - } - - public UpdateVpnConnectionRequest vpnOptions(VpnOptions vpnOptions) { - - this.vpnOptions = vpnOptions; - return this; - } - - /** - * Get vpnOptions - * - * @return vpnOptions - */ - @javax.annotation.Nullable - public VpnOptions getVpnOptions() { - return vpnOptions; - } - - public void setVpnOptions(VpnOptions vpnOptions) { - this.vpnOptions = vpnOptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVpnConnectionRequest updateVpnConnectionRequest = (UpdateVpnConnectionRequest) o; - return Objects.equals(this.clientGatewayId, updateVpnConnectionRequest.clientGatewayId) - && Objects.equals(this.dryRun, updateVpnConnectionRequest.dryRun) - && Objects.equals( - this.virtualGatewayId, updateVpnConnectionRequest.virtualGatewayId) - && Objects.equals(this.vpnConnectionId, updateVpnConnectionRequest.vpnConnectionId) - && Objects.equals(this.vpnOptions, updateVpnConnectionRequest.vpnOptions); - } - - @Override - public int hashCode() { - return Objects.hash(clientGatewayId, dryRun, virtualGatewayId, vpnConnectionId, vpnOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVpnConnectionRequest {\n"); - sb.append(" clientGatewayId: ").append(toIndentedString(clientGatewayId)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append(" vpnConnectionId: ").append(toIndentedString(vpnConnectionId)).append("\n"); - sb.append(" vpnOptions: ").append(toIndentedString(vpnOptions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGatewayId"); - openapiFields.add("DryRun"); - openapiFields.add("VirtualGatewayId"); - openapiFields.add("VpnConnectionId"); - openapiFields.add("VpnOptions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("VpnConnectionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVpnConnectionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVpnConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVpnConnectionRequest is not" - + " found in the empty JSON string", - UpdateVpnConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVpnConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVpnConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVpnConnectionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if ((jsonObj.get("ClientGatewayId") != null && !jsonObj.get("ClientGatewayId").isJsonNull()) - && !jsonObj.get("ClientGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGatewayId").toString())); - } - if ((jsonObj.get("VirtualGatewayId") != null - && !jsonObj.get("VirtualGatewayId").isJsonNull()) - && !jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - if (!jsonObj.get("VpnConnectionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnectionId").toString())); - } - // validate the optional field `VpnOptions` - if (jsonObj.get("VpnOptions") != null && !jsonObj.get("VpnOptions").isJsonNull()) { - VpnOptions.validateJsonObject(jsonObj.getAsJsonObject("VpnOptions")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVpnConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVpnConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVpnConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVpnConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVpnConnectionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVpnConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVpnConnectionRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVpnConnectionRequest - */ - public static UpdateVpnConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVpnConnectionRequest.class); - } - - /** - * Convert an instance of UpdateVpnConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponse.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponse.java deleted file mode 100644 index cb7703f6..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** UpdateVpnConnectionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateVpnConnectionResponse { - public static final String SERIALIZED_NAME_RESPONSE_CONTEXT = "ResponseContext"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_CONTEXT) - private ResponseContext responseContext; - - public static final String SERIALIZED_NAME_VPN_CONNECTION = "VpnConnection"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION) - private VpnConnection vpnConnection; - - public UpdateVpnConnectionResponse() {} - - public UpdateVpnConnectionResponse responseContext(ResponseContext responseContext) { - - this.responseContext = responseContext; - return this; - } - - /** - * Get responseContext - * - * @return responseContext - */ - @javax.annotation.Nullable - public ResponseContext getResponseContext() { - return responseContext; - } - - public void setResponseContext(ResponseContext responseContext) { - this.responseContext = responseContext; - } - - public UpdateVpnConnectionResponse vpnConnection(VpnConnection vpnConnection) { - - this.vpnConnection = vpnConnection; - return this; - } - - /** - * Get vpnConnection - * - * @return vpnConnection - */ - @javax.annotation.Nullable - public VpnConnection getVpnConnection() { - return vpnConnection; - } - - public void setVpnConnection(VpnConnection vpnConnection) { - this.vpnConnection = vpnConnection; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateVpnConnectionResponse updateVpnConnectionResponse = (UpdateVpnConnectionResponse) o; - return Objects.equals(this.responseContext, updateVpnConnectionResponse.responseContext) - && Objects.equals(this.vpnConnection, updateVpnConnectionResponse.vpnConnection); - } - - @Override - public int hashCode() { - return Objects.hash(responseContext, vpnConnection); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateVpnConnectionResponse {\n"); - sb.append(" responseContext: ").append(toIndentedString(responseContext)).append("\n"); - sb.append(" vpnConnection: ").append(toIndentedString(vpnConnection)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ResponseContext"); - openapiFields.add("VpnConnection"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateVpnConnectionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateVpnConnectionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVpnConnectionResponse is not" - + " found in the empty JSON string", - UpdateVpnConnectionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdateVpnConnectionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVpnConnectionResponse` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `ResponseContext` - if (jsonObj.get("ResponseContext") != null - && !jsonObj.get("ResponseContext").isJsonNull()) { - ResponseContext.validateJsonObject(jsonObj.getAsJsonObject("ResponseContext")); - } - // validate the optional field `VpnConnection` - if (jsonObj.get("VpnConnection") != null && !jsonObj.get("VpnConnection").isJsonNull()) { - VpnConnection.validateJsonObject(jsonObj.getAsJsonObject("VpnConnection")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVpnConnectionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVpnConnectionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVpnConnectionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVpnConnectionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVpnConnectionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVpnConnectionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVpnConnectionResponse - * @throws IOException if the JSON string is invalid with respect to UpdateVpnConnectionResponse - */ - public static UpdateVpnConnectionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVpnConnectionResponse.class); - } - - /** - * Convert an instance of UpdateVpnConnectionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/User.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/User.java deleted file mode 100644 index 79b03771..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/User.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the EIM user. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class User { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_ID = "UserId"; - - @SerializedName(SERIALIZED_NAME_USER_ID) - private String userId; - - public static final String SERIALIZED_NAME_USER_NAME = "UserName"; - - @SerializedName(SERIALIZED_NAME_USER_NAME) - private String userName; - - public User() {} - - public User creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) of creation of the EIM user. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public User lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) of the last modification of the EIM user. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public User path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the EIM user. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public User userId(String userId) { - - this.userId = userId; - return this; - } - - /** - * The ID of the EIM user. - * - * @return userId - */ - @javax.annotation.Nullable - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public User userName(String userName) { - - this.userName = userName; - return this; - } - - /** - * The name of the EIM user. - * - * @return userName - */ - @javax.annotation.Nullable - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.creationDate, user.creationDate) - && Objects.equals(this.lastModificationDate, user.lastModificationDate) - && Objects.equals(this.path, user.path) - && Objects.equals(this.userId, user.userId) - && Objects.equals(this.userName, user.userName); - } - - @Override - public int hashCode() { - return Objects.hash(creationDate, lastModificationDate, path, userId, userName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("LastModificationDate"); - openapiFields.add("Path"); - openapiFields.add("UserId"); - openapiFields.add("UserName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to User - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!User.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in User is not found in the empty JSON" - + " string", - User.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!User.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `User`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if ((jsonObj.get("UserId") != null && !jsonObj.get("UserId").isJsonNull()) - && !jsonObj.get("UserId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("UserId").toString())); - } - if ((jsonObj.get("UserName") != null && !jsonObj.get("UserName").isJsonNull()) - && !jsonObj.get("UserName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!User.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'User' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(User.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, User value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public User read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of User given an JSON string - * - * @param jsonString JSON string - * @return An instance of User - * @throws IOException if the JSON string is invalid with respect to User - */ - public static User fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, User.class); - } - - /** - * Convert an instance of User to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UserGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/UserGroup.java deleted file mode 100644 index 7e07ff30..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/UserGroup.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the user group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserGroup { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_LAST_MODIFICATION_DATE = "LastModificationDate"; - - @SerializedName(SERIALIZED_NAME_LAST_MODIFICATION_DATE) - private OffsetDateTime lastModificationDate; - - public static final String SERIALIZED_NAME_NAME = "Name"; - - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ORN = "Orn"; - - @SerializedName(SERIALIZED_NAME_ORN) - private String orn; - - public static final String SERIALIZED_NAME_PATH = "Path"; - - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_USER_GROUP_ID = "UserGroupId"; - - @SerializedName(SERIALIZED_NAME_USER_GROUP_ID) - private String userGroupId; - - public UserGroup() {} - - public UserGroup creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) of creation of the user group. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public UserGroup lastModificationDate(OffsetDateTime lastModificationDate) { - - this.lastModificationDate = lastModificationDate; - return this; - } - - /** - * The date and time (UTC) of the last modification of the user group. - * - * @return lastModificationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastModificationDate() { - return lastModificationDate; - } - - public void setLastModificationDate(OffsetDateTime lastModificationDate) { - this.lastModificationDate = lastModificationDate; - } - - public UserGroup name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the user group. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public UserGroup orn(String orn) { - - this.orn = orn; - return this; - } - - /** - * The Outscale Resource Name (ORN) of the user group. For more information, see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html). - * - * @return orn - */ - @javax.annotation.Nullable - public String getOrn() { - return orn; - } - - public void setOrn(String orn) { - this.orn = orn; - } - - public UserGroup path(String path) { - - this.path = path; - return this; - } - - /** - * The path to the user group. - * - * @return path - */ - @javax.annotation.Nullable - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public UserGroup userGroupId(String userGroupId) { - - this.userGroupId = userGroupId; - return this; - } - - /** - * The ID of the user group. - * - * @return userGroupId - */ - @javax.annotation.Nullable - public String getUserGroupId() { - return userGroupId; - } - - public void setUserGroupId(String userGroupId) { - this.userGroupId = userGroupId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserGroup userGroup = (UserGroup) o; - return Objects.equals(this.creationDate, userGroup.creationDate) - && Objects.equals(this.lastModificationDate, userGroup.lastModificationDate) - && Objects.equals(this.name, userGroup.name) - && Objects.equals(this.orn, userGroup.orn) - && Objects.equals(this.path, userGroup.path) - && Objects.equals(this.userGroupId, userGroup.userGroupId); - } - - @Override - public int hashCode() { - return Objects.hash(creationDate, lastModificationDate, name, orn, path, userGroupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserGroup {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" lastModificationDate: ") - .append(toIndentedString(lastModificationDate)) - .append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" orn: ").append(toIndentedString(orn)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" userGroupId: ").append(toIndentedString(userGroupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("LastModificationDate"); - openapiFields.add("Name"); - openapiFields.add("Orn"); - openapiFields.add("Path"); - openapiFields.add("UserGroupId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserGroup is not found in the empty" - + " JSON string", - UserGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UserGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserGroup` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Name") != null && !jsonObj.get("Name").isJsonNull()) - && !jsonObj.get("Name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Name").toString())); - } - if ((jsonObj.get("Orn") != null && !jsonObj.get("Orn").isJsonNull()) - && !jsonObj.get("Orn").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Orn` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Orn").toString())); - } - if ((jsonObj.get("Path") != null && !jsonObj.get("Path").isJsonNull()) - && !jsonObj.get("Path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("Path").toString())); - } - if ((jsonObj.get("UserGroupId") != null && !jsonObj.get("UserGroupId").isJsonNull()) - && !jsonObj.get("UserGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserGroupId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserGroup - * @throws IOException if the JSON string is invalid with respect to UserGroup - */ - public static UserGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserGroup.class); - } - - /** - * Convert an instance of UserGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetry.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetry.java deleted file mode 100644 index beb88668..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetry.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the current state of a VPN tunnel. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VgwTelemetry { - public static final String SERIALIZED_NAME_ACCEPTED_ROUTE_COUNT = "AcceptedRouteCount"; - - @SerializedName(SERIALIZED_NAME_ACCEPTED_ROUTE_COUNT) - private Integer acceptedRouteCount; - - public static final String SERIALIZED_NAME_LAST_STATE_CHANGE_DATE = "LastStateChangeDate"; - - @SerializedName(SERIALIZED_NAME_LAST_STATE_CHANGE_DATE) - private OffsetDateTime lastStateChangeDate; - - public static final String SERIALIZED_NAME_OUTSIDE_IP_ADDRESS = "OutsideIpAddress"; - - @SerializedName(SERIALIZED_NAME_OUTSIDE_IP_ADDRESS) - private String outsideIpAddress; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_DESCRIPTION = "StateDescription"; - - @SerializedName(SERIALIZED_NAME_STATE_DESCRIPTION) - private String stateDescription; - - public VgwTelemetry() {} - - public VgwTelemetry acceptedRouteCount(Integer acceptedRouteCount) { - - this.acceptedRouteCount = acceptedRouteCount; - return this; - } - - /** - * The number of routes accepted through BGP (Border Gateway Protocol) route exchanges. - * - * @return acceptedRouteCount - */ - @javax.annotation.Nullable - public Integer getAcceptedRouteCount() { - return acceptedRouteCount; - } - - public void setAcceptedRouteCount(Integer acceptedRouteCount) { - this.acceptedRouteCount = acceptedRouteCount; - } - - public VgwTelemetry lastStateChangeDate(OffsetDateTime lastStateChangeDate) { - - this.lastStateChangeDate = lastStateChangeDate; - return this; - } - - /** - * The date and time (UTC) of the latest state update. - * - * @return lastStateChangeDate - */ - @javax.annotation.Nullable - public OffsetDateTime getLastStateChangeDate() { - return lastStateChangeDate; - } - - public void setLastStateChangeDate(OffsetDateTime lastStateChangeDate) { - this.lastStateChangeDate = lastStateChangeDate; - } - - public VgwTelemetry outsideIpAddress(String outsideIpAddress) { - - this.outsideIpAddress = outsideIpAddress; - return this; - } - - /** - * The IP on the OUTSCALE side of the tunnel. - * - * @return outsideIpAddress - */ - @javax.annotation.Nullable - public String getOutsideIpAddress() { - return outsideIpAddress; - } - - public void setOutsideIpAddress(String outsideIpAddress) { - this.outsideIpAddress = outsideIpAddress; - } - - public VgwTelemetry state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the IPSEC tunnel (`UP` \\| `DOWN`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public VgwTelemetry stateDescription(String stateDescription) { - - this.stateDescription = stateDescription; - return this; - } - - /** - * A description of the current state of the tunnel. - * - * @return stateDescription - */ - @javax.annotation.Nullable - public String getStateDescription() { - return stateDescription; - } - - public void setStateDescription(String stateDescription) { - this.stateDescription = stateDescription; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VgwTelemetry vgwTelemetry = (VgwTelemetry) o; - return Objects.equals(this.acceptedRouteCount, vgwTelemetry.acceptedRouteCount) - && Objects.equals(this.lastStateChangeDate, vgwTelemetry.lastStateChangeDate) - && Objects.equals(this.outsideIpAddress, vgwTelemetry.outsideIpAddress) - && Objects.equals(this.state, vgwTelemetry.state) - && Objects.equals(this.stateDescription, vgwTelemetry.stateDescription); - } - - @Override - public int hashCode() { - return Objects.hash( - acceptedRouteCount, lastStateChangeDate, outsideIpAddress, state, stateDescription); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VgwTelemetry {\n"); - sb.append(" acceptedRouteCount: ") - .append(toIndentedString(acceptedRouteCount)) - .append("\n"); - sb.append(" lastStateChangeDate: ") - .append(toIndentedString(lastStateChangeDate)) - .append("\n"); - sb.append(" outsideIpAddress: ").append(toIndentedString(outsideIpAddress)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateDescription: ").append(toIndentedString(stateDescription)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AcceptedRouteCount"); - openapiFields.add("LastStateChangeDate"); - openapiFields.add("OutsideIpAddress"); - openapiFields.add("State"); - openapiFields.add("StateDescription"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VgwTelemetry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VgwTelemetry.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VgwTelemetry is not found in the" - + " empty JSON string", - VgwTelemetry.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VgwTelemetry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VgwTelemetry` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("OutsideIpAddress") != null - && !jsonObj.get("OutsideIpAddress").isJsonNull()) - && !jsonObj.get("OutsideIpAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OutsideIpAddress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("OutsideIpAddress").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("StateDescription") != null - && !jsonObj.get("StateDescription").isJsonNull()) - && !jsonObj.get("StateDescription").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateDescription` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("StateDescription").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VgwTelemetry.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VgwTelemetry' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VgwTelemetry.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VgwTelemetry value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VgwTelemetry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VgwTelemetry given an JSON string - * - * @param jsonString JSON string - * @return An instance of VgwTelemetry - * @throws IOException if the JSON string is invalid with respect to VgwTelemetry - */ - public static VgwTelemetry fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VgwTelemetry.class); - } - - /** - * Convert an instance of VgwTelemetry to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VirtualGateway.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VirtualGateway.java deleted file mode 100644 index 8975d27e..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VirtualGateway.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the virtual gateway. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualGateway { - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_NET_TO_VIRTUAL_GATEWAY_LINKS = - "NetToVirtualGatewayLinks"; - - @SerializedName(SERIALIZED_NAME_NET_TO_VIRTUAL_GATEWAY_LINKS) - private List netToVirtualGatewayLinks = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public VirtualGateway() {} - - public VirtualGateway connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The type of VPN connection supported by the virtual gateway (always `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nullable - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public VirtualGateway netToVirtualGatewayLinks( - List netToVirtualGatewayLinks) { - - this.netToVirtualGatewayLinks = netToVirtualGatewayLinks; - return this; - } - - public VirtualGateway addNetToVirtualGatewayLinksItem( - NetToVirtualGatewayLink netToVirtualGatewayLinksItem) { - if (this.netToVirtualGatewayLinks == null) { - this.netToVirtualGatewayLinks = new ArrayList<>(); - } - this.netToVirtualGatewayLinks.add(netToVirtualGatewayLinksItem); - return this; - } - - /** - * The Net to which the virtual gateway is attached. - * - * @return netToVirtualGatewayLinks - */ - @javax.annotation.Nullable - public List getNetToVirtualGatewayLinks() { - return netToVirtualGatewayLinks; - } - - public void setNetToVirtualGatewayLinks( - List netToVirtualGatewayLinks) { - this.netToVirtualGatewayLinks = netToVirtualGatewayLinks; - } - - public VirtualGateway state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the virtual gateway (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public VirtualGateway tags(List tags) { - - this.tags = tags; - return this; - } - - public VirtualGateway addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the virtual gateway. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public VirtualGateway virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway. - * - * @return virtualGatewayId - */ - @javax.annotation.Nullable - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VirtualGateway virtualGateway = (VirtualGateway) o; - return Objects.equals(this.connectionType, virtualGateway.connectionType) - && Objects.equals( - this.netToVirtualGatewayLinks, virtualGateway.netToVirtualGatewayLinks) - && Objects.equals(this.state, virtualGateway.state) - && Objects.equals(this.tags, virtualGateway.tags) - && Objects.equals(this.virtualGatewayId, virtualGateway.virtualGatewayId); - } - - @Override - public int hashCode() { - return Objects.hash( - connectionType, netToVirtualGatewayLinks, state, tags, virtualGatewayId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VirtualGateway {\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" netToVirtualGatewayLinks: ") - .append(toIndentedString(netToVirtualGatewayLinks)) - .append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ConnectionType"); - openapiFields.add("NetToVirtualGatewayLinks"); - openapiFields.add("State"); - openapiFields.add("Tags"); - openapiFields.add("VirtualGatewayId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VirtualGateway - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VirtualGateway.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VirtualGateway is not found in the" - + " empty JSON string", - VirtualGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VirtualGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VirtualGateway` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ConnectionType") != null && !jsonObj.get("ConnectionType").isJsonNull()) - && !jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - if (jsonObj.get("NetToVirtualGatewayLinks") != null - && !jsonObj.get("NetToVirtualGatewayLinks").isJsonNull()) { - JsonArray jsonArraynetToVirtualGatewayLinks = - jsonObj.getAsJsonArray("NetToVirtualGatewayLinks"); - if (jsonArraynetToVirtualGatewayLinks != null) { - // ensure the json data is an array - if (!jsonObj.get("NetToVirtualGatewayLinks").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetToVirtualGatewayLinks` to be an array" - + " in the JSON string but got `%s`", - jsonObj.get("NetToVirtualGatewayLinks").toString())); - } - - // validate the optional field `NetToVirtualGatewayLinks` (array) - for (int i = 0; i < jsonArraynetToVirtualGatewayLinks.size(); i++) { - NetToVirtualGatewayLink.validateJsonObject( - jsonArraynetToVirtualGatewayLinks.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VirtualGatewayId") != null - && !jsonObj.get("VirtualGatewayId").isJsonNull()) - && !jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VirtualGateway.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualGateway value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VirtualGateway read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VirtualGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualGateway - * @throws IOException if the JSON string is invalid with respect to VirtualGateway - */ - public static VirtualGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualGateway.class); - } - - /** - * Convert an instance of VirtualGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Vm.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Vm.java deleted file mode 100644 index f77c64c4..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Vm.java +++ /dev/null @@ -1,1477 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the VM. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Vm { - public static final String SERIALIZED_NAME_ARCHITECTURE = "Architecture"; - - @SerializedName(SERIALIZED_NAME_ARCHITECTURE) - private String architecture; - - public static final String SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS = "BlockDeviceMappings"; - - @SerializedName(SERIALIZED_NAME_BLOCK_DEVICE_MAPPINGS) - private List blockDeviceMappings = null; - - public static final String SERIALIZED_NAME_BSU_OPTIMIZED = "BsuOptimized"; - - @SerializedName(SERIALIZED_NAME_BSU_OPTIMIZED) - private Boolean bsuOptimized; - - public static final String SERIALIZED_NAME_CLIENT_TOKEN = "ClientToken"; - - @SerializedName(SERIALIZED_NAME_CLIENT_TOKEN) - private String clientToken; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DELETION_PROTECTION = "DeletionProtection"; - - @SerializedName(SERIALIZED_NAME_DELETION_PROTECTION) - private Boolean deletionProtection; - - public static final String SERIALIZED_NAME_HYPERVISOR = "Hypervisor"; - - @SerializedName(SERIALIZED_NAME_HYPERVISOR) - private String hypervisor; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED = "IsSourceDestChecked"; - - @SerializedName(SERIALIZED_NAME_IS_SOURCE_DEST_CHECKED) - private Boolean isSourceDestChecked; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_LAUNCH_NUMBER = "LaunchNumber"; - - @SerializedName(SERIALIZED_NAME_LAUNCH_NUMBER) - private Integer launchNumber; - - public static final String SERIALIZED_NAME_NESTED_VIRTUALIZATION = "NestedVirtualization"; - - @SerializedName(SERIALIZED_NAME_NESTED_VIRTUALIZATION) - private Boolean nestedVirtualization; - - public static final String SERIALIZED_NAME_NET_ID = "NetId"; - - @SerializedName(SERIALIZED_NAME_NET_ID) - private String netId; - - public static final String SERIALIZED_NAME_NICS = "Nics"; - - @SerializedName(SERIALIZED_NAME_NICS) - private List nics = null; - - public static final String SERIALIZED_NAME_OS_FAMILY = "OsFamily"; - - @SerializedName(SERIALIZED_NAME_OS_FAMILY) - private String osFamily; - - public static final String SERIALIZED_NAME_PERFORMANCE = "Performance"; - - @SerializedName(SERIALIZED_NAME_PERFORMANCE) - private String performance; - - public static final String SERIALIZED_NAME_PLACEMENT = "Placement"; - - @SerializedName(SERIALIZED_NAME_PLACEMENT) - private Placement placement; - - public static final String SERIALIZED_NAME_PRIVATE_DNS_NAME = "PrivateDnsName"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_DNS_NAME) - private String privateDnsName; - - public static final String SERIALIZED_NAME_PRIVATE_IP = "PrivateIp"; - - @SerializedName(SERIALIZED_NAME_PRIVATE_IP) - private String privateIp; - - public static final String SERIALIZED_NAME_PRODUCT_CODES = "ProductCodes"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_CODES) - private List productCodes = null; - - public static final String SERIALIZED_NAME_PUBLIC_DNS_NAME = "PublicDnsName"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_DNS_NAME) - private String publicDnsName; - - public static final String SERIALIZED_NAME_PUBLIC_IP = "PublicIp"; - - @SerializedName(SERIALIZED_NAME_PUBLIC_IP) - private String publicIp; - - public static final String SERIALIZED_NAME_RESERVATION_ID = "ReservationId"; - - @SerializedName(SERIALIZED_NAME_RESERVATION_ID) - private String reservationId; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_NAME = "RootDeviceName"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_NAME) - private String rootDeviceName; - - public static final String SERIALIZED_NAME_ROOT_DEVICE_TYPE = "RootDeviceType"; - - @SerializedName(SERIALIZED_NAME_ROOT_DEVICE_TYPE) - private String rootDeviceType; - - public static final String SERIALIZED_NAME_SECURITY_GROUPS = "SecurityGroups"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) - private List securityGroups = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_REASON = "StateReason"; - - @SerializedName(SERIALIZED_NAME_STATE_REASON) - private String stateReason; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_USER_DATA = "UserData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) - private String userData; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public static final String SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR = - "VmInitiatedShutdownBehavior"; - - @SerializedName(SERIALIZED_NAME_VM_INITIATED_SHUTDOWN_BEHAVIOR) - private String vmInitiatedShutdownBehavior; - - public static final String SERIALIZED_NAME_VM_TYPE = "VmType"; - - @SerializedName(SERIALIZED_NAME_VM_TYPE) - private String vmType; - - public Vm() {} - - public Vm architecture(String architecture) { - - this.architecture = architecture; - return this; - } - - /** - * The architecture of the VM (`i386` \\| `x86_64`). - * - * @return architecture - */ - @javax.annotation.Nullable - public String getArchitecture() { - return architecture; - } - - public void setArchitecture(String architecture) { - this.architecture = architecture; - } - - public Vm blockDeviceMappings(List blockDeviceMappings) { - - this.blockDeviceMappings = blockDeviceMappings; - return this; - } - - public Vm addBlockDeviceMappingsItem(BlockDeviceMappingCreated blockDeviceMappingsItem) { - if (this.blockDeviceMappings == null) { - this.blockDeviceMappings = new ArrayList<>(); - } - this.blockDeviceMappings.add(blockDeviceMappingsItem); - return this; - } - - /** - * The block device mapping of the VM. - * - * @return blockDeviceMappings - */ - @javax.annotation.Nullable - public List getBlockDeviceMappings() { - return blockDeviceMappings; - } - - public void setBlockDeviceMappings(List blockDeviceMappings) { - this.blockDeviceMappings = blockDeviceMappings; - } - - public Vm bsuOptimized(Boolean bsuOptimized) { - - this.bsuOptimized = bsuOptimized; - return this; - } - - /** - * This parameter is not available. It is present in our API for the sake of historical - * compatibility with AWS. - * - * @return bsuOptimized - */ - @javax.annotation.Nullable - public Boolean getBsuOptimized() { - return bsuOptimized; - } - - public void setBsuOptimized(Boolean bsuOptimized) { - this.bsuOptimized = bsuOptimized; - } - - public Vm clientToken(String clientToken) { - - this.clientToken = clientToken; - return this; - } - - /** - * The idempotency token provided when launching the VM. - * - * @return clientToken - */ - @javax.annotation.Nullable - public String getClientToken() { - return clientToken; - } - - public void setClientToken(String clientToken) { - this.clientToken = clientToken; - } - - public Vm creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the VM was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public Vm deletionProtection(Boolean deletionProtection) { - - this.deletionProtection = deletionProtection; - return this; - } - - /** - * If true, you cannot delete the VM unless you change this parameter back to false. - * - * @return deletionProtection - */ - @javax.annotation.Nullable - public Boolean getDeletionProtection() { - return deletionProtection; - } - - public void setDeletionProtection(Boolean deletionProtection) { - this.deletionProtection = deletionProtection; - } - - public Vm hypervisor(String hypervisor) { - - this.hypervisor = hypervisor; - return this; - } - - /** - * The hypervisor type of the VMs (`ovm` \\| `xen`). - * - * @return hypervisor - */ - @javax.annotation.Nullable - public String getHypervisor() { - return hypervisor; - } - - public void setHypervisor(String hypervisor) { - this.hypervisor = hypervisor; - } - - public Vm imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI used to create the VM. - * - * @return imageId - */ - @javax.annotation.Nullable - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public Vm isSourceDestChecked(Boolean isSourceDestChecked) { - - this.isSourceDestChecked = isSourceDestChecked; - return this; - } - - /** - * (Net only) If true, the source/destination check is enabled. If false, it is disabled. - * - * @return isSourceDestChecked - */ - @javax.annotation.Nullable - public Boolean getIsSourceDestChecked() { - return isSourceDestChecked; - } - - public void setIsSourceDestChecked(Boolean isSourceDestChecked) { - this.isSourceDestChecked = isSourceDestChecked; - } - - public Vm keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair used when launching the VM. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public Vm launchNumber(Integer launchNumber) { - - this.launchNumber = launchNumber; - return this; - } - - /** - * The number for the VM when launching a group of several VMs (for example, `0`, - * `1`, `2`, and so on). - * - * @return launchNumber - */ - @javax.annotation.Nullable - public Integer getLaunchNumber() { - return launchNumber; - } - - public void setLaunchNumber(Integer launchNumber) { - this.launchNumber = launchNumber; - } - - public Vm nestedVirtualization(Boolean nestedVirtualization) { - - this.nestedVirtualization = nestedVirtualization; - return this; - } - - /** - * If true, nested virtualization is enabled. If false, it is disabled. - * - * @return nestedVirtualization - */ - @javax.annotation.Nullable - public Boolean getNestedVirtualization() { - return nestedVirtualization; - } - - public void setNestedVirtualization(Boolean nestedVirtualization) { - this.nestedVirtualization = nestedVirtualization; - } - - public Vm netId(String netId) { - - this.netId = netId; - return this; - } - - /** - * The ID of the Net in which the VM is running. - * - * @return netId - */ - @javax.annotation.Nullable - public String getNetId() { - return netId; - } - - public void setNetId(String netId) { - this.netId = netId; - } - - public Vm nics(List nics) { - - this.nics = nics; - return this; - } - - public Vm addNicsItem(NicLight nicsItem) { - if (this.nics == null) { - this.nics = new ArrayList<>(); - } - this.nics.add(nicsItem); - return this; - } - - /** - * (Net only) The network interface cards (NICs) the VMs are attached to. - * - * @return nics - */ - @javax.annotation.Nullable - public List getNics() { - return nics; - } - - public void setNics(List nics) { - this.nics = nics; - } - - public Vm osFamily(String osFamily) { - - this.osFamily = osFamily; - return this; - } - - /** - * Indicates the operating system (OS) of the VM. - * - * @return osFamily - */ - @javax.annotation.Nullable - public String getOsFamily() { - return osFamily; - } - - public void setOsFamily(String osFamily) { - this.osFamily = osFamily; - } - - public Vm performance(String performance) { - - this.performance = performance; - return this; - } - - /** - * The performance of the VM (`medium` \\| `high` \\| `highest`). - * - * @return performance - */ - @javax.annotation.Nullable - public String getPerformance() { - return performance; - } - - public void setPerformance(String performance) { - this.performance = performance; - } - - public Vm placement(Placement placement) { - - this.placement = placement; - return this; - } - - /** - * Get placement - * - * @return placement - */ - @javax.annotation.Nullable - public Placement getPlacement() { - return placement; - } - - public void setPlacement(Placement placement) { - this.placement = placement; - } - - public Vm privateDnsName(String privateDnsName) { - - this.privateDnsName = privateDnsName; - return this; - } - - /** - * The name of the private DNS. - * - * @return privateDnsName - */ - @javax.annotation.Nullable - public String getPrivateDnsName() { - return privateDnsName; - } - - public void setPrivateDnsName(String privateDnsName) { - this.privateDnsName = privateDnsName; - } - - public Vm privateIp(String privateIp) { - - this.privateIp = privateIp; - return this; - } - - /** - * The primary private IP of the VM. - * - * @return privateIp - */ - @javax.annotation.Nullable - public String getPrivateIp() { - return privateIp; - } - - public void setPrivateIp(String privateIp) { - this.privateIp = privateIp; - } - - public Vm productCodes(List productCodes) { - - this.productCodes = productCodes; - return this; - } - - public Vm addProductCodesItem(String productCodesItem) { - if (this.productCodes == null) { - this.productCodes = new ArrayList<>(); - } - this.productCodes.add(productCodesItem); - return this; - } - - /** - * The product codes associated with the OMI used to create the VM. - * - * @return productCodes - */ - @javax.annotation.Nullable - public List getProductCodes() { - return productCodes; - } - - public void setProductCodes(List productCodes) { - this.productCodes = productCodes; - } - - public Vm publicDnsName(String publicDnsName) { - - this.publicDnsName = publicDnsName; - return this; - } - - /** - * The name of the public DNS. - * - * @return publicDnsName - */ - @javax.annotation.Nullable - public String getPublicDnsName() { - return publicDnsName; - } - - public void setPublicDnsName(String publicDnsName) { - this.publicDnsName = publicDnsName; - } - - public Vm publicIp(String publicIp) { - - this.publicIp = publicIp; - return this; - } - - /** - * The public IP of the VM. - * - * @return publicIp - */ - @javax.annotation.Nullable - public String getPublicIp() { - return publicIp; - } - - public void setPublicIp(String publicIp) { - this.publicIp = publicIp; - } - - public Vm reservationId(String reservationId) { - - this.reservationId = reservationId; - return this; - } - - /** - * The reservation ID of the VM. - * - * @return reservationId - */ - @javax.annotation.Nullable - public String getReservationId() { - return reservationId; - } - - public void setReservationId(String reservationId) { - this.reservationId = reservationId; - } - - public Vm rootDeviceName(String rootDeviceName) { - - this.rootDeviceName = rootDeviceName; - return this; - } - - /** - * The name of the root device for the VM (for example, `/dev/sda1`). - * - * @return rootDeviceName - */ - @javax.annotation.Nullable - public String getRootDeviceName() { - return rootDeviceName; - } - - public void setRootDeviceName(String rootDeviceName) { - this.rootDeviceName = rootDeviceName; - } - - public Vm rootDeviceType(String rootDeviceType) { - - this.rootDeviceType = rootDeviceType; - return this; - } - - /** - * The type of root device used by the VM (always `bsu`). - * - * @return rootDeviceType - */ - @javax.annotation.Nullable - public String getRootDeviceType() { - return rootDeviceType; - } - - public void setRootDeviceType(String rootDeviceType) { - this.rootDeviceType = rootDeviceType; - } - - public Vm securityGroups(List securityGroups) { - - this.securityGroups = securityGroups; - return this; - } - - public Vm addSecurityGroupsItem(SecurityGroupLight securityGroupsItem) { - if (this.securityGroups == null) { - this.securityGroups = new ArrayList<>(); - } - this.securityGroups.add(securityGroupsItem); - return this; - } - - /** - * One or more security groups associated with the VM. - * - * @return securityGroups - */ - @javax.annotation.Nullable - public List getSecurityGroups() { - return securityGroups; - } - - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - public Vm state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the VM (`pending` \\| `running` \\| `stopping` \\| - * `stopped` \\| `shutting-down` \\| `terminated` \\| - * `quarantine`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Vm stateReason(String stateReason) { - - this.stateReason = stateReason; - return this; - } - - /** - * The reason explaining the current state of the VM. - * - * @return stateReason - */ - @javax.annotation.Nullable - public String getStateReason() { - return stateReason; - } - - public void setStateReason(String stateReason) { - this.stateReason = stateReason; - } - - public Vm subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet for the VM. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public Vm tags(List tags) { - - this.tags = tags; - return this; - } - - public Vm addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the VM. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Vm userData(String userData) { - - this.userData = userData; - return this; - } - - /** - * The Base64-encoded MIME user data. - * - * @return userData - */ - @javax.annotation.Nullable - public String getUserData() { - return userData; - } - - public void setUserData(String userData) { - this.userData = userData; - } - - public Vm vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - public Vm vmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - return this; - } - - /** - * The VM behavior when you stop it. If set to `stop`, the VM stops. If set to - * `restart`, the VM stops then automatically restarts. If set to - * `terminate`, the VM stops and is deleted. - * - * @return vmInitiatedShutdownBehavior - */ - @javax.annotation.Nullable - public String getVmInitiatedShutdownBehavior() { - return vmInitiatedShutdownBehavior; - } - - public void setVmInitiatedShutdownBehavior(String vmInitiatedShutdownBehavior) { - this.vmInitiatedShutdownBehavior = vmInitiatedShutdownBehavior; - } - - public Vm vmType(String vmType) { - - this.vmType = vmType; - return this; - } - - /** - * The type of VM. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * - * @return vmType - */ - @javax.annotation.Nullable - public String getVmType() { - return vmType; - } - - public void setVmType(String vmType) { - this.vmType = vmType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Vm vm = (Vm) o; - return Objects.equals(this.architecture, vm.architecture) - && Objects.equals(this.blockDeviceMappings, vm.blockDeviceMappings) - && Objects.equals(this.bsuOptimized, vm.bsuOptimized) - && Objects.equals(this.clientToken, vm.clientToken) - && Objects.equals(this.creationDate, vm.creationDate) - && Objects.equals(this.deletionProtection, vm.deletionProtection) - && Objects.equals(this.hypervisor, vm.hypervisor) - && Objects.equals(this.imageId, vm.imageId) - && Objects.equals(this.isSourceDestChecked, vm.isSourceDestChecked) - && Objects.equals(this.keypairName, vm.keypairName) - && Objects.equals(this.launchNumber, vm.launchNumber) - && Objects.equals(this.nestedVirtualization, vm.nestedVirtualization) - && Objects.equals(this.netId, vm.netId) - && Objects.equals(this.nics, vm.nics) - && Objects.equals(this.osFamily, vm.osFamily) - && Objects.equals(this.performance, vm.performance) - && Objects.equals(this.placement, vm.placement) - && Objects.equals(this.privateDnsName, vm.privateDnsName) - && Objects.equals(this.privateIp, vm.privateIp) - && Objects.equals(this.productCodes, vm.productCodes) - && Objects.equals(this.publicDnsName, vm.publicDnsName) - && Objects.equals(this.publicIp, vm.publicIp) - && Objects.equals(this.reservationId, vm.reservationId) - && Objects.equals(this.rootDeviceName, vm.rootDeviceName) - && Objects.equals(this.rootDeviceType, vm.rootDeviceType) - && Objects.equals(this.securityGroups, vm.securityGroups) - && Objects.equals(this.state, vm.state) - && Objects.equals(this.stateReason, vm.stateReason) - && Objects.equals(this.subnetId, vm.subnetId) - && Objects.equals(this.tags, vm.tags) - && Objects.equals(this.userData, vm.userData) - && Objects.equals(this.vmId, vm.vmId) - && Objects.equals(this.vmInitiatedShutdownBehavior, vm.vmInitiatedShutdownBehavior) - && Objects.equals(this.vmType, vm.vmType); - } - - @Override - public int hashCode() { - return Objects.hash( - architecture, - blockDeviceMappings, - bsuOptimized, - clientToken, - creationDate, - deletionProtection, - hypervisor, - imageId, - isSourceDestChecked, - keypairName, - launchNumber, - nestedVirtualization, - netId, - nics, - osFamily, - performance, - placement, - privateDnsName, - privateIp, - productCodes, - publicDnsName, - publicIp, - reservationId, - rootDeviceName, - rootDeviceType, - securityGroups, - state, - stateReason, - subnetId, - tags, - userData, - vmId, - vmInitiatedShutdownBehavior, - vmType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Vm {\n"); - sb.append(" architecture: ").append(toIndentedString(architecture)).append("\n"); - sb.append(" blockDeviceMappings: ") - .append(toIndentedString(blockDeviceMappings)) - .append("\n"); - sb.append(" bsuOptimized: ").append(toIndentedString(bsuOptimized)).append("\n"); - sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" deletionProtection: ") - .append(toIndentedString(deletionProtection)) - .append("\n"); - sb.append(" hypervisor: ").append(toIndentedString(hypervisor)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" isSourceDestChecked: ") - .append(toIndentedString(isSourceDestChecked)) - .append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" launchNumber: ").append(toIndentedString(launchNumber)).append("\n"); - sb.append(" nestedVirtualization: ") - .append(toIndentedString(nestedVirtualization)) - .append("\n"); - sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); - sb.append(" nics: ").append(toIndentedString(nics)).append("\n"); - sb.append(" osFamily: ").append(toIndentedString(osFamily)).append("\n"); - sb.append(" performance: ").append(toIndentedString(performance)).append("\n"); - sb.append(" placement: ").append(toIndentedString(placement)).append("\n"); - sb.append(" privateDnsName: ").append(toIndentedString(privateDnsName)).append("\n"); - sb.append(" privateIp: ").append(toIndentedString(privateIp)).append("\n"); - sb.append(" productCodes: ").append(toIndentedString(productCodes)).append("\n"); - sb.append(" publicDnsName: ").append(toIndentedString(publicDnsName)).append("\n"); - sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); - sb.append(" reservationId: ").append(toIndentedString(reservationId)).append("\n"); - sb.append(" rootDeviceName: ").append(toIndentedString(rootDeviceName)).append("\n"); - sb.append(" rootDeviceType: ").append(toIndentedString(rootDeviceType)).append("\n"); - sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateReason: ").append(toIndentedString(stateReason)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append(" vmInitiatedShutdownBehavior: ") - .append(toIndentedString(vmInitiatedShutdownBehavior)) - .append("\n"); - sb.append(" vmType: ").append(toIndentedString(vmType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Architecture"); - openapiFields.add("BlockDeviceMappings"); - openapiFields.add("BsuOptimized"); - openapiFields.add("ClientToken"); - openapiFields.add("CreationDate"); - openapiFields.add("DeletionProtection"); - openapiFields.add("Hypervisor"); - openapiFields.add("ImageId"); - openapiFields.add("IsSourceDestChecked"); - openapiFields.add("KeypairName"); - openapiFields.add("LaunchNumber"); - openapiFields.add("NestedVirtualization"); - openapiFields.add("NetId"); - openapiFields.add("Nics"); - openapiFields.add("OsFamily"); - openapiFields.add("Performance"); - openapiFields.add("Placement"); - openapiFields.add("PrivateDnsName"); - openapiFields.add("PrivateIp"); - openapiFields.add("ProductCodes"); - openapiFields.add("PublicDnsName"); - openapiFields.add("PublicIp"); - openapiFields.add("ReservationId"); - openapiFields.add("RootDeviceName"); - openapiFields.add("RootDeviceType"); - openapiFields.add("SecurityGroups"); - openapiFields.add("State"); - openapiFields.add("StateReason"); - openapiFields.add("SubnetId"); - openapiFields.add("Tags"); - openapiFields.add("UserData"); - openapiFields.add("VmId"); - openapiFields.add("VmInitiatedShutdownBehavior"); - openapiFields.add("VmType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Vm - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Vm.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Vm is not found in the empty JSON" - + " string", - Vm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Vm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Vm`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Architecture") != null && !jsonObj.get("Architecture").isJsonNull()) - && !jsonObj.get("Architecture").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Architecture` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Architecture").toString())); - } - if (jsonObj.get("BlockDeviceMappings") != null - && !jsonObj.get("BlockDeviceMappings").isJsonNull()) { - JsonArray jsonArrayblockDeviceMappings = jsonObj.getAsJsonArray("BlockDeviceMappings"); - if (jsonArrayblockDeviceMappings != null) { - // ensure the json data is an array - if (!jsonObj.get("BlockDeviceMappings").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `BlockDeviceMappings` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("BlockDeviceMappings").toString())); - } - - // validate the optional field `BlockDeviceMappings` (array) - for (int i = 0; i < jsonArrayblockDeviceMappings.size(); i++) { - BlockDeviceMappingCreated.validateJsonObject( - jsonArrayblockDeviceMappings.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("ClientToken") != null && !jsonObj.get("ClientToken").isJsonNull()) - && !jsonObj.get("ClientToken").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientToken` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ClientToken").toString())); - } - if ((jsonObj.get("Hypervisor") != null && !jsonObj.get("Hypervisor").isJsonNull()) - && !jsonObj.get("Hypervisor").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Hypervisor` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Hypervisor").toString())); - } - if ((jsonObj.get("ImageId") != null && !jsonObj.get("ImageId").isJsonNull()) - && !jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if ((jsonObj.get("NetId") != null && !jsonObj.get("NetId").isJsonNull()) - && !jsonObj.get("NetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `NetId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("NetId").toString())); - } - if (jsonObj.get("Nics") != null && !jsonObj.get("Nics").isJsonNull()) { - JsonArray jsonArraynics = jsonObj.getAsJsonArray("Nics"); - if (jsonArraynics != null) { - // ensure the json data is an array - if (!jsonObj.get("Nics").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Nics` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Nics").toString())); - } - - // validate the optional field `Nics` (array) - for (int i = 0; i < jsonArraynics.size(); i++) { - NicLight.validateJsonObject(jsonArraynics.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("OsFamily") != null && !jsonObj.get("OsFamily").isJsonNull()) - && !jsonObj.get("OsFamily").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `OsFamily` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("OsFamily").toString())); - } - if ((jsonObj.get("Performance") != null && !jsonObj.get("Performance").isJsonNull()) - && !jsonObj.get("Performance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Performance` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Performance").toString())); - } - // validate the optional field `Placement` - if (jsonObj.get("Placement") != null && !jsonObj.get("Placement").isJsonNull()) { - Placement.validateJsonObject(jsonObj.getAsJsonObject("Placement")); - } - if ((jsonObj.get("PrivateDnsName") != null && !jsonObj.get("PrivateDnsName").isJsonNull()) - && !jsonObj.get("PrivateDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateDnsName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("PrivateDnsName").toString())); - } - if ((jsonObj.get("PrivateIp") != null && !jsonObj.get("PrivateIp").isJsonNull()) - && !jsonObj.get("PrivateIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PrivateIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PrivateIp").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ProductCodes") != null && !jsonObj.get("ProductCodes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ProductCodes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("ProductCodes").toString())); - } - if ((jsonObj.get("PublicDnsName") != null && !jsonObj.get("PublicDnsName").isJsonNull()) - && !jsonObj.get("PublicDnsName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicDnsName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicDnsName").toString())); - } - if ((jsonObj.get("PublicIp") != null && !jsonObj.get("PublicIp").isJsonNull()) - && !jsonObj.get("PublicIp").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PublicIp` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PublicIp").toString())); - } - if ((jsonObj.get("ReservationId") != null && !jsonObj.get("ReservationId").isJsonNull()) - && !jsonObj.get("ReservationId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ReservationId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ReservationId").toString())); - } - if ((jsonObj.get("RootDeviceName") != null && !jsonObj.get("RootDeviceName").isJsonNull()) - && !jsonObj.get("RootDeviceName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("RootDeviceName").toString())); - } - if ((jsonObj.get("RootDeviceType") != null && !jsonObj.get("RootDeviceType").isJsonNull()) - && !jsonObj.get("RootDeviceType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `RootDeviceType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("RootDeviceType").toString())); - } - if (jsonObj.get("SecurityGroups") != null && !jsonObj.get("SecurityGroups").isJsonNull()) { - JsonArray jsonArraysecurityGroups = jsonObj.getAsJsonArray("SecurityGroups"); - if (jsonArraysecurityGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("SecurityGroups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroups` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("SecurityGroups").toString())); - } - - // validate the optional field `SecurityGroups` (array) - for (int i = 0; i < jsonArraysecurityGroups.size(); i++) { - SecurityGroupLight.validateJsonObject( - jsonArraysecurityGroups.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("StateReason") != null && !jsonObj.get("StateReason").isJsonNull()) - && !jsonObj.get("StateReason").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `StateReason` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("StateReason").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("UserData") != null && !jsonObj.get("UserData").isJsonNull()) - && !jsonObj.get("UserData").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `UserData` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("UserData").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - if ((jsonObj.get("VmInitiatedShutdownBehavior") != null - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonNull()) - && !jsonObj.get("VmInitiatedShutdownBehavior").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmInitiatedShutdownBehavior` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("VmInitiatedShutdownBehavior").toString())); - } - if ((jsonObj.get("VmType") != null && !jsonObj.get("VmType").isJsonNull()) - && !jsonObj.get("VmType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmType` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Vm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Vm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Vm.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Vm value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Vm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Vm given an JSON string - * - * @param jsonString JSON string - * @return An instance of Vm - * @throws IOException if the JSON string is invalid with respect to Vm - */ - public static Vm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Vm.class); - } - - /** - * Convert an instance of Vm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmGroup.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmGroup.java deleted file mode 100644 index 1fc26ab3..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmGroup.java +++ /dev/null @@ -1,750 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the VM group. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VmGroup { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * The positioning strategy of the VMs on hypervisors. By default, or if set to - * `no-strategy`, TINA determines the most adequate position for the VMs. If set to - * `attract`, the VMs are deployed on the same hypervisor, which improves network - * performance. If set to `repulse`, the VMs are deployed on a different hypervisor, - * which improves fault tolerance. - */ - @JsonAdapter(PositioningStrategyEnum.Adapter.class) - public enum PositioningStrategyEnum { - ATTRACT("attract"), - - NO_STRATEGY("no-strategy"), - - REPULSE("repulse"); - - private String value; - - PositioningStrategyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositioningStrategyEnum fromValue(String value) { - for (PositioningStrategyEnum b : PositioningStrategyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final PositioningStrategyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositioningStrategyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositioningStrategyEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_POSITIONING_STRATEGY = "PositioningStrategy"; - - @SerializedName(SERIALIZED_NAME_POSITIONING_STRATEGY) - private PositioningStrategyEnum positioningStrategy; - - public static final String SERIALIZED_NAME_SECURITY_GROUP_IDS = "SecurityGroupIds"; - - @SerializedName(SERIALIZED_NAME_SECURITY_GROUP_IDS) - private List securityGroupIds = null; - - /** - * The state of the VM group (`pending` \\| `available` \\| `scaling - * up` \\| `scaling down` \\| `deleting` \\| `deleted`). - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - AVAILABLE("available"), - - DELETED("deleted"), - - DELETING("deleting"), - - PENDING("pending"), - - SCALING_DOWN("scaling down"), - - SCALING_UP("scaling up"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_SUBNET_ID = "SubnetId"; - - @SerializedName(SERIALIZED_NAME_SUBNET_ID) - private String subnetId; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_COUNT = "VmCount"; - - @SerializedName(SERIALIZED_NAME_VM_COUNT) - private Integer vmCount; - - public static final String SERIALIZED_NAME_VM_GROUP_ID = "VmGroupId"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_ID) - private String vmGroupId; - - public static final String SERIALIZED_NAME_VM_GROUP_NAME = "VmGroupName"; - - @SerializedName(SERIALIZED_NAME_VM_GROUP_NAME) - private String vmGroupName; - - public static final String SERIALIZED_NAME_VM_IDS = "VmIds"; - - @SerializedName(SERIALIZED_NAME_VM_IDS) - private List vmIds = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public VmGroup() {} - - public VmGroup creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the VM group was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public VmGroup description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the VM group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public VmGroup positioningStrategy(PositioningStrategyEnum positioningStrategy) { - - this.positioningStrategy = positioningStrategy; - return this; - } - - /** - * The positioning strategy of the VMs on hypervisors. By default, or if set to - * `no-strategy`, TINA determines the most adequate position for the VMs. If set to - * `attract`, the VMs are deployed on the same hypervisor, which improves network - * performance. If set to `repulse`, the VMs are deployed on a different hypervisor, - * which improves fault tolerance. - * - * @return positioningStrategy - */ - @javax.annotation.Nullable - public PositioningStrategyEnum getPositioningStrategy() { - return positioningStrategy; - } - - public void setPositioningStrategy(PositioningStrategyEnum positioningStrategy) { - this.positioningStrategy = positioningStrategy; - } - - public VmGroup securityGroupIds(List securityGroupIds) { - - this.securityGroupIds = securityGroupIds; - return this; - } - - public VmGroup addSecurityGroupIdsItem(String securityGroupIdsItem) { - if (this.securityGroupIds == null) { - this.securityGroupIds = new ArrayList<>(); - } - this.securityGroupIds.add(securityGroupIdsItem); - return this; - } - - /** - * One or more IDs of security groups for the VM group. - * - * @return securityGroupIds - */ - @javax.annotation.Nullable - public List getSecurityGroupIds() { - return securityGroupIds; - } - - public void setSecurityGroupIds(List securityGroupIds) { - this.securityGroupIds = securityGroupIds; - } - - public VmGroup state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The state of the VM group (`pending` \\| `available` \\| `scaling - * up` \\| `scaling down` \\| `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - public void setState(StateEnum state) { - this.state = state; - } - - public VmGroup subnetId(String subnetId) { - - this.subnetId = subnetId; - return this; - } - - /** - * The ID of the Subnet for the VM group. - * - * @return subnetId - */ - @javax.annotation.Nullable - public String getSubnetId() { - return subnetId; - } - - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - public VmGroup tags(List tags) { - - this.tags = tags; - return this; - } - - public VmGroup addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the VM. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public VmGroup vmCount(Integer vmCount) { - - this.vmCount = vmCount; - return this; - } - - /** - * The number of VMs in the VM group. - * - * @return vmCount - */ - @javax.annotation.Nullable - public Integer getVmCount() { - return vmCount; - } - - public void setVmCount(Integer vmCount) { - this.vmCount = vmCount; - } - - public VmGroup vmGroupId(String vmGroupId) { - - this.vmGroupId = vmGroupId; - return this; - } - - /** - * The ID of the VM group. - * - * @return vmGroupId - */ - @javax.annotation.Nullable - public String getVmGroupId() { - return vmGroupId; - } - - public void setVmGroupId(String vmGroupId) { - this.vmGroupId = vmGroupId; - } - - public VmGroup vmGroupName(String vmGroupName) { - - this.vmGroupName = vmGroupName; - return this; - } - - /** - * The name of the VM group. - * - * @return vmGroupName - */ - @javax.annotation.Nullable - public String getVmGroupName() { - return vmGroupName; - } - - public void setVmGroupName(String vmGroupName) { - this.vmGroupName = vmGroupName; - } - - public VmGroup vmIds(List vmIds) { - - this.vmIds = vmIds; - return this; - } - - public VmGroup addVmIdsItem(String vmIdsItem) { - if (this.vmIds == null) { - this.vmIds = new ArrayList<>(); - } - this.vmIds.add(vmIdsItem); - return this; - } - - /** - * The IDs of the VMs in the VM group. - * - * @return vmIds - */ - @javax.annotation.Nullable - public List getVmIds() { - return vmIds; - } - - public void setVmIds(List vmIds) { - this.vmIds = vmIds; - } - - public VmGroup vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * The ID of the VM template used by the VM group. - * - * @return vmTemplateId - */ - @javax.annotation.Nullable - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VmGroup vmGroup = (VmGroup) o; - return Objects.equals(this.creationDate, vmGroup.creationDate) - && Objects.equals(this.description, vmGroup.description) - && Objects.equals(this.positioningStrategy, vmGroup.positioningStrategy) - && Objects.equals(this.securityGroupIds, vmGroup.securityGroupIds) - && Objects.equals(this.state, vmGroup.state) - && Objects.equals(this.subnetId, vmGroup.subnetId) - && Objects.equals(this.tags, vmGroup.tags) - && Objects.equals(this.vmCount, vmGroup.vmCount) - && Objects.equals(this.vmGroupId, vmGroup.vmGroupId) - && Objects.equals(this.vmGroupName, vmGroup.vmGroupName) - && Objects.equals(this.vmIds, vmGroup.vmIds) - && Objects.equals(this.vmTemplateId, vmGroup.vmTemplateId); - } - - @Override - public int hashCode() { - return Objects.hash( - creationDate, - description, - positioningStrategy, - securityGroupIds, - state, - subnetId, - tags, - vmCount, - vmGroupId, - vmGroupName, - vmIds, - vmTemplateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VmGroup {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" positioningStrategy: ") - .append(toIndentedString(positioningStrategy)) - .append("\n"); - sb.append(" securityGroupIds: ").append(toIndentedString(securityGroupIds)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subnetId: ").append(toIndentedString(subnetId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmCount: ").append(toIndentedString(vmCount)).append("\n"); - sb.append(" vmGroupId: ").append(toIndentedString(vmGroupId)).append("\n"); - sb.append(" vmGroupName: ").append(toIndentedString(vmGroupName)).append("\n"); - sb.append(" vmIds: ").append(toIndentedString(vmIds)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("Description"); - openapiFields.add("PositioningStrategy"); - openapiFields.add("SecurityGroupIds"); - openapiFields.add("State"); - openapiFields.add("SubnetId"); - openapiFields.add("Tags"); - openapiFields.add("VmCount"); - openapiFields.add("VmGroupId"); - openapiFields.add("VmGroupName"); - openapiFields.add("VmIds"); - openapiFields.add("VmTemplateId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VmGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VmGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VmGroup is not found in the empty" - + " JSON string", - VmGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VmGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `VmGroup`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if ((jsonObj.get("PositioningStrategy") != null - && !jsonObj.get("PositioningStrategy").isJsonNull()) - && !jsonObj.get("PositioningStrategy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PositioningStrategy` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("PositioningStrategy").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("SecurityGroupIds") != null - && !jsonObj.get("SecurityGroupIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SecurityGroupIds` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("SecurityGroupIds").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubnetId") != null && !jsonObj.get("SubnetId").isJsonNull()) - && !jsonObj.get("SubnetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubnetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubnetId").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VmGroupId") != null && !jsonObj.get("VmGroupId").isJsonNull()) - && !jsonObj.get("VmGroupId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupId").toString())); - } - if ((jsonObj.get("VmGroupName") != null && !jsonObj.get("VmGroupName").isJsonNull()) - && !jsonObj.get("VmGroupName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmGroupName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmGroupName").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("VmIds") != null && !jsonObj.get("VmIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmIds` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("VmIds").toString())); - } - if ((jsonObj.get("VmTemplateId") != null && !jsonObj.get("VmTemplateId").isJsonNull()) - && !jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VmGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VmGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VmGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VmGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VmGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VmGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of VmGroup - * @throws IOException if the JSON string is invalid with respect to VmGroup - */ - public static VmGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VmGroup.class); - } - - /** - * Convert an instance of VmGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmState.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmState.java deleted file mode 100644 index 62dc3857..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmState.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the state of the VM. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VmState { - public static final String SERIALIZED_NAME_CURRENT_STATE = "CurrentState"; - - @SerializedName(SERIALIZED_NAME_CURRENT_STATE) - private String currentState; - - public static final String SERIALIZED_NAME_PREVIOUS_STATE = "PreviousState"; - - @SerializedName(SERIALIZED_NAME_PREVIOUS_STATE) - private String previousState; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public VmState() {} - - public VmState currentState(String currentState) { - - this.currentState = currentState; - return this; - } - - /** - * The current state of the VM (`InService` \\| `OutOfService` \\| - * `Unknown`). - * - * @return currentState - */ - @javax.annotation.Nullable - public String getCurrentState() { - return currentState; - } - - public void setCurrentState(String currentState) { - this.currentState = currentState; - } - - public VmState previousState(String previousState) { - - this.previousState = previousState; - return this; - } - - /** - * The previous state of the VM (`InService` \\| `OutOfService` \\| - * `Unknown`). - * - * @return previousState - */ - @javax.annotation.Nullable - public String getPreviousState() { - return previousState; - } - - public void setPreviousState(String previousState) { - this.previousState = previousState; - } - - public VmState vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VmState vmState = (VmState) o; - return Objects.equals(this.currentState, vmState.currentState) - && Objects.equals(this.previousState, vmState.previousState) - && Objects.equals(this.vmId, vmState.vmId); - } - - @Override - public int hashCode() { - return Objects.hash(currentState, previousState, vmId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VmState {\n"); - sb.append(" currentState: ").append(toIndentedString(currentState)).append("\n"); - sb.append(" previousState: ").append(toIndentedString(previousState)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CurrentState"); - openapiFields.add("PreviousState"); - openapiFields.add("VmId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VmState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VmState.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VmState is not found in the empty" - + " JSON string", - VmState.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VmState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `VmState`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("CurrentState") != null && !jsonObj.get("CurrentState").isJsonNull()) - && !jsonObj.get("CurrentState").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CurrentState` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CurrentState").toString())); - } - if ((jsonObj.get("PreviousState") != null && !jsonObj.get("PreviousState").isJsonNull()) - && !jsonObj.get("PreviousState").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `PreviousState` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("PreviousState").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VmState.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VmState' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VmState.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VmState value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VmState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VmState given an JSON string - * - * @param jsonString JSON string - * @return An instance of VmState - * @throws IOException if the JSON string is invalid with respect to VmState - */ - public static VmState fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VmState.class); - } - - /** - * Convert an instance of VmState to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmStates.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmStates.java deleted file mode 100644 index ec7fc611..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmStates.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the states of the VMs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VmStates { - public static final String SERIALIZED_NAME_MAINTENANCE_EVENTS = "MaintenanceEvents"; - - @SerializedName(SERIALIZED_NAME_MAINTENANCE_EVENTS) - private List maintenanceEvents = null; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_VM_ID = "VmId"; - - @SerializedName(SERIALIZED_NAME_VM_ID) - private String vmId; - - public static final String SERIALIZED_NAME_VM_STATE = "VmState"; - - @SerializedName(SERIALIZED_NAME_VM_STATE) - private String vmState; - - public VmStates() {} - - public VmStates maintenanceEvents(List maintenanceEvents) { - - this.maintenanceEvents = maintenanceEvents; - return this; - } - - public VmStates addMaintenanceEventsItem(MaintenanceEvent maintenanceEventsItem) { - if (this.maintenanceEvents == null) { - this.maintenanceEvents = new ArrayList<>(); - } - this.maintenanceEvents.add(maintenanceEventsItem); - return this; - } - - /** - * One or more scheduled events associated with the VM. - * - * @return maintenanceEvents - */ - @javax.annotation.Nullable - public List getMaintenanceEvents() { - return maintenanceEvents; - } - - public void setMaintenanceEvents(List maintenanceEvents) { - this.maintenanceEvents = maintenanceEvents; - } - - public VmStates subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The name of the Subregion of the VM. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public VmStates vmId(String vmId) { - - this.vmId = vmId; - return this; - } - - /** - * The ID of the VM. - * - * @return vmId - */ - @javax.annotation.Nullable - public String getVmId() { - return vmId; - } - - public void setVmId(String vmId) { - this.vmId = vmId; - } - - public VmStates vmState(String vmState) { - - this.vmState = vmState; - return this; - } - - /** - * The state of the VM (`pending` \\| `running` \\| `stopping` \\| - * `stopped` \\| `shutting-down` \\| `terminated` \\| - * `quarantine`). - * - * @return vmState - */ - @javax.annotation.Nullable - public String getVmState() { - return vmState; - } - - public void setVmState(String vmState) { - this.vmState = vmState; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VmStates vmStates = (VmStates) o; - return Objects.equals(this.maintenanceEvents, vmStates.maintenanceEvents) - && Objects.equals(this.subregionName, vmStates.subregionName) - && Objects.equals(this.vmId, vmStates.vmId) - && Objects.equals(this.vmState, vmStates.vmState); - } - - @Override - public int hashCode() { - return Objects.hash(maintenanceEvents, subregionName, vmId, vmState); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VmStates {\n"); - sb.append(" maintenanceEvents: ") - .append(toIndentedString(maintenanceEvents)) - .append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" vmId: ").append(toIndentedString(vmId)).append("\n"); - sb.append(" vmState: ").append(toIndentedString(vmState)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("MaintenanceEvents"); - openapiFields.add("SubregionName"); - openapiFields.add("VmId"); - openapiFields.add("VmState"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VmStates - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VmStates.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VmStates is not found in the empty" - + " JSON string", - VmStates.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VmStates.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VmStates` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("MaintenanceEvents") != null - && !jsonObj.get("MaintenanceEvents").isJsonNull()) { - JsonArray jsonArraymaintenanceEvents = jsonObj.getAsJsonArray("MaintenanceEvents"); - if (jsonArraymaintenanceEvents != null) { - // ensure the json data is an array - if (!jsonObj.get("MaintenanceEvents").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `MaintenanceEvents` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("MaintenanceEvents").toString())); - } - - // validate the optional field `MaintenanceEvents` (array) - for (int i = 0; i < jsonArraymaintenanceEvents.size(); i++) { - MaintenanceEvent.validateJsonObject( - jsonArraymaintenanceEvents.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if ((jsonObj.get("VmId") != null && !jsonObj.get("VmId").isJsonNull()) - && !jsonObj.get("VmId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("VmId").toString())); - } - if ((jsonObj.get("VmState") != null && !jsonObj.get("VmState").isJsonNull()) - && !jsonObj.get("VmState").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmState` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmState").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VmStates.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VmStates' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VmStates.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VmStates value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VmStates read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VmStates given an JSON string - * - * @param jsonString JSON string - * @return An instance of VmStates - * @throws IOException if the JSON string is invalid with respect to VmStates - */ - public static VmStates fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VmStates.class); - } - - /** - * Convert an instance of VmStates to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmTemplate.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmTemplate.java deleted file mode 100644 index 198f3885..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmTemplate.java +++ /dev/null @@ -1,628 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the VM template. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VmTemplate { - public static final String SERIALIZED_NAME_CPU_CORES = "CpuCores"; - - @SerializedName(SERIALIZED_NAME_CPU_CORES) - private Integer cpuCores; - - public static final String SERIALIZED_NAME_CPU_GENERATION = "CpuGeneration"; - - @SerializedName(SERIALIZED_NAME_CPU_GENERATION) - private String cpuGeneration; - - /** The performance of the VMs. */ - @JsonAdapter(CpuPerformanceEnum.Adapter.class) - public enum CpuPerformanceEnum { - MEDIUM("medium"), - - HIGH("high"), - - HIGHEST("highest"); - - private String value; - - CpuPerformanceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CpuPerformanceEnum fromValue(String value) { - for (CpuPerformanceEnum b : CpuPerformanceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CpuPerformanceEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CpuPerformanceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CpuPerformanceEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CPU_PERFORMANCE = "CpuPerformance"; - - @SerializedName(SERIALIZED_NAME_CPU_PERFORMANCE) - private CpuPerformanceEnum cpuPerformance; - - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IMAGE_ID = "ImageId"; - - @SerializedName(SERIALIZED_NAME_IMAGE_ID) - private String imageId; - - public static final String SERIALIZED_NAME_KEYPAIR_NAME = "KeypairName"; - - @SerializedName(SERIALIZED_NAME_KEYPAIR_NAME) - private String keypairName; - - public static final String SERIALIZED_NAME_RAM = "Ram"; - - @SerializedName(SERIALIZED_NAME_RAM) - private Integer ram; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_ID = "VmTemplateId"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_ID) - private String vmTemplateId; - - public static final String SERIALIZED_NAME_VM_TEMPLATE_NAME = "VmTemplateName"; - - @SerializedName(SERIALIZED_NAME_VM_TEMPLATE_NAME) - private String vmTemplateName; - - public VmTemplate() {} - - public VmTemplate cpuCores(Integer cpuCores) { - - this.cpuCores = cpuCores; - return this; - } - - /** - * The number of vCores. - * - * @return cpuCores - */ - @javax.annotation.Nonnull - public Integer getCpuCores() { - return cpuCores; - } - - public void setCpuCores(Integer cpuCores) { - this.cpuCores = cpuCores; - } - - public VmTemplate cpuGeneration(String cpuGeneration) { - - this.cpuGeneration = cpuGeneration; - return this; - } - - /** - * The processor generation. - * - * @return cpuGeneration - */ - @javax.annotation.Nonnull - public String getCpuGeneration() { - return cpuGeneration; - } - - public void setCpuGeneration(String cpuGeneration) { - this.cpuGeneration = cpuGeneration; - } - - public VmTemplate cpuPerformance(CpuPerformanceEnum cpuPerformance) { - - this.cpuPerformance = cpuPerformance; - return this; - } - - /** - * The performance of the VMs. - * - * @return cpuPerformance - */ - @javax.annotation.Nullable - public CpuPerformanceEnum getCpuPerformance() { - return cpuPerformance; - } - - public void setCpuPerformance(CpuPerformanceEnum cpuPerformance) { - this.cpuPerformance = cpuPerformance; - } - - public VmTemplate creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the VM was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public VmTemplate description(String description) { - - this.description = description; - return this; - } - - /** - * The description of the VM template. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public VmTemplate imageId(String imageId) { - - this.imageId = imageId; - return this; - } - - /** - * The ID of the OMI. - * - * @return imageId - */ - @javax.annotation.Nonnull - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public VmTemplate keypairName(String keypairName) { - - this.keypairName = keypairName; - return this; - } - - /** - * The name of the keypair. - * - * @return keypairName - */ - @javax.annotation.Nullable - public String getKeypairName() { - return keypairName; - } - - public void setKeypairName(String keypairName) { - this.keypairName = keypairName; - } - - public VmTemplate ram(Integer ram) { - - this.ram = ram; - return this; - } - - /** - * The amount of RAM. - * - * @return ram - */ - @javax.annotation.Nonnull - public Integer getRam() { - return ram; - } - - public void setRam(Integer ram) { - this.ram = ram; - } - - public VmTemplate tags(List tags) { - - this.tags = tags; - return this; - } - - public VmTemplate addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the VM template. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public VmTemplate vmTemplateId(String vmTemplateId) { - - this.vmTemplateId = vmTemplateId; - return this; - } - - /** - * The ID of the VM template. - * - * @return vmTemplateId - */ - @javax.annotation.Nonnull - public String getVmTemplateId() { - return vmTemplateId; - } - - public void setVmTemplateId(String vmTemplateId) { - this.vmTemplateId = vmTemplateId; - } - - public VmTemplate vmTemplateName(String vmTemplateName) { - - this.vmTemplateName = vmTemplateName; - return this; - } - - /** - * The name of the VM template. - * - * @return vmTemplateName - */ - @javax.annotation.Nonnull - public String getVmTemplateName() { - return vmTemplateName; - } - - public void setVmTemplateName(String vmTemplateName) { - this.vmTemplateName = vmTemplateName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VmTemplate vmTemplate = (VmTemplate) o; - return Objects.equals(this.cpuCores, vmTemplate.cpuCores) - && Objects.equals(this.cpuGeneration, vmTemplate.cpuGeneration) - && Objects.equals(this.cpuPerformance, vmTemplate.cpuPerformance) - && Objects.equals(this.creationDate, vmTemplate.creationDate) - && Objects.equals(this.description, vmTemplate.description) - && Objects.equals(this.imageId, vmTemplate.imageId) - && Objects.equals(this.keypairName, vmTemplate.keypairName) - && Objects.equals(this.ram, vmTemplate.ram) - && Objects.equals(this.tags, vmTemplate.tags) - && Objects.equals(this.vmTemplateId, vmTemplate.vmTemplateId) - && Objects.equals(this.vmTemplateName, vmTemplate.vmTemplateName); - } - - @Override - public int hashCode() { - return Objects.hash( - cpuCores, - cpuGeneration, - cpuPerformance, - creationDate, - description, - imageId, - keypairName, - ram, - tags, - vmTemplateId, - vmTemplateName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VmTemplate {\n"); - sb.append(" cpuCores: ").append(toIndentedString(cpuCores)).append("\n"); - sb.append(" cpuGeneration: ").append(toIndentedString(cpuGeneration)).append("\n"); - sb.append(" cpuPerformance: ").append(toIndentedString(cpuPerformance)).append("\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); - sb.append(" keypairName: ").append(toIndentedString(keypairName)).append("\n"); - sb.append(" ram: ").append(toIndentedString(ram)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vmTemplateId: ").append(toIndentedString(vmTemplateId)).append("\n"); - sb.append(" vmTemplateName: ").append(toIndentedString(vmTemplateName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CpuCores"); - openapiFields.add("CpuGeneration"); - openapiFields.add("CpuPerformance"); - openapiFields.add("CreationDate"); - openapiFields.add("Description"); - openapiFields.add("ImageId"); - openapiFields.add("KeypairName"); - openapiFields.add("Ram"); - openapiFields.add("Tags"); - openapiFields.add("VmTemplateId"); - openapiFields.add("VmTemplateName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CpuCores"); - openapiRequiredFields.add("CpuGeneration"); - openapiRequiredFields.add("ImageId"); - openapiRequiredFields.add("Ram"); - openapiRequiredFields.add("VmTemplateId"); - openapiRequiredFields.add("VmTemplateName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VmTemplate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VmTemplate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VmTemplate is not found in the empty" - + " JSON string", - VmTemplate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VmTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VmTemplate` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VmTemplate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("CpuGeneration").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuGeneration` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("CpuGeneration").toString())); - } - if ((jsonObj.get("CpuPerformance") != null && !jsonObj.get("CpuPerformance").isJsonNull()) - && !jsonObj.get("CpuPerformance").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `CpuPerformance` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("CpuPerformance").toString())); - } - if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) - && !jsonObj.get("Description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Description").toString())); - } - if (!jsonObj.get("ImageId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ImageId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("ImageId").toString())); - } - if ((jsonObj.get("KeypairName") != null && !jsonObj.get("KeypairName").isJsonNull()) - && !jsonObj.get("KeypairName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `KeypairName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("KeypairName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (!jsonObj.get("VmTemplateId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTemplateId").toString())); - } - if (!jsonObj.get("VmTemplateName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTemplateName` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VmTemplateName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VmTemplate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VmTemplate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VmTemplate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VmTemplate value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VmTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VmTemplate given an JSON string - * - * @param jsonString JSON string - * @return An instance of VmTemplate - * @throws IOException if the JSON string is invalid with respect to VmTemplate - */ - public static VmTemplate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VmTemplate.class); - } - - /** - * Convert an instance of VmTemplate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmType.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmType.java deleted file mode 100644 index b6eed00c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VmType.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the VM type. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VmType { - public static final String SERIALIZED_NAME_BSU_OPTIMIZED = "BsuOptimized"; - - @SerializedName(SERIALIZED_NAME_BSU_OPTIMIZED) - private Boolean bsuOptimized; - - public static final String SERIALIZED_NAME_EPHEMERALS_TYPE = "EphemeralsType"; - - @SerializedName(SERIALIZED_NAME_EPHEMERALS_TYPE) - private String ephemeralsType; - - public static final String SERIALIZED_NAME_ETH = "Eth"; - - @SerializedName(SERIALIZED_NAME_ETH) - private Integer eth; - - public static final String SERIALIZED_NAME_GPU = "Gpu"; - - @SerializedName(SERIALIZED_NAME_GPU) - private Integer gpu; - - public static final String SERIALIZED_NAME_MAX_PRIVATE_IPS = "MaxPrivateIps"; - - @SerializedName(SERIALIZED_NAME_MAX_PRIVATE_IPS) - private Integer maxPrivateIps; - - public static final String SERIALIZED_NAME_MEMORY_SIZE = "MemorySize"; - - @SerializedName(SERIALIZED_NAME_MEMORY_SIZE) - private Float memorySize; - - public static final String SERIALIZED_NAME_VCORE_COUNT = "VcoreCount"; - - @SerializedName(SERIALIZED_NAME_VCORE_COUNT) - private Integer vcoreCount; - - public static final String SERIALIZED_NAME_VM_TYPE_NAME = "VmTypeName"; - - @SerializedName(SERIALIZED_NAME_VM_TYPE_NAME) - private String vmTypeName; - - public static final String SERIALIZED_NAME_VOLUME_COUNT = "VolumeCount"; - - @SerializedName(SERIALIZED_NAME_VOLUME_COUNT) - private Integer volumeCount; - - public static final String SERIALIZED_NAME_VOLUME_SIZE = "VolumeSize"; - - @SerializedName(SERIALIZED_NAME_VOLUME_SIZE) - private Integer volumeSize; - - public VmType() {} - - public VmType bsuOptimized(Boolean bsuOptimized) { - - this.bsuOptimized = bsuOptimized; - return this; - } - - /** - * This parameter is not available. It is present in our API for the sake of historical - * compatibility with AWS. - * - * @return bsuOptimized - */ - @javax.annotation.Nullable - public Boolean getBsuOptimized() { - return bsuOptimized; - } - - public void setBsuOptimized(Boolean bsuOptimized) { - this.bsuOptimized = bsuOptimized; - } - - public VmType ephemeralsType(String ephemeralsType) { - - this.ephemeralsType = ephemeralsType; - return this; - } - - /** - * The type of ephemeral storage disk. - * - * @return ephemeralsType - */ - @javax.annotation.Nullable - public String getEphemeralsType() { - return ephemeralsType; - } - - public void setEphemeralsType(String ephemeralsType) { - this.ephemeralsType = ephemeralsType; - } - - public VmType eth(Integer eth) { - - this.eth = eth; - return this; - } - - /** - * The number of Ethernet interface available. - * - * @return eth - */ - @javax.annotation.Nullable - public Integer getEth() { - return eth; - } - - public void setEth(Integer eth) { - this.eth = eth; - } - - public VmType gpu(Integer gpu) { - - this.gpu = gpu; - return this; - } - - /** - * The number of GPU available. - * - * @return gpu - */ - @javax.annotation.Nullable - public Integer getGpu() { - return gpu; - } - - public void setGpu(Integer gpu) { - this.gpu = gpu; - } - - public VmType maxPrivateIps(Integer maxPrivateIps) { - - this.maxPrivateIps = maxPrivateIps; - return this; - } - - /** - * The maximum number of private IPs per network interface card (NIC). - * - * @return maxPrivateIps - */ - @javax.annotation.Nullable - public Integer getMaxPrivateIps() { - return maxPrivateIps; - } - - public void setMaxPrivateIps(Integer maxPrivateIps) { - this.maxPrivateIps = maxPrivateIps; - } - - public VmType memorySize(Float memorySize) { - - this.memorySize = memorySize; - return this; - } - - /** - * The amount of memory, in gibibytes. - * - * @return memorySize - */ - @javax.annotation.Nullable - public Float getMemorySize() { - return memorySize; - } - - public void setMemorySize(Float memorySize) { - this.memorySize = memorySize; - } - - public VmType vcoreCount(Integer vcoreCount) { - - this.vcoreCount = vcoreCount; - return this; - } - - /** - * The number of vCores. - * - * @return vcoreCount - */ - @javax.annotation.Nullable - public Integer getVcoreCount() { - return vcoreCount; - } - - public void setVcoreCount(Integer vcoreCount) { - this.vcoreCount = vcoreCount; - } - - public VmType vmTypeName(String vmTypeName) { - - this.vmTypeName = vmTypeName; - return this; - } - - /** - * The name of the VM type. - * - * @return vmTypeName - */ - @javax.annotation.Nullable - public String getVmTypeName() { - return vmTypeName; - } - - public void setVmTypeName(String vmTypeName) { - this.vmTypeName = vmTypeName; - } - - public VmType volumeCount(Integer volumeCount) { - - this.volumeCount = volumeCount; - return this; - } - - /** - * The maximum number of ephemeral storage disks. - * - * @return volumeCount - */ - @javax.annotation.Nullable - public Integer getVolumeCount() { - return volumeCount; - } - - public void setVolumeCount(Integer volumeCount) { - this.volumeCount = volumeCount; - } - - public VmType volumeSize(Integer volumeSize) { - - this.volumeSize = volumeSize; - return this; - } - - /** - * The size of one ephemeral storage disk, in gibibytes (GiB). - * - * @return volumeSize - */ - @javax.annotation.Nullable - public Integer getVolumeSize() { - return volumeSize; - } - - public void setVolumeSize(Integer volumeSize) { - this.volumeSize = volumeSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VmType vmType = (VmType) o; - return Objects.equals(this.bsuOptimized, vmType.bsuOptimized) - && Objects.equals(this.ephemeralsType, vmType.ephemeralsType) - && Objects.equals(this.eth, vmType.eth) - && Objects.equals(this.gpu, vmType.gpu) - && Objects.equals(this.maxPrivateIps, vmType.maxPrivateIps) - && Objects.equals(this.memorySize, vmType.memorySize) - && Objects.equals(this.vcoreCount, vmType.vcoreCount) - && Objects.equals(this.vmTypeName, vmType.vmTypeName) - && Objects.equals(this.volumeCount, vmType.volumeCount) - && Objects.equals(this.volumeSize, vmType.volumeSize); - } - - @Override - public int hashCode() { - return Objects.hash( - bsuOptimized, - ephemeralsType, - eth, - gpu, - maxPrivateIps, - memorySize, - vcoreCount, - vmTypeName, - volumeCount, - volumeSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VmType {\n"); - sb.append(" bsuOptimized: ").append(toIndentedString(bsuOptimized)).append("\n"); - sb.append(" ephemeralsType: ").append(toIndentedString(ephemeralsType)).append("\n"); - sb.append(" eth: ").append(toIndentedString(eth)).append("\n"); - sb.append(" gpu: ").append(toIndentedString(gpu)).append("\n"); - sb.append(" maxPrivateIps: ").append(toIndentedString(maxPrivateIps)).append("\n"); - sb.append(" memorySize: ").append(toIndentedString(memorySize)).append("\n"); - sb.append(" vcoreCount: ").append(toIndentedString(vcoreCount)).append("\n"); - sb.append(" vmTypeName: ").append(toIndentedString(vmTypeName)).append("\n"); - sb.append(" volumeCount: ").append(toIndentedString(volumeCount)).append("\n"); - sb.append(" volumeSize: ").append(toIndentedString(volumeSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("BsuOptimized"); - openapiFields.add("EphemeralsType"); - openapiFields.add("Eth"); - openapiFields.add("Gpu"); - openapiFields.add("MaxPrivateIps"); - openapiFields.add("MemorySize"); - openapiFields.add("VcoreCount"); - openapiFields.add("VmTypeName"); - openapiFields.add("VolumeCount"); - openapiFields.add("VolumeSize"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VmType - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VmType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VmType is not found in the empty JSON" - + " string", - VmType.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VmType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `VmType`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("EphemeralsType") != null && !jsonObj.get("EphemeralsType").isJsonNull()) - && !jsonObj.get("EphemeralsType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `EphemeralsType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("EphemeralsType").toString())); - } - if ((jsonObj.get("VmTypeName") != null && !jsonObj.get("VmTypeName").isJsonNull()) - && !jsonObj.get("VmTypeName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VmTypeName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VmTypeName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VmType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VmType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VmType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VmType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VmType read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VmType given an JSON string - * - * @param jsonString JSON string - * @return An instance of VmType - * @throws IOException if the JSON string is invalid with respect to VmType - */ - public static VmType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VmType.class); - } - - /** - * Convert an instance of VmType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Volume.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/Volume.java deleted file mode 100644 index 260fa02c..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/Volume.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the volume. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Volume { - public static final String SERIALIZED_NAME_CREATION_DATE = "CreationDate"; - - @SerializedName(SERIALIZED_NAME_CREATION_DATE) - private OffsetDateTime creationDate; - - public static final String SERIALIZED_NAME_IOPS = "Iops"; - - @SerializedName(SERIALIZED_NAME_IOPS) - private Integer iops; - - public static final String SERIALIZED_NAME_LINKED_VOLUMES = "LinkedVolumes"; - - @SerializedName(SERIALIZED_NAME_LINKED_VOLUMES) - private List linkedVolumes = null; - - public static final String SERIALIZED_NAME_SIZE = "Size"; - - @SerializedName(SERIALIZED_NAME_SIZE) - private Integer size; - - public static final String SERIALIZED_NAME_SNAPSHOT_ID = "SnapshotId"; - - @SerializedName(SERIALIZED_NAME_SNAPSHOT_ID) - private String snapshotId; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_SUBREGION_NAME = "SubregionName"; - - @SerializedName(SERIALIZED_NAME_SUBREGION_NAME) - private String subregionName; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VOLUME_ID = "VolumeId"; - - @SerializedName(SERIALIZED_NAME_VOLUME_ID) - private String volumeId; - - public static final String SERIALIZED_NAME_VOLUME_TYPE = "VolumeType"; - - @SerializedName(SERIALIZED_NAME_VOLUME_TYPE) - private String volumeType; - - public Volume() {} - - public Volume creationDate(OffsetDateTime creationDate) { - - this.creationDate = creationDate; - return this; - } - - /** - * The date and time (UTC) at which the volume was created. - * - * @return creationDate - */ - @javax.annotation.Nullable - public OffsetDateTime getCreationDate() { - return creationDate; - } - - public void setCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - } - - public Volume iops(Integer iops) { - - this.iops = iops; - return this; - } - - /** - * The number of I/O operations per second (IOPS):<br /> - For `io1` volumes, - * the number of provisioned IOPS<br /> - For `gp2` volumes, the baseline - * performance of the volume - * - * @return iops - */ - @javax.annotation.Nullable - public Integer getIops() { - return iops; - } - - public void setIops(Integer iops) { - this.iops = iops; - } - - public Volume linkedVolumes(List linkedVolumes) { - - this.linkedVolumes = linkedVolumes; - return this; - } - - public Volume addLinkedVolumesItem(LinkedVolume linkedVolumesItem) { - if (this.linkedVolumes == null) { - this.linkedVolumes = new ArrayList<>(); - } - this.linkedVolumes.add(linkedVolumesItem); - return this; - } - - /** - * Information about your volume attachment. - * - * @return linkedVolumes - */ - @javax.annotation.Nullable - public List getLinkedVolumes() { - return linkedVolumes; - } - - public void setLinkedVolumes(List linkedVolumes) { - this.linkedVolumes = linkedVolumes; - } - - public Volume size(Integer size) { - - this.size = size; - return this; - } - - /** - * The size of the volume, in gibibytes (GiB). - * - * @return size - */ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public Volume snapshotId(String snapshotId) { - - this.snapshotId = snapshotId; - return this; - } - - /** - * The snapshot from which the volume was created. - * - * @return snapshotId - */ - @javax.annotation.Nullable - public String getSnapshotId() { - return snapshotId; - } - - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - } - - public Volume state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the volume (`creating` \\| `available` \\| - * `in-use` \\| `updating` \\| `deleting` \\| `error`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public Volume subregionName(String subregionName) { - - this.subregionName = subregionName; - return this; - } - - /** - * The Subregion in which the volume was created. - * - * @return subregionName - */ - @javax.annotation.Nullable - public String getSubregionName() { - return subregionName; - } - - public void setSubregionName(String subregionName) { - this.subregionName = subregionName; - } - - public Volume tags(List tags) { - - this.tags = tags; - return this; - } - - public Volume addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the volume. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Volume volumeId(String volumeId) { - - this.volumeId = volumeId; - return this; - } - - /** - * The ID of the volume. - * - * @return volumeId - */ - @javax.annotation.Nullable - public String getVolumeId() { - return volumeId; - } - - public void setVolumeId(String volumeId) { - this.volumeId = volumeId; - } - - public Volume volumeType(String volumeType) { - - this.volumeType = volumeType; - return this; - } - - /** - * The type of the volume (`standard` \\| `gp2` \\| `io1`). - * - * @return volumeType - */ - @javax.annotation.Nullable - public String getVolumeType() { - return volumeType; - } - - public void setVolumeType(String volumeType) { - this.volumeType = volumeType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Volume volume = (Volume) o; - return Objects.equals(this.creationDate, volume.creationDate) - && Objects.equals(this.iops, volume.iops) - && Objects.equals(this.linkedVolumes, volume.linkedVolumes) - && Objects.equals(this.size, volume.size) - && Objects.equals(this.snapshotId, volume.snapshotId) - && Objects.equals(this.state, volume.state) - && Objects.equals(this.subregionName, volume.subregionName) - && Objects.equals(this.tags, volume.tags) - && Objects.equals(this.volumeId, volume.volumeId) - && Objects.equals(this.volumeType, volume.volumeType); - } - - @Override - public int hashCode() { - return Objects.hash( - creationDate, - iops, - linkedVolumes, - size, - snapshotId, - state, - subregionName, - tags, - volumeId, - volumeType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Volume {\n"); - sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" iops: ").append(toIndentedString(iops)).append("\n"); - sb.append(" linkedVolumes: ").append(toIndentedString(linkedVolumes)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" subregionName: ").append(toIndentedString(subregionName)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" volumeId: ").append(toIndentedString(volumeId)).append("\n"); - sb.append(" volumeType: ").append(toIndentedString(volumeType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CreationDate"); - openapiFields.add("Iops"); - openapiFields.add("LinkedVolumes"); - openapiFields.add("Size"); - openapiFields.add("SnapshotId"); - openapiFields.add("State"); - openapiFields.add("SubregionName"); - openapiFields.add("Tags"); - openapiFields.add("VolumeId"); - openapiFields.add("VolumeType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Volume - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Volume.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Volume is not found in the empty JSON" - + " string", - Volume.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Volume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Volume`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("LinkedVolumes") != null && !jsonObj.get("LinkedVolumes").isJsonNull()) { - JsonArray jsonArraylinkedVolumes = jsonObj.getAsJsonArray("LinkedVolumes"); - if (jsonArraylinkedVolumes != null) { - // ensure the json data is an array - if (!jsonObj.get("LinkedVolumes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `LinkedVolumes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("LinkedVolumes").toString())); - } - - // validate the optional field `LinkedVolumes` (array) - for (int i = 0; i < jsonArraylinkedVolumes.size(); i++) { - LinkedVolume.validateJsonObject( - jsonArraylinkedVolumes.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("SnapshotId") != null && !jsonObj.get("SnapshotId").isJsonNull()) - && !jsonObj.get("SnapshotId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SnapshotId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SnapshotId").toString())); - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if ((jsonObj.get("SubregionName") != null && !jsonObj.get("SubregionName").isJsonNull()) - && !jsonObj.get("SubregionName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `SubregionName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("SubregionName").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VolumeId") != null && !jsonObj.get("VolumeId").isJsonNull()) - && !jsonObj.get("VolumeId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeId").toString())); - } - if ((jsonObj.get("VolumeType") != null && !jsonObj.get("VolumeType").isJsonNull()) - && !jsonObj.get("VolumeType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VolumeType` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("VolumeType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Volume.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Volume' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Volume.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Volume value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Volume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Volume given an JSON string - * - * @param jsonString JSON string - * @return An instance of Volume - * @throws IOException if the JSON string is invalid with respect to Volume - */ - public static Volume fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Volume.class); - } - - /** - * Convert an instance of Volume to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnConnection.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnConnection.java deleted file mode 100644 index d8856b1b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnConnection.java +++ /dev/null @@ -1,627 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about a VPN connection. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VpnConnection { - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_CONFIGURATION = - "ClientGatewayConfiguration"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_CONFIGURATION) - private String clientGatewayConfiguration; - - public static final String SERIALIZED_NAME_CLIENT_GATEWAY_ID = "ClientGatewayId"; - - @SerializedName(SERIALIZED_NAME_CLIENT_GATEWAY_ID) - private String clientGatewayId; - - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "ConnectionType"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private String connectionType; - - public static final String SERIALIZED_NAME_ROUTES = "Routes"; - - @SerializedName(SERIALIZED_NAME_ROUTES) - private List routes = null; - - public static final String SERIALIZED_NAME_STATE = "State"; - - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATIC_ROUTES_ONLY = "StaticRoutesOnly"; - - @SerializedName(SERIALIZED_NAME_STATIC_ROUTES_ONLY) - private Boolean staticRoutesOnly; - - public static final String SERIALIZED_NAME_TAGS = "Tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - public static final String SERIALIZED_NAME_VGW_TELEMETRIES = "VgwTelemetries"; - - @SerializedName(SERIALIZED_NAME_VGW_TELEMETRIES) - private List vgwTelemetries = null; - - public static final String SERIALIZED_NAME_VIRTUAL_GATEWAY_ID = "VirtualGatewayId"; - - @SerializedName(SERIALIZED_NAME_VIRTUAL_GATEWAY_ID) - private String virtualGatewayId; - - public static final String SERIALIZED_NAME_VPN_CONNECTION_ID = "VpnConnectionId"; - - @SerializedName(SERIALIZED_NAME_VPN_CONNECTION_ID) - private String vpnConnectionId; - - public static final String SERIALIZED_NAME_VPN_OPTIONS = "VpnOptions"; - - @SerializedName(SERIALIZED_NAME_VPN_OPTIONS) - private VpnOptions vpnOptions; - - public VpnConnection() {} - - public VpnConnection clientGatewayConfiguration(String clientGatewayConfiguration) { - - this.clientGatewayConfiguration = clientGatewayConfiguration; - return this; - } - - /** - * Example configuration for the client gateway. - * - * @return clientGatewayConfiguration - */ - @javax.annotation.Nullable - public String getClientGatewayConfiguration() { - return clientGatewayConfiguration; - } - - public void setClientGatewayConfiguration(String clientGatewayConfiguration) { - this.clientGatewayConfiguration = clientGatewayConfiguration; - } - - public VpnConnection clientGatewayId(String clientGatewayId) { - - this.clientGatewayId = clientGatewayId; - return this; - } - - /** - * The ID of the client gateway used on the client end of the connection. - * - * @return clientGatewayId - */ - @javax.annotation.Nullable - public String getClientGatewayId() { - return clientGatewayId; - } - - public void setClientGatewayId(String clientGatewayId) { - this.clientGatewayId = clientGatewayId; - } - - public VpnConnection connectionType(String connectionType) { - - this.connectionType = connectionType; - return this; - } - - /** - * The type of VPN connection (always `ipsec.1`). - * - * @return connectionType - */ - @javax.annotation.Nullable - public String getConnectionType() { - return connectionType; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public VpnConnection routes(List routes) { - - this.routes = routes; - return this; - } - - public VpnConnection addRoutesItem(RouteLight routesItem) { - if (this.routes == null) { - this.routes = new ArrayList<>(); - } - this.routes.add(routesItem); - return this; - } - - /** - * Information about one or more static routes associated with the VPN connection, if any. - * - * @return routes - */ - @javax.annotation.Nullable - public List getRoutes() { - return routes; - } - - public void setRoutes(List routes) { - this.routes = routes; - } - - public VpnConnection state(String state) { - - this.state = state; - return this; - } - - /** - * The state of the VPN connection (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public VpnConnection staticRoutesOnly(Boolean staticRoutesOnly) { - - this.staticRoutesOnly = staticRoutesOnly; - return this; - } - - /** - * If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If - * true, routing is controlled using static routes. For more information about how to create and - * delete static routes, see [CreateVpnConnectionRoute](#createvpnconnectionroute) and - * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). - * - * @return staticRoutesOnly - */ - @javax.annotation.Nullable - public Boolean getStaticRoutesOnly() { - return staticRoutesOnly; - } - - public void setStaticRoutesOnly(Boolean staticRoutesOnly) { - this.staticRoutesOnly = staticRoutesOnly; - } - - public VpnConnection tags(List tags) { - - this.tags = tags; - return this; - } - - public VpnConnection addTagsItem(ResourceTag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * One or more tags associated with the VPN connection. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public VpnConnection vgwTelemetries(List vgwTelemetries) { - - this.vgwTelemetries = vgwTelemetries; - return this; - } - - public VpnConnection addVgwTelemetriesItem(VgwTelemetry vgwTelemetriesItem) { - if (this.vgwTelemetries == null) { - this.vgwTelemetries = new ArrayList<>(); - } - this.vgwTelemetries.add(vgwTelemetriesItem); - return this; - } - - /** - * Information about the current state of one or more of the VPN tunnels. - * - * @return vgwTelemetries - */ - @javax.annotation.Nullable - public List getVgwTelemetries() { - return vgwTelemetries; - } - - public void setVgwTelemetries(List vgwTelemetries) { - this.vgwTelemetries = vgwTelemetries; - } - - public VpnConnection virtualGatewayId(String virtualGatewayId) { - - this.virtualGatewayId = virtualGatewayId; - return this; - } - - /** - * The ID of the virtual gateway used on the OUTSCALE end of the connection. - * - * @return virtualGatewayId - */ - @javax.annotation.Nullable - public String getVirtualGatewayId() { - return virtualGatewayId; - } - - public void setVirtualGatewayId(String virtualGatewayId) { - this.virtualGatewayId = virtualGatewayId; - } - - public VpnConnection vpnConnectionId(String vpnConnectionId) { - - this.vpnConnectionId = vpnConnectionId; - return this; - } - - /** - * The ID of the VPN connection. - * - * @return vpnConnectionId - */ - @javax.annotation.Nullable - public String getVpnConnectionId() { - return vpnConnectionId; - } - - public void setVpnConnectionId(String vpnConnectionId) { - this.vpnConnectionId = vpnConnectionId; - } - - public VpnConnection vpnOptions(VpnOptions vpnOptions) { - - this.vpnOptions = vpnOptions; - return this; - } - - /** - * Get vpnOptions - * - * @return vpnOptions - */ - @javax.annotation.Nullable - public VpnOptions getVpnOptions() { - return vpnOptions; - } - - public void setVpnOptions(VpnOptions vpnOptions) { - this.vpnOptions = vpnOptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VpnConnection vpnConnection = (VpnConnection) o; - return Objects.equals( - this.clientGatewayConfiguration, vpnConnection.clientGatewayConfiguration) - && Objects.equals(this.clientGatewayId, vpnConnection.clientGatewayId) - && Objects.equals(this.connectionType, vpnConnection.connectionType) - && Objects.equals(this.routes, vpnConnection.routes) - && Objects.equals(this.state, vpnConnection.state) - && Objects.equals(this.staticRoutesOnly, vpnConnection.staticRoutesOnly) - && Objects.equals(this.tags, vpnConnection.tags) - && Objects.equals(this.vgwTelemetries, vpnConnection.vgwTelemetries) - && Objects.equals(this.virtualGatewayId, vpnConnection.virtualGatewayId) - && Objects.equals(this.vpnConnectionId, vpnConnection.vpnConnectionId) - && Objects.equals(this.vpnOptions, vpnConnection.vpnOptions); - } - - @Override - public int hashCode() { - return Objects.hash( - clientGatewayConfiguration, - clientGatewayId, - connectionType, - routes, - state, - staticRoutesOnly, - tags, - vgwTelemetries, - virtualGatewayId, - vpnConnectionId, - vpnOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VpnConnection {\n"); - sb.append(" clientGatewayConfiguration: ") - .append(toIndentedString(clientGatewayConfiguration)) - .append("\n"); - sb.append(" clientGatewayId: ").append(toIndentedString(clientGatewayId)).append("\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); - sb.append(" routes: ").append(toIndentedString(routes)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" staticRoutesOnly: ").append(toIndentedString(staticRoutesOnly)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vgwTelemetries: ").append(toIndentedString(vgwTelemetries)).append("\n"); - sb.append(" virtualGatewayId: ").append(toIndentedString(virtualGatewayId)).append("\n"); - sb.append(" vpnConnectionId: ").append(toIndentedString(vpnConnectionId)).append("\n"); - sb.append(" vpnOptions: ").append(toIndentedString(vpnOptions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ClientGatewayConfiguration"); - openapiFields.add("ClientGatewayId"); - openapiFields.add("ConnectionType"); - openapiFields.add("Routes"); - openapiFields.add("State"); - openapiFields.add("StaticRoutesOnly"); - openapiFields.add("Tags"); - openapiFields.add("VgwTelemetries"); - openapiFields.add("VirtualGatewayId"); - openapiFields.add("VpnConnectionId"); - openapiFields.add("VpnOptions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VpnConnection - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VpnConnection.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VpnConnection is not found in the" - + " empty JSON string", - VpnConnection.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VpnConnection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VpnConnection` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("ClientGatewayConfiguration") != null - && !jsonObj.get("ClientGatewayConfiguration").isJsonNull()) - && !jsonObj.get("ClientGatewayConfiguration").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayConfiguration` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("ClientGatewayConfiguration").toString())); - } - if ((jsonObj.get("ClientGatewayId") != null && !jsonObj.get("ClientGatewayId").isJsonNull()) - && !jsonObj.get("ClientGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ClientGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ClientGatewayId").toString())); - } - if ((jsonObj.get("ConnectionType") != null && !jsonObj.get("ConnectionType").isJsonNull()) - && !jsonObj.get("ConnectionType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `ConnectionType` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("ConnectionType").toString())); - } - if (jsonObj.get("Routes") != null && !jsonObj.get("Routes").isJsonNull()) { - JsonArray jsonArrayroutes = jsonObj.getAsJsonArray("Routes"); - if (jsonArrayroutes != null) { - // ensure the json data is an array - if (!jsonObj.get("Routes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Routes` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Routes").toString())); - } - - // validate the optional field `Routes` (array) - for (int i = 0; i < jsonArrayroutes.size(); i++) { - RouteLight.validateJsonObject(jsonArrayroutes.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("State") != null && !jsonObj.get("State").isJsonNull()) - && !jsonObj.get("State").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `State` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("State").toString())); - } - if (jsonObj.get("Tags") != null && !jsonObj.get("Tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("Tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("Tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("Tags").toString())); - } - - // validate the optional field `Tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ResourceTag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); - } - ; - } - } - if (jsonObj.get("VgwTelemetries") != null && !jsonObj.get("VgwTelemetries").isJsonNull()) { - JsonArray jsonArrayvgwTelemetries = jsonObj.getAsJsonArray("VgwTelemetries"); - if (jsonArrayvgwTelemetries != null) { - // ensure the json data is an array - if (!jsonObj.get("VgwTelemetries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VgwTelemetries` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("VgwTelemetries").toString())); - } - - // validate the optional field `VgwTelemetries` (array) - for (int i = 0; i < jsonArrayvgwTelemetries.size(); i++) { - VgwTelemetry.validateJsonObject( - jsonArrayvgwTelemetries.get(i).getAsJsonObject()); - } - ; - } - } - if ((jsonObj.get("VirtualGatewayId") != null - && !jsonObj.get("VirtualGatewayId").isJsonNull()) - && !jsonObj.get("VirtualGatewayId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VirtualGatewayId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VirtualGatewayId").toString())); - } - if ((jsonObj.get("VpnConnectionId") != null && !jsonObj.get("VpnConnectionId").isJsonNull()) - && !jsonObj.get("VpnConnectionId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `VpnConnectionId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("VpnConnectionId").toString())); - } - // validate the optional field `VpnOptions` - if (jsonObj.get("VpnOptions") != null && !jsonObj.get("VpnOptions").isJsonNull()) { - VpnOptions.validateJsonObject(jsonObj.getAsJsonObject("VpnOptions")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VpnConnection.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VpnConnection' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VpnConnection.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VpnConnection value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VpnConnection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VpnConnection given an JSON string - * - * @param jsonString JSON string - * @return An instance of VpnConnection - * @throws IOException if the JSON string is invalid with respect to VpnConnection - */ - public static VpnConnection fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VpnConnection.class); - } - - /** - * Convert an instance of VpnConnection to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnOptions.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnOptions.java deleted file mode 100644 index 54d76a47..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/VpnOptions.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** Information about the VPN options. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VpnOptions { - public static final String SERIALIZED_NAME_PHASE1_OPTIONS = "Phase1Options"; - - @SerializedName(SERIALIZED_NAME_PHASE1_OPTIONS) - private Phase1Options phase1Options; - - public static final String SERIALIZED_NAME_PHASE2_OPTIONS = "Phase2Options"; - - @SerializedName(SERIALIZED_NAME_PHASE2_OPTIONS) - private Phase2Options phase2Options; - - public static final String SERIALIZED_NAME_TUNNEL_INSIDE_IP_RANGE = "TunnelInsideIpRange"; - - @SerializedName(SERIALIZED_NAME_TUNNEL_INSIDE_IP_RANGE) - private String tunnelInsideIpRange; - - public VpnOptions() {} - - public VpnOptions phase1Options(Phase1Options phase1Options) { - - this.phase1Options = phase1Options; - return this; - } - - /** - * Get phase1Options - * - * @return phase1Options - */ - @javax.annotation.Nullable - public Phase1Options getPhase1Options() { - return phase1Options; - } - - public void setPhase1Options(Phase1Options phase1Options) { - this.phase1Options = phase1Options; - } - - public VpnOptions phase2Options(Phase2Options phase2Options) { - - this.phase2Options = phase2Options; - return this; - } - - /** - * Get phase2Options - * - * @return phase2Options - */ - @javax.annotation.Nullable - public Phase2Options getPhase2Options() { - return phase2Options; - } - - public void setPhase2Options(Phase2Options phase2Options) { - this.phase2Options = phase2Options; - } - - public VpnOptions tunnelInsideIpRange(String tunnelInsideIpRange) { - - this.tunnelInsideIpRange = tunnelInsideIpRange; - return this; - } - - /** - * The range of inside IPs for the tunnel. This must be a /30 CIDR block from the - * 169.254.254.0/24 range. - * - * @return tunnelInsideIpRange - */ - @javax.annotation.Nullable - public String getTunnelInsideIpRange() { - return tunnelInsideIpRange; - } - - public void setTunnelInsideIpRange(String tunnelInsideIpRange) { - this.tunnelInsideIpRange = tunnelInsideIpRange; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VpnOptions vpnOptions = (VpnOptions) o; - return Objects.equals(this.phase1Options, vpnOptions.phase1Options) - && Objects.equals(this.phase2Options, vpnOptions.phase2Options) - && Objects.equals(this.tunnelInsideIpRange, vpnOptions.tunnelInsideIpRange); - } - - @Override - public int hashCode() { - return Objects.hash(phase1Options, phase2Options, tunnelInsideIpRange); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VpnOptions {\n"); - sb.append(" phase1Options: ").append(toIndentedString(phase1Options)).append("\n"); - sb.append(" phase2Options: ").append(toIndentedString(phase2Options)).append("\n"); - sb.append(" tunnelInsideIpRange: ") - .append(toIndentedString(tunnelInsideIpRange)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Phase1Options"); - openapiFields.add("Phase2Options"); - openapiFields.add("TunnelInsideIpRange"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VpnOptions - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VpnOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VpnOptions is not found in the empty" - + " JSON string", - VpnOptions.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VpnOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VpnOptions` properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `Phase1Options` - if (jsonObj.get("Phase1Options") != null && !jsonObj.get("Phase1Options").isJsonNull()) { - Phase1Options.validateJsonObject(jsonObj.getAsJsonObject("Phase1Options")); - } - // validate the optional field `Phase2Options` - if (jsonObj.get("Phase2Options") != null && !jsonObj.get("Phase2Options").isJsonNull()) { - Phase2Options.validateJsonObject(jsonObj.getAsJsonObject("Phase2Options")); - } - if ((jsonObj.get("TunnelInsideIpRange") != null - && !jsonObj.get("TunnelInsideIpRange").isJsonNull()) - && !jsonObj.get("TunnelInsideIpRange").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `TunnelInsideIpRange` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("TunnelInsideIpRange").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VpnOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VpnOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VpnOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VpnOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VpnOptions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VpnOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of VpnOptions - * @throws IOException if the JSON string is invalid with respect to VpnOptions - */ - public static VpnOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VpnOptions.class); - } - - /** - * Convert an instance of VpnOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/model/With.java b/src/main/java/io/github/outscale/osc_sdk_java/client/model/With.java deleted file mode 100644 index f39ac68b..00000000 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/model/With.java +++ /dev/null @@ -1,627 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.github.outscale.osc_sdk_java.client.JSON; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; - -/** The information to display in each returned log. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class With { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "AccountId"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private Boolean accountId = true; - - public static final String SERIALIZED_NAME_CALL_DURATION = "CallDuration"; - - @SerializedName(SERIALIZED_NAME_CALL_DURATION) - private Boolean callDuration = true; - - public static final String SERIALIZED_NAME_QUERY_ACCESS_KEY = "QueryAccessKey"; - - @SerializedName(SERIALIZED_NAME_QUERY_ACCESS_KEY) - private Boolean queryAccessKey = true; - - public static final String SERIALIZED_NAME_QUERY_API_NAME = "QueryApiName"; - - @SerializedName(SERIALIZED_NAME_QUERY_API_NAME) - private Boolean queryApiName = true; - - public static final String SERIALIZED_NAME_QUERY_API_VERSION = "QueryApiVersion"; - - @SerializedName(SERIALIZED_NAME_QUERY_API_VERSION) - private Boolean queryApiVersion = true; - - public static final String SERIALIZED_NAME_QUERY_CALL_NAME = "QueryCallName"; - - @SerializedName(SERIALIZED_NAME_QUERY_CALL_NAME) - private Boolean queryCallName = true; - - public static final String SERIALIZED_NAME_QUERY_DATE = "QueryDate"; - - @SerializedName(SERIALIZED_NAME_QUERY_DATE) - private Boolean queryDate = true; - - public static final String SERIALIZED_NAME_QUERY_HEADER_RAW = "QueryHeaderRaw"; - - @SerializedName(SERIALIZED_NAME_QUERY_HEADER_RAW) - private Boolean queryHeaderRaw = true; - - public static final String SERIALIZED_NAME_QUERY_HEADER_SIZE = "QueryHeaderSize"; - - @SerializedName(SERIALIZED_NAME_QUERY_HEADER_SIZE) - private Boolean queryHeaderSize = true; - - public static final String SERIALIZED_NAME_QUERY_IP_ADDRESS = "QueryIpAddress"; - - @SerializedName(SERIALIZED_NAME_QUERY_IP_ADDRESS) - private Boolean queryIpAddress = true; - - public static final String SERIALIZED_NAME_QUERY_PAYLOAD_RAW = "QueryPayloadRaw"; - - @SerializedName(SERIALIZED_NAME_QUERY_PAYLOAD_RAW) - private Boolean queryPayloadRaw = true; - - public static final String SERIALIZED_NAME_QUERY_PAYLOAD_SIZE = "QueryPayloadSize"; - - @SerializedName(SERIALIZED_NAME_QUERY_PAYLOAD_SIZE) - private Boolean queryPayloadSize = true; - - public static final String SERIALIZED_NAME_QUERY_USER_AGENT = "QueryUserAgent"; - - @SerializedName(SERIALIZED_NAME_QUERY_USER_AGENT) - private Boolean queryUserAgent = true; - - public static final String SERIALIZED_NAME_REQUEST_ID = "RequestId"; - - @SerializedName(SERIALIZED_NAME_REQUEST_ID) - private Boolean requestId = true; - - public static final String SERIALIZED_NAME_RESPONSE_SIZE = "ResponseSize"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_SIZE) - private Boolean responseSize = true; - - public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "ResponseStatusCode"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) - private Boolean responseStatusCode = true; - - public With() {} - - public With accountId(Boolean accountId) { - - this.accountId = accountId; - return this; - } - - /** - * By default or if set to true, the account ID is displayed. - * - * @return accountId - */ - @javax.annotation.Nullable - public Boolean getAccountId() { - return accountId; - } - - public void setAccountId(Boolean accountId) { - this.accountId = accountId; - } - - public With callDuration(Boolean callDuration) { - - this.callDuration = callDuration; - return this; - } - - /** - * By default or if set to true, the duration of the call is displayed. - * - * @return callDuration - */ - @javax.annotation.Nullable - public Boolean getCallDuration() { - return callDuration; - } - - public void setCallDuration(Boolean callDuration) { - this.callDuration = callDuration; - } - - public With queryAccessKey(Boolean queryAccessKey) { - - this.queryAccessKey = queryAccessKey; - return this; - } - - /** - * By default or if set to true, the access key is displayed. - * - * @return queryAccessKey - */ - @javax.annotation.Nullable - public Boolean getQueryAccessKey() { - return queryAccessKey; - } - - public void setQueryAccessKey(Boolean queryAccessKey) { - this.queryAccessKey = queryAccessKey; - } - - public With queryApiName(Boolean queryApiName) { - - this.queryApiName = queryApiName; - return this; - } - - /** - * By default or if set to true, the name of the API is displayed. - * - * @return queryApiName - */ - @javax.annotation.Nullable - public Boolean getQueryApiName() { - return queryApiName; - } - - public void setQueryApiName(Boolean queryApiName) { - this.queryApiName = queryApiName; - } - - public With queryApiVersion(Boolean queryApiVersion) { - - this.queryApiVersion = queryApiVersion; - return this; - } - - /** - * By default or if set to true, the version of the API is displayed. - * - * @return queryApiVersion - */ - @javax.annotation.Nullable - public Boolean getQueryApiVersion() { - return queryApiVersion; - } - - public void setQueryApiVersion(Boolean queryApiVersion) { - this.queryApiVersion = queryApiVersion; - } - - public With queryCallName(Boolean queryCallName) { - - this.queryCallName = queryCallName; - return this; - } - - /** - * By default or if set to true, the name of the call is displayed. - * - * @return queryCallName - */ - @javax.annotation.Nullable - public Boolean getQueryCallName() { - return queryCallName; - } - - public void setQueryCallName(Boolean queryCallName) { - this.queryCallName = queryCallName; - } - - public With queryDate(Boolean queryDate) { - - this.queryDate = queryDate; - return this; - } - - /** - * By default or if set to true, the date of the call is displayed. - * - * @return queryDate - */ - @javax.annotation.Nullable - public Boolean getQueryDate() { - return queryDate; - } - - public void setQueryDate(Boolean queryDate) { - this.queryDate = queryDate; - } - - public With queryHeaderRaw(Boolean queryHeaderRaw) { - - this.queryHeaderRaw = queryHeaderRaw; - return this; - } - - /** - * By default or if set to true, the raw header of the HTTP request is displayed. - * - * @return queryHeaderRaw - */ - @javax.annotation.Nullable - public Boolean getQueryHeaderRaw() { - return queryHeaderRaw; - } - - public void setQueryHeaderRaw(Boolean queryHeaderRaw) { - this.queryHeaderRaw = queryHeaderRaw; - } - - public With queryHeaderSize(Boolean queryHeaderSize) { - - this.queryHeaderSize = queryHeaderSize; - return this; - } - - /** - * By default or if set to true, the size of the raw header of the HTTP request is displayed. - * - * @return queryHeaderSize - */ - @javax.annotation.Nullable - public Boolean getQueryHeaderSize() { - return queryHeaderSize; - } - - public void setQueryHeaderSize(Boolean queryHeaderSize) { - this.queryHeaderSize = queryHeaderSize; - } - - public With queryIpAddress(Boolean queryIpAddress) { - - this.queryIpAddress = queryIpAddress; - return this; - } - - /** - * By default or if set to true, the IP is displayed. - * - * @return queryIpAddress - */ - @javax.annotation.Nullable - public Boolean getQueryIpAddress() { - return queryIpAddress; - } - - public void setQueryIpAddress(Boolean queryIpAddress) { - this.queryIpAddress = queryIpAddress; - } - - public With queryPayloadRaw(Boolean queryPayloadRaw) { - - this.queryPayloadRaw = queryPayloadRaw; - return this; - } - - /** - * By default or if set to true, the raw payload of the HTTP request is displayed. - * - * @return queryPayloadRaw - */ - @javax.annotation.Nullable - public Boolean getQueryPayloadRaw() { - return queryPayloadRaw; - } - - public void setQueryPayloadRaw(Boolean queryPayloadRaw) { - this.queryPayloadRaw = queryPayloadRaw; - } - - public With queryPayloadSize(Boolean queryPayloadSize) { - - this.queryPayloadSize = queryPayloadSize; - return this; - } - - /** - * By default or if set to true, the size of the raw payload of the HTTP request is displayed. - * - * @return queryPayloadSize - */ - @javax.annotation.Nullable - public Boolean getQueryPayloadSize() { - return queryPayloadSize; - } - - public void setQueryPayloadSize(Boolean queryPayloadSize) { - this.queryPayloadSize = queryPayloadSize; - } - - public With queryUserAgent(Boolean queryUserAgent) { - - this.queryUserAgent = queryUserAgent; - return this; - } - - /** - * By default or if set to true, the user agent of the HTTP request is displayed. - * - * @return queryUserAgent - */ - @javax.annotation.Nullable - public Boolean getQueryUserAgent() { - return queryUserAgent; - } - - public void setQueryUserAgent(Boolean queryUserAgent) { - this.queryUserAgent = queryUserAgent; - } - - public With requestId(Boolean requestId) { - - this.requestId = requestId; - return this; - } - - /** - * By default or if set to true, the request ID is displayed. - * - * @return requestId - */ - @javax.annotation.Nullable - public Boolean getRequestId() { - return requestId; - } - - public void setRequestId(Boolean requestId) { - this.requestId = requestId; - } - - public With responseSize(Boolean responseSize) { - - this.responseSize = responseSize; - return this; - } - - /** - * By default or if set to true, the size of the response is displayed. - * - * @return responseSize - */ - @javax.annotation.Nullable - public Boolean getResponseSize() { - return responseSize; - } - - public void setResponseSize(Boolean responseSize) { - this.responseSize = responseSize; - } - - public With responseStatusCode(Boolean responseStatusCode) { - - this.responseStatusCode = responseStatusCode; - return this; - } - - /** - * By default or if set to true, the HTTP status code of the response is displayed. - * - * @return responseStatusCode - */ - @javax.annotation.Nullable - public Boolean getResponseStatusCode() { - return responseStatusCode; - } - - public void setResponseStatusCode(Boolean responseStatusCode) { - this.responseStatusCode = responseStatusCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - With with = (With) o; - return Objects.equals(this.accountId, with.accountId) - && Objects.equals(this.callDuration, with.callDuration) - && Objects.equals(this.queryAccessKey, with.queryAccessKey) - && Objects.equals(this.queryApiName, with.queryApiName) - && Objects.equals(this.queryApiVersion, with.queryApiVersion) - && Objects.equals(this.queryCallName, with.queryCallName) - && Objects.equals(this.queryDate, with.queryDate) - && Objects.equals(this.queryHeaderRaw, with.queryHeaderRaw) - && Objects.equals(this.queryHeaderSize, with.queryHeaderSize) - && Objects.equals(this.queryIpAddress, with.queryIpAddress) - && Objects.equals(this.queryPayloadRaw, with.queryPayloadRaw) - && Objects.equals(this.queryPayloadSize, with.queryPayloadSize) - && Objects.equals(this.queryUserAgent, with.queryUserAgent) - && Objects.equals(this.requestId, with.requestId) - && Objects.equals(this.responseSize, with.responseSize) - && Objects.equals(this.responseStatusCode, with.responseStatusCode); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - callDuration, - queryAccessKey, - queryApiName, - queryApiVersion, - queryCallName, - queryDate, - queryHeaderRaw, - queryHeaderSize, - queryIpAddress, - queryPayloadRaw, - queryPayloadSize, - queryUserAgent, - requestId, - responseSize, - responseStatusCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class With {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" callDuration: ").append(toIndentedString(callDuration)).append("\n"); - sb.append(" queryAccessKey: ").append(toIndentedString(queryAccessKey)).append("\n"); - sb.append(" queryApiName: ").append(toIndentedString(queryApiName)).append("\n"); - sb.append(" queryApiVersion: ").append(toIndentedString(queryApiVersion)).append("\n"); - sb.append(" queryCallName: ").append(toIndentedString(queryCallName)).append("\n"); - sb.append(" queryDate: ").append(toIndentedString(queryDate)).append("\n"); - sb.append(" queryHeaderRaw: ").append(toIndentedString(queryHeaderRaw)).append("\n"); - sb.append(" queryHeaderSize: ").append(toIndentedString(queryHeaderSize)).append("\n"); - sb.append(" queryIpAddress: ").append(toIndentedString(queryIpAddress)).append("\n"); - sb.append(" queryPayloadRaw: ").append(toIndentedString(queryPayloadRaw)).append("\n"); - sb.append(" queryPayloadSize: ").append(toIndentedString(queryPayloadSize)).append("\n"); - sb.append(" queryUserAgent: ").append(toIndentedString(queryUserAgent)).append("\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" responseSize: ").append(toIndentedString(responseSize)).append("\n"); - sb.append(" responseStatusCode: ") - .append(toIndentedString(responseStatusCode)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AccountId"); - openapiFields.add("CallDuration"); - openapiFields.add("QueryAccessKey"); - openapiFields.add("QueryApiName"); - openapiFields.add("QueryApiVersion"); - openapiFields.add("QueryCallName"); - openapiFields.add("QueryDate"); - openapiFields.add("QueryHeaderRaw"); - openapiFields.add("QueryHeaderSize"); - openapiFields.add("QueryIpAddress"); - openapiFields.add("QueryPayloadRaw"); - openapiFields.add("QueryPayloadSize"); - openapiFields.add("QueryUserAgent"); - openapiFields.add("RequestId"); - openapiFields.add("ResponseSize"); - openapiFields.add("ResponseStatusCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to With - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!With.openapiRequiredFields - .isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in With is not found in the empty JSON" - + " string", - With.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!With.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `With`" - + " properties. JSON: %s", - entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!With.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'With' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(With.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, With value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public With read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - }.nullSafe(); - } - } - - /** - * Create an instance of With given an JSON string - * - * @param jsonString JSON string - * @return An instance of With - * @throws IOException if the JSON string is invalid with respect to With - */ - public static With fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, With.class); - } - - /** - * Convert an instance of With to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java deleted file mode 100644 index b5924414..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/ConfigurationInitializerTest.java +++ /dev/null @@ -1,154 +0,0 @@ -package io.github.outscale.osc_sdk_java.client; - -import static org.junit.Assert.assertThrows; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; - -import org.junit.jupiter.api.Test; - -public class ConfigurationInitializerTest { - - private final ConfigurationInitializer configuration = new ConfigurationInitializer(); - - private String getValidCertificateFile() { - return ConfigurationInitializerTest.class.getResource("certs/valid/sdk.test.crt").getFile(); - } - - private String getValidKeyFile() { - return ConfigurationInitializerTest.class.getResource("certs/valid/sdk.test.key").getFile(); - } - - private String getInvalidKeyFile() { - return ConfigurationInitializerTest.class - .getResource("certs/invalid/sdk.test.key") - .getFile(); - } - - private String getInvalidCertificateFile() { - return ConfigurationInitializerTest.class - .getResource("certs/invalid/sdk.test.crt") - .getFile(); - } - - private String getValidCertificateB64() { - return "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURPVENDQWlFQ0ZCQlFQUmloN1pwNEhtcTZLeGtaOFdUbCtUcklNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1HMHgKQ3pBSkJnTlZCQVlUQWxSVE1RMHdDd1lEVlFRSURBUlVaWE4wTVEwd0N3WURWUVFIREFSVVpYTjBNUTB3Q3dZRApWUVFLREFSVVpYTjBNUTB3Q3dZRFZRUUxEQVJVWlhOME1RMHdDd1lEVlFRRERBUlVSVk5VTVJNd0VRWUpLb1pJCmh2Y05BUWtCRmdSVVJWTlVNQjRYRFRJeU1USXhOVEV5TXpZeE1Wb1hEVEkxTURrd09URXlNell4TVZvd1JURUwKTUFrR0ExVUVCaE1DVkZNeEV6QVJCZ05WQkFnTUNsTnZiV1V0VTNSaGRHVXhJVEFmQmdOVkJBb01HRWx1ZEdWeQpibVYwSUZkcFpHZHBkSE1nVUhSNUlFeDBaRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DCmdnRUJBS0VXYVJSNUltMkdnMHZjcVI1a0RmNHFyQ3N4amJkbmsvbk5DVDMzV25vVmRVUnVGQVlVV1ljVTVTdCsKTFg3RkdFK0VaOUo1bzlYLzBUcGFRbTMxZndIRUdieWJBQWQzRzI1Y2IwNnd4cGhHL3V6YWR0WVRHdURTdjQ3cgpPLzZuVTBnaG9hMldKRXVLSDJsNXJxQTZHakd4OWFqc1RUeThTbk9zV2MrOFdQRGhBaHhiRjFBS0hhMHprTE9kCm0zWlpnRTk2SWpEdjR1c0lQeUlhR2N1b21lNjBMUnB6OGp6NlBpYWtkbmFWZ21NWVpKMHRncndQWTkvRmd6cGEKVFo3QWhEcTcrSUJQZ1B5cXFZYnZuUHY1bTBvVlp5NG1CRkZuNTdrNnVjcUZpSUJvdDZsN3NDaTRSNXBGV1c2MwpRMFFmaEs4UUZkRXNzeUp6ejdJdGpqYTJuLzhDQXdFQUFUQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFVdmMwClVIS3B5V3Y5Uld0UGZlb3luYTdTOHNJMi9wM2UxNXh4V1ZKSW8zOVZBSmMyRTUvTzZSYVRHS2N6RzkxcjNCMEsKaWhwVkpEWllHM0V2VGtOWWN3Unhqb25URjBkYU5mTzYrSndIOGdMcFRrQU9GN3Ywd0gzeGRRVWJzOW0yY2RWdgphZ3dTT0M1WXdlTFdiaGw2Vm9tRlp0b3h0eE0xclRWUkFDcVNWNzBwNnNQK3FJUFNOUkxOZmVoVkt0Vm5PYmJUCmpFRndRZS9Vb2pCZ2FTMXM0Ni9lK0dMTkdmQWs0MmNZbnVyUU9QTFVKT1pvYmVncXpodElkNytQUndBbGVyT28KODhjb0RXY3JPRnl2RkdUUTJoMXB3dko3NkFNNXh5NHFFbitRNzVCZ0VuaWJSeHBzWUpDeUU1RGErem5LWnlGUQoyeHdWRS9aU2lOcm9BTno1NXc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="; - } - - private String getValidKeyB64() { - return "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBb1JacEZIa2liWWFEUzl5cEhtUU4vaXFzS3pHTnQyZVQrYzBKUGZkYWVoVjFSRzRVCkJoUlpoeFRsSzM0dGZzVVlUNFJuMG5tajFmL1JPbHBDYmZWL0FjUVp2SnNBQjNjYmJseHZUckRHbUViKzdOcDIKMWhNYTROSy9qdXM3L3FkVFNDR2hyWllrUzRvZmFYbXVvRG9hTWJIMXFPeE5QTHhLYzZ4Wno3eFk4T0VDSEZzWApVQW9kclRPUXM1MmJkbG1BVDNvaU1PL2k2d2cvSWhvWnk2aVo3clF0R25QeVBQbytKcVIyZHBXQ1l4aGtuUzJDCnZBOWozOFdET2xwTm5zQ0VPcnY0Z0UrQS9LcXBodStjKy9tYlNoVm5MaVlFVVdmbnVUcTV5b1dJZ0dpM3FYdXcKS0xoSG1rVlpicmREUkIrRXJ4QVYwU3l6SW5QUHNpMk9OcmFmL3dJREFRQUJBb0lCQUhGTUg5QUVldEJwd1VMRQpDamFUekx1dEs3YWRmYjAzSG42ZFZSaStObWFUWFEwcUZ1OUh0TWdyVEJ2US9SS2ljVHpNTlhGMW1HUFZMMFZKCllsdVFSU25xME9jMFpVcmEzUEk4RlJWVmcvaHFScll6MlUwcjFzVzF0SUZDdGNtZnloVjdnZ2xqQmxnUzU1RDUKd25aekp5VTRzejJDSmJqSC9kMXBwU2xVb1lHWXdvUXUvTzdYamJmbVFyTVY2L2o3dHRibUNMZmpaVjZ3UE53bwpETWZCUnlLKzY3WFhjcTV4c2dreE9qanhTbFUyZmY2ekh1TjhXU3hPUmlWNGw0OEIydU5wV041VWQySDkvcFNGCjgvZlZkNkFtaFh6SzlCL29kQUlKSFhPdU9iQ0JUbGRSV3h5VEVLbW10TTVrZE5GdE51MkRBN1RSNFY0VWJzTWMKZW83NkFMRUNnWUVBeldzdE42VGdzRTJJdXVlbm83ajRmaXhXdDN4MFU1SkNyZjg0cURZUzQ1cVVmbzBzU3gxdQp3V0F3M09FTjBmNHhkTUJEb2x0eFFOejBmQ1pkR1hVOGxiQUpzbENxWm1EVlRCcXUyTmdaTnhBbHNMYzdNNHY0CkdJb2svaE5YOHF1L0dVbEpqRnNBSzJxNTZMWE5uc3Z2TlZLcWQwdGRPOFB3WmNKU25mZ1lnV01DZ1lFQXlNREUKSHpIWEppMFlDd2RVQmF6SkpQVGtXV1pMYnlyTWk0di95OElNZTNmMC9nWUR1ZUtCZWdiVE1rVWxZN3lqTk5YYQpuZUlWSndvYk05MnJDNU9rVldvalo2ZlA1MVUydy9kendsSFZGanJiaFZtVVN0RjViZGdZRHNDbm5rMUdwTjdOCnM0bS8vVjV2RjBFbk5MY1hkY1IzTlFXMzRpNXdybmFOUm1ZejE3VUNnWUFneEZYa0tHTEcvTGN3eVQ4T2VMVDYKdTJ2aHZQSjVXajFVci8rRHBZeUJ6ZWlkL3pydmlIUmdXRTJ6RGhzOFFnWDFqNjI2T2tmb2h0Wmc3Mld1WitzUQpIWktPWlJ1cFZRenhKTmg3TW8xaklTcEI5QmgzY241U3U4YUcyT01RaktEaEViV3ZzOXhsRUpNek1iem85YkxrCm1Ka2tpbHNHNjR4dlR2NEt3TVozN1FLQmdRQ2RZTWtmTDJKY01rUEQrWlc3OFMycXhEVHpoTWNrT2lncVNiRloKV2lHUTlZUmhVL085Mkx6cUhjbVpnaTJDbDlKV1RFUmJPMjZic1VlTURIM1gwSUdtMkZNeklwSlE1elBNd3dQRAoxWVU0TFNJRTB5bjIwV3JoV3VQWlJOemlzKy9xdGlRS1dMWGkraElhNTkvRmFyZUFnbWwxYnFzdUxIdjN1VWFkClp1ZkRkUUtCZ0Zsb1ZJWlpNcGFIZGI2TUw3UmhPbGZQcXNldHl3TmFOMG0yVFAyY0tpMXVsTnZCNC9zd1I5WkQKYUN4TXd0c1BFK21Qa0ZpVXlQcUd1U1AvZSs3dzBIejFjdlJkT251TUNDVUE0alg5RFRjN2JOTFZKVVYwUHFsZgpoYlFPaDJzdFE5b0FJMStBOXpTZEhSWUUvMXpPWW9XaDlUN0N0T3YxRHhMMEFqa1Iwc2w1Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg=="; - } - - /** - * Model tests for AccepterNet - * - * @throws ConfigurationException - */ - @Test - public void testRegion() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - - ApiClient client = this.configuration.getApiClient(profile); - - assertEquals(1, client.getServers().size()); - assertEquals("https://api.{region}.outscale.com/api/v1", client.getServers().get(0).URL); - } - - @Test - public void testCertificateFileOk() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - profile.setX509ClientCert(this.getValidCertificateFile()); - profile.setX509ClientKey(this.getValidKeyFile()); - - ApiClient client = this.configuration.getApiClient(profile); - assertNotEquals(null, client); - } - - @Test - public void testCertificateFileKo() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - - // Invalid Certificate - profile.setX509ClientCert(this.getInvalidCertificateFile()); - profile.setX509ClientKey(this.getValidKeyFile()); - - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - - // Invalid Private Key - profile.setX509ClientCert(this.getValidCertificateFile()); - profile.setX509ClientKey(this.getInvalidKeyFile()); - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - - // Invalid Path - profile.setX509ClientCert("notAPath"); - profile.setX509ClientKey(this.getValidKeyFile()); - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - } - - @Test - public void testCertificateEnvOk() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - - profile.setX509ClientCertB64(this.getValidCertificateB64()); - profile.setX509ClientKeyB64(this.getValidKeyB64()); - - assertNotEquals(null, this.configuration.getApiClient(profile)); - } - - @Test - public void testCertificateBoth() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - - // Set Both - profile.setX509ClientCert(this.getValidCertificateFile()); - profile.setX509ClientKey(this.getValidKeyFile()); - profile.setX509ClientCertB64(this.getValidCertificateB64()); - profile.setX509ClientKeyB64(this.getValidCertificateB64()); - - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - } - - @Test - public void testCertificateEnvKo() throws ConfigurationException { - Profile profile = new Profile(); - profile.setRegion("us-east-2"); - - // Invalid Certificate - profile.setX509ClientCertB64("NotValid"); - profile.setX509ClientKeyB64(this.getValidKeyB64()); - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - - // Invalid PrivateKey - profile.setX509ClientCertB64(this.getValidCertificateB64()); - profile.setX509ClientKeyB64("NotValid"); - assertThrows( - ConfigurationException.class, - () -> { - this.configuration.getApiClient(profile); - }); - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApiTest.java deleted file mode 100644 index 8736605e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccessKeyApiTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAccessKeysResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSecretAccessKeyResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccessKeyResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for AccessKeyApi */ -@Disabled -public class AccessKeyApiTest { - - private final AccessKeyApi api = new AccessKeyApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createAccessKeyTest() throws ApiException { - CreateAccessKeyRequest createAccessKeyRequest = null; - CreateAccessKeyResponse response = api.createAccessKey(createAccessKeyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteAccessKeyTest() throws ApiException { - DeleteAccessKeyRequest deleteAccessKeyRequest = null; - DeleteAccessKeyResponse response = api.deleteAccessKey(deleteAccessKeyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readAccessKeysTest() throws ApiException { - ReadAccessKeysRequest readAccessKeysRequest = null; - ReadAccessKeysResponse response = api.readAccessKeys(readAccessKeysRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readSecretAccessKeyTest() throws ApiException { - ReadSecretAccessKeyRequest readSecretAccessKeyRequest = null; - ReadSecretAccessKeyResponse response = api.readSecretAccessKey(readSecretAccessKeyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateAccessKeyTest() throws ApiException { - UpdateAccessKeyRequest updateAccessKeyRequest = null; - UpdateAccessKeyResponse response = api.updateAccessKey(updateAccessKeyRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccountApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccountApiTest.java deleted file mode 100644 index a62f76b8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/AccountApiTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationRequest; -import io.github.outscale.osc_sdk_java.client.model.CheckAuthenticationResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateAccountResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAccountsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAccountsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadConsumptionAccountResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccountRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateAccountResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for AccountApi */ -@Disabled -public class AccountApiTest { - - private final AccountApi api = new AccountApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void checkAuthenticationTest() throws ApiException { - CheckAuthenticationRequest checkAuthenticationRequest = null; - CheckAuthenticationResponse response = api.checkAuthentication(checkAuthenticationRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createAccountTest() throws ApiException { - CreateAccountRequest createAccountRequest = null; - CreateAccountResponse response = api.createAccount(createAccountRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readAccountsTest() throws ApiException { - ReadAccountsRequest readAccountsRequest = null; - ReadAccountsResponse response = api.readAccounts(readAccountsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readConsumptionAccountTest() throws ApiException { - ReadConsumptionAccountRequest readConsumptionAccountRequest = null; - ReadConsumptionAccountResponse response = - api.readConsumptionAccount(readConsumptionAccountRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateAccountTest() throws ApiException { - UpdateAccountRequest updateAccountRequest = null; - UpdateAccountResponse response = api.updateAccount(updateAccountRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApiTest.java deleted file mode 100644 index bf4da246..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessPolicyApiTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessPolicyResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ApiAccessPolicyApi */ -@Disabled -public class ApiAccessPolicyApiTest { - - private final ApiAccessPolicyApi api = new ApiAccessPolicyApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readApiAccessPolicyTest() throws ApiException { - ReadApiAccessPolicyRequest readApiAccessPolicyRequest = null; - ReadApiAccessPolicyResponse response = api.readApiAccessPolicy(readApiAccessPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateApiAccessPolicyTest() throws ApiException { - UpdateApiAccessPolicyRequest updateApiAccessPolicyRequest = null; - UpdateApiAccessPolicyResponse response = - api.updateApiAccessPolicy(updateApiAccessPolicyRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApiTest.java deleted file mode 100644 index 95251022..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiAccessRuleApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateApiAccessRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteApiAccessRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiAccessRulesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateApiAccessRuleResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ApiAccessRuleApi */ -@Disabled -public class ApiAccessRuleApiTest { - - private final ApiAccessRuleApi api = new ApiAccessRuleApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createApiAccessRuleTest() throws ApiException { - CreateApiAccessRuleRequest createApiAccessRuleRequest = null; - CreateApiAccessRuleResponse response = api.createApiAccessRule(createApiAccessRuleRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteApiAccessRuleTest() throws ApiException { - DeleteApiAccessRuleRequest deleteApiAccessRuleRequest = null; - DeleteApiAccessRuleResponse response = api.deleteApiAccessRule(deleteApiAccessRuleRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readApiAccessRulesTest() throws ApiException { - ReadApiAccessRulesRequest readApiAccessRulesRequest = null; - ReadApiAccessRulesResponse response = api.readApiAccessRules(readApiAccessRulesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateApiAccessRuleTest() throws ApiException { - UpdateApiAccessRuleRequest updateApiAccessRuleRequest = null; - UpdateApiAccessRuleResponse response = api.updateApiAccessRule(updateApiAccessRuleRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApiTest.java deleted file mode 100644 index 064ab00a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ApiLogApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadApiLogsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadApiLogsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ApiLogApi */ -@Disabled -public class ApiLogApiTest { - - private final ApiLogApi api = new ApiLogApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readApiLogsTest() throws ApiException { - ReadApiLogsRequest readApiLogsRequest = null; - ReadApiLogsResponse response = api.readApiLogs(readApiLogsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/CaApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/CaApiTest.java deleted file mode 100644 index 8265e135..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/CaApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateCaRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateCaResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteCaRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteCaResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadCasRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCasResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateCaRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateCaResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for CaApi */ -@Disabled -public class CaApiTest { - - private final CaApi api = new CaApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createCaTest() throws ApiException { - CreateCaRequest createCaRequest = null; - CreateCaResponse response = api.createCa(createCaRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteCaTest() throws ApiException { - DeleteCaRequest deleteCaRequest = null; - DeleteCaResponse response = api.deleteCa(deleteCaRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readCasTest() throws ApiException { - ReadCasRequest readCasRequest = null; - ReadCasResponse response = api.readCas(readCasRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateCaTest() throws ApiException { - UpdateCaRequest updateCaRequest = null; - UpdateCaResponse response = api.updateCa(updateCaRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/CatalogApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/CatalogApiTest.java deleted file mode 100644 index 9bc141f1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/CatalogApiTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadCatalogsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for CatalogApi */ -@Disabled -public class CatalogApiTest { - - private final CatalogApi api = new CatalogApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readCatalogTest() throws ApiException { - ReadCatalogRequest readCatalogRequest = null; - ReadCatalogResponse response = api.readCatalog(readCatalogRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readCatalogsTest() throws ApiException { - ReadCatalogsRequest readCatalogsRequest = null; - ReadCatalogsResponse response = api.readCatalogs(readCatalogsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApiTest.java deleted file mode 100644 index d46756a1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ClientGatewayApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateClientGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteClientGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadClientGatewaysResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ClientGatewayApi */ -@Disabled -public class ClientGatewayApiTest { - - private final ClientGatewayApi api = new ClientGatewayApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createClientGatewayTest() throws ApiException { - CreateClientGatewayRequest createClientGatewayRequest = null; - CreateClientGatewayResponse response = api.createClientGateway(createClientGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteClientGatewayTest() throws ApiException { - DeleteClientGatewayRequest deleteClientGatewayRequest = null; - DeleteClientGatewayResponse response = api.deleteClientGateway(deleteClientGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readClientGatewaysTest() throws ApiException { - ReadClientGatewaysRequest readClientGatewaysRequest = null; - ReadClientGatewaysResponse response = api.readClientGateways(readClientGatewaysRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApiTest.java deleted file mode 100644 index 61e20c18..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DedicatedGroupApiTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDedicatedGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDedicatedGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDedicatedGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateDedicatedGroupResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for DedicatedGroupApi */ -@Disabled -public class DedicatedGroupApiTest { - - private final DedicatedGroupApi api = new DedicatedGroupApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createDedicatedGroupTest() throws ApiException { - CreateDedicatedGroupRequest createDedicatedGroupRequest = null; - CreateDedicatedGroupResponse response = - api.createDedicatedGroup(createDedicatedGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteDedicatedGroupTest() throws ApiException { - DeleteDedicatedGroupRequest deleteDedicatedGroupRequest = null; - DeleteDedicatedGroupResponse response = - api.deleteDedicatedGroup(deleteDedicatedGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readDedicatedGroupsTest() throws ApiException { - ReadDedicatedGroupsRequest readDedicatedGroupsRequest = null; - ReadDedicatedGroupsResponse response = api.readDedicatedGroups(readDedicatedGroupsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateDedicatedGroupTest() throws ApiException { - UpdateDedicatedGroupRequest updateDedicatedGroupRequest = null; - UpdateDedicatedGroupResponse response = - api.updateDedicatedGroup(updateDedicatedGroupRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApiTest.java deleted file mode 100644 index baa00368..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DhcpOptionApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDhcpOptionsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDhcpOptionsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDhcpOptionsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for DhcpOptionApi */ -@Disabled -public class DhcpOptionApiTest { - - private final DhcpOptionApi api = new DhcpOptionApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createDhcpOptionsTest() throws ApiException { - CreateDhcpOptionsRequest createDhcpOptionsRequest = null; - CreateDhcpOptionsResponse response = api.createDhcpOptions(createDhcpOptionsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteDhcpOptionsTest() throws ApiException { - DeleteDhcpOptionsRequest deleteDhcpOptionsRequest = null; - DeleteDhcpOptionsResponse response = api.deleteDhcpOptions(deleteDhcpOptionsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readDhcpOptionsTest() throws ApiException { - ReadDhcpOptionsRequest readDhcpOptionsRequest = null; - ReadDhcpOptionsResponse response = api.readDhcpOptions(readDhcpOptionsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApiTest.java deleted file mode 100644 index d23a847a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinksResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for DirectLinkApi */ -@Disabled -public class DirectLinkApiTest { - - private final DirectLinkApi api = new DirectLinkApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createDirectLinkTest() throws ApiException { - CreateDirectLinkRequest createDirectLinkRequest = null; - CreateDirectLinkResponse response = api.createDirectLink(createDirectLinkRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteDirectLinkTest() throws ApiException { - DeleteDirectLinkRequest deleteDirectLinkRequest = null; - DeleteDirectLinkResponse response = api.deleteDirectLink(deleteDirectLinkRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readDirectLinksTest() throws ApiException { - ReadDirectLinksRequest readDirectLinksRequest = null; - ReadDirectLinksResponse response = api.readDirectLinks(readDirectLinksRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApiTest.java deleted file mode 100644 index 7d9c295d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/DirectLinkInterfaceApiTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateDirectLinkInterfaceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteDirectLinkInterfaceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadDirectLinkInterfacesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateDirectLinkInterfaceResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for DirectLinkInterfaceApi */ -@Disabled -public class DirectLinkInterfaceApiTest { - - private final DirectLinkInterfaceApi api = new DirectLinkInterfaceApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createDirectLinkInterfaceTest() throws ApiException { - CreateDirectLinkInterfaceRequest createDirectLinkInterfaceRequest = null; - CreateDirectLinkInterfaceResponse response = - api.createDirectLinkInterface(createDirectLinkInterfaceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteDirectLinkInterfaceTest() throws ApiException { - DeleteDirectLinkInterfaceRequest deleteDirectLinkInterfaceRequest = null; - DeleteDirectLinkInterfaceResponse response = - api.deleteDirectLinkInterface(deleteDirectLinkInterfaceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readDirectLinkInterfacesTest() throws ApiException { - ReadDirectLinkInterfacesRequest readDirectLinkInterfacesRequest = null; - ReadDirectLinkInterfacesResponse response = - api.readDirectLinkInterfaces(readDirectLinkInterfacesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateDirectLinkInterfaceTest() throws ApiException { - UpdateDirectLinkInterfaceRequest updateDirectLinkInterfaceRequest = null; - UpdateDirectLinkInterfaceResponse response = - api.updateDirectLinkInterface(updateDirectLinkInterfaceRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApiTest.java deleted file mode 100644 index 61bd4dd5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/FlexibleGpuApiTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpuCatalogResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadFlexibleGpusResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkFlexibleGpuResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateFlexibleGpuResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for FlexibleGpuApi */ -@Disabled -public class FlexibleGpuApiTest { - - private final FlexibleGpuApi api = new FlexibleGpuApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createFlexibleGpuTest() throws ApiException { - CreateFlexibleGpuRequest createFlexibleGpuRequest = null; - CreateFlexibleGpuResponse response = api.createFlexibleGpu(createFlexibleGpuRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteFlexibleGpuTest() throws ApiException { - DeleteFlexibleGpuRequest deleteFlexibleGpuRequest = null; - DeleteFlexibleGpuResponse response = api.deleteFlexibleGpu(deleteFlexibleGpuRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkFlexibleGpuTest() throws ApiException { - LinkFlexibleGpuRequest linkFlexibleGpuRequest = null; - LinkFlexibleGpuResponse response = api.linkFlexibleGpu(linkFlexibleGpuRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readFlexibleGpuCatalogTest() throws ApiException { - ReadFlexibleGpuCatalogRequest readFlexibleGpuCatalogRequest = null; - ReadFlexibleGpuCatalogResponse response = - api.readFlexibleGpuCatalog(readFlexibleGpuCatalogRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readFlexibleGpusTest() throws ApiException { - ReadFlexibleGpusRequest readFlexibleGpusRequest = null; - ReadFlexibleGpusResponse response = api.readFlexibleGpus(readFlexibleGpusRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkFlexibleGpuTest() throws ApiException { - UnlinkFlexibleGpuRequest unlinkFlexibleGpuRequest = null; - UnlinkFlexibleGpuResponse response = api.unlinkFlexibleGpu(unlinkFlexibleGpuRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateFlexibleGpuTest() throws ApiException { - UpdateFlexibleGpuRequest updateFlexibleGpuRequest = null; - UpdateFlexibleGpuResponse response = api.updateFlexibleGpu(updateFlexibleGpuRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ImageApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ImageApiTest.java deleted file mode 100644 index 62397918..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ImageApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateImageExportTaskResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateImageRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateImageResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteImageRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteImageResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadImageExportTasksResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadImagesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadImagesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateImageRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateImageResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ImageApi */ -@Disabled -public class ImageApiTest { - - private final ImageApi api = new ImageApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createImageTest() throws ApiException { - CreateImageRequest createImageRequest = null; - CreateImageResponse response = api.createImage(createImageRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createImageExportTaskTest() throws ApiException { - CreateImageExportTaskRequest createImageExportTaskRequest = null; - CreateImageExportTaskResponse response = - api.createImageExportTask(createImageExportTaskRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteImageTest() throws ApiException { - DeleteImageRequest deleteImageRequest = null; - DeleteImageResponse response = api.deleteImage(deleteImageRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readImageExportTasksTest() throws ApiException { - ReadImageExportTasksRequest readImageExportTasksRequest = null; - ReadImageExportTasksResponse response = - api.readImageExportTasks(readImageExportTasksRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readImagesTest() throws ApiException { - ReadImagesRequest readImagesRequest = null; - ReadImagesResponse response = api.readImages(readImagesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateImageTest() throws ApiException { - UpdateImageRequest updateImageRequest = null; - UpdateImageResponse response = api.updateImage(updateImageRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApiTest.java deleted file mode 100644 index c91ee3f2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/InternetServiceApiTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkInternetServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadInternetServicesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkInternetServiceResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for InternetServiceApi */ -@Disabled -public class InternetServiceApiTest { - - private final InternetServiceApi api = new InternetServiceApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createInternetServiceTest() throws ApiException { - CreateInternetServiceRequest createInternetServiceRequest = null; - CreateInternetServiceResponse response = - api.createInternetService(createInternetServiceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteInternetServiceTest() throws ApiException { - DeleteInternetServiceRequest deleteInternetServiceRequest = null; - DeleteInternetServiceResponse response = - api.deleteInternetService(deleteInternetServiceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkInternetServiceTest() throws ApiException { - LinkInternetServiceRequest linkInternetServiceRequest = null; - LinkInternetServiceResponse response = api.linkInternetService(linkInternetServiceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readInternetServicesTest() throws ApiException { - ReadInternetServicesRequest readInternetServicesRequest = null; - ReadInternetServicesResponse response = - api.readInternetServices(readInternetServicesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkInternetServiceTest() throws ApiException { - UnlinkInternetServiceRequest unlinkInternetServiceRequest = null; - UnlinkInternetServiceResponse response = - api.unlinkInternetService(unlinkInternetServiceRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/KeypairApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/KeypairApiTest.java deleted file mode 100644 index 6c361910..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/KeypairApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateKeypairRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateKeypairResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteKeypairRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteKeypairResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadKeypairsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadKeypairsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for KeypairApi */ -@Disabled -public class KeypairApiTest { - - private final KeypairApi api = new KeypairApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createKeypairTest() throws ApiException { - CreateKeypairRequest createKeypairRequest = null; - CreateKeypairResponse response = api.createKeypair(createKeypairRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteKeypairTest() throws ApiException { - DeleteKeypairRequest deleteKeypairRequest = null; - DeleteKeypairResponse response = api.deleteKeypair(deleteKeypairRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readKeypairsTest() throws ApiException { - ReadKeypairsRequest readKeypairsRequest = null; - ReadKeypairsResponse response = api.readKeypairs(readKeypairsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ListenerApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ListenerApiTest.java deleted file mode 100644 index 33f1db40..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ListenerApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateListenerRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerListenersResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteListenerRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerListenersResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadListenerRulesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateListenerRuleResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ListenerApi */ -@Disabled -public class ListenerApiTest { - - private final ListenerApi api = new ListenerApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createListenerRuleTest() throws ApiException { - CreateListenerRuleRequest createListenerRuleRequest = null; - CreateListenerRuleResponse response = api.createListenerRule(createListenerRuleRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createLoadBalancerListenersTest() throws ApiException { - CreateLoadBalancerListenersRequest createLoadBalancerListenersRequest = null; - CreateLoadBalancerListenersResponse response = - api.createLoadBalancerListeners(createLoadBalancerListenersRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteListenerRuleTest() throws ApiException { - DeleteListenerRuleRequest deleteListenerRuleRequest = null; - DeleteListenerRuleResponse response = api.deleteListenerRule(deleteListenerRuleRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteLoadBalancerListenersTest() throws ApiException { - DeleteLoadBalancerListenersRequest deleteLoadBalancerListenersRequest = null; - DeleteLoadBalancerListenersResponse response = - api.deleteLoadBalancerListeners(deleteLoadBalancerListenersRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readListenerRulesTest() throws ApiException { - ReadListenerRulesRequest readListenerRulesRequest = null; - ReadListenerRulesResponse response = api.readListenerRules(readListenerRulesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateListenerRuleTest() throws ApiException { - UpdateListenerRuleRequest updateListenerRuleRequest = null; - UpdateListenerRuleResponse response = api.updateListenerRule(updateListenerRuleRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApiTest.java deleted file mode 100644 index 8185f3e6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerApiTest.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.DeregisterVmsInLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkLoadBalancerBackendMachinesRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkLoadBalancerBackendMachinesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancerTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLoadBalancersResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsHealthResponse; -import io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.RegisterVmsInLoadBalancerResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkLoadBalancerBackendMachinesRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkLoadBalancerBackendMachinesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateLoadBalancerResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for LoadBalancerApi */ -@Disabled -public class LoadBalancerApiTest { - - private final LoadBalancerApi api = new LoadBalancerApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createLoadBalancerTest() throws ApiException { - CreateLoadBalancerRequest createLoadBalancerRequest = null; - CreateLoadBalancerResponse response = api.createLoadBalancer(createLoadBalancerRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createLoadBalancerTagsTest() throws ApiException { - CreateLoadBalancerTagsRequest createLoadBalancerTagsRequest = null; - CreateLoadBalancerTagsResponse response = - api.createLoadBalancerTags(createLoadBalancerTagsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteLoadBalancerTest() throws ApiException { - DeleteLoadBalancerRequest deleteLoadBalancerRequest = null; - DeleteLoadBalancerResponse response = api.deleteLoadBalancer(deleteLoadBalancerRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteLoadBalancerTagsTest() throws ApiException { - DeleteLoadBalancerTagsRequest deleteLoadBalancerTagsRequest = null; - DeleteLoadBalancerTagsResponse response = - api.deleteLoadBalancerTags(deleteLoadBalancerTagsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deregisterVmsInLoadBalancerTest() throws ApiException { - DeregisterVmsInLoadBalancerRequest deregisterVmsInLoadBalancerRequest = null; - DeregisterVmsInLoadBalancerResponse response = - api.deregisterVmsInLoadBalancer(deregisterVmsInLoadBalancerRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkLoadBalancerBackendMachinesTest() throws ApiException { - LinkLoadBalancerBackendMachinesRequest linkLoadBalancerBackendMachinesRequest = null; - LinkLoadBalancerBackendMachinesResponse response = - api.linkLoadBalancerBackendMachines(linkLoadBalancerBackendMachinesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readLoadBalancerTagsTest() throws ApiException { - ReadLoadBalancerTagsRequest readLoadBalancerTagsRequest = null; - ReadLoadBalancerTagsResponse response = - api.readLoadBalancerTags(readLoadBalancerTagsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readLoadBalancersTest() throws ApiException { - ReadLoadBalancersRequest readLoadBalancersRequest = null; - ReadLoadBalancersResponse response = api.readLoadBalancers(readLoadBalancersRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmsHealthTest() throws ApiException { - ReadVmsHealthRequest readVmsHealthRequest = null; - ReadVmsHealthResponse response = api.readVmsHealth(readVmsHealthRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void registerVmsInLoadBalancerTest() throws ApiException { - RegisterVmsInLoadBalancerRequest registerVmsInLoadBalancerRequest = null; - RegisterVmsInLoadBalancerResponse response = - api.registerVmsInLoadBalancer(registerVmsInLoadBalancerRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkLoadBalancerBackendMachinesTest() throws ApiException { - UnlinkLoadBalancerBackendMachinesRequest unlinkLoadBalancerBackendMachinesRequest = null; - UnlinkLoadBalancerBackendMachinesResponse response = - api.unlinkLoadBalancerBackendMachines(unlinkLoadBalancerBackendMachinesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateLoadBalancerTest() throws ApiException { - UpdateLoadBalancerRequest updateLoadBalancerRequest = null; - UpdateLoadBalancerResponse response = api.updateLoadBalancer(updateLoadBalancerRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApiTest.java deleted file mode 100644 index 7bb23ed8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LoadBalancerPolicyApiTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateLoadBalancerPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteLoadBalancerPolicyResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for LoadBalancerPolicyApi */ -@Disabled -public class LoadBalancerPolicyApiTest { - - private final LoadBalancerPolicyApi api = new LoadBalancerPolicyApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createLoadBalancerPolicyTest() throws ApiException { - CreateLoadBalancerPolicyRequest createLoadBalancerPolicyRequest = null; - CreateLoadBalancerPolicyResponse response = - api.createLoadBalancerPolicy(createLoadBalancerPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteLoadBalancerPolicyTest() throws ApiException { - DeleteLoadBalancerPolicyRequest deleteLoadBalancerPolicyRequest = null; - DeleteLoadBalancerPolicyResponse response = - api.deleteLoadBalancerPolicy(deleteLoadBalancerPolicyRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LocationApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/LocationApiTest.java deleted file mode 100644 index 5182307b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/LocationApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadLocationsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLocationsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for LocationApi */ -@Disabled -public class LocationApiTest { - - private final LocationApi api = new LocationApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readLocationsTest() throws ApiException { - ReadLocationsRequest readLocationsRequest = null; - ReadLocationsResponse response = api.readLocations(readLocationsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApiTest.java deleted file mode 100644 index 23d80b35..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NatServiceApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateNatServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNatServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNatServiceResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNatServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNatServicesResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for NatServiceApi */ -@Disabled -public class NatServiceApiTest { - - private final NatServiceApi api = new NatServiceApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createNatServiceTest() throws ApiException { - CreateNatServiceRequest createNatServiceRequest = null; - CreateNatServiceResponse response = api.createNatService(createNatServiceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteNatServiceTest() throws ApiException { - DeleteNatServiceRequest deleteNatServiceRequest = null; - DeleteNatServiceResponse response = api.deleteNatService(deleteNatServiceRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNatServicesTest() throws ApiException { - ReadNatServicesRequest readNatServicesRequest = null; - ReadNatServicesResponse response = api.readNatServices(readNatServicesRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApiTest.java deleted file mode 100644 index c44e9538..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetAccessPointApiTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetAccessPointResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetAccessPointResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointServicesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetAccessPointsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetAccessPointResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for NetAccessPointApi */ -@Disabled -public class NetAccessPointApiTest { - - private final NetAccessPointApi api = new NetAccessPointApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createNetAccessPointTest() throws ApiException { - CreateNetAccessPointRequest createNetAccessPointRequest = null; - CreateNetAccessPointResponse response = - api.createNetAccessPoint(createNetAccessPointRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteNetAccessPointTest() throws ApiException { - DeleteNetAccessPointRequest deleteNetAccessPointRequest = null; - DeleteNetAccessPointResponse response = - api.deleteNetAccessPoint(deleteNetAccessPointRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNetAccessPointServicesTest() throws ApiException { - ReadNetAccessPointServicesRequest readNetAccessPointServicesRequest = null; - ReadNetAccessPointServicesResponse response = - api.readNetAccessPointServices(readNetAccessPointServicesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNetAccessPointsTest() throws ApiException { - ReadNetAccessPointsRequest readNetAccessPointsRequest = null; - ReadNetAccessPointsResponse response = api.readNetAccessPoints(readNetAccessPointsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateNetAccessPointTest() throws ApiException { - UpdateNetAccessPointRequest updateNetAccessPointRequest = null; - UpdateNetAccessPointResponse response = - api.updateNetAccessPoint(updateNetAccessPointRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetApiTest.java deleted file mode 100644 index 03ed23d7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateNetRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNetResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for NetApi */ -@Disabled -public class NetApiTest { - - private final NetApi api = new NetApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createNetTest() throws ApiException { - CreateNetRequest createNetRequest = null; - CreateNetResponse response = api.createNet(createNetRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteNetTest() throws ApiException { - DeleteNetRequest deleteNetRequest = null; - DeleteNetResponse response = api.deleteNet(deleteNetRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNetsTest() throws ApiException { - ReadNetsRequest readNetsRequest = null; - ReadNetsResponse response = api.readNets(readNetsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateNetTest() throws ApiException { - UpdateNetRequest updateNetRequest = null; - UpdateNetResponse response = api.updateNet(updateNetRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApiTest.java deleted file mode 100644 index 4aeaeb0d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NetPeeringApiTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.AcceptNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNetPeeringResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNetPeeringsResponse; -import io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringRequest; -import io.github.outscale.osc_sdk_java.client.model.RejectNetPeeringResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for NetPeeringApi */ -@Disabled -public class NetPeeringApiTest { - - private final NetPeeringApi api = new NetPeeringApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void acceptNetPeeringTest() throws ApiException { - AcceptNetPeeringRequest acceptNetPeeringRequest = null; - AcceptNetPeeringResponse response = api.acceptNetPeering(acceptNetPeeringRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createNetPeeringTest() throws ApiException { - CreateNetPeeringRequest createNetPeeringRequest = null; - CreateNetPeeringResponse response = api.createNetPeering(createNetPeeringRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteNetPeeringTest() throws ApiException { - DeleteNetPeeringRequest deleteNetPeeringRequest = null; - DeleteNetPeeringResponse response = api.deleteNetPeering(deleteNetPeeringRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNetPeeringsTest() throws ApiException { - ReadNetPeeringsRequest readNetPeeringsRequest = null; - ReadNetPeeringsResponse response = api.readNetPeerings(readNetPeeringsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void rejectNetPeeringTest() throws ApiException { - RejectNetPeeringRequest rejectNetPeeringRequest = null; - RejectNetPeeringResponse response = api.rejectNetPeering(rejectNetPeeringRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NicApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/NicApiTest.java deleted file mode 100644 index 4ee69cb5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/NicApiTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateNicRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateNicResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteNicRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteNicResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkNicRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkNicResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPrivateIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadNicsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadNicsResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkNicRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkNicResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPrivateIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateNicRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateNicResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for NicApi */ -@Disabled -public class NicApiTest { - - private final NicApi api = new NicApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createNicTest() throws ApiException { - CreateNicRequest createNicRequest = null; - CreateNicResponse response = api.createNic(createNicRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteNicTest() throws ApiException { - DeleteNicRequest deleteNicRequest = null; - DeleteNicResponse response = api.deleteNic(deleteNicRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkNicTest() throws ApiException { - LinkNicRequest linkNicRequest = null; - LinkNicResponse response = api.linkNic(linkNicRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkPrivateIpsTest() throws ApiException { - LinkPrivateIpsRequest linkPrivateIpsRequest = null; - LinkPrivateIpsResponse response = api.linkPrivateIps(linkPrivateIpsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readNicsTest() throws ApiException { - ReadNicsRequest readNicsRequest = null; - ReadNicsResponse response = api.readNics(readNicsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkNicTest() throws ApiException { - UnlinkNicRequest unlinkNicRequest = null; - UnlinkNicResponse response = api.unlinkNic(unlinkNicRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkPrivateIpsTest() throws ApiException { - UnlinkPrivateIpsRequest unlinkPrivateIpsRequest = null; - UnlinkPrivateIpsResponse response = api.unlinkPrivateIps(unlinkPrivateIpsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateNicTest() throws ApiException { - UpdateNicRequest updateNicRequest = null; - UpdateNicResponse response = api.updateNic(updateNicRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PolicyApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/PolicyApiTest.java deleted file mode 100644 index 0b1ae26b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PolicyApiTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkManagedPolicyToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkManagedPolicyToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.PutUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadLinkedPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadManagedPoliciesLinkedToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadManagedPoliciesLinkedToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPolicyVersionsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPoliciesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupPolicyResponse; -import io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionRequest; -import io.github.outscale.osc_sdk_java.client.model.SetDefaultPolicyVersionResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkManagedPolicyFromUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkManagedPolicyFromUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPolicyResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for PolicyApi */ -@Disabled -public class PolicyApiTest { - - private final PolicyApi api = new PolicyApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createPolicyTest() throws ApiException { - CreatePolicyRequest createPolicyRequest = null; - CreatePolicyResponse response = api.createPolicy(createPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createPolicyVersionTest() throws ApiException { - CreatePolicyVersionRequest createPolicyVersionRequest = null; - CreatePolicyVersionResponse response = api.createPolicyVersion(createPolicyVersionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deletePolicyTest() throws ApiException { - DeletePolicyRequest deletePolicyRequest = null; - DeletePolicyResponse response = api.deletePolicy(deletePolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deletePolicyVersionTest() throws ApiException { - DeletePolicyVersionRequest deletePolicyVersionRequest = null; - DeletePolicyVersionResponse response = api.deletePolicyVersion(deletePolicyVersionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteUserGroupPolicyTest() throws ApiException { - DeleteUserGroupPolicyRequest deleteUserGroupPolicyRequest = null; - DeleteUserGroupPolicyResponse response = - api.deleteUserGroupPolicy(deleteUserGroupPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkManagedPolicyToUserGroupTest() throws ApiException { - LinkManagedPolicyToUserGroupRequest linkManagedPolicyToUserGroupRequest = null; - LinkManagedPolicyToUserGroupResponse response = - api.linkManagedPolicyToUserGroup(linkManagedPolicyToUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkPolicyTest() throws ApiException { - LinkPolicyRequest linkPolicyRequest = null; - LinkPolicyResponse response = api.linkPolicy(linkPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void putUserGroupPolicyTest() throws ApiException { - PutUserGroupPolicyRequest putUserGroupPolicyRequest = null; - PutUserGroupPolicyResponse response = api.putUserGroupPolicy(putUserGroupPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readLinkedPoliciesTest() throws ApiException { - ReadLinkedPoliciesRequest readLinkedPoliciesRequest = null; - ReadLinkedPoliciesResponse response = api.readLinkedPolicies(readLinkedPoliciesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readManagedPoliciesLinkedToUserGroupTest() throws ApiException { - ReadManagedPoliciesLinkedToUserGroupRequest readManagedPoliciesLinkedToUserGroupRequest = - null; - ReadManagedPoliciesLinkedToUserGroupResponse response = - api.readManagedPoliciesLinkedToUserGroup( - readManagedPoliciesLinkedToUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPoliciesTest() throws ApiException { - ReadPoliciesRequest readPoliciesRequest = null; - ReadPoliciesResponse response = api.readPolicies(readPoliciesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPolicyTest() throws ApiException { - ReadPolicyRequest readPolicyRequest = null; - ReadPolicyResponse response = api.readPolicy(readPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPolicyVersionTest() throws ApiException { - ReadPolicyVersionRequest readPolicyVersionRequest = null; - ReadPolicyVersionResponse response = api.readPolicyVersion(readPolicyVersionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPolicyVersionsTest() throws ApiException { - ReadPolicyVersionsRequest readPolicyVersionsRequest = null; - ReadPolicyVersionsResponse response = api.readPolicyVersions(readPolicyVersionsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUserGroupPoliciesTest() throws ApiException { - ReadUserGroupPoliciesRequest readUserGroupPoliciesRequest = null; - ReadUserGroupPoliciesResponse response = - api.readUserGroupPolicies(readUserGroupPoliciesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUserGroupPolicyTest() throws ApiException { - ReadUserGroupPolicyRequest readUserGroupPolicyRequest = null; - ReadUserGroupPolicyResponse response = api.readUserGroupPolicy(readUserGroupPolicyRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void setDefaultPolicyVersionTest() throws ApiException { - SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest = null; - SetDefaultPolicyVersionResponse response = - api.setDefaultPolicyVersion(setDefaultPolicyVersionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkManagedPolicyFromUserGroupTest() throws ApiException { - UnlinkManagedPolicyFromUserGroupRequest unlinkManagedPolicyFromUserGroupRequest = null; - UnlinkManagedPolicyFromUserGroupResponse response = - api.unlinkManagedPolicyFromUserGroup(unlinkManagedPolicyFromUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkPolicyTest() throws ApiException { - UnlinkPolicyRequest unlinkPolicyRequest = null; - UnlinkPolicyResponse response = api.unlinkPolicy(unlinkPolicyRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApiTest.java deleted file mode 100644 index cbb27101..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ProductTypeApiTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateProductTypeRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateProductTypeResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadProductTypesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadProductTypesResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ProductTypeApi */ -@Disabled -public class ProductTypeApiTest { - - private final ProductTypeApi api = new ProductTypeApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createProductTypeTest() throws ApiException { - CreateProductTypeRequest createProductTypeRequest = null; - CreateProductTypeResponse response = api.createProductType(createProductTypeRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readProductTypesTest() throws ApiException { - ReadProductTypesRequest readProductTypesRequest = null; - ReadProductTypesResponse response = api.readProductTypes(readProductTypesRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApiTest.java deleted file mode 100644 index 5bc3c3b3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicCatalogApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicCatalogResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for PublicCatalogApi */ -@Disabled -public class PublicCatalogApiTest { - - private final PublicCatalogApi api = new PublicCatalogApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readPublicCatalogTest() throws ApiException { - ReadPublicCatalogRequest readPublicCatalogRequest = null; - ReadPublicCatalogResponse response = api.readPublicCatalog(readPublicCatalogRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApiTest.java deleted file mode 100644 index 37350b37..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/PublicIpApiTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreatePublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.CreatePublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.DeletePublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.DeletePublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkPublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkPublicIpResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpRangesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadPublicIpsResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkPublicIpResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for PublicIpApi */ -@Disabled -public class PublicIpApiTest { - - private final PublicIpApi api = new PublicIpApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createPublicIpTest() throws ApiException { - CreatePublicIpRequest createPublicIpRequest = null; - CreatePublicIpResponse response = api.createPublicIp(createPublicIpRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deletePublicIpTest() throws ApiException { - DeletePublicIpRequest deletePublicIpRequest = null; - DeletePublicIpResponse response = api.deletePublicIp(deletePublicIpRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkPublicIpTest() throws ApiException { - LinkPublicIpRequest linkPublicIpRequest = null; - LinkPublicIpResponse response = api.linkPublicIp(linkPublicIpRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPublicIpRangesTest() throws ApiException { - ReadPublicIpRangesRequest readPublicIpRangesRequest = null; - ReadPublicIpRangesResponse response = api.readPublicIpRanges(readPublicIpRangesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readPublicIpsTest() throws ApiException { - ReadPublicIpsRequest readPublicIpsRequest = null; - ReadPublicIpsResponse response = api.readPublicIps(readPublicIpsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkPublicIpTest() throws ApiException { - UnlinkPublicIpRequest unlinkPublicIpRequest = null; - UnlinkPublicIpResponse response = api.unlinkPublicIp(unlinkPublicIpRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/QuotaApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/QuotaApiTest.java deleted file mode 100644 index 59e32adc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/QuotaApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadQuotasRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadQuotasResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for QuotaApi */ -@Disabled -public class QuotaApiTest { - - private final QuotaApi api = new QuotaApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readQuotasTest() throws ApiException { - ReadQuotasRequest readQuotasRequest = null; - ReadQuotasResponse response = api.readQuotas(readQuotasRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RegionApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/RegionApiTest.java deleted file mode 100644 index 9be0053a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RegionApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadRegionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadRegionsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for RegionApi */ -@Disabled -public class RegionApiTest { - - private final RegionApi api = new RegionApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readRegionsTest() throws ApiException { - ReadRegionsRequest readRegionsRequest = null; - ReadRegionsResponse response = api.readRegions(readRegionsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteApiTest.java deleted file mode 100644 index 1f14a739..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for RouteApi */ -@Disabled -public class RouteApiTest { - - private final RouteApi api = new RouteApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createRouteTest() throws ApiException { - CreateRouteRequest createRouteRequest = null; - CreateRouteResponse response = api.createRoute(createRouteRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteRouteTest() throws ApiException { - DeleteRouteRequest deleteRouteRequest = null; - DeleteRouteResponse response = api.deleteRoute(deleteRouteRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateRouteTest() throws ApiException { - UpdateRouteRequest updateRouteRequest = null; - UpdateRouteResponse response = api.updateRoute(updateRouteRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApiTest.java deleted file mode 100644 index de335c4d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/RouteTableApiTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadRouteTablesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkRouteTableResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRouteTableLinkResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for RouteTableApi */ -@Disabled -public class RouteTableApiTest { - - private final RouteTableApi api = new RouteTableApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createRouteTableTest() throws ApiException { - CreateRouteTableRequest createRouteTableRequest = null; - CreateRouteTableResponse response = api.createRouteTable(createRouteTableRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteRouteTableTest() throws ApiException { - DeleteRouteTableRequest deleteRouteTableRequest = null; - DeleteRouteTableResponse response = api.deleteRouteTable(deleteRouteTableRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkRouteTableTest() throws ApiException { - LinkRouteTableRequest linkRouteTableRequest = null; - LinkRouteTableResponse response = api.linkRouteTable(linkRouteTableRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readRouteTablesTest() throws ApiException { - ReadRouteTablesRequest readRouteTablesRequest = null; - ReadRouteTablesResponse response = api.readRouteTables(readRouteTablesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkRouteTableTest() throws ApiException { - UnlinkRouteTableRequest unlinkRouteTableRequest = null; - UnlinkRouteTableResponse response = api.unlinkRouteTable(unlinkRouteTableRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateRouteTableLinkTest() throws ApiException { - UpdateRouteTableLinkRequest updateRouteTableLinkRequest = null; - UpdateRouteTableLinkResponse response = - api.updateRouteTableLink(updateRouteTableLinkRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApiTest.java deleted file mode 100644 index 12792c3f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSecurityGroupsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for SecurityGroupApi */ -@Disabled -public class SecurityGroupApiTest { - - private final SecurityGroupApi api = new SecurityGroupApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createSecurityGroupTest() throws ApiException { - CreateSecurityGroupRequest createSecurityGroupRequest = null; - CreateSecurityGroupResponse response = api.createSecurityGroup(createSecurityGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteSecurityGroupTest() throws ApiException { - DeleteSecurityGroupRequest deleteSecurityGroupRequest = null; - DeleteSecurityGroupResponse response = api.deleteSecurityGroup(deleteSecurityGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readSecurityGroupsTest() throws ApiException { - ReadSecurityGroupsRequest readSecurityGroupsRequest = null; - ReadSecurityGroupsResponse response = api.readSecurityGroups(readSecurityGroupsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApiTest.java deleted file mode 100644 index fc964a06..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SecurityGroupRuleApiTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSecurityGroupRuleResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSecurityGroupRuleResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for SecurityGroupRuleApi */ -@Disabled -public class SecurityGroupRuleApiTest { - - private final SecurityGroupRuleApi api = new SecurityGroupRuleApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createSecurityGroupRuleTest() throws ApiException { - CreateSecurityGroupRuleRequest createSecurityGroupRuleRequest = null; - CreateSecurityGroupRuleResponse response = - api.createSecurityGroupRule(createSecurityGroupRuleRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteSecurityGroupRuleTest() throws ApiException { - DeleteSecurityGroupRuleRequest deleteSecurityGroupRuleRequest = null; - DeleteSecurityGroupRuleResponse response = - api.deleteSecurityGroupRule(deleteSecurityGroupRuleRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApiTest.java deleted file mode 100644 index b9fde8b9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/ServerCertificateApiTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateServerCertificateResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteServerCertificateResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadServerCertificatesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateServerCertificateResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for ServerCertificateApi */ -@Disabled -public class ServerCertificateApiTest { - - private final ServerCertificateApi api = new ServerCertificateApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createServerCertificateTest() throws ApiException { - CreateServerCertificateRequest createServerCertificateRequest = null; - CreateServerCertificateResponse response = - api.createServerCertificate(createServerCertificateRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteServerCertificateTest() throws ApiException { - DeleteServerCertificateRequest deleteServerCertificateRequest = null; - DeleteServerCertificateResponse response = - api.deleteServerCertificate(deleteServerCertificateRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readServerCertificatesTest() throws ApiException { - ReadServerCertificatesRequest readServerCertificatesRequest = null; - ReadServerCertificatesResponse response = - api.readServerCertificates(readServerCertificatesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateServerCertificateTest() throws ApiException { - UpdateServerCertificateRequest updateServerCertificateRequest = null; - UpdateServerCertificateResponse response = - api.updateServerCertificate(updateServerCertificateRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApiTest.java deleted file mode 100644 index e5841867..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SnapshotApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotExportTaskResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSnapshotResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSnapshotResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotExportTasksResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSnapshotsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateSnapshotResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for SnapshotApi */ -@Disabled -public class SnapshotApiTest { - - private final SnapshotApi api = new SnapshotApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createSnapshotTest() throws ApiException { - CreateSnapshotRequest createSnapshotRequest = null; - CreateSnapshotResponse response = api.createSnapshot(createSnapshotRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createSnapshotExportTaskTest() throws ApiException { - CreateSnapshotExportTaskRequest createSnapshotExportTaskRequest = null; - CreateSnapshotExportTaskResponse response = - api.createSnapshotExportTask(createSnapshotExportTaskRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteSnapshotTest() throws ApiException { - DeleteSnapshotRequest deleteSnapshotRequest = null; - DeleteSnapshotResponse response = api.deleteSnapshot(deleteSnapshotRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readSnapshotExportTasksTest() throws ApiException { - ReadSnapshotExportTasksRequest readSnapshotExportTasksRequest = null; - ReadSnapshotExportTasksResponse response = - api.readSnapshotExportTasks(readSnapshotExportTasksRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readSnapshotsTest() throws ApiException { - ReadSnapshotsRequest readSnapshotsRequest = null; - ReadSnapshotsResponse response = api.readSnapshots(readSnapshotsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateSnapshotTest() throws ApiException { - UpdateSnapshotRequest updateSnapshotRequest = null; - UpdateSnapshotResponse response = api.updateSnapshot(updateSnapshotRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubnetApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubnetApiTest.java deleted file mode 100644 index 0a39265e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubnetApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateSubnetResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteSubnetResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadSubnetsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSubnetsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateSubnetRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateSubnetResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for SubnetApi */ -@Disabled -public class SubnetApiTest { - - private final SubnetApi api = new SubnetApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createSubnetTest() throws ApiException { - CreateSubnetRequest createSubnetRequest = null; - CreateSubnetResponse response = api.createSubnet(createSubnetRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteSubnetTest() throws ApiException { - DeleteSubnetRequest deleteSubnetRequest = null; - DeleteSubnetResponse response = api.deleteSubnet(deleteSubnetRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readSubnetsTest() throws ApiException { - ReadSubnetsRequest readSubnetsRequest = null; - ReadSubnetsResponse response = api.readSubnets(readSubnetsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateSubnetTest() throws ApiException { - UpdateSubnetRequest updateSubnetRequest = null; - UpdateSubnetResponse response = api.updateSubnet(updateSubnetRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubregionApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubregionApiTest.java deleted file mode 100644 index 61fd1c79..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/SubregionApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.ReadSubregionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadSubregionsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for SubregionApi */ -@Disabled -public class SubregionApiTest { - - private final SubregionApi api = new SubregionApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void readSubregionsTest() throws ApiException { - ReadSubregionsRequest readSubregionsRequest = null; - ReadSubregionsResponse response = api.readSubregions(readSubregionsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/TagApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/TagApiTest.java deleted file mode 100644 index b87510a1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/TagApiTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteTagsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadTagsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadTagsResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for TagApi */ -@Disabled -public class TagApiTest { - - private final TagApi api = new TagApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createTagsTest() throws ApiException { - CreateTagsRequest createTagsRequest = null; - CreateTagsResponse response = api.createTags(createTagsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteTagsTest() throws ApiException { - DeleteTagsRequest deleteTagsRequest = null; - DeleteTagsResponse response = api.deleteTags(deleteTagsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readTagsTest() throws ApiException { - ReadTagsRequest readTagsRequest = null; - ReadTagsResponse response = api.readTags(readTagsRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/TaskApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/TaskApiTest.java deleted file mode 100644 index 86ffee48..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/TaskApiTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteExportTaskResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for TaskApi */ -@Disabled -public class TaskApiTest { - - private final TaskApi api = new TaskApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteExportTaskTest() throws ApiException { - DeleteExportTaskRequest deleteExportTaskRequest = null; - DeleteExportTaskResponse response = api.deleteExportTask(deleteExportTaskRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserApiTest.java deleted file mode 100644 index 36a9494f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateUserRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateUserResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUsersRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUsersResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for UserApi */ -@Disabled -public class UserApiTest { - - private final UserApi api = new UserApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createUserTest() throws ApiException { - CreateUserRequest createUserRequest = null; - CreateUserResponse response = api.createUser(createUserRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteUserTest() throws ApiException { - DeleteUserRequest deleteUserRequest = null; - DeleteUserResponse response = api.deleteUser(deleteUserRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUsersTest() throws ApiException { - ReadUsersRequest readUsersRequest = null; - ReadUsersResponse response = api.readUsers(readUsersRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateUserTest() throws ApiException { - UpdateUserRequest updateUserRequest = null; - UpdateUserResponse response = api.updateUser(updateUserRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApiTest.java deleted file mode 100644 index 2142a3f7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/UserGroupApiTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.AddUserToUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsPerUserResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadUserGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.RemoveUserFromUserGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateUserGroupResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for UserGroupApi */ -@Disabled -public class UserGroupApiTest { - - private final UserGroupApi api = new UserGroupApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void addUserToUserGroupTest() throws ApiException { - AddUserToUserGroupRequest addUserToUserGroupRequest = null; - AddUserToUserGroupResponse response = api.addUserToUserGroup(addUserToUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createUserGroupTest() throws ApiException { - CreateUserGroupRequest createUserGroupRequest = null; - CreateUserGroupResponse response = api.createUserGroup(createUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteUserGroupTest() throws ApiException { - DeleteUserGroupRequest deleteUserGroupRequest = null; - DeleteUserGroupResponse response = api.deleteUserGroup(deleteUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUserGroupTest() throws ApiException { - ReadUserGroupRequest readUserGroupRequest = null; - ReadUserGroupResponse response = api.readUserGroup(readUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUserGroupsTest() throws ApiException { - ReadUserGroupsRequest readUserGroupsRequest = null; - ReadUserGroupsResponse response = api.readUserGroups(readUserGroupsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readUserGroupsPerUserTest() throws ApiException { - ReadUserGroupsPerUserRequest readUserGroupsPerUserRequest = null; - ReadUserGroupsPerUserResponse response = - api.readUserGroupsPerUser(readUserGroupsPerUserRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void removeUserFromUserGroupTest() throws ApiException { - RemoveUserFromUserGroupRequest removeUserFromUserGroupRequest = null; - RemoveUserFromUserGroupResponse response = - api.removeUserFromUserGroup(removeUserFromUserGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateUserGroupTest() throws ApiException { - UpdateUserGroupRequest updateUserGroupRequest = null; - UpdateUserGroupResponse response = api.updateUserGroup(updateUserGroupRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApiTest.java deleted file mode 100644 index 6e0d397d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VirtualGatewayApiTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVirtualGatewaysResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVirtualGatewayResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateRoutePropagationResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VirtualGatewayApi */ -@Disabled -public class VirtualGatewayApiTest { - - private final VirtualGatewayApi api = new VirtualGatewayApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVirtualGatewayTest() throws ApiException { - CreateVirtualGatewayRequest createVirtualGatewayRequest = null; - CreateVirtualGatewayResponse response = - api.createVirtualGateway(createVirtualGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVirtualGatewayTest() throws ApiException { - DeleteVirtualGatewayRequest deleteVirtualGatewayRequest = null; - DeleteVirtualGatewayResponse response = - api.deleteVirtualGateway(deleteVirtualGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkVirtualGatewayTest() throws ApiException { - LinkVirtualGatewayRequest linkVirtualGatewayRequest = null; - LinkVirtualGatewayResponse response = api.linkVirtualGateway(linkVirtualGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVirtualGatewaysTest() throws ApiException { - ReadVirtualGatewaysRequest readVirtualGatewaysRequest = null; - ReadVirtualGatewaysResponse response = api.readVirtualGateways(readVirtualGatewaysRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkVirtualGatewayTest() throws ApiException { - UnlinkVirtualGatewayRequest unlinkVirtualGatewayRequest = null; - UnlinkVirtualGatewayResponse response = - api.unlinkVirtualGateway(unlinkVirtualGatewayRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateRoutePropagationTest() throws ApiException { - UpdateRoutePropagationRequest updateRoutePropagationRequest = null; - UpdateRoutePropagationResponse response = - api.updateRoutePropagation(updateRoutePropagationRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmApiTest.java deleted file mode 100644 index 518a6bc7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmApiTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadAdminPasswordResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadConsoleOutputResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTypesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTypesResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsStateRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmsStateResponse; -import io.github.outscale.osc_sdk_java.client.model.RebootVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.RebootVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.StartVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.StartVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.StopVmsRequest; -import io.github.outscale.osc_sdk_java.client.model.StopVmsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VmApi */ -@Disabled -public class VmApiTest { - - private final VmApi api = new VmApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVmsTest() throws ApiException { - CreateVmsRequest createVmsRequest = null; - CreateVmsResponse response = api.createVms(createVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVmsTest() throws ApiException { - DeleteVmsRequest deleteVmsRequest = null; - DeleteVmsResponse response = api.deleteVms(deleteVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readAdminPasswordTest() throws ApiException { - ReadAdminPasswordRequest readAdminPasswordRequest = null; - ReadAdminPasswordResponse response = api.readAdminPassword(readAdminPasswordRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readConsoleOutputTest() throws ApiException { - ReadConsoleOutputRequest readConsoleOutputRequest = null; - ReadConsoleOutputResponse response = api.readConsoleOutput(readConsoleOutputRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmTypesTest() throws ApiException { - ReadVmTypesRequest readVmTypesRequest = null; - ReadVmTypesResponse response = api.readVmTypes(readVmTypesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmsTest() throws ApiException { - ReadVmsRequest readVmsRequest = null; - ReadVmsResponse response = api.readVms(readVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmsStateTest() throws ApiException { - ReadVmsStateRequest readVmsStateRequest = null; - ReadVmsStateResponse response = api.readVmsState(readVmsStateRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void rebootVmsTest() throws ApiException { - RebootVmsRequest rebootVmsRequest = null; - RebootVmsResponse response = api.rebootVms(rebootVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void startVmsTest() throws ApiException { - StartVmsRequest startVmsRequest = null; - StartVmsResponse response = api.startVms(startVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void stopVmsTest() throws ApiException { - StopVmsRequest stopVmsRequest = null; - StopVmsResponse response = api.stopVms(stopVmsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateVmTest() throws ApiException { - UpdateVmRequest updateVmRequest = null; - UpdateVmResponse response = api.updateVm(updateVmRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApiTest.java deleted file mode 100644 index b2d7e65b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmGroupApiTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmGroupsResponse; -import io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ScaleDownVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.ScaleUpVmGroupResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmGroupResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VmGroupApi */ -@Disabled -public class VmGroupApiTest { - - private final VmGroupApi api = new VmGroupApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVmGroupTest() throws ApiException { - CreateVmGroupRequest createVmGroupRequest = null; - CreateVmGroupResponse response = api.createVmGroup(createVmGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVmGroupTest() throws ApiException { - DeleteVmGroupRequest deleteVmGroupRequest = null; - DeleteVmGroupResponse response = api.deleteVmGroup(deleteVmGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmGroupsTest() throws ApiException { - ReadVmGroupsRequest readVmGroupsRequest = null; - ReadVmGroupsResponse response = api.readVmGroups(readVmGroupsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void scaleDownVmGroupTest() throws ApiException { - ScaleDownVmGroupRequest scaleDownVmGroupRequest = null; - ScaleDownVmGroupResponse response = api.scaleDownVmGroup(scaleDownVmGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void scaleUpVmGroupTest() throws ApiException { - ScaleUpVmGroupRequest scaleUpVmGroupRequest = null; - ScaleUpVmGroupResponse response = api.scaleUpVmGroup(scaleUpVmGroupRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateVmGroupTest() throws ApiException { - UpdateVmGroupRequest updateVmGroupRequest = null; - UpdateVmGroupResponse response = api.updateVmGroup(updateVmGroupRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApiTest.java deleted file mode 100644 index 2e71ff70..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VmTemplateApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVmTemplateResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVmTemplateResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVmTemplatesResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVmTemplateResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VmTemplateApi */ -@Disabled -public class VmTemplateApiTest { - - private final VmTemplateApi api = new VmTemplateApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVmTemplateTest() throws ApiException { - CreateVmTemplateRequest createVmTemplateRequest = null; - CreateVmTemplateResponse response = api.createVmTemplate(createVmTemplateRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVmTemplateTest() throws ApiException { - DeleteVmTemplateRequest deleteVmTemplateRequest = null; - DeleteVmTemplateResponse response = api.deleteVmTemplate(deleteVmTemplateRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVmTemplatesTest() throws ApiException { - ReadVmTemplatesRequest readVmTemplatesRequest = null; - ReadVmTemplatesResponse response = api.readVmTemplates(readVmTemplatesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateVmTemplateTest() throws ApiException { - UpdateVmTemplateRequest updateVmTemplateRequest = null; - UpdateVmTemplateResponse response = api.updateVmTemplate(updateVmTemplateRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VolumeApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VolumeApiTest.java deleted file mode 100644 index 9e36ccdf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VolumeApiTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.LinkVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.LinkVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVolumesRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVolumesResponse; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.UnlinkVolumeResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVolumeRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVolumeResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VolumeApi */ -@Disabled -public class VolumeApiTest { - - private final VolumeApi api = new VolumeApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVolumeTest() throws ApiException { - CreateVolumeRequest createVolumeRequest = null; - CreateVolumeResponse response = api.createVolume(createVolumeRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVolumeTest() throws ApiException { - DeleteVolumeRequest deleteVolumeRequest = null; - DeleteVolumeResponse response = api.deleteVolume(deleteVolumeRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void linkVolumeTest() throws ApiException { - LinkVolumeRequest linkVolumeRequest = null; - LinkVolumeResponse response = api.linkVolume(linkVolumeRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVolumesTest() throws ApiException { - ReadVolumesRequest readVolumesRequest = null; - ReadVolumesResponse response = api.readVolumes(readVolumesRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void unlinkVolumeTest() throws ApiException { - UnlinkVolumeRequest unlinkVolumeRequest = null; - UnlinkVolumeResponse response = api.unlinkVolume(unlinkVolumeRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateVolumeTest() throws ApiException { - UpdateVolumeRequest updateVolumeRequest = null; - UpdateVolumeResponse response = api.updateVolume(updateVolumeRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApiTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApiTest.java deleted file mode 100644 index f34bcfa4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/api/VpnConnectionApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.api; - -import io.github.outscale.osc_sdk_java.client.ApiException; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionResponse; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.CreateVpnConnectionRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionResponse; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteRequest; -import io.github.outscale.osc_sdk_java.client.model.DeleteVpnConnectionRouteResponse; -import io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsRequest; -import io.github.outscale.osc_sdk_java.client.model.ReadVpnConnectionsResponse; -import io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionRequest; -import io.github.outscale.osc_sdk_java.client.model.UpdateVpnConnectionResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for VpnConnectionApi */ -@Disabled -public class VpnConnectionApiTest { - - private final VpnConnectionApi api = new VpnConnectionApi(); - - /** @throws ApiException if the Api call fails */ - @Test - public void createVpnConnectionTest() throws ApiException { - CreateVpnConnectionRequest createVpnConnectionRequest = null; - CreateVpnConnectionResponse response = api.createVpnConnection(createVpnConnectionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void createVpnConnectionRouteTest() throws ApiException { - CreateVpnConnectionRouteRequest createVpnConnectionRouteRequest = null; - CreateVpnConnectionRouteResponse response = - api.createVpnConnectionRoute(createVpnConnectionRouteRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVpnConnectionTest() throws ApiException { - DeleteVpnConnectionRequest deleteVpnConnectionRequest = null; - DeleteVpnConnectionResponse response = api.deleteVpnConnection(deleteVpnConnectionRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void deleteVpnConnectionRouteTest() throws ApiException { - DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest = null; - DeleteVpnConnectionRouteResponse response = - api.deleteVpnConnectionRoute(deleteVpnConnectionRouteRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void readVpnConnectionsTest() throws ApiException { - ReadVpnConnectionsRequest readVpnConnectionsRequest = null; - ReadVpnConnectionsResponse response = api.readVpnConnections(readVpnConnectionsRequest); - // TODO: test validations - } - - /** @throws ApiException if the Api call fails */ - @Test - public void updateVpnConnectionTest() throws ApiException { - UpdateVpnConnectionRequest updateVpnConnectionRequest = null; - UpdateVpnConnectionResponse response = api.updateVpnConnection(updateVpnConnectionRequest); - // TODO: test validations - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequestTest.java deleted file mode 100644 index e4e0993c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AcceptNetPeeringRequest */ -public class AcceptNetPeeringRequestTest { - private final AcceptNetPeeringRequest model = new AcceptNetPeeringRequest(); - - /** Model tests for AcceptNetPeeringRequest */ - @Test - public void testAcceptNetPeeringRequest() { - // TODO: test AcceptNetPeeringRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponseTest.java deleted file mode 100644 index d3726c58..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AcceptNetPeeringResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AcceptNetPeeringResponse */ -public class AcceptNetPeeringResponseTest { - private final AcceptNetPeeringResponse model = new AcceptNetPeeringResponse(); - - /** Model tests for AcceptNetPeeringResponse */ - @Test - public void testAcceptNetPeeringResponse() { - // TODO: test AcceptNetPeeringResponse - } - - /** Test the property 'netPeering' */ - @Test - public void netPeeringTest() { - // TODO: test netPeering - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccepterNetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccepterNetTest.java deleted file mode 100644 index 7ef35b4e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccepterNetTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AccepterNet */ -public class AccepterNetTest { - private final AccepterNet model = new AccepterNet(); - - /** Model tests for AccepterNet */ - @Test - public void testAccepterNet() { - // TODO: test AccepterNet - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKeyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKeyTest.java deleted file mode 100644 index 0ad41f0b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeySecretKeyTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AccessKeySecretKey */ -public class AccessKeySecretKeyTest { - private final AccessKeySecretKey model = new AccessKeySecretKey(); - - /** Model tests for AccessKeySecretKey */ - @Test - public void testAccessKeySecretKey() { - // TODO: test AccessKeySecretKey - } - - /** Test the property 'accessKeyId' */ - @Test - public void accessKeyIdTest() { - // TODO: test accessKeyId - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'secretKey' */ - @Test - public void secretKeyTest() { - // TODO: test secretKey - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeyTest.java deleted file mode 100644 index 7d8da703..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessKeyTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AccessKey */ -public class AccessKeyTest { - private final AccessKey model = new AccessKey(); - - /** Model tests for AccessKey */ - @Test - public void testAccessKey() { - // TODO: test AccessKey - } - - /** Test the property 'accessKeyId' */ - @Test - public void accessKeyIdTest() { - // TODO: test accessKeyId - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessLogTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessLogTest.java deleted file mode 100644 index 997a281e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccessLogTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AccessLog */ -public class AccessLogTest { - private final AccessLog model = new AccessLog(); - - /** Model tests for AccessLog */ - @Test - public void testAccessLog() { - // TODO: test AccessLog - } - - /** Test the property 'isEnabled' */ - @Test - public void isEnabledTest() { - // TODO: test isEnabled - } - - /** Test the property 'osuBucketName' */ - @Test - public void osuBucketNameTest() { - // TODO: test osuBucketName - } - - /** Test the property 'osuBucketPrefix' */ - @Test - public void osuBucketPrefixTest() { - // TODO: test osuBucketPrefix - } - - /** Test the property 'publicationInterval' */ - @Test - public void publicationIntervalTest() { - // TODO: test publicationInterval - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccountTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccountTest.java deleted file mode 100644 index d83afcdf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AccountTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Account */ -public class AccountTest { - private final Account model = new Account(); - - /** Model tests for Account */ - @Test - public void testAccount() { - // TODO: test Account - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'additionalEmails' */ - @Test - public void additionalEmailsTest() { - // TODO: test additionalEmails - } - - /** Test the property 'city' */ - @Test - public void cityTest() { - // TODO: test city - } - - /** Test the property 'companyName' */ - @Test - public void companyNameTest() { - // TODO: test companyName - } - - /** Test the property 'country' */ - @Test - public void countryTest() { - // TODO: test country - } - - /** Test the property 'customerId' */ - @Test - public void customerIdTest() { - // TODO: test customerId - } - - /** Test the property 'email' */ - @Test - public void emailTest() { - // TODO: test email - } - - /** Test the property 'firstName' */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** Test the property 'jobTitle' */ - @Test - public void jobTitleTest() { - // TODO: test jobTitle - } - - /** Test the property 'lastName' */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** Test the property 'mobileNumber' */ - @Test - public void mobileNumberTest() { - // TODO: test mobileNumber - } - - /** Test the property 'phoneNumber' */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** Test the property 'stateProvince' */ - @Test - public void stateProvinceTest() { - // TODO: test stateProvince - } - - /** Test the property 'vatNumber' */ - @Test - public void vatNumberTest() { - // TODO: test vatNumber - } - - /** Test the property 'zipCode' */ - @Test - public void zipCodeTest() { - // TODO: test zipCode - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequestTest.java deleted file mode 100644 index 557e8328..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AddUserToUserGroupRequest */ -public class AddUserToUserGroupRequestTest { - private final AddUserToUserGroupRequest model = new AddUserToUserGroupRequest(); - - /** Model tests for AddUserToUserGroupRequest */ - @Test - public void testAddUserToUserGroupRequest() { - // TODO: test AddUserToUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } - - /** Test the property 'userPath' */ - @Test - public void userPathTest() { - // TODO: test userPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponseTest.java deleted file mode 100644 index ea3fd059..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/AddUserToUserGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for AddUserToUserGroupResponse */ -public class AddUserToUserGroupResponseTest { - private final AddUserToUserGroupResponse model = new AddUserToUserGroupResponse(); - - /** Model tests for AddUserToUserGroupResponse */ - @Test - public void testAddUserToUserGroupResponse() { - // TODO: test AddUserToUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicyTest.java deleted file mode 100644 index b3681f25..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessPolicyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ApiAccessPolicy */ -public class ApiAccessPolicyTest { - private final ApiAccessPolicy model = new ApiAccessPolicy(); - - /** Model tests for ApiAccessPolicy */ - @Test - public void testApiAccessPolicy() { - // TODO: test ApiAccessPolicy - } - - /** Test the property 'maxAccessKeyExpirationSeconds' */ - @Test - public void maxAccessKeyExpirationSecondsTest() { - // TODO: test maxAccessKeyExpirationSeconds - } - - /** Test the property 'requireTrustedEnv' */ - @Test - public void requireTrustedEnvTest() { - // TODO: test requireTrustedEnv - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRuleTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRuleTest.java deleted file mode 100644 index 5581f012..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApiAccessRuleTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ApiAccessRule */ -public class ApiAccessRuleTest { - private final ApiAccessRule model = new ApiAccessRule(); - - /** Model tests for ApiAccessRule */ - @Test - public void testApiAccessRule() { - // TODO: test ApiAccessRule - } - - /** Test the property 'apiAccessRuleId' */ - @Test - public void apiAccessRuleIdTest() { - // TODO: test apiAccessRuleId - } - - /** Test the property 'caIds' */ - @Test - public void caIdsTest() { - // TODO: test caIds - } - - /** Test the property 'cns' */ - @Test - public void cnsTest() { - // TODO: test cns - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicyTest.java deleted file mode 100644 index 90bf659e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ApplicationStickyCookiePolicyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ApplicationStickyCookiePolicy */ -public class ApplicationStickyCookiePolicyTest { - private final ApplicationStickyCookiePolicy model = new ApplicationStickyCookiePolicy(); - - /** Model tests for ApplicationStickyCookiePolicy */ - @Test - public void testApplicationStickyCookiePolicy() { - // TODO: test ApplicationStickyCookiePolicy - } - - /** Test the property 'cookieName' */ - @Test - public void cookieNameTest() { - // TODO: test cookieName - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealthTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealthTest.java deleted file mode 100644 index a57b98a9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BackendVmHealthTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BackendVmHealth */ -public class BackendVmHealthTest { - private final BackendVmHealth model = new BackendVmHealth(); - - /** Model tests for BackendVmHealth */ - @Test - public void testBackendVmHealth() { - // TODO: test BackendVmHealth - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'stateReason' */ - @Test - public void stateReasonTest() { - // TODO: test stateReason - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreatedTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreatedTest.java deleted file mode 100644 index ae260427..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingCreatedTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BlockDeviceMappingCreated */ -public class BlockDeviceMappingCreatedTest { - private final BlockDeviceMappingCreated model = new BlockDeviceMappingCreated(); - - /** Model tests for BlockDeviceMappingCreated */ - @Test - public void testBlockDeviceMappingCreated() { - // TODO: test BlockDeviceMappingCreated - } - - /** Test the property 'bsu' */ - @Test - public void bsuTest() { - // TODO: test bsu - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImageTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImageTest.java deleted file mode 100644 index de3f091a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingImageTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BlockDeviceMappingImage */ -public class BlockDeviceMappingImageTest { - private final BlockDeviceMappingImage model = new BlockDeviceMappingImage(); - - /** Model tests for BlockDeviceMappingImage */ - @Test - public void testBlockDeviceMappingImage() { - // TODO: test BlockDeviceMappingImage - } - - /** Test the property 'bsu' */ - @Test - public void bsuTest() { - // TODO: test bsu - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } - - /** Test the property 'virtualDeviceName' */ - @Test - public void virtualDeviceNameTest() { - // TODO: test virtualDeviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreationTest.java deleted file mode 100644 index 698b3486..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmCreationTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BlockDeviceMappingVmCreation */ -public class BlockDeviceMappingVmCreationTest { - private final BlockDeviceMappingVmCreation model = new BlockDeviceMappingVmCreation(); - - /** Model tests for BlockDeviceMappingVmCreation */ - @Test - public void testBlockDeviceMappingVmCreation() { - // TODO: test BlockDeviceMappingVmCreation - } - - /** Test the property 'bsu' */ - @Test - public void bsuTest() { - // TODO: test bsu - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } - - /** Test the property 'noDevice' */ - @Test - public void noDeviceTest() { - // TODO: test noDevice - } - - /** Test the property 'virtualDeviceName' */ - @Test - public void virtualDeviceNameTest() { - // TODO: test virtualDeviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdateTest.java deleted file mode 100644 index bc28c75d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BlockDeviceMappingVmUpdateTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BlockDeviceMappingVmUpdate */ -public class BlockDeviceMappingVmUpdateTest { - private final BlockDeviceMappingVmUpdate model = new BlockDeviceMappingVmUpdate(); - - /** Model tests for BlockDeviceMappingVmUpdate */ - @Test - public void testBlockDeviceMappingVmUpdate() { - // TODO: test BlockDeviceMappingVmUpdate - } - - /** Test the property 'bsu' */ - @Test - public void bsuTest() { - // TODO: test bsu - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } - - /** Test the property 'noDevice' */ - @Test - public void noDeviceTest() { - // TODO: test noDevice - } - - /** Test the property 'virtualDeviceName' */ - @Test - public void virtualDeviceNameTest() { - // TODO: test virtualDeviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuCreatedTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuCreatedTest.java deleted file mode 100644 index 23e57d9f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuCreatedTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BsuCreated */ -public class BsuCreatedTest { - private final BsuCreated model = new BsuCreated(); - - /** Model tests for BsuCreated */ - @Test - public void testBsuCreated() { - // TODO: test BsuCreated - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'linkDate' */ - @Test - public void linkDateTest() { - // TODO: test linkDate - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreateTest.java deleted file mode 100644 index 4edf5b9a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToCreateTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BsuToCreate */ -public class BsuToCreateTest { - private final BsuToCreate model = new BsuToCreate(); - - /** Model tests for BsuToCreate */ - @Test - public void testBsuToCreate() { - // TODO: test BsuToCreate - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'iops' */ - @Test - public void iopsTest() { - // TODO: test iops - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } - - /** Test the property 'volumeSize' */ - @Test - public void volumeSizeTest() { - // TODO: test volumeSize - } - - /** Test the property 'volumeType' */ - @Test - public void volumeTypeTest() { - // TODO: test volumeType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVmTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVmTest.java deleted file mode 100644 index e94de106..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/BsuToUpdateVmTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for BsuToUpdateVm */ -public class BsuToUpdateVmTest { - private final BsuToUpdateVm model = new BsuToUpdateVm(); - - /** Model tests for BsuToUpdateVm */ - @Test - public void testBsuToUpdateVm() { - // TODO: test BsuToUpdateVm - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CaTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CaTest.java deleted file mode 100644 index 7bf992bd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CaTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Ca */ -public class CaTest { - private final Ca model = new Ca(); - - /** Model tests for Ca */ - @Test - public void testCa() { - // TODO: test Ca - } - - /** Test the property 'caFingerprint' */ - @Test - public void caFingerprintTest() { - // TODO: test caFingerprint - } - - /** Test the property 'caId' */ - @Test - public void caIdTest() { - // TODO: test caId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntryTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntryTest.java deleted file mode 100644 index 421d645f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogEntryTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CatalogEntry */ -public class CatalogEntryTest { - private final CatalogEntry model = new CatalogEntry(); - - /** Model tests for CatalogEntry */ - @Test - public void testCatalogEntry() { - // TODO: test CatalogEntry - } - - /** Test the property 'category' */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** Test the property 'flags' */ - @Test - public void flagsTest() { - // TODO: test flags - } - - /** Test the property 'operation' */ - @Test - public void operationTest() { - // TODO: test operation - } - - /** Test the property 'service' */ - @Test - public void serviceTest() { - // TODO: test service - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'title' */ - @Test - public void titleTest() { - // TODO: test title - } - - /** Test the property 'type' */ - @Test - public void typeTest() { - // TODO: test type - } - - /** Test the property 'unitPrice' */ - @Test - public void unitPriceTest() { - // TODO: test unitPrice - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogTest.java deleted file mode 100644 index 6ed8655e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Catalog */ -public class CatalogTest { - private final Catalog model = new Catalog(); - - /** Model tests for Catalog */ - @Test - public void testCatalog() { - // TODO: test Catalog - } - - /** Test the property 'entries' */ - @Test - public void entriesTest() { - // TODO: test entries - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogsTest.java deleted file mode 100644 index 890258bc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CatalogsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Catalogs */ -public class CatalogsTest { - private final Catalogs model = new Catalogs(); - - /** Model tests for Catalogs */ - @Test - public void testCatalogs() { - // TODO: test Catalogs - } - - /** Test the property 'entries' */ - @Test - public void entriesTest() { - // TODO: test entries - } - - /** Test the property 'fromDate' */ - @Test - public void fromDateTest() { - // TODO: test fromDate - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'toDate' */ - @Test - public void toDateTest() { - // TODO: test toDate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequestTest.java deleted file mode 100644 index e2a7bf57..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CheckAuthenticationRequest */ -public class CheckAuthenticationRequestTest { - private final CheckAuthenticationRequest model = new CheckAuthenticationRequest(); - - /** Model tests for CheckAuthenticationRequest */ - @Test - public void testCheckAuthenticationRequest() { - // TODO: test CheckAuthenticationRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'login' */ - @Test - public void loginTest() { - // TODO: test login - } - - /** Test the property 'password' */ - @Test - public void passwordTest() { - // TODO: test password - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponseTest.java deleted file mode 100644 index 80a39569..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CheckAuthenticationResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CheckAuthenticationResponse */ -public class CheckAuthenticationResponseTest { - private final CheckAuthenticationResponse model = new CheckAuthenticationResponse(); - - /** Model tests for CheckAuthenticationResponse */ - @Test - public void testCheckAuthenticationResponse() { - // TODO: test CheckAuthenticationResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ClientGatewayTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ClientGatewayTest.java deleted file mode 100644 index e29157aa..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ClientGatewayTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ClientGateway */ -public class ClientGatewayTest { - private final ClientGateway model = new ClientGateway(); - - /** Model tests for ClientGateway */ - @Test - public void testClientGateway() { - // TODO: test ClientGateway - } - - /** Test the property 'bgpAsn' */ - @Test - public void bgpAsnTest() { - // TODO: test bgpAsn - } - - /** Test the property 'clientGatewayId' */ - @Test - public void clientGatewayIdTest() { - // TODO: test clientGatewayId - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntryTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntryTest.java deleted file mode 100644 index 9799f355..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ConsumptionEntryTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ConsumptionEntry */ -public class ConsumptionEntryTest { - private final ConsumptionEntry model = new ConsumptionEntry(); - - /** Model tests for ConsumptionEntry */ - @Test - public void testConsumptionEntry() { - // TODO: test ConsumptionEntry - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'category' */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** Test the property 'fromDate' */ - @Test - public void fromDateTest() { - // TODO: test fromDate - } - - /** Test the property 'operation' */ - @Test - public void operationTest() { - // TODO: test operation - } - - /** Test the property 'payingAccountId' */ - @Test - public void payingAccountIdTest() { - // TODO: test payingAccountId - } - - /** Test the property 'price' */ - @Test - public void priceTest() { - // TODO: test price - } - - /** Test the property 'service' */ - @Test - public void serviceTest() { - // TODO: test service - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'title' */ - @Test - public void titleTest() { - // TODO: test title - } - - /** Test the property 'toDate' */ - @Test - public void toDateTest() { - // TODO: test toDate - } - - /** Test the property 'type' */ - @Test - public void typeTest() { - // TODO: test type - } - - /** Test the property 'unitPrice' */ - @Test - public void unitPriceTest() { - // TODO: test unitPrice - } - - /** Test the property 'value' */ - @Test - public void valueTest() { - // TODO: test value - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequestTest.java deleted file mode 100644 index f649987b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateAccessKeyRequest */ -public class CreateAccessKeyRequestTest { - private final CreateAccessKeyRequest model = new CreateAccessKeyRequest(); - - /** Model tests for CreateAccessKeyRequest */ - @Test - public void testCreateAccessKeyRequest() { - // TODO: test CreateAccessKeyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponseTest.java deleted file mode 100644 index 6bab3e79..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccessKeyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateAccessKeyResponse */ -public class CreateAccessKeyResponseTest { - private final CreateAccessKeyResponse model = new CreateAccessKeyResponse(); - - /** Model tests for CreateAccessKeyResponse */ - @Test - public void testCreateAccessKeyResponse() { - // TODO: test CreateAccessKeyResponse - } - - /** Test the property 'accessKey' */ - @Test - public void accessKeyTest() { - // TODO: test accessKey - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequestTest.java deleted file mode 100644 index f0334faa..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountRequestTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateAccountRequest */ -public class CreateAccountRequestTest { - private final CreateAccountRequest model = new CreateAccountRequest(); - - /** Model tests for CreateAccountRequest */ - @Test - public void testCreateAccountRequest() { - // TODO: test CreateAccountRequest - } - - /** Test the property 'additionalEmails' */ - @Test - public void additionalEmailsTest() { - // TODO: test additionalEmails - } - - /** Test the property 'city' */ - @Test - public void cityTest() { - // TODO: test city - } - - /** Test the property 'companyName' */ - @Test - public void companyNameTest() { - // TODO: test companyName - } - - /** Test the property 'country' */ - @Test - public void countryTest() { - // TODO: test country - } - - /** Test the property 'customerId' */ - @Test - public void customerIdTest() { - // TODO: test customerId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'email' */ - @Test - public void emailTest() { - // TODO: test email - } - - /** Test the property 'firstName' */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** Test the property 'jobTitle' */ - @Test - public void jobTitleTest() { - // TODO: test jobTitle - } - - /** Test the property 'lastName' */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** Test the property 'mobileNumber' */ - @Test - public void mobileNumberTest() { - // TODO: test mobileNumber - } - - /** Test the property 'phoneNumber' */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** Test the property 'stateProvince' */ - @Test - public void stateProvinceTest() { - // TODO: test stateProvince - } - - /** Test the property 'vatNumber' */ - @Test - public void vatNumberTest() { - // TODO: test vatNumber - } - - /** Test the property 'zipCode' */ - @Test - public void zipCodeTest() { - // TODO: test zipCode - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponseTest.java deleted file mode 100644 index 499b10b5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateAccountResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateAccountResponse */ -public class CreateAccountResponseTest { - private final CreateAccountResponse model = new CreateAccountResponse(); - - /** Model tests for CreateAccountResponse */ - @Test - public void testCreateAccountResponse() { - // TODO: test CreateAccountResponse - } - - /** Test the property 'account' */ - @Test - public void accountTest() { - // TODO: test account - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequestTest.java deleted file mode 100644 index 689e9793..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateApiAccessRuleRequest */ -public class CreateApiAccessRuleRequestTest { - private final CreateApiAccessRuleRequest model = new CreateApiAccessRuleRequest(); - - /** Model tests for CreateApiAccessRuleRequest */ - @Test - public void testCreateApiAccessRuleRequest() { - // TODO: test CreateApiAccessRuleRequest - } - - /** Test the property 'caIds' */ - @Test - public void caIdsTest() { - // TODO: test caIds - } - - /** Test the property 'cns' */ - @Test - public void cnsTest() { - // TODO: test cns - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponseTest.java deleted file mode 100644 index be34c53a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateApiAccessRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateApiAccessRuleResponse */ -public class CreateApiAccessRuleResponseTest { - private final CreateApiAccessRuleResponse model = new CreateApiAccessRuleResponse(); - - /** Model tests for CreateApiAccessRuleResponse */ - @Test - public void testCreateApiAccessRuleResponse() { - // TODO: test CreateApiAccessRuleResponse - } - - /** Test the property 'apiAccessRule' */ - @Test - public void apiAccessRuleTest() { - // TODO: test apiAccessRule - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequestTest.java deleted file mode 100644 index f6a5e3ec..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateCaRequest */ -public class CreateCaRequestTest { - private final CreateCaRequest model = new CreateCaRequest(); - - /** Model tests for CreateCaRequest */ - @Test - public void testCreateCaRequest() { - // TODO: test CreateCaRequest - } - - /** Test the property 'caPem' */ - @Test - public void caPemTest() { - // TODO: test caPem - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponseTest.java deleted file mode 100644 index affb289a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateCaResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateCaResponse */ -public class CreateCaResponseTest { - private final CreateCaResponse model = new CreateCaResponse(); - - /** Model tests for CreateCaResponse */ - @Test - public void testCreateCaResponse() { - // TODO: test CreateCaResponse - } - - /** Test the property 'ca' */ - @Test - public void caTest() { - // TODO: test ca - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequestTest.java deleted file mode 100644 index 7007557a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateClientGatewayRequest */ -public class CreateClientGatewayRequestTest { - private final CreateClientGatewayRequest model = new CreateClientGatewayRequest(); - - /** Model tests for CreateClientGatewayRequest */ - @Test - public void testCreateClientGatewayRequest() { - // TODO: test CreateClientGatewayRequest - } - - /** Test the property 'bgpAsn' */ - @Test - public void bgpAsnTest() { - // TODO: test bgpAsn - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponseTest.java deleted file mode 100644 index 3f910733..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateClientGatewayResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateClientGatewayResponse */ -public class CreateClientGatewayResponseTest { - private final CreateClientGatewayResponse model = new CreateClientGatewayResponse(); - - /** Model tests for CreateClientGatewayResponse */ - @Test - public void testCreateClientGatewayResponse() { - // TODO: test CreateClientGatewayResponse - } - - /** Test the property 'clientGateway' */ - @Test - public void clientGatewayTest() { - // TODO: test clientGateway - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequestTest.java deleted file mode 100644 index 4d2d66e9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDedicatedGroupRequest */ -public class CreateDedicatedGroupRequestTest { - private final CreateDedicatedGroupRequest model = new CreateDedicatedGroupRequest(); - - /** Model tests for CreateDedicatedGroupRequest */ - @Test - public void testCreateDedicatedGroupRequest() { - // TODO: test CreateDedicatedGroupRequest - } - - /** Test the property 'cpuGeneration' */ - @Test - public void cpuGenerationTest() { - // TODO: test cpuGeneration - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponseTest.java deleted file mode 100644 index e801d64a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDedicatedGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDedicatedGroupResponse */ -public class CreateDedicatedGroupResponseTest { - private final CreateDedicatedGroupResponse model = new CreateDedicatedGroupResponse(); - - /** Model tests for CreateDedicatedGroupResponse */ - @Test - public void testCreateDedicatedGroupResponse() { - // TODO: test CreateDedicatedGroupResponse - } - - /** Test the property 'dedicatedGroup' */ - @Test - public void dedicatedGroupTest() { - // TODO: test dedicatedGroup - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequestTest.java deleted file mode 100644 index d6436bb6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDhcpOptionsRequest */ -public class CreateDhcpOptionsRequestTest { - private final CreateDhcpOptionsRequest model = new CreateDhcpOptionsRequest(); - - /** Model tests for CreateDhcpOptionsRequest */ - @Test - public void testCreateDhcpOptionsRequest() { - // TODO: test CreateDhcpOptionsRequest - } - - /** Test the property 'domainName' */ - @Test - public void domainNameTest() { - // TODO: test domainName - } - - /** Test the property 'domainNameServers' */ - @Test - public void domainNameServersTest() { - // TODO: test domainNameServers - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'logServers' */ - @Test - public void logServersTest() { - // TODO: test logServers - } - - /** Test the property 'ntpServers' */ - @Test - public void ntpServersTest() { - // TODO: test ntpServers - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponseTest.java deleted file mode 100644 index 57e55a85..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDhcpOptionsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDhcpOptionsResponse */ -public class CreateDhcpOptionsResponseTest { - private final CreateDhcpOptionsResponse model = new CreateDhcpOptionsResponse(); - - /** Model tests for CreateDhcpOptionsResponse */ - @Test - public void testCreateDhcpOptionsResponse() { - // TODO: test CreateDhcpOptionsResponse - } - - /** Test the property 'dhcpOptionsSet' */ - @Test - public void dhcpOptionsSetTest() { - // TODO: test dhcpOptionsSet - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequestTest.java deleted file mode 100644 index 92f77960..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDirectLinkInterfaceRequest */ -public class CreateDirectLinkInterfaceRequestTest { - private final CreateDirectLinkInterfaceRequest model = new CreateDirectLinkInterfaceRequest(); - - /** Model tests for CreateDirectLinkInterfaceRequest */ - @Test - public void testCreateDirectLinkInterfaceRequest() { - // TODO: test CreateDirectLinkInterfaceRequest - } - - /** Test the property 'directLinkId' */ - @Test - public void directLinkIdTest() { - // TODO: test directLinkId - } - - /** Test the property 'directLinkInterface' */ - @Test - public void directLinkInterfaceTest() { - // TODO: test directLinkInterface - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponseTest.java deleted file mode 100644 index 43f63990..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkInterfaceResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDirectLinkInterfaceResponse */ -public class CreateDirectLinkInterfaceResponseTest { - private final CreateDirectLinkInterfaceResponse model = new CreateDirectLinkInterfaceResponse(); - - /** Model tests for CreateDirectLinkInterfaceResponse */ - @Test - public void testCreateDirectLinkInterfaceResponse() { - // TODO: test CreateDirectLinkInterfaceResponse - } - - /** Test the property 'directLinkInterface' */ - @Test - public void directLinkInterfaceTest() { - // TODO: test directLinkInterface - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequestTest.java deleted file mode 100644 index e6802ff3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDirectLinkRequest */ -public class CreateDirectLinkRequestTest { - private final CreateDirectLinkRequest model = new CreateDirectLinkRequest(); - - /** Model tests for CreateDirectLinkRequest */ - @Test - public void testCreateDirectLinkRequest() { - // TODO: test CreateDirectLinkRequest - } - - /** Test the property 'bandwidth' */ - @Test - public void bandwidthTest() { - // TODO: test bandwidth - } - - /** Test the property 'directLinkName' */ - @Test - public void directLinkNameTest() { - // TODO: test directLinkName - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'location' */ - @Test - public void locationTest() { - // TODO: test location - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponseTest.java deleted file mode 100644 index 640016d3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateDirectLinkResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateDirectLinkResponse */ -public class CreateDirectLinkResponseTest { - private final CreateDirectLinkResponse model = new CreateDirectLinkResponse(); - - /** Model tests for CreateDirectLinkResponse */ - @Test - public void testCreateDirectLinkResponse() { - // TODO: test CreateDirectLinkResponse - } - - /** Test the property 'directLink' */ - @Test - public void directLinkTest() { - // TODO: test directLink - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequestTest.java deleted file mode 100644 index d1f1c8dc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateFlexibleGpuRequest */ -public class CreateFlexibleGpuRequestTest { - private final CreateFlexibleGpuRequest model = new CreateFlexibleGpuRequest(); - - /** Model tests for CreateFlexibleGpuRequest */ - @Test - public void testCreateFlexibleGpuRequest() { - // TODO: test CreateFlexibleGpuRequest - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'generation' */ - @Test - public void generationTest() { - // TODO: test generation - } - - /** Test the property 'modelName' */ - @Test - public void modelNameTest() { - // TODO: test modelName - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponseTest.java deleted file mode 100644 index ace15584..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateFlexibleGpuResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateFlexibleGpuResponse */ -public class CreateFlexibleGpuResponseTest { - private final CreateFlexibleGpuResponse model = new CreateFlexibleGpuResponse(); - - /** Model tests for CreateFlexibleGpuResponse */ - @Test - public void testCreateFlexibleGpuResponse() { - // TODO: test CreateFlexibleGpuResponse - } - - /** Test the property 'flexibleGpu' */ - @Test - public void flexibleGpuTest() { - // TODO: test flexibleGpu - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequestTest.java deleted file mode 100644 index f7d726c7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateImageExportTaskRequest */ -public class CreateImageExportTaskRequestTest { - private final CreateImageExportTaskRequest model = new CreateImageExportTaskRequest(); - - /** Model tests for CreateImageExportTaskRequest */ - @Test - public void testCreateImageExportTaskRequest() { - // TODO: test CreateImageExportTaskRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'osuExport' */ - @Test - public void osuExportTest() { - // TODO: test osuExport - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponseTest.java deleted file mode 100644 index f9fe42fc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageExportTaskResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateImageExportTaskResponse */ -public class CreateImageExportTaskResponseTest { - private final CreateImageExportTaskResponse model = new CreateImageExportTaskResponse(); - - /** Model tests for CreateImageExportTaskResponse */ - @Test - public void testCreateImageExportTaskResponse() { - // TODO: test CreateImageExportTaskResponse - } - - /** Test the property 'imageExportTask' */ - @Test - public void imageExportTaskTest() { - // TODO: test imageExportTask - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequestTest.java deleted file mode 100644 index a8c8c6bf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageRequestTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateImageRequest */ -public class CreateImageRequestTest { - private final CreateImageRequest model = new CreateImageRequest(); - - /** Model tests for CreateImageRequest */ - @Test - public void testCreateImageRequest() { - // TODO: test CreateImageRequest - } - - /** Test the property 'architecture' */ - @Test - public void architectureTest() { - // TODO: test architecture - } - - /** Test the property 'blockDeviceMappings' */ - @Test - public void blockDeviceMappingsTest() { - // TODO: test blockDeviceMappings - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'fileLocation' */ - @Test - public void fileLocationTest() { - // TODO: test fileLocation - } - - /** Test the property 'imageName' */ - @Test - public void imageNameTest() { - // TODO: test imageName - } - - /** Test the property 'noReboot' */ - @Test - public void noRebootTest() { - // TODO: test noReboot - } - - /** Test the property 'productCodes' */ - @Test - public void productCodesTest() { - // TODO: test productCodes - } - - /** Test the property 'rootDeviceName' */ - @Test - public void rootDeviceNameTest() { - // TODO: test rootDeviceName - } - - /** Test the property 'sourceImageId' */ - @Test - public void sourceImageIdTest() { - // TODO: test sourceImageId - } - - /** Test the property 'sourceRegionName' */ - @Test - public void sourceRegionNameTest() { - // TODO: test sourceRegionName - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponseTest.java deleted file mode 100644 index 8863b395..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateImageResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateImageResponse */ -public class CreateImageResponseTest { - private final CreateImageResponse model = new CreateImageResponse(); - - /** Model tests for CreateImageResponse */ - @Test - public void testCreateImageResponse() { - // TODO: test CreateImageResponse - } - - /** Test the property 'image' */ - @Test - public void imageTest() { - // TODO: test image - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequestTest.java deleted file mode 100644 index 291a738d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateInternetServiceRequest */ -public class CreateInternetServiceRequestTest { - private final CreateInternetServiceRequest model = new CreateInternetServiceRequest(); - - /** Model tests for CreateInternetServiceRequest */ - @Test - public void testCreateInternetServiceRequest() { - // TODO: test CreateInternetServiceRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponseTest.java deleted file mode 100644 index 916d5199..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateInternetServiceResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateInternetServiceResponse */ -public class CreateInternetServiceResponseTest { - private final CreateInternetServiceResponse model = new CreateInternetServiceResponse(); - - /** Model tests for CreateInternetServiceResponse */ - @Test - public void testCreateInternetServiceResponse() { - // TODO: test CreateInternetServiceResponse - } - - /** Test the property 'internetService' */ - @Test - public void internetServiceTest() { - // TODO: test internetService - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequestTest.java deleted file mode 100644 index 4ac84127..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateKeypairRequest */ -public class CreateKeypairRequestTest { - private final CreateKeypairRequest model = new CreateKeypairRequest(); - - /** Model tests for CreateKeypairRequest */ - @Test - public void testCreateKeypairRequest() { - // TODO: test CreateKeypairRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'publicKey' */ - @Test - public void publicKeyTest() { - // TODO: test publicKey - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponseTest.java deleted file mode 100644 index d701a7d1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateKeypairResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateKeypairResponse */ -public class CreateKeypairResponseTest { - private final CreateKeypairResponse model = new CreateKeypairResponse(); - - /** Model tests for CreateKeypairResponse */ - @Test - public void testCreateKeypairResponse() { - // TODO: test CreateKeypairResponse - } - - /** Test the property 'keypair' */ - @Test - public void keypairTest() { - // TODO: test keypair - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequestTest.java deleted file mode 100644 index 5c34407a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateListenerRuleRequest */ -public class CreateListenerRuleRequestTest { - private final CreateListenerRuleRequest model = new CreateListenerRuleRequest(); - - /** Model tests for CreateListenerRuleRequest */ - @Test - public void testCreateListenerRuleRequest() { - // TODO: test CreateListenerRuleRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'listener' */ - @Test - public void listenerTest() { - // TODO: test listener - } - - /** Test the property 'listenerRule' */ - @Test - public void listenerRuleTest() { - // TODO: test listenerRule - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponseTest.java deleted file mode 100644 index c2db970e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateListenerRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateListenerRuleResponse */ -public class CreateListenerRuleResponseTest { - private final CreateListenerRuleResponse model = new CreateListenerRuleResponse(); - - /** Model tests for CreateListenerRuleResponse */ - @Test - public void testCreateListenerRuleResponse() { - // TODO: test CreateListenerRuleResponse - } - - /** Test the property 'listenerRule' */ - @Test - public void listenerRuleTest() { - // TODO: test listenerRule - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequestTest.java deleted file mode 100644 index d13f39f0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerListenersRequest */ -public class CreateLoadBalancerListenersRequestTest { - private final CreateLoadBalancerListenersRequest model = - new CreateLoadBalancerListenersRequest(); - - /** Model tests for CreateLoadBalancerListenersRequest */ - @Test - public void testCreateLoadBalancerListenersRequest() { - // TODO: test CreateLoadBalancerListenersRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'listeners' */ - @Test - public void listenersTest() { - // TODO: test listeners - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponseTest.java deleted file mode 100644 index 60b169aa..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerListenersResponseTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerListenersResponse */ -public class CreateLoadBalancerListenersResponseTest { - private final CreateLoadBalancerListenersResponse model = - new CreateLoadBalancerListenersResponse(); - - /** Model tests for CreateLoadBalancerListenersResponse */ - @Test - public void testCreateLoadBalancerListenersResponse() { - // TODO: test CreateLoadBalancerListenersResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequestTest.java deleted file mode 100644 index acfe2ddd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyRequestTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerPolicyRequest */ -public class CreateLoadBalancerPolicyRequestTest { - private final CreateLoadBalancerPolicyRequest model = new CreateLoadBalancerPolicyRequest(); - - /** Model tests for CreateLoadBalancerPolicyRequest */ - @Test - public void testCreateLoadBalancerPolicyRequest() { - // TODO: test CreateLoadBalancerPolicyRequest - } - - /** Test the property 'cookieExpirationPeriod' */ - @Test - public void cookieExpirationPeriodTest() { - // TODO: test cookieExpirationPeriod - } - - /** Test the property 'cookieName' */ - @Test - public void cookieNameTest() { - // TODO: test cookieName - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } - - /** Test the property 'policyType' */ - @Test - public void policyTypeTest() { - // TODO: test policyType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponseTest.java deleted file mode 100644 index 45d2f7e8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerPolicyResponse */ -public class CreateLoadBalancerPolicyResponseTest { - private final CreateLoadBalancerPolicyResponse model = new CreateLoadBalancerPolicyResponse(); - - /** Model tests for CreateLoadBalancerPolicyResponse */ - @Test - public void testCreateLoadBalancerPolicyResponse() { - // TODO: test CreateLoadBalancerPolicyResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequestTest.java deleted file mode 100644 index 53c7d9e2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerRequestTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerRequest */ -public class CreateLoadBalancerRequestTest { - private final CreateLoadBalancerRequest model = new CreateLoadBalancerRequest(); - - /** Model tests for CreateLoadBalancerRequest */ - @Test - public void testCreateLoadBalancerRequest() { - // TODO: test CreateLoadBalancerRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'listeners' */ - @Test - public void listenersTest() { - // TODO: test listeners - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'loadBalancerType' */ - @Test - public void loadBalancerTypeTest() { - // TODO: test loadBalancerType - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'subnets' */ - @Test - public void subnetsTest() { - // TODO: test subnets - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponseTest.java deleted file mode 100644 index 878ba60b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerResponse */ -public class CreateLoadBalancerResponseTest { - private final CreateLoadBalancerResponse model = new CreateLoadBalancerResponse(); - - /** Model tests for CreateLoadBalancerResponse */ - @Test - public void testCreateLoadBalancerResponse() { - // TODO: test CreateLoadBalancerResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequestTest.java deleted file mode 100644 index e1b8abeb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerTagsRequest */ -public class CreateLoadBalancerTagsRequestTest { - private final CreateLoadBalancerTagsRequest model = new CreateLoadBalancerTagsRequest(); - - /** Model tests for CreateLoadBalancerTagsRequest */ - @Test - public void testCreateLoadBalancerTagsRequest() { - // TODO: test CreateLoadBalancerTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerNames' */ - @Test - public void loadBalancerNamesTest() { - // TODO: test loadBalancerNames - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponseTest.java deleted file mode 100644 index 24b26345..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateLoadBalancerTagsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateLoadBalancerTagsResponse */ -public class CreateLoadBalancerTagsResponseTest { - private final CreateLoadBalancerTagsResponse model = new CreateLoadBalancerTagsResponse(); - - /** Model tests for CreateLoadBalancerTagsResponse */ - @Test - public void testCreateLoadBalancerTagsResponse() { - // TODO: test CreateLoadBalancerTagsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequestTest.java deleted file mode 100644 index a332d844..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNatServiceRequest */ -public class CreateNatServiceRequestTest { - private final CreateNatServiceRequest model = new CreateNatServiceRequest(); - - /** Model tests for CreateNatServiceRequest */ - @Test - public void testCreateNatServiceRequest() { - // TODO: test CreateNatServiceRequest - } - - /** Test the property 'clientToken' */ - @Test - public void clientTokenTest() { - // TODO: test clientToken - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponseTest.java deleted file mode 100644 index ccd0e1f4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNatServiceResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNatServiceResponse */ -public class CreateNatServiceResponseTest { - private final CreateNatServiceResponse model = new CreateNatServiceResponse(); - - /** Model tests for CreateNatServiceResponse */ - @Test - public void testCreateNatServiceResponse() { - // TODO: test CreateNatServiceResponse - } - - /** Test the property 'natService' */ - @Test - public void natServiceTest() { - // TODO: test natService - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequestTest.java deleted file mode 100644 index 46e9b72e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetAccessPointRequest */ -public class CreateNetAccessPointRequestTest { - private final CreateNetAccessPointRequest model = new CreateNetAccessPointRequest(); - - /** Model tests for CreateNetAccessPointRequest */ - @Test - public void testCreateNetAccessPointRequest() { - // TODO: test CreateNetAccessPointRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'routeTableIds' */ - @Test - public void routeTableIdsTest() { - // TODO: test routeTableIds - } - - /** Test the property 'serviceName' */ - @Test - public void serviceNameTest() { - // TODO: test serviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponseTest.java deleted file mode 100644 index 34a3926d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetAccessPointResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetAccessPointResponse */ -public class CreateNetAccessPointResponseTest { - private final CreateNetAccessPointResponse model = new CreateNetAccessPointResponse(); - - /** Model tests for CreateNetAccessPointResponse */ - @Test - public void testCreateNetAccessPointResponse() { - // TODO: test CreateNetAccessPointResponse - } - - /** Test the property 'netAccessPoint' */ - @Test - public void netAccessPointTest() { - // TODO: test netAccessPoint - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequestTest.java deleted file mode 100644 index ec8c0d63..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetPeeringRequest */ -public class CreateNetPeeringRequestTest { - private final CreateNetPeeringRequest model = new CreateNetPeeringRequest(); - - /** Model tests for CreateNetPeeringRequest */ - @Test - public void testCreateNetPeeringRequest() { - // TODO: test CreateNetPeeringRequest - } - - /** Test the property 'accepterNetId' */ - @Test - public void accepterNetIdTest() { - // TODO: test accepterNetId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'sourceNetId' */ - @Test - public void sourceNetIdTest() { - // TODO: test sourceNetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponseTest.java deleted file mode 100644 index 47cddd52..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetPeeringResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetPeeringResponse */ -public class CreateNetPeeringResponseTest { - private final CreateNetPeeringResponse model = new CreateNetPeeringResponse(); - - /** Model tests for CreateNetPeeringResponse */ - @Test - public void testCreateNetPeeringResponse() { - // TODO: test CreateNetPeeringResponse - } - - /** Test the property 'netPeering' */ - @Test - public void netPeeringTest() { - // TODO: test netPeering - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequestTest.java deleted file mode 100644 index b1fb34a6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetRequest */ -public class CreateNetRequestTest { - private final CreateNetRequest model = new CreateNetRequest(); - - /** Model tests for CreateNetRequest */ - @Test - public void testCreateNetRequest() { - // TODO: test CreateNetRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'tenancy' */ - @Test - public void tenancyTest() { - // TODO: test tenancy - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponseTest.java deleted file mode 100644 index 0c46cc80..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNetResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNetResponse */ -public class CreateNetResponseTest { - private final CreateNetResponse model = new CreateNetResponse(); - - /** Model tests for CreateNetResponse */ - @Test - public void testCreateNetResponse() { - // TODO: test CreateNetResponse - } - - /** Test the property 'net' */ - @Test - public void netTest() { - // TODO: test net - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequestTest.java deleted file mode 100644 index e02ef78d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNicRequest */ -public class CreateNicRequestTest { - private final CreateNicRequest model = new CreateNicRequest(); - - /** Model tests for CreateNicRequest */ - @Test - public void testCreateNicRequest() { - // TODO: test CreateNicRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponseTest.java deleted file mode 100644 index 2345002f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateNicResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateNicResponse */ -public class CreateNicResponseTest { - private final CreateNicResponse model = new CreateNicResponse(); - - /** Model tests for CreateNicResponse */ - @Test - public void testCreateNicResponse() { - // TODO: test CreateNicResponse - } - - /** Test the property 'nic' */ - @Test - public void nicTest() { - // TODO: test nic - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequestTest.java deleted file mode 100644 index 4171c3de..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePolicyRequest */ -public class CreatePolicyRequestTest { - private final CreatePolicyRequest model = new CreatePolicyRequest(); - - /** Model tests for CreatePolicyRequest */ - @Test - public void testCreatePolicyRequest() { - // TODO: test CreatePolicyRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'document' */ - @Test - public void documentTest() { - // TODO: test document - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponseTest.java deleted file mode 100644 index ee28c688..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePolicyResponse */ -public class CreatePolicyResponseTest { - private final CreatePolicyResponse model = new CreatePolicyResponse(); - - /** Model tests for CreatePolicyResponse */ - @Test - public void testCreatePolicyResponse() { - // TODO: test CreatePolicyResponse - } - - /** Test the property 'policy' */ - @Test - public void policyTest() { - // TODO: test policy - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequestTest.java deleted file mode 100644 index 1bb09793..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePolicyVersionRequest */ -public class CreatePolicyVersionRequestTest { - private final CreatePolicyVersionRequest model = new CreatePolicyVersionRequest(); - - /** Model tests for CreatePolicyVersionRequest */ - @Test - public void testCreatePolicyVersionRequest() { - // TODO: test CreatePolicyVersionRequest - } - - /** Test the property 'document' */ - @Test - public void documentTest() { - // TODO: test document - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'setAsDefault' */ - @Test - public void setAsDefaultTest() { - // TODO: test setAsDefault - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponseTest.java deleted file mode 100644 index 011490e4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePolicyVersionResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePolicyVersionResponse */ -public class CreatePolicyVersionResponseTest { - private final CreatePolicyVersionResponse model = new CreatePolicyVersionResponse(); - - /** Model tests for CreatePolicyVersionResponse */ - @Test - public void testCreatePolicyVersionResponse() { - // TODO: test CreatePolicyVersionResponse - } - - /** Test the property 'policyVersion' */ - @Test - public void policyVersionTest() { - // TODO: test policyVersion - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequestTest.java deleted file mode 100644 index e1f15b1c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateProductTypeRequest */ -public class CreateProductTypeRequestTest { - private final CreateProductTypeRequest model = new CreateProductTypeRequest(); - - /** Model tests for CreateProductTypeRequest */ - @Test - public void testCreateProductTypeRequest() { - // TODO: test CreateProductTypeRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vendor' */ - @Test - public void vendorTest() { - // TODO: test vendor - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponseTest.java deleted file mode 100644 index b3e31823..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateProductTypeResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateProductTypeResponse */ -public class CreateProductTypeResponseTest { - private final CreateProductTypeResponse model = new CreateProductTypeResponse(); - - /** Model tests for CreateProductTypeResponse */ - @Test - public void testCreateProductTypeResponse() { - // TODO: test CreateProductTypeResponse - } - - /** Test the property 'productType' */ - @Test - public void productTypeTest() { - // TODO: test productType - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequestTest.java deleted file mode 100644 index a74cbd2e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePublicIpRequest */ -public class CreatePublicIpRequestTest { - private final CreatePublicIpRequest model = new CreatePublicIpRequest(); - - /** Model tests for CreatePublicIpRequest */ - @Test - public void testCreatePublicIpRequest() { - // TODO: test CreatePublicIpRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponseTest.java deleted file mode 100644 index 816a48f0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreatePublicIpResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreatePublicIpResponse */ -public class CreatePublicIpResponseTest { - private final CreatePublicIpResponse model = new CreatePublicIpResponse(); - - /** Model tests for CreatePublicIpResponse */ - @Test - public void testCreatePublicIpResponse() { - // TODO: test CreatePublicIpResponse - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequestTest.java deleted file mode 100644 index 5c5809d1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteRequestTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateRouteRequest */ -public class CreateRouteRequestTest { - private final CreateRouteRequest model = new CreateRouteRequest(); - - /** Model tests for CreateRouteRequest */ - @Test - public void testCreateRouteRequest() { - // TODO: test CreateRouteRequest - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'gatewayId' */ - @Test - public void gatewayIdTest() { - // TODO: test gatewayId - } - - /** Test the property 'natServiceId' */ - @Test - public void natServiceIdTest() { - // TODO: test natServiceId - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponseTest.java deleted file mode 100644 index 51317574..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateRouteResponse */ -public class CreateRouteResponseTest { - private final CreateRouteResponse model = new CreateRouteResponse(); - - /** Model tests for CreateRouteResponse */ - @Test - public void testCreateRouteResponse() { - // TODO: test CreateRouteResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTable' */ - @Test - public void routeTableTest() { - // TODO: test routeTable - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequestTest.java deleted file mode 100644 index ad326b10..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateRouteTableRequest */ -public class CreateRouteTableRequestTest { - private final CreateRouteTableRequest model = new CreateRouteTableRequest(); - - /** Model tests for CreateRouteTableRequest */ - @Test - public void testCreateRouteTableRequest() { - // TODO: test CreateRouteTableRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponseTest.java deleted file mode 100644 index a6d144a6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateRouteTableResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateRouteTableResponse */ -public class CreateRouteTableResponseTest { - private final CreateRouteTableResponse model = new CreateRouteTableResponse(); - - /** Model tests for CreateRouteTableResponse */ - @Test - public void testCreateRouteTableResponse() { - // TODO: test CreateRouteTableResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTable' */ - @Test - public void routeTableTest() { - // TODO: test routeTable - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequestTest.java deleted file mode 100644 index da0112b9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSecurityGroupRequest */ -public class CreateSecurityGroupRequestTest { - private final CreateSecurityGroupRequest model = new CreateSecurityGroupRequest(); - - /** Model tests for CreateSecurityGroupRequest */ - @Test - public void testCreateSecurityGroupRequest() { - // TODO: test CreateSecurityGroupRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponseTest.java deleted file mode 100644 index aea0f67b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSecurityGroupResponse */ -public class CreateSecurityGroupResponseTest { - private final CreateSecurityGroupResponse model = new CreateSecurityGroupResponse(); - - /** Model tests for CreateSecurityGroupResponse */ - @Test - public void testCreateSecurityGroupResponse() { - // TODO: test CreateSecurityGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'securityGroup' */ - @Test - public void securityGroupTest() { - // TODO: test securityGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequestTest.java deleted file mode 100644 index 7f37b71b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleRequestTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSecurityGroupRuleRequest */ -public class CreateSecurityGroupRuleRequestTest { - private final CreateSecurityGroupRuleRequest model = new CreateSecurityGroupRuleRequest(); - - /** Model tests for CreateSecurityGroupRuleRequest */ - @Test - public void testCreateSecurityGroupRuleRequest() { - // TODO: test CreateSecurityGroupRuleRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flow' */ - @Test - public void flowTest() { - // TODO: test flow - } - - /** Test the property 'fromPortRange' */ - @Test - public void fromPortRangeTest() { - // TODO: test fromPortRange - } - - /** Test the property 'ipProtocol' */ - @Test - public void ipProtocolTest() { - // TODO: test ipProtocol - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'rules' */ - @Test - public void rulesTest() { - // TODO: test rules - } - - /** Test the property 'securityGroupAccountIdToLink' */ - @Test - public void securityGroupAccountIdToLinkTest() { - // TODO: test securityGroupAccountIdToLink - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupNameToLink' */ - @Test - public void securityGroupNameToLinkTest() { - // TODO: test securityGroupNameToLink - } - - /** Test the property 'toPortRange' */ - @Test - public void toPortRangeTest() { - // TODO: test toPortRange - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponseTest.java deleted file mode 100644 index e7e567f5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSecurityGroupRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSecurityGroupRuleResponse */ -public class CreateSecurityGroupRuleResponseTest { - private final CreateSecurityGroupRuleResponse model = new CreateSecurityGroupRuleResponse(); - - /** Model tests for CreateSecurityGroupRuleResponse */ - @Test - public void testCreateSecurityGroupRuleResponse() { - // TODO: test CreateSecurityGroupRuleResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'securityGroup' */ - @Test - public void securityGroupTest() { - // TODO: test securityGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequestTest.java deleted file mode 100644 index 649e95bd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateRequestTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateServerCertificateRequest */ -public class CreateServerCertificateRequestTest { - private final CreateServerCertificateRequest model = new CreateServerCertificateRequest(); - - /** Model tests for CreateServerCertificateRequest */ - @Test - public void testCreateServerCertificateRequest() { - // TODO: test CreateServerCertificateRequest - } - - /** Test the property 'body' */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** Test the property 'chain' */ - @Test - public void chainTest() { - // TODO: test chain - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'privateKey' */ - @Test - public void privateKeyTest() { - // TODO: test privateKey - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponseTest.java deleted file mode 100644 index d47d059a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateServerCertificateResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateServerCertificateResponse */ -public class CreateServerCertificateResponseTest { - private final CreateServerCertificateResponse model = new CreateServerCertificateResponse(); - - /** Model tests for CreateServerCertificateResponse */ - @Test - public void testCreateServerCertificateResponse() { - // TODO: test CreateServerCertificateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'serverCertificate' */ - @Test - public void serverCertificateTest() { - // TODO: test serverCertificate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequestTest.java deleted file mode 100644 index db789e4e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSnapshotExportTaskRequest */ -public class CreateSnapshotExportTaskRequestTest { - private final CreateSnapshotExportTaskRequest model = new CreateSnapshotExportTaskRequest(); - - /** Model tests for CreateSnapshotExportTaskRequest */ - @Test - public void testCreateSnapshotExportTaskRequest() { - // TODO: test CreateSnapshotExportTaskRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'osuExport' */ - @Test - public void osuExportTest() { - // TODO: test osuExport - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponseTest.java deleted file mode 100644 index 9b8ec823..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotExportTaskResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSnapshotExportTaskResponse */ -public class CreateSnapshotExportTaskResponseTest { - private final CreateSnapshotExportTaskResponse model = new CreateSnapshotExportTaskResponse(); - - /** Model tests for CreateSnapshotExportTaskResponse */ - @Test - public void testCreateSnapshotExportTaskResponse() { - // TODO: test CreateSnapshotExportTaskResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'snapshotExportTask' */ - @Test - public void snapshotExportTaskTest() { - // TODO: test snapshotExportTask - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequestTest.java deleted file mode 100644 index 43c33022..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotRequestTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSnapshotRequest */ -public class CreateSnapshotRequestTest { - private final CreateSnapshotRequest model = new CreateSnapshotRequest(); - - /** Model tests for CreateSnapshotRequest */ - @Test - public void testCreateSnapshotRequest() { - // TODO: test CreateSnapshotRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'fileLocation' */ - @Test - public void fileLocationTest() { - // TODO: test fileLocation - } - - /** Test the property 'snapshotSize' */ - @Test - public void snapshotSizeTest() { - // TODO: test snapshotSize - } - - /** Test the property 'sourceRegionName' */ - @Test - public void sourceRegionNameTest() { - // TODO: test sourceRegionName - } - - /** Test the property 'sourceSnapshotId' */ - @Test - public void sourceSnapshotIdTest() { - // TODO: test sourceSnapshotId - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponseTest.java deleted file mode 100644 index 9907b4b6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSnapshotResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSnapshotResponse */ -public class CreateSnapshotResponseTest { - private final CreateSnapshotResponse model = new CreateSnapshotResponse(); - - /** Model tests for CreateSnapshotResponse */ - @Test - public void testCreateSnapshotResponse() { - // TODO: test CreateSnapshotResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'snapshot' */ - @Test - public void snapshotTest() { - // TODO: test snapshot - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequestTest.java deleted file mode 100644 index 06b5a84f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSubnetRequest */ -public class CreateSubnetRequestTest { - private final CreateSubnetRequest model = new CreateSubnetRequest(); - - /** Model tests for CreateSubnetRequest */ - @Test - public void testCreateSubnetRequest() { - // TODO: test CreateSubnetRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponseTest.java deleted file mode 100644 index a83542ff..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateSubnetResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateSubnetResponse */ -public class CreateSubnetResponseTest { - private final CreateSubnetResponse model = new CreateSubnetResponse(); - - /** Model tests for CreateSubnetResponse */ - @Test - public void testCreateSubnetResponse() { - // TODO: test CreateSubnetResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'subnet' */ - @Test - public void subnetTest() { - // TODO: test subnet - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequestTest.java deleted file mode 100644 index 918f4317..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateTagsRequest */ -public class CreateTagsRequestTest { - private final CreateTagsRequest model = new CreateTagsRequest(); - - /** Model tests for CreateTagsRequest */ - @Test - public void testCreateTagsRequest() { - // TODO: test CreateTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'resourceIds' */ - @Test - public void resourceIdsTest() { - // TODO: test resourceIds - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponseTest.java deleted file mode 100644 index 15571639..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateTagsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateTagsResponse */ -public class CreateTagsResponseTest { - private final CreateTagsResponse model = new CreateTagsResponse(); - - /** Model tests for CreateTagsResponse */ - @Test - public void testCreateTagsResponse() { - // TODO: test CreateTagsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequestTest.java deleted file mode 100644 index 9ade3898..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateUserGroupRequest */ -public class CreateUserGroupRequestTest { - private final CreateUserGroupRequest model = new CreateUserGroupRequest(); - - /** Model tests for CreateUserGroupRequest */ - @Test - public void testCreateUserGroupRequest() { - // TODO: test CreateUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponseTest.java deleted file mode 100644 index 79fdd598..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateUserGroupResponse */ -public class CreateUserGroupResponseTest { - private final CreateUserGroupResponse model = new CreateUserGroupResponse(); - - /** Model tests for CreateUserGroupResponse */ - @Test - public void testCreateUserGroupResponse() { - // TODO: test CreateUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'userGroup' */ - @Test - public void userGroupTest() { - // TODO: test userGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequestTest.java deleted file mode 100644 index 33408054..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateUserRequest */ -public class CreateUserRequestTest { - private final CreateUserRequest model = new CreateUserRequest(); - - /** Model tests for CreateUserRequest */ - @Test - public void testCreateUserRequest() { - // TODO: test CreateUserRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponseTest.java deleted file mode 100644 index ffa02cb8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateUserResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateUserResponse */ -public class CreateUserResponseTest { - private final CreateUserResponse model = new CreateUserResponse(); - - /** Model tests for CreateUserResponse */ - @Test - public void testCreateUserResponse() { - // TODO: test CreateUserResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'user' */ - @Test - public void userTest() { - // TODO: test user - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequestTest.java deleted file mode 100644 index b5af5eae..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVirtualGatewayRequest */ -public class CreateVirtualGatewayRequestTest { - private final CreateVirtualGatewayRequest model = new CreateVirtualGatewayRequest(); - - /** Model tests for CreateVirtualGatewayRequest */ - @Test - public void testCreateVirtualGatewayRequest() { - // TODO: test CreateVirtualGatewayRequest - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponseTest.java deleted file mode 100644 index f185449e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVirtualGatewayResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVirtualGatewayResponse */ -public class CreateVirtualGatewayResponseTest { - private final CreateVirtualGatewayResponse model = new CreateVirtualGatewayResponse(); - - /** Model tests for CreateVirtualGatewayResponse */ - @Test - public void testCreateVirtualGatewayResponse() { - // TODO: test CreateVirtualGatewayResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'virtualGateway' */ - @Test - public void virtualGatewayTest() { - // TODO: test virtualGateway - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequestTest.java deleted file mode 100644 index fd0d6b5b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupRequestTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmGroupRequest */ -public class CreateVmGroupRequestTest { - private final CreateVmGroupRequest model = new CreateVmGroupRequest(); - - /** Model tests for CreateVmGroupRequest */ - @Test - public void testCreateVmGroupRequest() { - // TODO: test CreateVmGroupRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'positioningStrategy' */ - @Test - public void positioningStrategyTest() { - // TODO: test positioningStrategy - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmCount' */ - @Test - public void vmCountTest() { - // TODO: test vmCount - } - - /** Test the property 'vmGroupName' */ - @Test - public void vmGroupNameTest() { - // TODO: test vmGroupName - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponseTest.java deleted file mode 100644 index 15a18a49..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmGroupResponse */ -public class CreateVmGroupResponseTest { - private final CreateVmGroupResponse model = new CreateVmGroupResponse(); - - /** Model tests for CreateVmGroupResponse */ - @Test - public void testCreateVmGroupResponse() { - // TODO: test CreateVmGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmGroup' */ - @Test - public void vmGroupTest() { - // TODO: test vmGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequestTest.java deleted file mode 100644 index c095589f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateRequestTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmTemplateRequest */ -public class CreateVmTemplateRequestTest { - private final CreateVmTemplateRequest model = new CreateVmTemplateRequest(); - - /** Model tests for CreateVmTemplateRequest */ - @Test - public void testCreateVmTemplateRequest() { - // TODO: test CreateVmTemplateRequest - } - - /** Test the property 'cpuCores' */ - @Test - public void cpuCoresTest() { - // TODO: test cpuCores - } - - /** Test the property 'cpuGeneration' */ - @Test - public void cpuGenerationTest() { - // TODO: test cpuGeneration - } - - /** Test the property 'cpuPerformance' */ - @Test - public void cpuPerformanceTest() { - // TODO: test cpuPerformance - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'ram' */ - @Test - public void ramTest() { - // TODO: test ram - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmTemplateName' */ - @Test - public void vmTemplateNameTest() { - // TODO: test vmTemplateName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponseTest.java deleted file mode 100644 index 9544ac7f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmTemplateResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmTemplateResponse */ -public class CreateVmTemplateResponseTest { - private final CreateVmTemplateResponse model = new CreateVmTemplateResponse(); - - /** Model tests for CreateVmTemplateResponse */ - @Test - public void testCreateVmTemplateResponse() { - // TODO: test CreateVmTemplateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmTemplate' */ - @Test - public void vmTemplateTest() { - // TODO: test vmTemplate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequestTest.java deleted file mode 100644 index 825eebcf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsRequestTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmsRequest */ -public class CreateVmsRequestTest { - private final CreateVmsRequest model = new CreateVmsRequest(); - - /** Model tests for CreateVmsRequest */ - @Test - public void testCreateVmsRequest() { - // TODO: test CreateVmsRequest - } - - /** Test the property 'blockDeviceMappings' */ - @Test - public void blockDeviceMappingsTest() { - // TODO: test blockDeviceMappings - } - - /** Test the property 'bootOnCreation' */ - @Test - public void bootOnCreationTest() { - // TODO: test bootOnCreation - } - - /** Test the property 'bsuOptimized' */ - @Test - public void bsuOptimizedTest() { - // TODO: test bsuOptimized - } - - /** Test the property 'clientToken' */ - @Test - public void clientTokenTest() { - // TODO: test clientToken - } - - /** Test the property 'deletionProtection' */ - @Test - public void deletionProtectionTest() { - // TODO: test deletionProtection - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'maxVmsCount' */ - @Test - public void maxVmsCountTest() { - // TODO: test maxVmsCount - } - - /** Test the property 'minVmsCount' */ - @Test - public void minVmsCountTest() { - // TODO: test minVmsCount - } - - /** Test the property 'nestedVirtualization' */ - @Test - public void nestedVirtualizationTest() { - // TODO: test nestedVirtualization - } - - /** Test the property 'nics' */ - @Test - public void nicsTest() { - // TODO: test nics - } - - /** Test the property 'performance' */ - @Test - public void performanceTest() { - // TODO: test performance - } - - /** Test the property 'placement' */ - @Test - public void placementTest() { - // TODO: test placement - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'userData' */ - @Test - public void userDataTest() { - // TODO: test userData - } - - /** Test the property 'vmInitiatedShutdownBehavior' */ - @Test - public void vmInitiatedShutdownBehaviorTest() { - // TODO: test vmInitiatedShutdownBehavior - } - - /** Test the property 'vmType' */ - @Test - public void vmTypeTest() { - // TODO: test vmType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponseTest.java deleted file mode 100644 index d9952a74..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVmsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVmsResponse */ -public class CreateVmsResponseTest { - private final CreateVmsResponse model = new CreateVmsResponse(); - - /** Model tests for CreateVmsResponse */ - @Test - public void testCreateVmsResponse() { - // TODO: test CreateVmsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vms' */ - @Test - public void vmsTest() { - // TODO: test vms - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequestTest.java deleted file mode 100644 index 92e2150b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeRequestTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVolumeRequest */ -public class CreateVolumeRequestTest { - private final CreateVolumeRequest model = new CreateVolumeRequest(); - - /** Model tests for CreateVolumeRequest */ - @Test - public void testCreateVolumeRequest() { - // TODO: test CreateVolumeRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'iops' */ - @Test - public void iopsTest() { - // TODO: test iops - } - - /** Test the property 'size' */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'volumeType' */ - @Test - public void volumeTypeTest() { - // TODO: test volumeType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponseTest.java deleted file mode 100644 index 6cd0b076..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVolumeResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVolumeResponse */ -public class CreateVolumeResponseTest { - private final CreateVolumeResponse model = new CreateVolumeResponse(); - - /** Model tests for CreateVolumeResponse */ - @Test - public void testCreateVolumeResponse() { - // TODO: test CreateVolumeResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'volume' */ - @Test - public void volumeTest() { - // TODO: test volume - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequestTest.java deleted file mode 100644 index c37539b7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVpnConnectionRequest */ -public class CreateVpnConnectionRequestTest { - private final CreateVpnConnectionRequest model = new CreateVpnConnectionRequest(); - - /** Model tests for CreateVpnConnectionRequest */ - @Test - public void testCreateVpnConnectionRequest() { - // TODO: test CreateVpnConnectionRequest - } - - /** Test the property 'clientGatewayId' */ - @Test - public void clientGatewayIdTest() { - // TODO: test clientGatewayId - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'staticRoutesOnly' */ - @Test - public void staticRoutesOnlyTest() { - // TODO: test staticRoutesOnly - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponseTest.java deleted file mode 100644 index 1a384273..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVpnConnectionResponse */ -public class CreateVpnConnectionResponseTest { - private final CreateVpnConnectionResponse model = new CreateVpnConnectionResponse(); - - /** Model tests for CreateVpnConnectionResponse */ - @Test - public void testCreateVpnConnectionResponse() { - // TODO: test CreateVpnConnectionResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vpnConnection' */ - @Test - public void vpnConnectionTest() { - // TODO: test vpnConnection - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequestTest.java deleted file mode 100644 index 119744b4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVpnConnectionRouteRequest */ -public class CreateVpnConnectionRouteRequestTest { - private final CreateVpnConnectionRouteRequest model = new CreateVpnConnectionRouteRequest(); - - /** Model tests for CreateVpnConnectionRouteRequest */ - @Test - public void testCreateVpnConnectionRouteRequest() { - // TODO: test CreateVpnConnectionRouteRequest - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vpnConnectionId' */ - @Test - public void vpnConnectionIdTest() { - // TODO: test vpnConnectionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponseTest.java deleted file mode 100644 index 93e3d5a3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/CreateVpnConnectionRouteResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateVpnConnectionRouteResponse */ -public class CreateVpnConnectionRouteResponseTest { - private final CreateVpnConnectionRouteResponse model = new CreateVpnConnectionRouteResponse(); - - /** Model tests for CreateVpnConnectionRouteResponse */ - @Test - public void testCreateVpnConnectionRouteResponse() { - // TODO: test CreateVpnConnectionRouteResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroupTest.java deleted file mode 100644 index 2cb53b4f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DedicatedGroupTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DedicatedGroup */ -public class DedicatedGroupTest { - private final DedicatedGroup model = new DedicatedGroup(); - - /** Model tests for DedicatedGroup */ - @Test - public void testDedicatedGroup() { - // TODO: test DedicatedGroup - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'cpuGeneration' */ - @Test - public void cpuGenerationTest() { - // TODO: test cpuGeneration - } - - /** Test the property 'dedicatedGroupId' */ - @Test - public void dedicatedGroupIdTest() { - // TODO: test dedicatedGroupId - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequestTest.java deleted file mode 100644 index a1754826..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteAccessKeyRequest */ -public class DeleteAccessKeyRequestTest { - private final DeleteAccessKeyRequest model = new DeleteAccessKeyRequest(); - - /** Model tests for DeleteAccessKeyRequest */ - @Test - public void testDeleteAccessKeyRequest() { - // TODO: test DeleteAccessKeyRequest - } - - /** Test the property 'accessKeyId' */ - @Test - public void accessKeyIdTest() { - // TODO: test accessKeyId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponseTest.java deleted file mode 100644 index 6ac35264..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteAccessKeyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteAccessKeyResponse */ -public class DeleteAccessKeyResponseTest { - private final DeleteAccessKeyResponse model = new DeleteAccessKeyResponse(); - - /** Model tests for DeleteAccessKeyResponse */ - @Test - public void testDeleteAccessKeyResponse() { - // TODO: test DeleteAccessKeyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequestTest.java deleted file mode 100644 index 4c937856..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteApiAccessRuleRequest */ -public class DeleteApiAccessRuleRequestTest { - private final DeleteApiAccessRuleRequest model = new DeleteApiAccessRuleRequest(); - - /** Model tests for DeleteApiAccessRuleRequest */ - @Test - public void testDeleteApiAccessRuleRequest() { - // TODO: test DeleteApiAccessRuleRequest - } - - /** Test the property 'apiAccessRuleId' */ - @Test - public void apiAccessRuleIdTest() { - // TODO: test apiAccessRuleId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponseTest.java deleted file mode 100644 index 9d678b89..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteApiAccessRuleResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteApiAccessRuleResponse */ -public class DeleteApiAccessRuleResponseTest { - private final DeleteApiAccessRuleResponse model = new DeleteApiAccessRuleResponse(); - - /** Model tests for DeleteApiAccessRuleResponse */ - @Test - public void testDeleteApiAccessRuleResponse() { - // TODO: test DeleteApiAccessRuleResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequestTest.java deleted file mode 100644 index e75c4dfe..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteCaRequest */ -public class DeleteCaRequestTest { - private final DeleteCaRequest model = new DeleteCaRequest(); - - /** Model tests for DeleteCaRequest */ - @Test - public void testDeleteCaRequest() { - // TODO: test DeleteCaRequest - } - - /** Test the property 'caId' */ - @Test - public void caIdTest() { - // TODO: test caId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponseTest.java deleted file mode 100644 index fef66d69..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteCaResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteCaResponse */ -public class DeleteCaResponseTest { - private final DeleteCaResponse model = new DeleteCaResponse(); - - /** Model tests for DeleteCaResponse */ - @Test - public void testDeleteCaResponse() { - // TODO: test DeleteCaResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequestTest.java deleted file mode 100644 index 4e567fcb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteClientGatewayRequest */ -public class DeleteClientGatewayRequestTest { - private final DeleteClientGatewayRequest model = new DeleteClientGatewayRequest(); - - /** Model tests for DeleteClientGatewayRequest */ - @Test - public void testDeleteClientGatewayRequest() { - // TODO: test DeleteClientGatewayRequest - } - - /** Test the property 'clientGatewayId' */ - @Test - public void clientGatewayIdTest() { - // TODO: test clientGatewayId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponseTest.java deleted file mode 100644 index 03c3fd9c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteClientGatewayResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteClientGatewayResponse */ -public class DeleteClientGatewayResponseTest { - private final DeleteClientGatewayResponse model = new DeleteClientGatewayResponse(); - - /** Model tests for DeleteClientGatewayResponse */ - @Test - public void testDeleteClientGatewayResponse() { - // TODO: test DeleteClientGatewayResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequestTest.java deleted file mode 100644 index 734cb593..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDedicatedGroupRequest */ -public class DeleteDedicatedGroupRequestTest { - private final DeleteDedicatedGroupRequest model = new DeleteDedicatedGroupRequest(); - - /** Model tests for DeleteDedicatedGroupRequest */ - @Test - public void testDeleteDedicatedGroupRequest() { - // TODO: test DeleteDedicatedGroupRequest - } - - /** Test the property 'dedicatedGroupId' */ - @Test - public void dedicatedGroupIdTest() { - // TODO: test dedicatedGroupId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'force' */ - @Test - public void forceTest() { - // TODO: test force - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponseTest.java deleted file mode 100644 index 16ddb075..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDedicatedGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDedicatedGroupResponse */ -public class DeleteDedicatedGroupResponseTest { - private final DeleteDedicatedGroupResponse model = new DeleteDedicatedGroupResponse(); - - /** Model tests for DeleteDedicatedGroupResponse */ - @Test - public void testDeleteDedicatedGroupResponse() { - // TODO: test DeleteDedicatedGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequestTest.java deleted file mode 100644 index 400ca7e9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDhcpOptionsRequest */ -public class DeleteDhcpOptionsRequestTest { - private final DeleteDhcpOptionsRequest model = new DeleteDhcpOptionsRequest(); - - /** Model tests for DeleteDhcpOptionsRequest */ - @Test - public void testDeleteDhcpOptionsRequest() { - // TODO: test DeleteDhcpOptionsRequest - } - - /** Test the property 'dhcpOptionsSetId' */ - @Test - public void dhcpOptionsSetIdTest() { - // TODO: test dhcpOptionsSetId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponseTest.java deleted file mode 100644 index b580bb74..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDhcpOptionsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDhcpOptionsResponse */ -public class DeleteDhcpOptionsResponseTest { - private final DeleteDhcpOptionsResponse model = new DeleteDhcpOptionsResponse(); - - /** Model tests for DeleteDhcpOptionsResponse */ - @Test - public void testDeleteDhcpOptionsResponse() { - // TODO: test DeleteDhcpOptionsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequestTest.java deleted file mode 100644 index c931513b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDirectLinkInterfaceRequest */ -public class DeleteDirectLinkInterfaceRequestTest { - private final DeleteDirectLinkInterfaceRequest model = new DeleteDirectLinkInterfaceRequest(); - - /** Model tests for DeleteDirectLinkInterfaceRequest */ - @Test - public void testDeleteDirectLinkInterfaceRequest() { - // TODO: test DeleteDirectLinkInterfaceRequest - } - - /** Test the property 'directLinkInterfaceId' */ - @Test - public void directLinkInterfaceIdTest() { - // TODO: test directLinkInterfaceId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponseTest.java deleted file mode 100644 index 3c6ebdc8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkInterfaceResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDirectLinkInterfaceResponse */ -public class DeleteDirectLinkInterfaceResponseTest { - private final DeleteDirectLinkInterfaceResponse model = new DeleteDirectLinkInterfaceResponse(); - - /** Model tests for DeleteDirectLinkInterfaceResponse */ - @Test - public void testDeleteDirectLinkInterfaceResponse() { - // TODO: test DeleteDirectLinkInterfaceResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequestTest.java deleted file mode 100644 index 61b8e0fa..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDirectLinkRequest */ -public class DeleteDirectLinkRequestTest { - private final DeleteDirectLinkRequest model = new DeleteDirectLinkRequest(); - - /** Model tests for DeleteDirectLinkRequest */ - @Test - public void testDeleteDirectLinkRequest() { - // TODO: test DeleteDirectLinkRequest - } - - /** Test the property 'directLinkId' */ - @Test - public void directLinkIdTest() { - // TODO: test directLinkId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponseTest.java deleted file mode 100644 index b0e2dd57..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteDirectLinkResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteDirectLinkResponse */ -public class DeleteDirectLinkResponseTest { - private final DeleteDirectLinkResponse model = new DeleteDirectLinkResponse(); - - /** Model tests for DeleteDirectLinkResponse */ - @Test - public void testDeleteDirectLinkResponse() { - // TODO: test DeleteDirectLinkResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequestTest.java deleted file mode 100644 index 4a6ece13..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteExportTaskRequest */ -public class DeleteExportTaskRequestTest { - private final DeleteExportTaskRequest model = new DeleteExportTaskRequest(); - - /** Model tests for DeleteExportTaskRequest */ - @Test - public void testDeleteExportTaskRequest() { - // TODO: test DeleteExportTaskRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'exportTaskId' */ - @Test - public void exportTaskIdTest() { - // TODO: test exportTaskId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponseTest.java deleted file mode 100644 index 8b31b0d4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteExportTaskResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteExportTaskResponse */ -public class DeleteExportTaskResponseTest { - private final DeleteExportTaskResponse model = new DeleteExportTaskResponse(); - - /** Model tests for DeleteExportTaskResponse */ - @Test - public void testDeleteExportTaskResponse() { - // TODO: test DeleteExportTaskResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequestTest.java deleted file mode 100644 index 1564279a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteFlexibleGpuRequest */ -public class DeleteFlexibleGpuRequestTest { - private final DeleteFlexibleGpuRequest model = new DeleteFlexibleGpuRequest(); - - /** Model tests for DeleteFlexibleGpuRequest */ - @Test - public void testDeleteFlexibleGpuRequest() { - // TODO: test DeleteFlexibleGpuRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flexibleGpuId' */ - @Test - public void flexibleGpuIdTest() { - // TODO: test flexibleGpuId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponseTest.java deleted file mode 100644 index ade1a410..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteFlexibleGpuResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteFlexibleGpuResponse */ -public class DeleteFlexibleGpuResponseTest { - private final DeleteFlexibleGpuResponse model = new DeleteFlexibleGpuResponse(); - - /** Model tests for DeleteFlexibleGpuResponse */ - @Test - public void testDeleteFlexibleGpuResponse() { - // TODO: test DeleteFlexibleGpuResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequestTest.java deleted file mode 100644 index 72e65170..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteImageRequest */ -public class DeleteImageRequestTest { - private final DeleteImageRequest model = new DeleteImageRequest(); - - /** Model tests for DeleteImageRequest */ - @Test - public void testDeleteImageRequest() { - // TODO: test DeleteImageRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponseTest.java deleted file mode 100644 index 414716e5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteImageResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteImageResponse */ -public class DeleteImageResponseTest { - private final DeleteImageResponse model = new DeleteImageResponse(); - - /** Model tests for DeleteImageResponse */ - @Test - public void testDeleteImageResponse() { - // TODO: test DeleteImageResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequestTest.java deleted file mode 100644 index 8971919e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteInternetServiceRequest */ -public class DeleteInternetServiceRequestTest { - private final DeleteInternetServiceRequest model = new DeleteInternetServiceRequest(); - - /** Model tests for DeleteInternetServiceRequest */ - @Test - public void testDeleteInternetServiceRequest() { - // TODO: test DeleteInternetServiceRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'internetServiceId' */ - @Test - public void internetServiceIdTest() { - // TODO: test internetServiceId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponseTest.java deleted file mode 100644 index 0993af04..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteInternetServiceResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteInternetServiceResponse */ -public class DeleteInternetServiceResponseTest { - private final DeleteInternetServiceResponse model = new DeleteInternetServiceResponse(); - - /** Model tests for DeleteInternetServiceResponse */ - @Test - public void testDeleteInternetServiceResponse() { - // TODO: test DeleteInternetServiceResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequestTest.java deleted file mode 100644 index c06a3bea..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteKeypairRequest */ -public class DeleteKeypairRequestTest { - private final DeleteKeypairRequest model = new DeleteKeypairRequest(); - - /** Model tests for DeleteKeypairRequest */ - @Test - public void testDeleteKeypairRequest() { - // TODO: test DeleteKeypairRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponseTest.java deleted file mode 100644 index 885bcd11..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteKeypairResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteKeypairResponse */ -public class DeleteKeypairResponseTest { - private final DeleteKeypairResponse model = new DeleteKeypairResponse(); - - /** Model tests for DeleteKeypairResponse */ - @Test - public void testDeleteKeypairResponse() { - // TODO: test DeleteKeypairResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequestTest.java deleted file mode 100644 index eac8dca8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteListenerRuleRequest */ -public class DeleteListenerRuleRequestTest { - private final DeleteListenerRuleRequest model = new DeleteListenerRuleRequest(); - - /** Model tests for DeleteListenerRuleRequest */ - @Test - public void testDeleteListenerRuleRequest() { - // TODO: test DeleteListenerRuleRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'listenerRuleName' */ - @Test - public void listenerRuleNameTest() { - // TODO: test listenerRuleName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponseTest.java deleted file mode 100644 index 0c2fdd2e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteListenerRuleResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteListenerRuleResponse */ -public class DeleteListenerRuleResponseTest { - private final DeleteListenerRuleResponse model = new DeleteListenerRuleResponse(); - - /** Model tests for DeleteListenerRuleResponse */ - @Test - public void testDeleteListenerRuleResponse() { - // TODO: test DeleteListenerRuleResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequestTest.java deleted file mode 100644 index ce697639..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerListenersRequest */ -public class DeleteLoadBalancerListenersRequestTest { - private final DeleteLoadBalancerListenersRequest model = - new DeleteLoadBalancerListenersRequest(); - - /** Model tests for DeleteLoadBalancerListenersRequest */ - @Test - public void testDeleteLoadBalancerListenersRequest() { - // TODO: test DeleteLoadBalancerListenersRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'loadBalancerPorts' */ - @Test - public void loadBalancerPortsTest() { - // TODO: test loadBalancerPorts - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponseTest.java deleted file mode 100644 index cd80dbed..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerListenersResponseTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerListenersResponse */ -public class DeleteLoadBalancerListenersResponseTest { - private final DeleteLoadBalancerListenersResponse model = - new DeleteLoadBalancerListenersResponse(); - - /** Model tests for DeleteLoadBalancerListenersResponse */ - @Test - public void testDeleteLoadBalancerListenersResponse() { - // TODO: test DeleteLoadBalancerListenersResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequestTest.java deleted file mode 100644 index 61e2d58f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerPolicyRequest */ -public class DeleteLoadBalancerPolicyRequestTest { - private final DeleteLoadBalancerPolicyRequest model = new DeleteLoadBalancerPolicyRequest(); - - /** Model tests for DeleteLoadBalancerPolicyRequest */ - @Test - public void testDeleteLoadBalancerPolicyRequest() { - // TODO: test DeleteLoadBalancerPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponseTest.java deleted file mode 100644 index e52a8d94..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerPolicyResponse */ -public class DeleteLoadBalancerPolicyResponseTest { - private final DeleteLoadBalancerPolicyResponse model = new DeleteLoadBalancerPolicyResponse(); - - /** Model tests for DeleteLoadBalancerPolicyResponse */ - @Test - public void testDeleteLoadBalancerPolicyResponse() { - // TODO: test DeleteLoadBalancerPolicyResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequestTest.java deleted file mode 100644 index 92039c2d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerRequest */ -public class DeleteLoadBalancerRequestTest { - private final DeleteLoadBalancerRequest model = new DeleteLoadBalancerRequest(); - - /** Model tests for DeleteLoadBalancerRequest */ - @Test - public void testDeleteLoadBalancerRequest() { - // TODO: test DeleteLoadBalancerRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponseTest.java deleted file mode 100644 index a4e84569..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerResponse */ -public class DeleteLoadBalancerResponseTest { - private final DeleteLoadBalancerResponse model = new DeleteLoadBalancerResponse(); - - /** Model tests for DeleteLoadBalancerResponse */ - @Test - public void testDeleteLoadBalancerResponse() { - // TODO: test DeleteLoadBalancerResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequestTest.java deleted file mode 100644 index c08388a2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerTagsRequest */ -public class DeleteLoadBalancerTagsRequestTest { - private final DeleteLoadBalancerTagsRequest model = new DeleteLoadBalancerTagsRequest(); - - /** Model tests for DeleteLoadBalancerTagsRequest */ - @Test - public void testDeleteLoadBalancerTagsRequest() { - // TODO: test DeleteLoadBalancerTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerNames' */ - @Test - public void loadBalancerNamesTest() { - // TODO: test loadBalancerNames - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponseTest.java deleted file mode 100644 index ea84facf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteLoadBalancerTagsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteLoadBalancerTagsResponse */ -public class DeleteLoadBalancerTagsResponseTest { - private final DeleteLoadBalancerTagsResponse model = new DeleteLoadBalancerTagsResponse(); - - /** Model tests for DeleteLoadBalancerTagsResponse */ - @Test - public void testDeleteLoadBalancerTagsResponse() { - // TODO: test DeleteLoadBalancerTagsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequestTest.java deleted file mode 100644 index d7031f53..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNatServiceRequest */ -public class DeleteNatServiceRequestTest { - private final DeleteNatServiceRequest model = new DeleteNatServiceRequest(); - - /** Model tests for DeleteNatServiceRequest */ - @Test - public void testDeleteNatServiceRequest() { - // TODO: test DeleteNatServiceRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'natServiceId' */ - @Test - public void natServiceIdTest() { - // TODO: test natServiceId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponseTest.java deleted file mode 100644 index 561ef70e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNatServiceResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNatServiceResponse */ -public class DeleteNatServiceResponseTest { - private final DeleteNatServiceResponse model = new DeleteNatServiceResponse(); - - /** Model tests for DeleteNatServiceResponse */ - @Test - public void testDeleteNatServiceResponse() { - // TODO: test DeleteNatServiceResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequestTest.java deleted file mode 100644 index fef665cb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetAccessPointRequest */ -public class DeleteNetAccessPointRequestTest { - private final DeleteNetAccessPointRequest model = new DeleteNetAccessPointRequest(); - - /** Model tests for DeleteNetAccessPointRequest */ - @Test - public void testDeleteNetAccessPointRequest() { - // TODO: test DeleteNetAccessPointRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netAccessPointId' */ - @Test - public void netAccessPointIdTest() { - // TODO: test netAccessPointId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponseTest.java deleted file mode 100644 index 0fca36b2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetAccessPointResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetAccessPointResponse */ -public class DeleteNetAccessPointResponseTest { - private final DeleteNetAccessPointResponse model = new DeleteNetAccessPointResponse(); - - /** Model tests for DeleteNetAccessPointResponse */ - @Test - public void testDeleteNetAccessPointResponse() { - // TODO: test DeleteNetAccessPointResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequestTest.java deleted file mode 100644 index 35900200..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetPeeringRequest */ -public class DeleteNetPeeringRequestTest { - private final DeleteNetPeeringRequest model = new DeleteNetPeeringRequest(); - - /** Model tests for DeleteNetPeeringRequest */ - @Test - public void testDeleteNetPeeringRequest() { - // TODO: test DeleteNetPeeringRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponseTest.java deleted file mode 100644 index 0fefa1de..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetPeeringResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetPeeringResponse */ -public class DeleteNetPeeringResponseTest { - private final DeleteNetPeeringResponse model = new DeleteNetPeeringResponse(); - - /** Model tests for DeleteNetPeeringResponse */ - @Test - public void testDeleteNetPeeringResponse() { - // TODO: test DeleteNetPeeringResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequestTest.java deleted file mode 100644 index 21342df7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetRequest */ -public class DeleteNetRequestTest { - private final DeleteNetRequest model = new DeleteNetRequest(); - - /** Model tests for DeleteNetRequest */ - @Test - public void testDeleteNetRequest() { - // TODO: test DeleteNetRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponseTest.java deleted file mode 100644 index a56cea20..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNetResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNetResponse */ -public class DeleteNetResponseTest { - private final DeleteNetResponse model = new DeleteNetResponse(); - - /** Model tests for DeleteNetResponse */ - @Test - public void testDeleteNetResponse() { - // TODO: test DeleteNetResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequestTest.java deleted file mode 100644 index ba28600e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNicRequest */ -public class DeleteNicRequestTest { - private final DeleteNicRequest model = new DeleteNicRequest(); - - /** Model tests for DeleteNicRequest */ - @Test - public void testDeleteNicRequest() { - // TODO: test DeleteNicRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponseTest.java deleted file mode 100644 index e5029192..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteNicResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteNicResponse */ -public class DeleteNicResponseTest { - private final DeleteNicResponse model = new DeleteNicResponse(); - - /** Model tests for DeleteNicResponse */ - @Test - public void testDeleteNicResponse() { - // TODO: test DeleteNicResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequestTest.java deleted file mode 100644 index f3081fc4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePolicyRequest */ -public class DeletePolicyRequestTest { - private final DeletePolicyRequest model = new DeletePolicyRequest(); - - /** Model tests for DeletePolicyRequest */ - @Test - public void testDeletePolicyRequest() { - // TODO: test DeletePolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponseTest.java deleted file mode 100644 index faa18bc8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePolicyResponse */ -public class DeletePolicyResponseTest { - private final DeletePolicyResponse model = new DeletePolicyResponse(); - - /** Model tests for DeletePolicyResponse */ - @Test - public void testDeletePolicyResponse() { - // TODO: test DeletePolicyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequestTest.java deleted file mode 100644 index 69722832..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePolicyVersionRequest */ -public class DeletePolicyVersionRequestTest { - private final DeletePolicyVersionRequest model = new DeletePolicyVersionRequest(); - - /** Model tests for DeletePolicyVersionRequest */ - @Test - public void testDeletePolicyVersionRequest() { - // TODO: test DeletePolicyVersionRequest - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'versionId' */ - @Test - public void versionIdTest() { - // TODO: test versionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponseTest.java deleted file mode 100644 index 6c0af157..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePolicyVersionResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePolicyVersionResponse */ -public class DeletePolicyVersionResponseTest { - private final DeletePolicyVersionResponse model = new DeletePolicyVersionResponse(); - - /** Model tests for DeletePolicyVersionResponse */ - @Test - public void testDeletePolicyVersionResponse() { - // TODO: test DeletePolicyVersionResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequestTest.java deleted file mode 100644 index 29a38fc7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePublicIpRequest */ -public class DeletePublicIpRequestTest { - private final DeletePublicIpRequest model = new DeletePublicIpRequest(); - - /** Model tests for DeletePublicIpRequest */ - @Test - public void testDeletePublicIpRequest() { - // TODO: test DeletePublicIpRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponseTest.java deleted file mode 100644 index 36608327..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeletePublicIpResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeletePublicIpResponse */ -public class DeletePublicIpResponseTest { - private final DeletePublicIpResponse model = new DeletePublicIpResponse(); - - /** Model tests for DeletePublicIpResponse */ - @Test - public void testDeletePublicIpResponse() { - // TODO: test DeletePublicIpResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequestTest.java deleted file mode 100644 index 48a97832..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteRouteRequest */ -public class DeleteRouteRequestTest { - private final DeleteRouteRequest model = new DeleteRouteRequest(); - - /** Model tests for DeleteRouteRequest */ - @Test - public void testDeleteRouteRequest() { - // TODO: test DeleteRouteRequest - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponseTest.java deleted file mode 100644 index c7034aab..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteRouteResponse */ -public class DeleteRouteResponseTest { - private final DeleteRouteResponse model = new DeleteRouteResponse(); - - /** Model tests for DeleteRouteResponse */ - @Test - public void testDeleteRouteResponse() { - // TODO: test DeleteRouteResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTable' */ - @Test - public void routeTableTest() { - // TODO: test routeTable - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequestTest.java deleted file mode 100644 index 61d58f30..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteRouteTableRequest */ -public class DeleteRouteTableRequestTest { - private final DeleteRouteTableRequest model = new DeleteRouteTableRequest(); - - /** Model tests for DeleteRouteTableRequest */ - @Test - public void testDeleteRouteTableRequest() { - // TODO: test DeleteRouteTableRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponseTest.java deleted file mode 100644 index d8ef0e85..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteRouteTableResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteRouteTableResponse */ -public class DeleteRouteTableResponseTest { - private final DeleteRouteTableResponse model = new DeleteRouteTableResponse(); - - /** Model tests for DeleteRouteTableResponse */ - @Test - public void testDeleteRouteTableResponse() { - // TODO: test DeleteRouteTableResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequestTest.java deleted file mode 100644 index bb6accde..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSecurityGroupRequest */ -public class DeleteSecurityGroupRequestTest { - private final DeleteSecurityGroupRequest model = new DeleteSecurityGroupRequest(); - - /** Model tests for DeleteSecurityGroupRequest */ - @Test - public void testDeleteSecurityGroupRequest() { - // TODO: test DeleteSecurityGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponseTest.java deleted file mode 100644 index d58a9a77..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSecurityGroupResponse */ -public class DeleteSecurityGroupResponseTest { - private final DeleteSecurityGroupResponse model = new DeleteSecurityGroupResponse(); - - /** Model tests for DeleteSecurityGroupResponse */ - @Test - public void testDeleteSecurityGroupResponse() { - // TODO: test DeleteSecurityGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequestTest.java deleted file mode 100644 index 91cd8a8c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleRequestTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSecurityGroupRuleRequest */ -public class DeleteSecurityGroupRuleRequestTest { - private final DeleteSecurityGroupRuleRequest model = new DeleteSecurityGroupRuleRequest(); - - /** Model tests for DeleteSecurityGroupRuleRequest */ - @Test - public void testDeleteSecurityGroupRuleRequest() { - // TODO: test DeleteSecurityGroupRuleRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flow' */ - @Test - public void flowTest() { - // TODO: test flow - } - - /** Test the property 'fromPortRange' */ - @Test - public void fromPortRangeTest() { - // TODO: test fromPortRange - } - - /** Test the property 'ipProtocol' */ - @Test - public void ipProtocolTest() { - // TODO: test ipProtocol - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'rules' */ - @Test - public void rulesTest() { - // TODO: test rules - } - - /** Test the property 'securityGroupAccountIdToUnlink' */ - @Test - public void securityGroupAccountIdToUnlinkTest() { - // TODO: test securityGroupAccountIdToUnlink - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupNameToUnlink' */ - @Test - public void securityGroupNameToUnlinkTest() { - // TODO: test securityGroupNameToUnlink - } - - /** Test the property 'toPortRange' */ - @Test - public void toPortRangeTest() { - // TODO: test toPortRange - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponseTest.java deleted file mode 100644 index 6a44af1b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSecurityGroupRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSecurityGroupRuleResponse */ -public class DeleteSecurityGroupRuleResponseTest { - private final DeleteSecurityGroupRuleResponse model = new DeleteSecurityGroupRuleResponse(); - - /** Model tests for DeleteSecurityGroupRuleResponse */ - @Test - public void testDeleteSecurityGroupRuleResponse() { - // TODO: test DeleteSecurityGroupRuleResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'securityGroup' */ - @Test - public void securityGroupTest() { - // TODO: test securityGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequestTest.java deleted file mode 100644 index 996b3e11..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteServerCertificateRequest */ -public class DeleteServerCertificateRequestTest { - private final DeleteServerCertificateRequest model = new DeleteServerCertificateRequest(); - - /** Model tests for DeleteServerCertificateRequest */ - @Test - public void testDeleteServerCertificateRequest() { - // TODO: test DeleteServerCertificateRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponseTest.java deleted file mode 100644 index 102c2372..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteServerCertificateResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteServerCertificateResponse */ -public class DeleteServerCertificateResponseTest { - private final DeleteServerCertificateResponse model = new DeleteServerCertificateResponse(); - - /** Model tests for DeleteServerCertificateResponse */ - @Test - public void testDeleteServerCertificateResponse() { - // TODO: test DeleteServerCertificateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequestTest.java deleted file mode 100644 index 7b17df41..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSnapshotRequest */ -public class DeleteSnapshotRequestTest { - private final DeleteSnapshotRequest model = new DeleteSnapshotRequest(); - - /** Model tests for DeleteSnapshotRequest */ - @Test - public void testDeleteSnapshotRequest() { - // TODO: test DeleteSnapshotRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponseTest.java deleted file mode 100644 index 2ffda0df..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSnapshotResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSnapshotResponse */ -public class DeleteSnapshotResponseTest { - private final DeleteSnapshotResponse model = new DeleteSnapshotResponse(); - - /** Model tests for DeleteSnapshotResponse */ - @Test - public void testDeleteSnapshotResponse() { - // TODO: test DeleteSnapshotResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequestTest.java deleted file mode 100644 index 430cc7d0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSubnetRequest */ -public class DeleteSubnetRequestTest { - private final DeleteSubnetRequest model = new DeleteSubnetRequest(); - - /** Model tests for DeleteSubnetRequest */ - @Test - public void testDeleteSubnetRequest() { - // TODO: test DeleteSubnetRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponseTest.java deleted file mode 100644 index 8f109cdd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteSubnetResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteSubnetResponse */ -public class DeleteSubnetResponseTest { - private final DeleteSubnetResponse model = new DeleteSubnetResponse(); - - /** Model tests for DeleteSubnetResponse */ - @Test - public void testDeleteSubnetResponse() { - // TODO: test DeleteSubnetResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequestTest.java deleted file mode 100644 index d1ac9c79..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteTagsRequest */ -public class DeleteTagsRequestTest { - private final DeleteTagsRequest model = new DeleteTagsRequest(); - - /** Model tests for DeleteTagsRequest */ - @Test - public void testDeleteTagsRequest() { - // TODO: test DeleteTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'resourceIds' */ - @Test - public void resourceIdsTest() { - // TODO: test resourceIds - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponseTest.java deleted file mode 100644 index b9e51795..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteTagsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteTagsResponse */ -public class DeleteTagsResponseTest { - private final DeleteTagsResponse model = new DeleteTagsResponse(); - - /** Model tests for DeleteTagsResponse */ - @Test - public void testDeleteTagsResponse() { - // TODO: test DeleteTagsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequestTest.java deleted file mode 100644 index 704d78e3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserGroupPolicyRequest */ -public class DeleteUserGroupPolicyRequestTest { - private final DeleteUserGroupPolicyRequest model = new DeleteUserGroupPolicyRequest(); - - /** Model tests for DeleteUserGroupPolicyRequest */ - @Test - public void testDeleteUserGroupPolicyRequest() { - // TODO: test DeleteUserGroupPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponseTest.java deleted file mode 100644 index 6b828a16..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupPolicyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserGroupPolicyResponse */ -public class DeleteUserGroupPolicyResponseTest { - private final DeleteUserGroupPolicyResponse model = new DeleteUserGroupPolicyResponse(); - - /** Model tests for DeleteUserGroupPolicyResponse */ - @Test - public void testDeleteUserGroupPolicyResponse() { - // TODO: test DeleteUserGroupPolicyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequestTest.java deleted file mode 100644 index 30b21bfc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserGroupRequest */ -public class DeleteUserGroupRequestTest { - private final DeleteUserGroupRequest model = new DeleteUserGroupRequest(); - - /** Model tests for DeleteUserGroupRequest */ - @Test - public void testDeleteUserGroupRequest() { - // TODO: test DeleteUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'force' */ - @Test - public void forceTest() { - // TODO: test force - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponseTest.java deleted file mode 100644 index f45282b8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserGroupResponse */ -public class DeleteUserGroupResponseTest { - private final DeleteUserGroupResponse model = new DeleteUserGroupResponse(); - - /** Model tests for DeleteUserGroupResponse */ - @Test - public void testDeleteUserGroupResponse() { - // TODO: test DeleteUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequestTest.java deleted file mode 100644 index ec2bf36e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserRequest */ -public class DeleteUserRequestTest { - private final DeleteUserRequest model = new DeleteUserRequest(); - - /** Model tests for DeleteUserRequest */ - @Test - public void testDeleteUserRequest() { - // TODO: test DeleteUserRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponseTest.java deleted file mode 100644 index 06aa3c46..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteUserResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteUserResponse */ -public class DeleteUserResponseTest { - private final DeleteUserResponse model = new DeleteUserResponse(); - - /** Model tests for DeleteUserResponse */ - @Test - public void testDeleteUserResponse() { - // TODO: test DeleteUserResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequestTest.java deleted file mode 100644 index 530fcabc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVirtualGatewayRequest */ -public class DeleteVirtualGatewayRequestTest { - private final DeleteVirtualGatewayRequest model = new DeleteVirtualGatewayRequest(); - - /** Model tests for DeleteVirtualGatewayRequest */ - @Test - public void testDeleteVirtualGatewayRequest() { - // TODO: test DeleteVirtualGatewayRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponseTest.java deleted file mode 100644 index 183db1c2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVirtualGatewayResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVirtualGatewayResponse */ -public class DeleteVirtualGatewayResponseTest { - private final DeleteVirtualGatewayResponse model = new DeleteVirtualGatewayResponse(); - - /** Model tests for DeleteVirtualGatewayResponse */ - @Test - public void testDeleteVirtualGatewayResponse() { - // TODO: test DeleteVirtualGatewayResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequestTest.java deleted file mode 100644 index 8c187617..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmGroupRequest */ -public class DeleteVmGroupRequestTest { - private final DeleteVmGroupRequest model = new DeleteVmGroupRequest(); - - /** Model tests for DeleteVmGroupRequest */ - @Test - public void testDeleteVmGroupRequest() { - // TODO: test DeleteVmGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmGroupId' */ - @Test - public void vmGroupIdTest() { - // TODO: test vmGroupId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponseTest.java deleted file mode 100644 index 39b1b097..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmGroupResponse */ -public class DeleteVmGroupResponseTest { - private final DeleteVmGroupResponse model = new DeleteVmGroupResponse(); - - /** Model tests for DeleteVmGroupResponse */ - @Test - public void testDeleteVmGroupResponse() { - // TODO: test DeleteVmGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequestTest.java deleted file mode 100644 index b1b781fa..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmTemplateRequest */ -public class DeleteVmTemplateRequestTest { - private final DeleteVmTemplateRequest model = new DeleteVmTemplateRequest(); - - /** Model tests for DeleteVmTemplateRequest */ - @Test - public void testDeleteVmTemplateRequest() { - // TODO: test DeleteVmTemplateRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponseTest.java deleted file mode 100644 index 0f0d4f72..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmTemplateResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmTemplateResponse */ -public class DeleteVmTemplateResponseTest { - private final DeleteVmTemplateResponse model = new DeleteVmTemplateResponse(); - - /** Model tests for DeleteVmTemplateResponse */ - @Test - public void testDeleteVmTemplateResponse() { - // TODO: test DeleteVmTemplateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequestTest.java deleted file mode 100644 index 2120cbf8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmsRequest */ -public class DeleteVmsRequestTest { - private final DeleteVmsRequest model = new DeleteVmsRequest(); - - /** Model tests for DeleteVmsRequest */ - @Test - public void testDeleteVmsRequest() { - // TODO: test DeleteVmsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponseTest.java deleted file mode 100644 index eaf2e670..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVmsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVmsResponse */ -public class DeleteVmsResponseTest { - private final DeleteVmsResponse model = new DeleteVmsResponse(); - - /** Model tests for DeleteVmsResponse */ - @Test - public void testDeleteVmsResponse() { - // TODO: test DeleteVmsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vms' */ - @Test - public void vmsTest() { - // TODO: test vms - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequestTest.java deleted file mode 100644 index 6099df6c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVolumeRequest */ -public class DeleteVolumeRequestTest { - private final DeleteVolumeRequest model = new DeleteVolumeRequest(); - - /** Model tests for DeleteVolumeRequest */ - @Test - public void testDeleteVolumeRequest() { - // TODO: test DeleteVolumeRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponseTest.java deleted file mode 100644 index fa7ecf14..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVolumeResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVolumeResponse */ -public class DeleteVolumeResponseTest { - private final DeleteVolumeResponse model = new DeleteVolumeResponse(); - - /** Model tests for DeleteVolumeResponse */ - @Test - public void testDeleteVolumeResponse() { - // TODO: test DeleteVolumeResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequestTest.java deleted file mode 100644 index 491c6dc9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVpnConnectionRequest */ -public class DeleteVpnConnectionRequestTest { - private final DeleteVpnConnectionRequest model = new DeleteVpnConnectionRequest(); - - /** Model tests for DeleteVpnConnectionRequest */ - @Test - public void testDeleteVpnConnectionRequest() { - // TODO: test DeleteVpnConnectionRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vpnConnectionId' */ - @Test - public void vpnConnectionIdTest() { - // TODO: test vpnConnectionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponseTest.java deleted file mode 100644 index 69435409..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVpnConnectionResponse */ -public class DeleteVpnConnectionResponseTest { - private final DeleteVpnConnectionResponse model = new DeleteVpnConnectionResponse(); - - /** Model tests for DeleteVpnConnectionResponse */ - @Test - public void testDeleteVpnConnectionResponse() { - // TODO: test DeleteVpnConnectionResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequestTest.java deleted file mode 100644 index da7acd59..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVpnConnectionRouteRequest */ -public class DeleteVpnConnectionRouteRequestTest { - private final DeleteVpnConnectionRouteRequest model = new DeleteVpnConnectionRouteRequest(); - - /** Model tests for DeleteVpnConnectionRouteRequest */ - @Test - public void testDeleteVpnConnectionRouteRequest() { - // TODO: test DeleteVpnConnectionRouteRequest - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vpnConnectionId' */ - @Test - public void vpnConnectionIdTest() { - // TODO: test vpnConnectionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponseTest.java deleted file mode 100644 index 7e8674f5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeleteVpnConnectionRouteResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeleteVpnConnectionRouteResponse */ -public class DeleteVpnConnectionRouteResponseTest { - private final DeleteVpnConnectionRouteResponse model = new DeleteVpnConnectionRouteResponse(); - - /** Model tests for DeleteVpnConnectionRouteResponse */ - @Test - public void testDeleteVpnConnectionRouteResponse() { - // TODO: test DeleteVpnConnectionRouteResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequestTest.java deleted file mode 100644 index 80969c61..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeregisterVmsInLoadBalancerRequest */ -public class DeregisterVmsInLoadBalancerRequestTest { - private final DeregisterVmsInLoadBalancerRequest model = - new DeregisterVmsInLoadBalancerRequest(); - - /** Model tests for DeregisterVmsInLoadBalancerRequest */ - @Test - public void testDeregisterVmsInLoadBalancerRequest() { - // TODO: test DeregisterVmsInLoadBalancerRequest - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponseTest.java deleted file mode 100644 index 9006393f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DeregisterVmsInLoadBalancerResponseTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DeregisterVmsInLoadBalancerResponse */ -public class DeregisterVmsInLoadBalancerResponseTest { - private final DeregisterVmsInLoadBalancerResponse model = - new DeregisterVmsInLoadBalancerResponse(); - - /** Model tests for DeregisterVmsInLoadBalancerResponse */ - @Test - public void testDeregisterVmsInLoadBalancerResponse() { - // TODO: test DeregisterVmsInLoadBalancerResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSetTest.java deleted file mode 100644 index b5d97eab..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DhcpOptionsSetTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DhcpOptionsSet */ -public class DhcpOptionsSetTest { - private final DhcpOptionsSet model = new DhcpOptionsSet(); - - /** Model tests for DhcpOptionsSet */ - @Test - public void testDhcpOptionsSet() { - // TODO: test DhcpOptionsSet - } - - /** Test the property '_default' */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** Test the property 'dhcpOptionsSetId' */ - @Test - public void dhcpOptionsSetIdTest() { - // TODO: test dhcpOptionsSetId - } - - /** Test the property 'domainName' */ - @Test - public void domainNameTest() { - // TODO: test domainName - } - - /** Test the property 'domainNameServers' */ - @Test - public void domainNameServersTest() { - // TODO: test domainNameServers - } - - /** Test the property 'logServers' */ - @Test - public void logServersTest() { - // TODO: test logServers - } - - /** Test the property 'ntpServers' */ - @Test - public void ntpServersTest() { - // TODO: test ntpServers - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaceTest.java deleted file mode 100644 index df34f6a3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfaceTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DirectLinkInterface */ -public class DirectLinkInterfaceTest { - private final DirectLinkInterface model = new DirectLinkInterface(); - - /** Model tests for DirectLinkInterface */ - @Test - public void testDirectLinkInterface() { - // TODO: test DirectLinkInterface - } - - /** Test the property 'bgpAsn' */ - @Test - public void bgpAsnTest() { - // TODO: test bgpAsn - } - - /** Test the property 'bgpKey' */ - @Test - public void bgpKeyTest() { - // TODO: test bgpKey - } - - /** Test the property 'clientPrivateIp' */ - @Test - public void clientPrivateIpTest() { - // TODO: test clientPrivateIp - } - - /** Test the property 'directLinkInterfaceName' */ - @Test - public void directLinkInterfaceNameTest() { - // TODO: test directLinkInterfaceName - } - - /** Test the property 'outscalePrivateIp' */ - @Test - public void outscalePrivateIpTest() { - // TODO: test outscalePrivateIp - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } - - /** Test the property 'vlan' */ - @Test - public void vlanTest() { - // TODO: test vlan - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfacesTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfacesTest.java deleted file mode 100644 index e61fa418..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkInterfacesTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DirectLinkInterfaces */ -public class DirectLinkInterfacesTest { - private final DirectLinkInterfaces model = new DirectLinkInterfaces(); - - /** Model tests for DirectLinkInterfaces */ - @Test - public void testDirectLinkInterfaces() { - // TODO: test DirectLinkInterfaces - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'bgpAsn' */ - @Test - public void bgpAsnTest() { - // TODO: test bgpAsn - } - - /** Test the property 'bgpKey' */ - @Test - public void bgpKeyTest() { - // TODO: test bgpKey - } - - /** Test the property 'clientPrivateIp' */ - @Test - public void clientPrivateIpTest() { - // TODO: test clientPrivateIp - } - - /** Test the property 'directLinkId' */ - @Test - public void directLinkIdTest() { - // TODO: test directLinkId - } - - /** Test the property 'directLinkInterfaceId' */ - @Test - public void directLinkInterfaceIdTest() { - // TODO: test directLinkInterfaceId - } - - /** Test the property 'directLinkInterfaceName' */ - @Test - public void directLinkInterfaceNameTest() { - // TODO: test directLinkInterfaceName - } - - /** Test the property 'interfaceType' */ - @Test - public void interfaceTypeTest() { - // TODO: test interfaceType - } - - /** Test the property 'location' */ - @Test - public void locationTest() { - // TODO: test location - } - - /** Test the property 'mtu' */ - @Test - public void mtuTest() { - // TODO: test mtu - } - - /** Test the property 'outscalePrivateIp' */ - @Test - public void outscalePrivateIpTest() { - // TODO: test outscalePrivateIp - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } - - /** Test the property 'vlan' */ - @Test - public void vlanTest() { - // TODO: test vlan - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkTest.java deleted file mode 100644 index 1b6c0ce4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/DirectLinkTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DirectLink */ -public class DirectLinkTest { - private final DirectLink model = new DirectLink(); - - /** Model tests for DirectLink */ - @Test - public void testDirectLink() { - // TODO: test DirectLink - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'bandwidth' */ - @Test - public void bandwidthTest() { - // TODO: test bandwidth - } - - /** Test the property 'directLinkId' */ - @Test - public void directLinkIdTest() { - // TODO: test directLinkId - } - - /** Test the property 'directLinkName' */ - @Test - public void directLinkNameTest() { - // TODO: test directLinkName - } - - /** Test the property 'location' */ - @Test - public void locationTest() { - // TODO: test location - } - - /** Test the property 'regionName' */ - @Test - public void regionNameTest() { - // TODO: test regionName - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponseTest.java deleted file mode 100644 index 2d360a05..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ErrorResponse */ -public class ErrorResponseTest { - private final ErrorResponse model = new ErrorResponse(); - - /** Model tests for ErrorResponse */ - @Test - public void testErrorResponse() { - // TODO: test ErrorResponse - } - - /** Test the property 'errors' */ - @Test - public void errorsTest() { - // TODO: test errors - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorsTest.java deleted file mode 100644 index 6639b1e8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ErrorsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Errors */ -public class ErrorsTest { - private final Errors model = new Errors(); - - /** Model tests for Errors */ - @Test - public void testErrors() { - // TODO: test Errors - } - - /** Test the property 'code' */ - @Test - public void codeTest() { - // TODO: test code - } - - /** Test the property 'details' */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** Test the property 'type' */ - @Test - public void typeTest() { - // TODO: test type - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeysTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeysTest.java deleted file mode 100644 index 9dbf19f5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersAccessKeysTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersAccessKeys */ -public class FiltersAccessKeysTest { - private final FiltersAccessKeys model = new FiltersAccessKeys(); - - /** Model tests for FiltersAccessKeys */ - @Test - public void testFiltersAccessKeys() { - // TODO: test FiltersAccessKeys - } - - /** Test the property 'accessKeyIds' */ - @Test - public void accessKeyIdsTest() { - // TODO: test accessKeyIds - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRuleTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRuleTest.java deleted file mode 100644 index 2eb9cb13..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiAccessRuleTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersApiAccessRule */ -public class FiltersApiAccessRuleTest { - private final FiltersApiAccessRule model = new FiltersApiAccessRule(); - - /** Model tests for FiltersApiAccessRule */ - @Test - public void testFiltersApiAccessRule() { - // TODO: test FiltersApiAccessRule - } - - /** Test the property 'apiAccessRuleIds' */ - @Test - public void apiAccessRuleIdsTest() { - // TODO: test apiAccessRuleIds - } - - /** Test the property 'caIds' */ - @Test - public void caIdsTest() { - // TODO: test caIds - } - - /** Test the property 'cns' */ - @Test - public void cnsTest() { - // TODO: test cns - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLogTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLogTest.java deleted file mode 100644 index c789a902..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersApiLogTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersApiLog */ -public class FiltersApiLogTest { - private final FiltersApiLog model = new FiltersApiLog(); - - /** Model tests for FiltersApiLog */ - @Test - public void testFiltersApiLog() { - // TODO: test FiltersApiLog - } - - /** Test the property 'queryAccessKeys' */ - @Test - public void queryAccessKeysTest() { - // TODO: test queryAccessKeys - } - - /** Test the property 'queryApiNames' */ - @Test - public void queryApiNamesTest() { - // TODO: test queryApiNames - } - - /** Test the property 'queryCallNames' */ - @Test - public void queryCallNamesTest() { - // TODO: test queryCallNames - } - - /** Test the property 'queryDateAfter' */ - @Test - public void queryDateAfterTest() { - // TODO: test queryDateAfter - } - - /** Test the property 'queryDateBefore' */ - @Test - public void queryDateBeforeTest() { - // TODO: test queryDateBefore - } - - /** Test the property 'queryIpAddresses' */ - @Test - public void queryIpAddressesTest() { - // TODO: test queryIpAddresses - } - - /** Test the property 'queryUserAgents' */ - @Test - public void queryUserAgentsTest() { - // TODO: test queryUserAgents - } - - /** Test the property 'requestIds' */ - @Test - public void requestIdsTest() { - // TODO: test requestIds - } - - /** Test the property 'responseStatusCodes' */ - @Test - public void responseStatusCodesTest() { - // TODO: test responseStatusCodes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCaTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCaTest.java deleted file mode 100644 index daf0eb43..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCaTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersCa */ -public class FiltersCaTest { - private final FiltersCa model = new FiltersCa(); - - /** Model tests for FiltersCa */ - @Test - public void testFiltersCa() { - // TODO: test FiltersCa - } - - /** Test the property 'caFingerprints' */ - @Test - public void caFingerprintsTest() { - // TODO: test caFingerprints - } - - /** Test the property 'caIds' */ - @Test - public void caIdsTest() { - // TODO: test caIds - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogsTest.java deleted file mode 100644 index fe63b287..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersCatalogsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersCatalogs */ -public class FiltersCatalogsTest { - private final FiltersCatalogs model = new FiltersCatalogs(); - - /** Model tests for FiltersCatalogs */ - @Test - public void testFiltersCatalogs() { - // TODO: test FiltersCatalogs - } - - /** Test the property 'currentCatalogOnly' */ - @Test - public void currentCatalogOnlyTest() { - // TODO: test currentCatalogOnly - } - - /** Test the property 'fromDate' */ - @Test - public void fromDateTest() { - // TODO: test fromDate - } - - /** Test the property 'toDate' */ - @Test - public void toDateTest() { - // TODO: test toDate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGatewayTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGatewayTest.java deleted file mode 100644 index dc7c142a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersClientGatewayTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersClientGateway */ -public class FiltersClientGatewayTest { - private final FiltersClientGateway model = new FiltersClientGateway(); - - /** Model tests for FiltersClientGateway */ - @Test - public void testFiltersClientGateway() { - // TODO: test FiltersClientGateway - } - - /** Test the property 'bgpAsns' */ - @Test - public void bgpAsnsTest() { - // TODO: test bgpAsns - } - - /** Test the property 'clientGatewayIds' */ - @Test - public void clientGatewayIdsTest() { - // TODO: test clientGatewayIds - } - - /** Test the property 'connectionTypes' */ - @Test - public void connectionTypesTest() { - // TODO: test connectionTypes - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroupTest.java deleted file mode 100644 index 73d6a52e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDedicatedGroupTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersDedicatedGroup */ -public class FiltersDedicatedGroupTest { - private final FiltersDedicatedGroup model = new FiltersDedicatedGroup(); - - /** Model tests for FiltersDedicatedGroup */ - @Test - public void testFiltersDedicatedGroup() { - // TODO: test FiltersDedicatedGroup - } - - /** Test the property 'cpuGenerations' */ - @Test - public void cpuGenerationsTest() { - // TODO: test cpuGenerations - } - - /** Test the property 'dedicatedGroupIds' */ - @Test - public void dedicatedGroupIdsTest() { - // TODO: test dedicatedGroupIds - } - - /** Test the property 'names' */ - @Test - public void namesTest() { - // TODO: test names - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptionsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptionsTest.java deleted file mode 100644 index 04f695fd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDhcpOptionsTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersDhcpOptions */ -public class FiltersDhcpOptionsTest { - private final FiltersDhcpOptions model = new FiltersDhcpOptions(); - - /** Model tests for FiltersDhcpOptions */ - @Test - public void testFiltersDhcpOptions() { - // TODO: test FiltersDhcpOptions - } - - /** Test the property '_default' */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** Test the property 'dhcpOptionsSetIds' */ - @Test - public void dhcpOptionsSetIdsTest() { - // TODO: test dhcpOptionsSetIds - } - - /** Test the property 'domainNameServers' */ - @Test - public void domainNameServersTest() { - // TODO: test domainNameServers - } - - /** Test the property 'domainNames' */ - @Test - public void domainNamesTest() { - // TODO: test domainNames - } - - /** Test the property 'logServers' */ - @Test - public void logServersTest() { - // TODO: test logServers - } - - /** Test the property 'ntpServers' */ - @Test - public void ntpServersTest() { - // TODO: test ntpServers - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterfaceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterfaceTest.java deleted file mode 100644 index 8f8a5389..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkInterfaceTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersDirectLinkInterface */ -public class FiltersDirectLinkInterfaceTest { - private final FiltersDirectLinkInterface model = new FiltersDirectLinkInterface(); - - /** Model tests for FiltersDirectLinkInterface */ - @Test - public void testFiltersDirectLinkInterface() { - // TODO: test FiltersDirectLinkInterface - } - - /** Test the property 'directLinkIds' */ - @Test - public void directLinkIdsTest() { - // TODO: test directLinkIds - } - - /** Test the property 'directLinkInterfaceIds' */ - @Test - public void directLinkInterfaceIdsTest() { - // TODO: test directLinkInterfaceIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkTest.java deleted file mode 100644 index cde178f5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersDirectLinkTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersDirectLink */ -public class FiltersDirectLinkTest { - private final FiltersDirectLink model = new FiltersDirectLink(); - - /** Model tests for FiltersDirectLink */ - @Test - public void testFiltersDirectLink() { - // TODO: test FiltersDirectLink - } - - /** Test the property 'directLinkIds' */ - @Test - public void directLinkIdsTest() { - // TODO: test directLinkIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTaskTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTaskTest.java deleted file mode 100644 index 50547ae5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersExportTaskTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersExportTask */ -public class FiltersExportTaskTest { - private final FiltersExportTask model = new FiltersExportTask(); - - /** Model tests for FiltersExportTask */ - @Test - public void testFiltersExportTask() { - // TODO: test FiltersExportTask - } - - /** Test the property 'taskIds' */ - @Test - public void taskIdsTest() { - // TODO: test taskIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpuTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpuTest.java deleted file mode 100644 index e37420db..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersFlexibleGpuTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersFlexibleGpu */ -public class FiltersFlexibleGpuTest { - private final FiltersFlexibleGpu model = new FiltersFlexibleGpu(); - - /** Model tests for FiltersFlexibleGpu */ - @Test - public void testFiltersFlexibleGpu() { - // TODO: test FiltersFlexibleGpu - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'flexibleGpuIds' */ - @Test - public void flexibleGpuIdsTest() { - // TODO: test flexibleGpuIds - } - - /** Test the property 'generations' */ - @Test - public void generationsTest() { - // TODO: test generations - } - - /** Test the property 'modelNames' */ - @Test - public void modelNamesTest() { - // TODO: test modelNames - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersImageTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersImageTest.java deleted file mode 100644 index 025e2fea..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersImageTest.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersImage */ -public class FiltersImageTest { - private final FiltersImage model = new FiltersImage(); - - /** Model tests for FiltersImage */ - @Test - public void testFiltersImage() { - // TODO: test FiltersImage - } - - /** Test the property 'accountAliases' */ - @Test - public void accountAliasesTest() { - // TODO: test accountAliases - } - - /** Test the property 'accountIds' */ - @Test - public void accountIdsTest() { - // TODO: test accountIds - } - - /** Test the property 'architectures' */ - @Test - public void architecturesTest() { - // TODO: test architectures - } - - /** Test the property 'blockDeviceMappingDeleteOnVmDeletion' */ - @Test - public void blockDeviceMappingDeleteOnVmDeletionTest() { - // TODO: test blockDeviceMappingDeleteOnVmDeletion - } - - /** Test the property 'blockDeviceMappingDeviceNames' */ - @Test - public void blockDeviceMappingDeviceNamesTest() { - // TODO: test blockDeviceMappingDeviceNames - } - - /** Test the property 'blockDeviceMappingSnapshotIds' */ - @Test - public void blockDeviceMappingSnapshotIdsTest() { - // TODO: test blockDeviceMappingSnapshotIds - } - - /** Test the property 'blockDeviceMappingVolumeSizes' */ - @Test - public void blockDeviceMappingVolumeSizesTest() { - // TODO: test blockDeviceMappingVolumeSizes - } - - /** Test the property 'blockDeviceMappingVolumeTypes' */ - @Test - public void blockDeviceMappingVolumeTypesTest() { - // TODO: test blockDeviceMappingVolumeTypes - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'fileLocations' */ - @Test - public void fileLocationsTest() { - // TODO: test fileLocations - } - - /** Test the property 'hypervisors' */ - @Test - public void hypervisorsTest() { - // TODO: test hypervisors - } - - /** Test the property 'imageIds' */ - @Test - public void imageIdsTest() { - // TODO: test imageIds - } - - /** Test the property 'imageNames' */ - @Test - public void imageNamesTest() { - // TODO: test imageNames - } - - /** Test the property 'permissionsToLaunchAccountIds' */ - @Test - public void permissionsToLaunchAccountIdsTest() { - // TODO: test permissionsToLaunchAccountIds - } - - /** Test the property 'permissionsToLaunchGlobalPermission' */ - @Test - public void permissionsToLaunchGlobalPermissionTest() { - // TODO: test permissionsToLaunchGlobalPermission - } - - /** Test the property 'productCodeNames' */ - @Test - public void productCodeNamesTest() { - // TODO: test productCodeNames - } - - /** Test the property 'productCodes' */ - @Test - public void productCodesTest() { - // TODO: test productCodes - } - - /** Test the property 'rootDeviceNames' */ - @Test - public void rootDeviceNamesTest() { - // TODO: test rootDeviceNames - } - - /** Test the property 'rootDeviceTypes' */ - @Test - public void rootDeviceTypesTest() { - // TODO: test rootDeviceTypes - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'virtualizationTypes' */ - @Test - public void virtualizationTypesTest() { - // TODO: test virtualizationTypes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetServiceTest.java deleted file mode 100644 index bf8b8d49..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersInternetServiceTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersInternetService */ -public class FiltersInternetServiceTest { - private final FiltersInternetService model = new FiltersInternetService(); - - /** Model tests for FiltersInternetService */ - @Test - public void testFiltersInternetService() { - // TODO: test FiltersInternetService - } - - /** Test the property 'internetServiceIds' */ - @Test - public void internetServiceIdsTest() { - // TODO: test internetServiceIds - } - - /** Test the property 'linkNetIds' */ - @Test - public void linkNetIdsTest() { - // TODO: test linkNetIds - } - - /** Test the property 'linkStates' */ - @Test - public void linkStatesTest() { - // TODO: test linkStates - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypairTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypairTest.java deleted file mode 100644 index b8d7ed0e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersKeypairTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersKeypair */ -public class FiltersKeypairTest { - private final FiltersKeypair model = new FiltersKeypair(); - - /** Model tests for FiltersKeypair */ - @Test - public void testFiltersKeypair() { - // TODO: test FiltersKeypair - } - - /** Test the property 'keypairFingerprints' */ - @Test - public void keypairFingerprintsTest() { - // TODO: test keypairFingerprints - } - - /** Test the property 'keypairNames' */ - @Test - public void keypairNamesTest() { - // TODO: test keypairNames - } - - /** Test the property 'keypairTypes' */ - @Test - public void keypairTypesTest() { - // TODO: test keypairTypes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRuleTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRuleTest.java deleted file mode 100644 index 61316e8b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersListenerRuleTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersListenerRule */ -public class FiltersListenerRuleTest { - private final FiltersListenerRule model = new FiltersListenerRule(); - - /** Model tests for FiltersListenerRule */ - @Test - public void testFiltersListenerRule() { - // TODO: test FiltersListenerRule - } - - /** Test the property 'listenerRuleNames' */ - @Test - public void listenerRuleNamesTest() { - // TODO: test listenerRuleNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancerTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancerTest.java deleted file mode 100644 index a00fe96d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersLoadBalancerTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersLoadBalancer */ -public class FiltersLoadBalancerTest { - private final FiltersLoadBalancer model = new FiltersLoadBalancer(); - - /** Model tests for FiltersLoadBalancer */ - @Test - public void testFiltersLoadBalancer() { - // TODO: test FiltersLoadBalancer - } - - /** Test the property 'loadBalancerNames' */ - @Test - public void loadBalancerNamesTest() { - // TODO: test loadBalancerNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatServiceTest.java deleted file mode 100644 index 23db929f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNatServiceTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersNatService */ -public class FiltersNatServiceTest { - private final FiltersNatService model = new FiltersNatService(); - - /** Model tests for FiltersNatService */ - @Test - public void testFiltersNatService() { - // TODO: test FiltersNatService - } - - /** Test the property 'clientTokens' */ - @Test - public void clientTokensTest() { - // TODO: test clientTokens - } - - /** Test the property 'natServiceIds' */ - @Test - public void natServiceIdsTest() { - // TODO: test natServiceIds - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'subnetIds' */ - @Test - public void subnetIdsTest() { - // TODO: test subnetIds - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPointTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPointTest.java deleted file mode 100644 index 79a05834..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetAccessPointTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersNetAccessPoint */ -public class FiltersNetAccessPointTest { - private final FiltersNetAccessPoint model = new FiltersNetAccessPoint(); - - /** Model tests for FiltersNetAccessPoint */ - @Test - public void testFiltersNetAccessPoint() { - // TODO: test FiltersNetAccessPoint - } - - /** Test the property 'netAccessPointIds' */ - @Test - public void netAccessPointIdsTest() { - // TODO: test netAccessPointIds - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'serviceNames' */ - @Test - public void serviceNamesTest() { - // TODO: test serviceNames - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeeringTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeeringTest.java deleted file mode 100644 index a966d49f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetPeeringTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersNetPeering */ -public class FiltersNetPeeringTest { - private final FiltersNetPeering model = new FiltersNetPeering(); - - /** Model tests for FiltersNetPeering */ - @Test - public void testFiltersNetPeering() { - // TODO: test FiltersNetPeering - } - - /** Test the property 'accepterNetAccountIds' */ - @Test - public void accepterNetAccountIdsTest() { - // TODO: test accepterNetAccountIds - } - - /** Test the property 'accepterNetIpRanges' */ - @Test - public void accepterNetIpRangesTest() { - // TODO: test accepterNetIpRanges - } - - /** Test the property 'accepterNetNetIds' */ - @Test - public void accepterNetNetIdsTest() { - // TODO: test accepterNetNetIds - } - - /** Test the property 'expirationDates' */ - @Test - public void expirationDatesTest() { - // TODO: test expirationDates - } - - /** Test the property 'netPeeringIds' */ - @Test - public void netPeeringIdsTest() { - // TODO: test netPeeringIds - } - - /** Test the property 'sourceNetAccountIds' */ - @Test - public void sourceNetAccountIdsTest() { - // TODO: test sourceNetAccountIds - } - - /** Test the property 'sourceNetIpRanges' */ - @Test - public void sourceNetIpRangesTest() { - // TODO: test sourceNetIpRanges - } - - /** Test the property 'sourceNetNetIds' */ - @Test - public void sourceNetNetIdsTest() { - // TODO: test sourceNetNetIds - } - - /** Test the property 'stateMessages' */ - @Test - public void stateMessagesTest() { - // TODO: test stateMessages - } - - /** Test the property 'stateNames' */ - @Test - public void stateNamesTest() { - // TODO: test stateNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetTest.java deleted file mode 100644 index 207dcc48..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNetTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersNet */ -public class FiltersNetTest { - private final FiltersNet model = new FiltersNet(); - - /** Model tests for FiltersNet */ - @Test - public void testFiltersNet() { - // TODO: test FiltersNet - } - - /** Test the property 'dhcpOptionsSetIds' */ - @Test - public void dhcpOptionsSetIdsTest() { - // TODO: test dhcpOptionsSetIds - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** Test the property 'isDefault' */ - @Test - public void isDefaultTest() { - // TODO: test isDefault - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNicTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNicTest.java deleted file mode 100644 index 97b25b49..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersNicTest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersNic */ -public class FiltersNicTest { - private final FiltersNic model = new FiltersNic(); - - /** Model tests for FiltersNic */ - @Test - public void testFiltersNic() { - // TODO: test FiltersNic - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'isSourceDestCheck' */ - @Test - public void isSourceDestCheckTest() { - // TODO: test isSourceDestCheck - } - - /** Test the property 'linkNicDeleteOnVmDeletion' */ - @Test - public void linkNicDeleteOnVmDeletionTest() { - // TODO: test linkNicDeleteOnVmDeletion - } - - /** Test the property 'linkNicDeviceNumbers' */ - @Test - public void linkNicDeviceNumbersTest() { - // TODO: test linkNicDeviceNumbers - } - - /** Test the property 'linkNicLinkNicIds' */ - @Test - public void linkNicLinkNicIdsTest() { - // TODO: test linkNicLinkNicIds - } - - /** Test the property 'linkNicStates' */ - @Test - public void linkNicStatesTest() { - // TODO: test linkNicStates - } - - /** Test the property 'linkNicVmAccountIds' */ - @Test - public void linkNicVmAccountIdsTest() { - // TODO: test linkNicVmAccountIds - } - - /** Test the property 'linkNicVmIds' */ - @Test - public void linkNicVmIdsTest() { - // TODO: test linkNicVmIds - } - - /** Test the property 'linkPublicIpAccountIds' */ - @Test - public void linkPublicIpAccountIdsTest() { - // TODO: test linkPublicIpAccountIds - } - - /** Test the property 'linkPublicIpLinkPublicIpIds' */ - @Test - public void linkPublicIpLinkPublicIpIdsTest() { - // TODO: test linkPublicIpLinkPublicIpIds - } - - /** Test the property 'linkPublicIpPublicDnsNames' */ - @Test - public void linkPublicIpPublicDnsNamesTest() { - // TODO: test linkPublicIpPublicDnsNames - } - - /** Test the property 'linkPublicIpPublicIpIds' */ - @Test - public void linkPublicIpPublicIpIdsTest() { - // TODO: test linkPublicIpPublicIpIds - } - - /** Test the property 'linkPublicIpPublicIps' */ - @Test - public void linkPublicIpPublicIpsTest() { - // TODO: test linkPublicIpPublicIps - } - - /** Test the property 'macAddresses' */ - @Test - public void macAddressesTest() { - // TODO: test macAddresses - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'nicIds' */ - @Test - public void nicIdsTest() { - // TODO: test nicIds - } - - /** Test the property 'privateDnsNames' */ - @Test - public void privateDnsNamesTest() { - // TODO: test privateDnsNames - } - - /** Test the property 'privateIpsLinkPublicIpAccountIds' */ - @Test - public void privateIpsLinkPublicIpAccountIdsTest() { - // TODO: test privateIpsLinkPublicIpAccountIds - } - - /** Test the property 'privateIpsLinkPublicIpPublicIps' */ - @Test - public void privateIpsLinkPublicIpPublicIpsTest() { - // TODO: test privateIpsLinkPublicIpPublicIps - } - - /** Test the property 'privateIpsPrimaryIp' */ - @Test - public void privateIpsPrimaryIpTest() { - // TODO: test privateIpsPrimaryIp - } - - /** Test the property 'privateIpsPrivateIps' */ - @Test - public void privateIpsPrivateIpsTest() { - // TODO: test privateIpsPrivateIps - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'securityGroupNames' */ - @Test - public void securityGroupNamesTest() { - // TODO: test securityGroupNames - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'subnetIds' */ - @Test - public void subnetIdsTest() { - // TODO: test subnetIds - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductTypeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductTypeTest.java deleted file mode 100644 index 56c3712d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersProductTypeTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersProductType */ -public class FiltersProductTypeTest { - private final FiltersProductType model = new FiltersProductType(); - - /** Model tests for FiltersProductType */ - @Test - public void testFiltersProductType() { - // TODO: test FiltersProductType - } - - /** Test the property 'productTypeIds' */ - @Test - public void productTypeIdsTest() { - // TODO: test productTypeIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIpTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIpTest.java deleted file mode 100644 index 79f79d14..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersPublicIpTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersPublicIp */ -public class FiltersPublicIpTest { - private final FiltersPublicIp model = new FiltersPublicIp(); - - /** Model tests for FiltersPublicIp */ - @Test - public void testFiltersPublicIp() { - // TODO: test FiltersPublicIp - } - - /** Test the property 'linkPublicIpIds' */ - @Test - public void linkPublicIpIdsTest() { - // TODO: test linkPublicIpIds - } - - /** Test the property 'nicAccountIds' */ - @Test - public void nicAccountIdsTest() { - // TODO: test nicAccountIds - } - - /** Test the property 'nicIds' */ - @Test - public void nicIdsTest() { - // TODO: test nicIds - } - - /** Test the property 'placements' */ - @Test - public void placementsTest() { - // TODO: test placements - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'publicIpIds' */ - @Test - public void publicIpIdsTest() { - // TODO: test publicIpIds - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuotaTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuotaTest.java deleted file mode 100644 index 6051d535..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersQuotaTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersQuota */ -public class FiltersQuotaTest { - private final FiltersQuota model = new FiltersQuota(); - - /** Model tests for FiltersQuota */ - @Test - public void testFiltersQuota() { - // TODO: test FiltersQuota - } - - /** Test the property 'collections' */ - @Test - public void collectionsTest() { - // TODO: test collections - } - - /** Test the property 'quotaNames' */ - @Test - public void quotaNamesTest() { - // TODO: test quotaNames - } - - /** Test the property 'quotaTypes' */ - @Test - public void quotaTypesTest() { - // TODO: test quotaTypes - } - - /** Test the property 'shortDescriptions' */ - @Test - public void shortDescriptionsTest() { - // TODO: test shortDescriptions - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTableTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTableTest.java deleted file mode 100644 index 8078a1e0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersRouteTableTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersRouteTable */ -public class FiltersRouteTableTest { - private final FiltersRouteTable model = new FiltersRouteTable(); - - /** Model tests for FiltersRouteTable */ - @Test - public void testFiltersRouteTable() { - // TODO: test FiltersRouteTable - } - - /** Test the property 'linkRouteTableIds' */ - @Test - public void linkRouteTableIdsTest() { - // TODO: test linkRouteTableIds - } - - /** Test the property 'linkRouteTableLinkRouteTableIds' */ - @Test - public void linkRouteTableLinkRouteTableIdsTest() { - // TODO: test linkRouteTableLinkRouteTableIds - } - - /** Test the property 'linkRouteTableMain' */ - @Test - public void linkRouteTableMainTest() { - // TODO: test linkRouteTableMain - } - - /** Test the property 'linkSubnetIds' */ - @Test - public void linkSubnetIdsTest() { - // TODO: test linkSubnetIds - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'routeCreationMethods' */ - @Test - public void routeCreationMethodsTest() { - // TODO: test routeCreationMethods - } - - /** Test the property 'routeDestinationIpRanges' */ - @Test - public void routeDestinationIpRangesTest() { - // TODO: test routeDestinationIpRanges - } - - /** Test the property 'routeDestinationServiceIds' */ - @Test - public void routeDestinationServiceIdsTest() { - // TODO: test routeDestinationServiceIds - } - - /** Test the property 'routeGatewayIds' */ - @Test - public void routeGatewayIdsTest() { - // TODO: test routeGatewayIds - } - - /** Test the property 'routeNatServiceIds' */ - @Test - public void routeNatServiceIdsTest() { - // TODO: test routeNatServiceIds - } - - /** Test the property 'routeNetPeeringIds' */ - @Test - public void routeNetPeeringIdsTest() { - // TODO: test routeNetPeeringIds - } - - /** Test the property 'routeStates' */ - @Test - public void routeStatesTest() { - // TODO: test routeStates - } - - /** Test the property 'routeTableIds' */ - @Test - public void routeTableIdsTest() { - // TODO: test routeTableIds - } - - /** Test the property 'routeVmIds' */ - @Test - public void routeVmIdsTest() { - // TODO: test routeVmIds - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroupTest.java deleted file mode 100644 index 3be5c0c8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSecurityGroupTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersSecurityGroup */ -public class FiltersSecurityGroupTest { - private final FiltersSecurityGroup model = new FiltersSecurityGroup(); - - /** Model tests for FiltersSecurityGroup */ - @Test - public void testFiltersSecurityGroup() { - // TODO: test FiltersSecurityGroup - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'inboundRuleAccountIds' */ - @Test - public void inboundRuleAccountIdsTest() { - // TODO: test inboundRuleAccountIds - } - - /** Test the property 'inboundRuleFromPortRanges' */ - @Test - public void inboundRuleFromPortRangesTest() { - // TODO: test inboundRuleFromPortRanges - } - - /** Test the property 'inboundRuleIpRanges' */ - @Test - public void inboundRuleIpRangesTest() { - // TODO: test inboundRuleIpRanges - } - - /** Test the property 'inboundRuleProtocols' */ - @Test - public void inboundRuleProtocolsTest() { - // TODO: test inboundRuleProtocols - } - - /** Test the property 'inboundRuleSecurityGroupIds' */ - @Test - public void inboundRuleSecurityGroupIdsTest() { - // TODO: test inboundRuleSecurityGroupIds - } - - /** Test the property 'inboundRuleSecurityGroupNames' */ - @Test - public void inboundRuleSecurityGroupNamesTest() { - // TODO: test inboundRuleSecurityGroupNames - } - - /** Test the property 'inboundRuleToPortRanges' */ - @Test - public void inboundRuleToPortRangesTest() { - // TODO: test inboundRuleToPortRanges - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'outboundRuleAccountIds' */ - @Test - public void outboundRuleAccountIdsTest() { - // TODO: test outboundRuleAccountIds - } - - /** Test the property 'outboundRuleFromPortRanges' */ - @Test - public void outboundRuleFromPortRangesTest() { - // TODO: test outboundRuleFromPortRanges - } - - /** Test the property 'outboundRuleIpRanges' */ - @Test - public void outboundRuleIpRangesTest() { - // TODO: test outboundRuleIpRanges - } - - /** Test the property 'outboundRuleProtocols' */ - @Test - public void outboundRuleProtocolsTest() { - // TODO: test outboundRuleProtocols - } - - /** Test the property 'outboundRuleSecurityGroupIds' */ - @Test - public void outboundRuleSecurityGroupIdsTest() { - // TODO: test outboundRuleSecurityGroupIds - } - - /** Test the property 'outboundRuleSecurityGroupNames' */ - @Test - public void outboundRuleSecurityGroupNamesTest() { - // TODO: test outboundRuleSecurityGroupNames - } - - /** Test the property 'outboundRuleToPortRanges' */ - @Test - public void outboundRuleToPortRangesTest() { - // TODO: test outboundRuleToPortRanges - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'securityGroupNames' */ - @Test - public void securityGroupNamesTest() { - // TODO: test securityGroupNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificateTest.java deleted file mode 100644 index 72ac116c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServerCertificateTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersServerCertificate */ -public class FiltersServerCertificateTest { - private final FiltersServerCertificate model = new FiltersServerCertificate(); - - /** Model tests for FiltersServerCertificate */ - @Test - public void testFiltersServerCertificate() { - // TODO: test FiltersServerCertificate - } - - /** Test the property 'paths' */ - @Test - public void pathsTest() { - // TODO: test paths - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServiceTest.java deleted file mode 100644 index a476fcdc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersServiceTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersService */ -public class FiltersServiceTest { - private final FiltersService model = new FiltersService(); - - /** Model tests for FiltersService */ - @Test - public void testFiltersService() { - // TODO: test FiltersService - } - - /** Test the property 'serviceIds' */ - @Test - public void serviceIdsTest() { - // TODO: test serviceIds - } - - /** Test the property 'serviceNames' */ - @Test - public void serviceNamesTest() { - // TODO: test serviceNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshotTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshotTest.java deleted file mode 100644 index 28d01712..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSnapshotTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersSnapshot */ -public class FiltersSnapshotTest { - private final FiltersSnapshot model = new FiltersSnapshot(); - - /** Model tests for FiltersSnapshot */ - @Test - public void testFiltersSnapshot() { - // TODO: test FiltersSnapshot - } - - /** Test the property 'accountAliases' */ - @Test - public void accountAliasesTest() { - // TODO: test accountAliases - } - - /** Test the property 'accountIds' */ - @Test - public void accountIdsTest() { - // TODO: test accountIds - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'fromCreationDate' */ - @Test - public void fromCreationDateTest() { - // TODO: test fromCreationDate - } - - /** Test the property 'permissionsToCreateVolumeAccountIds' */ - @Test - public void permissionsToCreateVolumeAccountIdsTest() { - // TODO: test permissionsToCreateVolumeAccountIds - } - - /** Test the property 'permissionsToCreateVolumeGlobalPermission' */ - @Test - public void permissionsToCreateVolumeGlobalPermissionTest() { - // TODO: test permissionsToCreateVolumeGlobalPermission - } - - /** Test the property 'progresses' */ - @Test - public void progressesTest() { - // TODO: test progresses - } - - /** Test the property 'snapshotIds' */ - @Test - public void snapshotIdsTest() { - // TODO: test snapshotIds - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'toCreationDate' */ - @Test - public void toCreationDateTest() { - // TODO: test toCreationDate - } - - /** Test the property 'volumeIds' */ - @Test - public void volumeIdsTest() { - // TODO: test volumeIds - } - - /** Test the property 'volumeSizes' */ - @Test - public void volumeSizesTest() { - // TODO: test volumeSizes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnetTest.java deleted file mode 100644 index cb1d2bbd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubnetTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersSubnet */ -public class FiltersSubnetTest { - private final FiltersSubnet model = new FiltersSubnet(); - - /** Model tests for FiltersSubnet */ - @Test - public void testFiltersSubnet() { - // TODO: test FiltersSubnet - } - - /** Test the property 'availableIpsCounts' */ - @Test - public void availableIpsCountsTest() { - // TODO: test availableIpsCounts - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'subnetIds' */ - @Test - public void subnetIdsTest() { - // TODO: test subnetIds - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregionTest.java deleted file mode 100644 index cb2f0e99..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersSubregionTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersSubregion */ -public class FiltersSubregionTest { - private final FiltersSubregion model = new FiltersSubregion(); - - /** Model tests for FiltersSubregion */ - @Test - public void testFiltersSubregion() { - // TODO: test FiltersSubregion - } - - /** Test the property 'regionNames' */ - @Test - public void regionNamesTest() { - // TODO: test regionNames - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersTagTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersTagTest.java deleted file mode 100644 index 2e350a25..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersTagTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersTag */ -public class FiltersTagTest { - private final FiltersTag model = new FiltersTag(); - - /** Model tests for FiltersTag */ - @Test - public void testFiltersTag() { - // TODO: test FiltersTag - } - - /** Test the property 'keys' */ - @Test - public void keysTest() { - // TODO: test keys - } - - /** Test the property 'resourceIds' */ - @Test - public void resourceIdsTest() { - // TODO: test resourceIds - } - - /** Test the property 'resourceTypes' */ - @Test - public void resourceTypesTest() { - // TODO: test resourceTypes - } - - /** Test the property 'values' */ - @Test - public void valuesTest() { - // TODO: test values - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroupTest.java deleted file mode 100644 index 1336f7eb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersUserGroupTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersUserGroup */ -public class FiltersUserGroupTest { - private final FiltersUserGroup model = new FiltersUserGroup(); - - /** Model tests for FiltersUserGroup */ - @Test - public void testFiltersUserGroup() { - // TODO: test FiltersUserGroup - } - - /** Test the property 'pathPrefix' */ - @Test - public void pathPrefixTest() { - // TODO: test pathPrefix - } - - /** Test the property 'userGroupIds' */ - @Test - public void userGroupIdsTest() { - // TODO: test userGroupIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGatewayTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGatewayTest.java deleted file mode 100644 index 7add4b8e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVirtualGatewayTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVirtualGateway */ -public class FiltersVirtualGatewayTest { - private final FiltersVirtualGateway model = new FiltersVirtualGateway(); - - /** Model tests for FiltersVirtualGateway */ - @Test - public void testFiltersVirtualGateway() { - // TODO: test FiltersVirtualGateway - } - - /** Test the property 'connectionTypes' */ - @Test - public void connectionTypesTest() { - // TODO: test connectionTypes - } - - /** Test the property 'linkNetIds' */ - @Test - public void linkNetIdsTest() { - // TODO: test linkNetIds - } - - /** Test the property 'linkStates' */ - @Test - public void linkStatesTest() { - // TODO: test linkStates - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'virtualGatewayIds' */ - @Test - public void virtualGatewayIdsTest() { - // TODO: test virtualGatewayIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroupTest.java deleted file mode 100644 index a2f1c9ad..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmGroupTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVmGroup */ -public class FiltersVmGroupTest { - private final FiltersVmGroup model = new FiltersVmGroup(); - - /** Model tests for FiltersVmGroup */ - @Test - public void testFiltersVmGroup() { - // TODO: test FiltersVmGroup - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'subnetIds' */ - @Test - public void subnetIdsTest() { - // TODO: test subnetIds - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmCounts' */ - @Test - public void vmCountsTest() { - // TODO: test vmCounts - } - - /** Test the property 'vmGroupIds' */ - @Test - public void vmGroupIdsTest() { - // TODO: test vmGroupIds - } - - /** Test the property 'vmGroupNames' */ - @Test - public void vmGroupNamesTest() { - // TODO: test vmGroupNames - } - - /** Test the property 'vmTemplateIds' */ - @Test - public void vmTemplateIdsTest() { - // TODO: test vmTemplateIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplateTest.java deleted file mode 100644 index efe520fd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTemplateTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVmTemplate */ -public class FiltersVmTemplateTest { - private final FiltersVmTemplate model = new FiltersVmTemplate(); - - /** Model tests for FiltersVmTemplate */ - @Test - public void testFiltersVmTemplate() { - // TODO: test FiltersVmTemplate - } - - /** Test the property 'cpuCores' */ - @Test - public void cpuCoresTest() { - // TODO: test cpuCores - } - - /** Test the property 'cpuGenerations' */ - @Test - public void cpuGenerationsTest() { - // TODO: test cpuGenerations - } - - /** Test the property 'cpuPerformances' */ - @Test - public void cpuPerformancesTest() { - // TODO: test cpuPerformances - } - - /** Test the property 'descriptions' */ - @Test - public void descriptionsTest() { - // TODO: test descriptions - } - - /** Test the property 'imageIds' */ - @Test - public void imageIdsTest() { - // TODO: test imageIds - } - - /** Test the property 'keypairNames' */ - @Test - public void keypairNamesTest() { - // TODO: test keypairNames - } - - /** Test the property 'rams' */ - @Test - public void ramsTest() { - // TODO: test rams - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmTemplateIds' */ - @Test - public void vmTemplateIdsTest() { - // TODO: test vmTemplateIds - } - - /** Test the property 'vmTemplateNames' */ - @Test - public void vmTemplateNamesTest() { - // TODO: test vmTemplateNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTest.java deleted file mode 100644 index 487def3c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTest.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVm */ -public class FiltersVmTest { - private final FiltersVm model = new FiltersVm(); - - /** Model tests for FiltersVm */ - @Test - public void testFiltersVm() { - // TODO: test FiltersVm - } - - /** Test the property 'architectures' */ - @Test - public void architecturesTest() { - // TODO: test architectures - } - - /** Test the property 'blockDeviceMappingDeleteOnVmDeletion' */ - @Test - public void blockDeviceMappingDeleteOnVmDeletionTest() { - // TODO: test blockDeviceMappingDeleteOnVmDeletion - } - - /** Test the property 'blockDeviceMappingDeviceNames' */ - @Test - public void blockDeviceMappingDeviceNamesTest() { - // TODO: test blockDeviceMappingDeviceNames - } - - /** Test the property 'blockDeviceMappingLinkDates' */ - @Test - public void blockDeviceMappingLinkDatesTest() { - // TODO: test blockDeviceMappingLinkDates - } - - /** Test the property 'blockDeviceMappingStates' */ - @Test - public void blockDeviceMappingStatesTest() { - // TODO: test blockDeviceMappingStates - } - - /** Test the property 'blockDeviceMappingVolumeIds' */ - @Test - public void blockDeviceMappingVolumeIdsTest() { - // TODO: test blockDeviceMappingVolumeIds - } - - /** Test the property 'clientTokens' */ - @Test - public void clientTokensTest() { - // TODO: test clientTokens - } - - /** Test the property 'creationDates' */ - @Test - public void creationDatesTest() { - // TODO: test creationDates - } - - /** Test the property 'imageIds' */ - @Test - public void imageIdsTest() { - // TODO: test imageIds - } - - /** Test the property 'isSourceDestChecked' */ - @Test - public void isSourceDestCheckedTest() { - // TODO: test isSourceDestChecked - } - - /** Test the property 'keypairNames' */ - @Test - public void keypairNamesTest() { - // TODO: test keypairNames - } - - /** Test the property 'launchNumbers' */ - @Test - public void launchNumbersTest() { - // TODO: test launchNumbers - } - - /** Test the property 'lifecycles' */ - @Test - public void lifecyclesTest() { - // TODO: test lifecycles - } - - /** Test the property 'netIds' */ - @Test - public void netIdsTest() { - // TODO: test netIds - } - - /** Test the property 'nicAccountIds' */ - @Test - public void nicAccountIdsTest() { - // TODO: test nicAccountIds - } - - /** Test the property 'nicDescriptions' */ - @Test - public void nicDescriptionsTest() { - // TODO: test nicDescriptions - } - - /** Test the property 'nicIsSourceDestChecked' */ - @Test - public void nicIsSourceDestCheckedTest() { - // TODO: test nicIsSourceDestChecked - } - - /** Test the property 'nicLinkNicDeleteOnVmDeletion' */ - @Test - public void nicLinkNicDeleteOnVmDeletionTest() { - // TODO: test nicLinkNicDeleteOnVmDeletion - } - - /** Test the property 'nicLinkNicDeviceNumbers' */ - @Test - public void nicLinkNicDeviceNumbersTest() { - // TODO: test nicLinkNicDeviceNumbers - } - - /** Test the property 'nicLinkNicLinkNicDates' */ - @Test - public void nicLinkNicLinkNicDatesTest() { - // TODO: test nicLinkNicLinkNicDates - } - - /** Test the property 'nicLinkNicLinkNicIds' */ - @Test - public void nicLinkNicLinkNicIdsTest() { - // TODO: test nicLinkNicLinkNicIds - } - - /** Test the property 'nicLinkNicStates' */ - @Test - public void nicLinkNicStatesTest() { - // TODO: test nicLinkNicStates - } - - /** Test the property 'nicLinkNicVmAccountIds' */ - @Test - public void nicLinkNicVmAccountIdsTest() { - // TODO: test nicLinkNicVmAccountIds - } - - /** Test the property 'nicLinkNicVmIds' */ - @Test - public void nicLinkNicVmIdsTest() { - // TODO: test nicLinkNicVmIds - } - - /** Test the property 'nicLinkPublicIpAccountIds' */ - @Test - public void nicLinkPublicIpAccountIdsTest() { - // TODO: test nicLinkPublicIpAccountIds - } - - /** Test the property 'nicLinkPublicIpLinkPublicIpIds' */ - @Test - public void nicLinkPublicIpLinkPublicIpIdsTest() { - // TODO: test nicLinkPublicIpLinkPublicIpIds - } - - /** Test the property 'nicLinkPublicIpPublicIpIds' */ - @Test - public void nicLinkPublicIpPublicIpIdsTest() { - // TODO: test nicLinkPublicIpPublicIpIds - } - - /** Test the property 'nicLinkPublicIpPublicIps' */ - @Test - public void nicLinkPublicIpPublicIpsTest() { - // TODO: test nicLinkPublicIpPublicIps - } - - /** Test the property 'nicMacAddresses' */ - @Test - public void nicMacAddressesTest() { - // TODO: test nicMacAddresses - } - - /** Test the property 'nicNetIds' */ - @Test - public void nicNetIdsTest() { - // TODO: test nicNetIds - } - - /** Test the property 'nicNicIds' */ - @Test - public void nicNicIdsTest() { - // TODO: test nicNicIds - } - - /** Test the property 'nicPrivateIpsLinkPublicIpAccountIds' */ - @Test - public void nicPrivateIpsLinkPublicIpAccountIdsTest() { - // TODO: test nicPrivateIpsLinkPublicIpAccountIds - } - - /** Test the property 'nicPrivateIpsLinkPublicIpIds' */ - @Test - public void nicPrivateIpsLinkPublicIpIdsTest() { - // TODO: test nicPrivateIpsLinkPublicIpIds - } - - /** Test the property 'nicPrivateIpsPrimaryIp' */ - @Test - public void nicPrivateIpsPrimaryIpTest() { - // TODO: test nicPrivateIpsPrimaryIp - } - - /** Test the property 'nicPrivateIpsPrivateIps' */ - @Test - public void nicPrivateIpsPrivateIpsTest() { - // TODO: test nicPrivateIpsPrivateIps - } - - /** Test the property 'nicSecurityGroupIds' */ - @Test - public void nicSecurityGroupIdsTest() { - // TODO: test nicSecurityGroupIds - } - - /** Test the property 'nicSecurityGroupNames' */ - @Test - public void nicSecurityGroupNamesTest() { - // TODO: test nicSecurityGroupNames - } - - /** Test the property 'nicStates' */ - @Test - public void nicStatesTest() { - // TODO: test nicStates - } - - /** Test the property 'nicSubnetIds' */ - @Test - public void nicSubnetIdsTest() { - // TODO: test nicSubnetIds - } - - /** Test the property 'nicSubregionNames' */ - @Test - public void nicSubregionNamesTest() { - // TODO: test nicSubregionNames - } - - /** Test the property 'platforms' */ - @Test - public void platformsTest() { - // TODO: test platforms - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'productCodes' */ - @Test - public void productCodesTest() { - // TODO: test productCodes - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'reservationIds' */ - @Test - public void reservationIdsTest() { - // TODO: test reservationIds - } - - /** Test the property 'rootDeviceNames' */ - @Test - public void rootDeviceNamesTest() { - // TODO: test rootDeviceNames - } - - /** Test the property 'rootDeviceTypes' */ - @Test - public void rootDeviceTypesTest() { - // TODO: test rootDeviceTypes - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'securityGroupNames' */ - @Test - public void securityGroupNamesTest() { - // TODO: test securityGroupNames - } - - /** Test the property 'stateReasonCodes' */ - @Test - public void stateReasonCodesTest() { - // TODO: test stateReasonCodes - } - - /** Test the property 'stateReasonMessages' */ - @Test - public void stateReasonMessagesTest() { - // TODO: test stateReasonMessages - } - - /** Test the property 'stateReasons' */ - @Test - public void stateReasonsTest() { - // TODO: test stateReasons - } - - /** Test the property 'subnetIds' */ - @Test - public void subnetIdsTest() { - // TODO: test subnetIds - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'tenancies' */ - @Test - public void tenanciesTest() { - // TODO: test tenancies - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } - - /** Test the property 'vmSecurityGroupIds' */ - @Test - public void vmSecurityGroupIdsTest() { - // TODO: test vmSecurityGroupIds - } - - /** Test the property 'vmSecurityGroupNames' */ - @Test - public void vmSecurityGroupNamesTest() { - // TODO: test vmSecurityGroupNames - } - - /** Test the property 'vmStateCodes' */ - @Test - public void vmStateCodesTest() { - // TODO: test vmStateCodes - } - - /** Test the property 'vmStateNames' */ - @Test - public void vmStateNamesTest() { - // TODO: test vmStateNames - } - - /** Test the property 'vmTypes' */ - @Test - public void vmTypesTest() { - // TODO: test vmTypes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTypeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTypeTest.java deleted file mode 100644 index d28ac472..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmTypeTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVmType */ -public class FiltersVmTypeTest { - private final FiltersVmType model = new FiltersVmType(); - - /** Model tests for FiltersVmType */ - @Test - public void testFiltersVmType() { - // TODO: test FiltersVmType - } - - /** Test the property 'bsuOptimized' */ - @Test - public void bsuOptimizedTest() { - // TODO: test bsuOptimized - } - - /** Test the property 'ephemeralsTypes' */ - @Test - public void ephemeralsTypesTest() { - // TODO: test ephemeralsTypes - } - - /** Test the property 'eths' */ - @Test - public void ethsTest() { - // TODO: test eths - } - - /** Test the property 'gpus' */ - @Test - public void gpusTest() { - // TODO: test gpus - } - - /** Test the property 'memorySizes' */ - @Test - public void memorySizesTest() { - // TODO: test memorySizes - } - - /** Test the property 'vcoreCounts' */ - @Test - public void vcoreCountsTest() { - // TODO: test vcoreCounts - } - - /** Test the property 'vmTypeNames' */ - @Test - public void vmTypeNamesTest() { - // TODO: test vmTypeNames - } - - /** Test the property 'volumeCounts' */ - @Test - public void volumeCountsTest() { - // TODO: test volumeCounts - } - - /** Test the property 'volumeSizes' */ - @Test - public void volumeSizesTest() { - // TODO: test volumeSizes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsStateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsStateTest.java deleted file mode 100644 index 3499d1e3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVmsStateTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVmsState */ -public class FiltersVmsStateTest { - private final FiltersVmsState model = new FiltersVmsState(); - - /** Model tests for FiltersVmsState */ - @Test - public void testFiltersVmsState() { - // TODO: test FiltersVmsState - } - - /** Test the property 'maintenanceEventCodes' */ - @Test - public void maintenanceEventCodesTest() { - // TODO: test maintenanceEventCodes - } - - /** Test the property 'maintenanceEventDescriptions' */ - @Test - public void maintenanceEventDescriptionsTest() { - // TODO: test maintenanceEventDescriptions - } - - /** Test the property 'maintenanceEventsNotAfter' */ - @Test - public void maintenanceEventsNotAfterTest() { - // TODO: test maintenanceEventsNotAfter - } - - /** Test the property 'maintenanceEventsNotBefore' */ - @Test - public void maintenanceEventsNotBeforeTest() { - // TODO: test maintenanceEventsNotBefore - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } - - /** Test the property 'vmStates' */ - @Test - public void vmStatesTest() { - // TODO: test vmStates - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolumeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolumeTest.java deleted file mode 100644 index e2a66e0b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVolumeTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVolume */ -public class FiltersVolumeTest { - private final FiltersVolume model = new FiltersVolume(); - - /** Model tests for FiltersVolume */ - @Test - public void testFiltersVolume() { - // TODO: test FiltersVolume - } - - /** Test the property 'creationDates' */ - @Test - public void creationDatesTest() { - // TODO: test creationDates - } - - /** Test the property 'linkVolumeDeleteOnVmDeletion' */ - @Test - public void linkVolumeDeleteOnVmDeletionTest() { - // TODO: test linkVolumeDeleteOnVmDeletion - } - - /** Test the property 'linkVolumeDeviceNames' */ - @Test - public void linkVolumeDeviceNamesTest() { - // TODO: test linkVolumeDeviceNames - } - - /** Test the property 'linkVolumeLinkDates' */ - @Test - public void linkVolumeLinkDatesTest() { - // TODO: test linkVolumeLinkDates - } - - /** Test the property 'linkVolumeLinkStates' */ - @Test - public void linkVolumeLinkStatesTest() { - // TODO: test linkVolumeLinkStates - } - - /** Test the property 'linkVolumeVmIds' */ - @Test - public void linkVolumeVmIdsTest() { - // TODO: test linkVolumeVmIds - } - - /** Test the property 'snapshotIds' */ - @Test - public void snapshotIdsTest() { - // TODO: test snapshotIds - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'volumeIds' */ - @Test - public void volumeIdsTest() { - // TODO: test volumeIds - } - - /** Test the property 'volumeSizes' */ - @Test - public void volumeSizesTest() { - // TODO: test volumeSizes - } - - /** Test the property 'volumeStates' */ - @Test - public void volumeStatesTest() { - // TODO: test volumeStates - } - - /** Test the property 'volumeTypes' */ - @Test - public void volumeTypesTest() { - // TODO: test volumeTypes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnectionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnectionTest.java deleted file mode 100644 index 937205d7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FiltersVpnConnectionTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FiltersVpnConnection */ -public class FiltersVpnConnectionTest { - private final FiltersVpnConnection model = new FiltersVpnConnection(); - - /** Model tests for FiltersVpnConnection */ - @Test - public void testFiltersVpnConnection() { - // TODO: test FiltersVpnConnection - } - - /** Test the property 'bgpAsns' */ - @Test - public void bgpAsnsTest() { - // TODO: test bgpAsns - } - - /** Test the property 'clientGatewayIds' */ - @Test - public void clientGatewayIdsTest() { - // TODO: test clientGatewayIds - } - - /** Test the property 'connectionTypes' */ - @Test - public void connectionTypesTest() { - // TODO: test connectionTypes - } - - /** Test the property 'routeDestinationIpRanges' */ - @Test - public void routeDestinationIpRangesTest() { - // TODO: test routeDestinationIpRanges - } - - /** Test the property 'states' */ - @Test - public void statesTest() { - // TODO: test states - } - - /** Test the property 'staticRoutesOnly' */ - @Test - public void staticRoutesOnlyTest() { - // TODO: test staticRoutesOnly - } - - /** Test the property 'tagKeys' */ - @Test - public void tagKeysTest() { - // TODO: test tagKeys - } - - /** Test the property 'tagValues' */ - @Test - public void tagValuesTest() { - // TODO: test tagValues - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'virtualGatewayIds' */ - @Test - public void virtualGatewayIdsTest() { - // TODO: test virtualGatewayIds - } - - /** Test the property 'vpnConnectionIds' */ - @Test - public void vpnConnectionIdsTest() { - // TODO: test vpnConnectionIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalogTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalogTest.java deleted file mode 100644 index 428fec57..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuCatalogTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FlexibleGpuCatalog */ -public class FlexibleGpuCatalogTest { - private final FlexibleGpuCatalog model = new FlexibleGpuCatalog(); - - /** Model tests for FlexibleGpuCatalog */ - @Test - public void testFlexibleGpuCatalog() { - // TODO: test FlexibleGpuCatalog - } - - /** Test the property 'generations' */ - @Test - public void generationsTest() { - // TODO: test generations - } - - /** Test the property 'maxCpu' */ - @Test - public void maxCpuTest() { - // TODO: test maxCpu - } - - /** Test the property 'maxRam' */ - @Test - public void maxRamTest() { - // TODO: test maxRam - } - - /** Test the property 'modelName' */ - @Test - public void modelNameTest() { - // TODO: test modelName - } - - /** Test the property 'vram' */ - @Test - public void vramTest() { - // TODO: test vram - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuTest.java deleted file mode 100644 index 4232defe..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/FlexibleGpuTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for FlexibleGpu */ -public class FlexibleGpuTest { - private final FlexibleGpu model = new FlexibleGpu(); - - /** Model tests for FlexibleGpu */ - @Test - public void testFlexibleGpu() { - // TODO: test FlexibleGpu - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'flexibleGpuId' */ - @Test - public void flexibleGpuIdTest() { - // TODO: test flexibleGpuId - } - - /** Test the property 'generation' */ - @Test - public void generationTest() { - // TODO: test generation - } - - /** Test the property 'modelName' */ - @Test - public void modelNameTest() { - // TODO: test modelName - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/HealthCheckTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/HealthCheckTest.java deleted file mode 100644 index a4db29c3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/HealthCheckTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for HealthCheck */ -public class HealthCheckTest { - private final HealthCheck model = new HealthCheck(); - - /** Model tests for HealthCheck */ - @Test - public void testHealthCheck() { - // TODO: test HealthCheck - } - - /** Test the property 'checkInterval' */ - @Test - public void checkIntervalTest() { - // TODO: test checkInterval - } - - /** Test the property 'healthyThreshold' */ - @Test - public void healthyThresholdTest() { - // TODO: test healthyThreshold - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'port' */ - @Test - public void portTest() { - // TODO: test port - } - - /** Test the property 'protocol' */ - @Test - public void protocolTest() { - // TODO: test protocol - } - - /** Test the property 'timeout' */ - @Test - public void timeoutTest() { - // TODO: test timeout - } - - /** Test the property 'unhealthyThreshold' */ - @Test - public void unhealthyThresholdTest() { - // TODO: test unhealthyThreshold - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTaskTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTaskTest.java deleted file mode 100644 index 3c8b4fa2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageExportTaskTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ImageExportTask */ -public class ImageExportTaskTest { - private final ImageExportTask model = new ImageExportTask(); - - /** Model tests for ImageExportTask */ - @Test - public void testImageExportTask() { - // TODO: test ImageExportTask - } - - /** Test the property 'comment' */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'osuExport' */ - @Test - public void osuExportTest() { - // TODO: test osuExport - } - - /** Test the property 'progress' */ - @Test - public void progressTest() { - // TODO: test progress - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'taskId' */ - @Test - public void taskIdTest() { - // TODO: test taskId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageTest.java deleted file mode 100644 index 38c36b5d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ImageTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Image */ -public class ImageTest { - private final Image model = new Image(); - - /** Model tests for Image */ - @Test - public void testImage() { - // TODO: test Image - } - - /** Test the property 'accountAlias' */ - @Test - public void accountAliasTest() { - // TODO: test accountAlias - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'architecture' */ - @Test - public void architectureTest() { - // TODO: test architecture - } - - /** Test the property 'blockDeviceMappings' */ - @Test - public void blockDeviceMappingsTest() { - // TODO: test blockDeviceMappings - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'fileLocation' */ - @Test - public void fileLocationTest() { - // TODO: test fileLocation - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'imageName' */ - @Test - public void imageNameTest() { - // TODO: test imageName - } - - /** Test the property 'imageType' */ - @Test - public void imageTypeTest() { - // TODO: test imageType - } - - /** Test the property 'permissionsToLaunch' */ - @Test - public void permissionsToLaunchTest() { - // TODO: test permissionsToLaunch - } - - /** Test the property 'productCodes' */ - @Test - public void productCodesTest() { - // TODO: test productCodes - } - - /** Test the property 'rootDeviceName' */ - @Test - public void rootDeviceNameTest() { - // TODO: test rootDeviceName - } - - /** Test the property 'rootDeviceType' */ - @Test - public void rootDeviceTypeTest() { - // TODO: test rootDeviceType - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'stateComment' */ - @Test - public void stateCommentTest() { - // TODO: test stateComment - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicyTest.java deleted file mode 100644 index c90203b7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/InlinePolicyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for InlinePolicy */ -public class InlinePolicyTest { - private final InlinePolicy model = new InlinePolicy(); - - /** Model tests for InlinePolicy */ - @Test - public void testInlinePolicy() { - // TODO: test InlinePolicy - } - - /** Test the property 'body' */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/InternetServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/InternetServiceTest.java deleted file mode 100644 index bae3013c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/InternetServiceTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for InternetService */ -public class InternetServiceTest { - private final InternetService model = new InternetService(); - - /** Model tests for InternetService */ - @Test - public void testInternetService() { - // TODO: test InternetService - } - - /** Test the property 'internetServiceId' */ - @Test - public void internetServiceIdTest() { - // TODO: test internetServiceId - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreatedTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreatedTest.java deleted file mode 100644 index 2c5a2635..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairCreatedTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for KeypairCreated */ -public class KeypairCreatedTest { - private final KeypairCreated model = new KeypairCreated(); - - /** Model tests for KeypairCreated */ - @Test - public void testKeypairCreated() { - // TODO: test KeypairCreated - } - - /** Test the property 'keypairFingerprint' */ - @Test - public void keypairFingerprintTest() { - // TODO: test keypairFingerprint - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'keypairType' */ - @Test - public void keypairTypeTest() { - // TODO: test keypairType - } - - /** Test the property 'privateKey' */ - @Test - public void privateKeyTest() { - // TODO: test privateKey - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairTest.java deleted file mode 100644 index 2ca9ce04..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/KeypairTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Keypair */ -public class KeypairTest { - private final Keypair model = new Keypair(); - - /** Model tests for Keypair */ - @Test - public void testKeypair() { - // TODO: test Keypair - } - - /** Test the property 'keypairFingerprint' */ - @Test - public void keypairFingerprintTest() { - // TODO: test keypairFingerprint - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'keypairType' */ - @Test - public void keypairTypeTest() { - // TODO: test keypairType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequestTest.java deleted file mode 100644 index 815c766c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkFlexibleGpuRequest */ -public class LinkFlexibleGpuRequestTest { - private final LinkFlexibleGpuRequest model = new LinkFlexibleGpuRequest(); - - /** Model tests for LinkFlexibleGpuRequest */ - @Test - public void testLinkFlexibleGpuRequest() { - // TODO: test LinkFlexibleGpuRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flexibleGpuId' */ - @Test - public void flexibleGpuIdTest() { - // TODO: test flexibleGpuId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponseTest.java deleted file mode 100644 index bdbe7ed5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkFlexibleGpuResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkFlexibleGpuResponse */ -public class LinkFlexibleGpuResponseTest { - private final LinkFlexibleGpuResponse model = new LinkFlexibleGpuResponse(); - - /** Model tests for LinkFlexibleGpuResponse */ - @Test - public void testLinkFlexibleGpuResponse() { - // TODO: test LinkFlexibleGpuResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequestTest.java deleted file mode 100644 index e48dead2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkInternetServiceRequest */ -public class LinkInternetServiceRequestTest { - private final LinkInternetServiceRequest model = new LinkInternetServiceRequest(); - - /** Model tests for LinkInternetServiceRequest */ - @Test - public void testLinkInternetServiceRequest() { - // TODO: test LinkInternetServiceRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'internetServiceId' */ - @Test - public void internetServiceIdTest() { - // TODO: test internetServiceId - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponseTest.java deleted file mode 100644 index 56ff2618..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkInternetServiceResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkInternetServiceResponse */ -public class LinkInternetServiceResponseTest { - private final LinkInternetServiceResponse model = new LinkInternetServiceResponse(); - - /** Model tests for LinkInternetServiceResponse */ - @Test - public void testLinkInternetServiceResponse() { - // TODO: test LinkInternetServiceResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequestTest.java deleted file mode 100644 index f20236a6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesRequestTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkLoadBalancerBackendMachinesRequest */ -public class LinkLoadBalancerBackendMachinesRequestTest { - private final LinkLoadBalancerBackendMachinesRequest model = - new LinkLoadBalancerBackendMachinesRequest(); - - /** Model tests for LinkLoadBalancerBackendMachinesRequest */ - @Test - public void testLinkLoadBalancerBackendMachinesRequest() { - // TODO: test LinkLoadBalancerBackendMachinesRequest - } - - /** Test the property 'backendIps' */ - @Test - public void backendIpsTest() { - // TODO: test backendIps - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponseTest.java deleted file mode 100644 index 676102f4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkLoadBalancerBackendMachinesResponseTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkLoadBalancerBackendMachinesResponse */ -public class LinkLoadBalancerBackendMachinesResponseTest { - private final LinkLoadBalancerBackendMachinesResponse model = - new LinkLoadBalancerBackendMachinesResponse(); - - /** Model tests for LinkLoadBalancerBackendMachinesResponse */ - @Test - public void testLinkLoadBalancerBackendMachinesResponse() { - // TODO: test LinkLoadBalancerBackendMachinesResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequestTest.java deleted file mode 100644 index 8db27cb3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkManagedPolicyToUserGroupRequest */ -public class LinkManagedPolicyToUserGroupRequestTest { - private final LinkManagedPolicyToUserGroupRequest model = - new LinkManagedPolicyToUserGroupRequest(); - - /** Model tests for LinkManagedPolicyToUserGroupRequest */ - @Test - public void testLinkManagedPolicyToUserGroupRequest() { - // TODO: test LinkManagedPolicyToUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponseTest.java deleted file mode 100644 index d36987ee..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkManagedPolicyToUserGroupResponseTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkManagedPolicyToUserGroupResponse */ -public class LinkManagedPolicyToUserGroupResponseTest { - private final LinkManagedPolicyToUserGroupResponse model = - new LinkManagedPolicyToUserGroupResponse(); - - /** Model tests for LinkManagedPolicyToUserGroupResponse */ - @Test - public void testLinkManagedPolicyToUserGroupResponse() { - // TODO: test LinkManagedPolicyToUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLightTest.java deleted file mode 100644 index 936a2ead..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicLightTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkNicLight */ -public class LinkNicLightTest { - private final LinkNicLight model = new LinkNicLight(); - - /** Model tests for LinkNicLight */ - @Test - public void testLinkNicLight() { - // TODO: test LinkNicLight - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'deviceNumber' */ - @Test - public void deviceNumberTest() { - // TODO: test deviceNumber - } - - /** Test the property 'linkNicId' */ - @Test - public void linkNicIdTest() { - // TODO: test linkNicId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequestTest.java deleted file mode 100644 index 20135b74..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkNicRequest */ -public class LinkNicRequestTest { - private final LinkNicRequest model = new LinkNicRequest(); - - /** Model tests for LinkNicRequest */ - @Test - public void testLinkNicRequest() { - // TODO: test LinkNicRequest - } - - /** Test the property 'deviceNumber' */ - @Test - public void deviceNumberTest() { - // TODO: test deviceNumber - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponseTest.java deleted file mode 100644 index c370f353..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkNicResponse */ -public class LinkNicResponseTest { - private final LinkNicResponse model = new LinkNicResponse(); - - /** Model tests for LinkNicResponse */ - @Test - public void testLinkNicResponse() { - // TODO: test LinkNicResponse - } - - /** Test the property 'linkNicId' */ - @Test - public void linkNicIdTest() { - // TODO: test linkNicId - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicTest.java deleted file mode 100644 index 529a32b0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkNic */ -public class LinkNicTest { - private final LinkNic model = new LinkNic(); - - /** Model tests for LinkNic */ - @Test - public void testLinkNic() { - // TODO: test LinkNic - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'deviceNumber' */ - @Test - public void deviceNumberTest() { - // TODO: test deviceNumber - } - - /** Test the property 'linkNicId' */ - @Test - public void linkNicIdTest() { - // TODO: test linkNicId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'vmAccountId' */ - @Test - public void vmAccountIdTest() { - // TODO: test vmAccountId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdateTest.java deleted file mode 100644 index 23ff841d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkNicToUpdateTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkNicToUpdate */ -public class LinkNicToUpdateTest { - private final LinkNicToUpdate model = new LinkNicToUpdate(); - - /** Model tests for LinkNicToUpdate */ - @Test - public void testLinkNicToUpdate() { - // TODO: test LinkNicToUpdate - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'linkNicId' */ - @Test - public void linkNicIdTest() { - // TODO: test linkNicId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequestTest.java deleted file mode 100644 index 1e5d02b5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPolicyRequest */ -public class LinkPolicyRequestTest { - private final LinkPolicyRequest model = new LinkPolicyRequest(); - - /** Model tests for LinkPolicyRequest */ - @Test - public void testLinkPolicyRequest() { - // TODO: test LinkPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponseTest.java deleted file mode 100644 index 223ddda6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPolicyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPolicyResponse */ -public class LinkPolicyResponseTest { - private final LinkPolicyResponse model = new LinkPolicyResponse(); - - /** Model tests for LinkPolicyResponse */ - @Test - public void testLinkPolicyResponse() { - // TODO: test LinkPolicyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequestTest.java deleted file mode 100644 index d937aa42..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPrivateIpsRequest */ -public class LinkPrivateIpsRequestTest { - private final LinkPrivateIpsRequest model = new LinkPrivateIpsRequest(); - - /** Model tests for LinkPrivateIpsRequest */ - @Test - public void testLinkPrivateIpsRequest() { - // TODO: test LinkPrivateIpsRequest - } - - /** Test the property 'allowRelink' */ - @Test - public void allowRelinkTest() { - // TODO: test allowRelink - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'secondaryPrivateIpCount' */ - @Test - public void secondaryPrivateIpCountTest() { - // TODO: test secondaryPrivateIpCount - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponseTest.java deleted file mode 100644 index ddc10b2e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPrivateIpsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPrivateIpsResponse */ -public class LinkPrivateIpsResponseTest { - private final LinkPrivateIpsResponse model = new LinkPrivateIpsResponse(); - - /** Model tests for LinkPrivateIpsResponse */ - @Test - public void testLinkPrivateIpsResponse() { - // TODO: test LinkPrivateIpsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVmTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVmTest.java deleted file mode 100644 index 58fc44ab..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpLightForVmTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPublicIpLightForVm */ -public class LinkPublicIpLightForVmTest { - private final LinkPublicIpLightForVm model = new LinkPublicIpLightForVm(); - - /** Model tests for LinkPublicIpLightForVm */ - @Test - public void testLinkPublicIpLightForVm() { - // TODO: test LinkPublicIpLightForVm - } - - /** Test the property 'publicDnsName' */ - @Test - public void publicDnsNameTest() { - // TODO: test publicDnsName - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpAccountId' */ - @Test - public void publicIpAccountIdTest() { - // TODO: test publicIpAccountId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequestTest.java deleted file mode 100644 index 6b7944e8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpRequestTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPublicIpRequest */ -public class LinkPublicIpRequestTest { - private final LinkPublicIpRequest model = new LinkPublicIpRequest(); - - /** Model tests for LinkPublicIpRequest */ - @Test - public void testLinkPublicIpRequest() { - // TODO: test LinkPublicIpRequest - } - - /** Test the property 'allowRelink' */ - @Test - public void allowRelinkTest() { - // TODO: test allowRelink - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponseTest.java deleted file mode 100644 index 4976ca71..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPublicIpResponse */ -public class LinkPublicIpResponseTest { - private final LinkPublicIpResponse model = new LinkPublicIpResponse(); - - /** Model tests for LinkPublicIpResponse */ - @Test - public void testLinkPublicIpResponse() { - // TODO: test LinkPublicIpResponse - } - - /** Test the property 'linkPublicIpId' */ - @Test - public void linkPublicIpIdTest() { - // TODO: test linkPublicIpId - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpTest.java deleted file mode 100644 index d729ac4d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkPublicIpTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkPublicIp */ -public class LinkPublicIpTest { - private final LinkPublicIp model = new LinkPublicIp(); - - /** Model tests for LinkPublicIp */ - @Test - public void testLinkPublicIp() { - // TODO: test LinkPublicIp - } - - /** Test the property 'linkPublicIpId' */ - @Test - public void linkPublicIpIdTest() { - // TODO: test linkPublicIpId - } - - /** Test the property 'publicDnsName' */ - @Test - public void publicDnsNameTest() { - // TODO: test publicDnsName - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpAccountId' */ - @Test - public void publicIpAccountIdTest() { - // TODO: test publicIpAccountId - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequestTest.java deleted file mode 100644 index 0905b63c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkRouteTableRequest */ -public class LinkRouteTableRequestTest { - private final LinkRouteTableRequest model = new LinkRouteTableRequest(); - - /** Model tests for LinkRouteTableRequest */ - @Test - public void testLinkRouteTableRequest() { - // TODO: test LinkRouteTableRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponseTest.java deleted file mode 100644 index 2cd936c3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkRouteTableResponse */ -public class LinkRouteTableResponseTest { - private final LinkRouteTableResponse model = new LinkRouteTableResponse(); - - /** Model tests for LinkRouteTableResponse */ - @Test - public void testLinkRouteTableResponse() { - // TODO: test LinkRouteTableResponse - } - - /** Test the property 'linkRouteTableId' */ - @Test - public void linkRouteTableIdTest() { - // TODO: test linkRouteTableId - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableTest.java deleted file mode 100644 index 78b4d19d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkRouteTableTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkRouteTable */ -public class LinkRouteTableTest { - private final LinkRouteTable model = new LinkRouteTable(); - - /** Model tests for LinkRouteTable */ - @Test - public void testLinkRouteTable() { - // TODO: test LinkRouteTable - } - - /** Test the property 'linkRouteTableId' */ - @Test - public void linkRouteTableIdTest() { - // TODO: test linkRouteTableId - } - - /** Test the property 'main' */ - @Test - public void mainTest() { - // TODO: test main - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequestTest.java deleted file mode 100644 index 57c4c3ac..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkVirtualGatewayRequest */ -public class LinkVirtualGatewayRequestTest { - private final LinkVirtualGatewayRequest model = new LinkVirtualGatewayRequest(); - - /** Model tests for LinkVirtualGatewayRequest */ - @Test - public void testLinkVirtualGatewayRequest() { - // TODO: test LinkVirtualGatewayRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponseTest.java deleted file mode 100644 index 1a99bb04..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVirtualGatewayResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkVirtualGatewayResponse */ -public class LinkVirtualGatewayResponseTest { - private final LinkVirtualGatewayResponse model = new LinkVirtualGatewayResponse(); - - /** Model tests for LinkVirtualGatewayResponse */ - @Test - public void testLinkVirtualGatewayResponse() { - // TODO: test LinkVirtualGatewayResponse - } - - /** Test the property 'netToVirtualGatewayLink' */ - @Test - public void netToVirtualGatewayLinkTest() { - // TODO: test netToVirtualGatewayLink - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequestTest.java deleted file mode 100644 index 1af18ee1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkVolumeRequest */ -public class LinkVolumeRequestTest { - private final LinkVolumeRequest model = new LinkVolumeRequest(); - - /** Model tests for LinkVolumeRequest */ - @Test - public void testLinkVolumeRequest() { - // TODO: test LinkVolumeRequest - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponseTest.java deleted file mode 100644 index cb9bcae1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkVolumeResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkVolumeResponse */ -public class LinkVolumeResponseTest { - private final LinkVolumeResponse model = new LinkVolumeResponse(); - - /** Model tests for LinkVolumeResponse */ - @Test - public void testLinkVolumeResponse() { - // TODO: test LinkVolumeResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicyTest.java deleted file mode 100644 index 88f64d03..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedPolicyTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkedPolicy */ -public class LinkedPolicyTest { - private final LinkedPolicy model = new LinkedPolicy(); - - /** Model tests for LinkedPolicy */ - @Test - public void testLinkedPolicy() { - // TODO: test LinkedPolicy - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'orn' */ - @Test - public void ornTest() { - // TODO: test orn - } - - /** Test the property 'policyId' */ - @Test - public void policyIdTest() { - // TODO: test policyId - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolumeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolumeTest.java deleted file mode 100644 index d577b222..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LinkedVolumeTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LinkedVolume */ -public class LinkedVolumeTest { - private final LinkedVolume model = new LinkedVolume(); - - /** Model tests for LinkedVolume */ - @Test - public void testLinkedVolume() { - // TODO: test LinkedVolume - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'deviceName' */ - @Test - public void deviceNameTest() { - // TODO: test deviceName - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreationTest.java deleted file mode 100644 index eb2be44c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerForCreationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ListenerForCreation */ -public class ListenerForCreationTest { - private final ListenerForCreation model = new ListenerForCreation(); - - /** Model tests for ListenerForCreation */ - @Test - public void testListenerForCreation() { - // TODO: test ListenerForCreation - } - - /** Test the property 'backendPort' */ - @Test - public void backendPortTest() { - // TODO: test backendPort - } - - /** Test the property 'backendProtocol' */ - @Test - public void backendProtocolTest() { - // TODO: test backendProtocol - } - - /** Test the property 'loadBalancerPort' */ - @Test - public void loadBalancerPortTest() { - // TODO: test loadBalancerPort - } - - /** Test the property 'loadBalancerProtocol' */ - @Test - public void loadBalancerProtocolTest() { - // TODO: test loadBalancerProtocol - } - - /** Test the property 'serverCertificateId' */ - @Test - public void serverCertificateIdTest() { - // TODO: test serverCertificateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreationTest.java deleted file mode 100644 index e96807b0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleForCreationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ListenerRuleForCreation */ -public class ListenerRuleForCreationTest { - private final ListenerRuleForCreation model = new ListenerRuleForCreation(); - - /** Model tests for ListenerRuleForCreation */ - @Test - public void testListenerRuleForCreation() { - // TODO: test ListenerRuleForCreation - } - - /** Test the property 'action' */ - @Test - public void actionTest() { - // TODO: test action - } - - /** Test the property 'hostNamePattern' */ - @Test - public void hostNamePatternTest() { - // TODO: test hostNamePattern - } - - /** Test the property 'listenerRuleName' */ - @Test - public void listenerRuleNameTest() { - // TODO: test listenerRuleName - } - - /** Test the property 'pathPattern' */ - @Test - public void pathPatternTest() { - // TODO: test pathPattern - } - - /** Test the property 'priority' */ - @Test - public void priorityTest() { - // TODO: test priority - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleTest.java deleted file mode 100644 index 8f54d90b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerRuleTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ListenerRule */ -public class ListenerRuleTest { - private final ListenerRule model = new ListenerRule(); - - /** Model tests for ListenerRule */ - @Test - public void testListenerRule() { - // TODO: test ListenerRule - } - - /** Test the property 'action' */ - @Test - public void actionTest() { - // TODO: test action - } - - /** Test the property 'hostNamePattern' */ - @Test - public void hostNamePatternTest() { - // TODO: test hostNamePattern - } - - /** Test the property 'listenerId' */ - @Test - public void listenerIdTest() { - // TODO: test listenerId - } - - /** Test the property 'listenerRuleId' */ - @Test - public void listenerRuleIdTest() { - // TODO: test listenerRuleId - } - - /** Test the property 'listenerRuleName' */ - @Test - public void listenerRuleNameTest() { - // TODO: test listenerRuleName - } - - /** Test the property 'pathPattern' */ - @Test - public void pathPatternTest() { - // TODO: test pathPattern - } - - /** Test the property 'priority' */ - @Test - public void priorityTest() { - // TODO: test priority - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerTest.java deleted file mode 100644 index 40e7bc59..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ListenerTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Listener */ -public class ListenerTest { - private final Listener model = new Listener(); - - /** Model tests for Listener */ - @Test - public void testListener() { - // TODO: test Listener - } - - /** Test the property 'backendPort' */ - @Test - public void backendPortTest() { - // TODO: test backendPort - } - - /** Test the property 'backendProtocol' */ - @Test - public void backendProtocolTest() { - // TODO: test backendProtocol - } - - /** Test the property 'loadBalancerPort' */ - @Test - public void loadBalancerPortTest() { - // TODO: test loadBalancerPort - } - - /** Test the property 'loadBalancerProtocol' */ - @Test - public void loadBalancerProtocolTest() { - // TODO: test loadBalancerProtocol - } - - /** Test the property 'policyNames' */ - @Test - public void policyNamesTest() { - // TODO: test policyNames - } - - /** Test the property 'serverCertificateId' */ - @Test - public void serverCertificateIdTest() { - // TODO: test serverCertificateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLightTest.java deleted file mode 100644 index daac5218..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerLightTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LoadBalancerLight */ -public class LoadBalancerLightTest { - private final LoadBalancerLight model = new LoadBalancerLight(); - - /** Model tests for LoadBalancerLight */ - @Test - public void testLoadBalancerLight() { - // TODO: test LoadBalancerLight - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'loadBalancerPort' */ - @Test - public void loadBalancerPortTest() { - // TODO: test loadBalancerPort - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicyTest.java deleted file mode 100644 index e5e13ec3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerStickyCookiePolicyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LoadBalancerStickyCookiePolicy */ -public class LoadBalancerStickyCookiePolicyTest { - private final LoadBalancerStickyCookiePolicy model = new LoadBalancerStickyCookiePolicy(); - - /** Model tests for LoadBalancerStickyCookiePolicy */ - @Test - public void testLoadBalancerStickyCookiePolicy() { - // TODO: test LoadBalancerStickyCookiePolicy - } - - /** Test the property 'cookieExpirationPeriod' */ - @Test - public void cookieExpirationPeriodTest() { - // TODO: test cookieExpirationPeriod - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTagTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTagTest.java deleted file mode 100644 index 0a3c4b29..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTagTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LoadBalancerTag */ -public class LoadBalancerTagTest { - private final LoadBalancerTag model = new LoadBalancerTag(); - - /** Model tests for LoadBalancerTag */ - @Test - public void testLoadBalancerTag() { - // TODO: test LoadBalancerTag - } - - /** Test the property 'key' */ - @Test - public void keyTest() { - // TODO: test key - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'value' */ - @Test - public void valueTest() { - // TODO: test value - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTest.java deleted file mode 100644 index 29dc87a5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LoadBalancerTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for LoadBalancer */ -public class LoadBalancerTest { - private final LoadBalancer model = new LoadBalancer(); - - /** Model tests for LoadBalancer */ - @Test - public void testLoadBalancer() { - // TODO: test LoadBalancer - } - - /** Test the property 'accessLog' */ - @Test - public void accessLogTest() { - // TODO: test accessLog - } - - /** Test the property 'applicationStickyCookiePolicies' */ - @Test - public void applicationStickyCookiePoliciesTest() { - // TODO: test applicationStickyCookiePolicies - } - - /** Test the property 'backendIps' */ - @Test - public void backendIpsTest() { - // TODO: test backendIps - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dnsName' */ - @Test - public void dnsNameTest() { - // TODO: test dnsName - } - - /** Test the property 'healthCheck' */ - @Test - public void healthCheckTest() { - // TODO: test healthCheck - } - - /** Test the property 'listeners' */ - @Test - public void listenersTest() { - // TODO: test listeners - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'loadBalancerStickyCookiePolicies' */ - @Test - public void loadBalancerStickyCookiePoliciesTest() { - // TODO: test loadBalancerStickyCookiePolicies - } - - /** Test the property 'loadBalancerType' */ - @Test - public void loadBalancerTypeTest() { - // TODO: test loadBalancerType - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'securedCookies' */ - @Test - public void securedCookiesTest() { - // TODO: test securedCookies - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'sourceSecurityGroup' */ - @Test - public void sourceSecurityGroupTest() { - // TODO: test sourceSecurityGroup - } - - /** Test the property 'subnets' */ - @Test - public void subnetsTest() { - // TODO: test subnets - } - - /** Test the property 'subregionNames' */ - @Test - public void subregionNamesTest() { - // TODO: test subregionNames - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LocationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LocationTest.java deleted file mode 100644 index 921929da..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LocationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Location */ -public class LocationTest { - private final Location model = new Location(); - - /** Model tests for Location */ - @Test - public void testLocation() { - // TODO: test Location - } - - /** Test the property 'code' */ - @Test - public void codeTest() { - // TODO: test code - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LogTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/LogTest.java deleted file mode 100644 index 933cc306..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/LogTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Log */ -public class LogTest { - private final Log model = new Log(); - - /** Model tests for Log */ - @Test - public void testLog() { - // TODO: test Log - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'callDuration' */ - @Test - public void callDurationTest() { - // TODO: test callDuration - } - - /** Test the property 'queryAccessKey' */ - @Test - public void queryAccessKeyTest() { - // TODO: test queryAccessKey - } - - /** Test the property 'queryApiName' */ - @Test - public void queryApiNameTest() { - // TODO: test queryApiName - } - - /** Test the property 'queryApiVersion' */ - @Test - public void queryApiVersionTest() { - // TODO: test queryApiVersion - } - - /** Test the property 'queryCallName' */ - @Test - public void queryCallNameTest() { - // TODO: test queryCallName - } - - /** Test the property 'queryDate' */ - @Test - public void queryDateTest() { - // TODO: test queryDate - } - - /** Test the property 'queryHeaderRaw' */ - @Test - public void queryHeaderRawTest() { - // TODO: test queryHeaderRaw - } - - /** Test the property 'queryHeaderSize' */ - @Test - public void queryHeaderSizeTest() { - // TODO: test queryHeaderSize - } - - /** Test the property 'queryIpAddress' */ - @Test - public void queryIpAddressTest() { - // TODO: test queryIpAddress - } - - /** Test the property 'queryPayloadRaw' */ - @Test - public void queryPayloadRawTest() { - // TODO: test queryPayloadRaw - } - - /** Test the property 'queryPayloadSize' */ - @Test - public void queryPayloadSizeTest() { - // TODO: test queryPayloadSize - } - - /** Test the property 'queryUserAgent' */ - @Test - public void queryUserAgentTest() { - // TODO: test queryUserAgent - } - - /** Test the property 'requestId' */ - @Test - public void requestIdTest() { - // TODO: test requestId - } - - /** Test the property 'responseSize' */ - @Test - public void responseSizeTest() { - // TODO: test responseSize - } - - /** Test the property 'responseStatusCode' */ - @Test - public void responseStatusCodeTest() { - // TODO: test responseStatusCode - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEventTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEventTest.java deleted file mode 100644 index d5b3658f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/MaintenanceEventTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for MaintenanceEvent */ -public class MaintenanceEventTest { - private final MaintenanceEvent model = new MaintenanceEvent(); - - /** Model tests for MaintenanceEvent */ - @Test - public void testMaintenanceEvent() { - // TODO: test MaintenanceEvent - } - - /** Test the property 'code' */ - @Test - public void codeTest() { - // TODO: test code - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'notAfter' */ - @Test - public void notAfterTest() { - // TODO: test notAfter - } - - /** Test the property 'notBefore' */ - @Test - public void notBeforeTest() { - // TODO: test notBefore - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NatServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NatServiceTest.java deleted file mode 100644 index b3f53a87..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NatServiceTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NatService */ -public class NatServiceTest { - private final NatService model = new NatService(); - - /** Model tests for NatService */ - @Test - public void testNatService() { - // TODO: test NatService - } - - /** Test the property 'clientToken' */ - @Test - public void clientTokenTest() { - // TODO: test clientToken - } - - /** Test the property 'natServiceId' */ - @Test - public void natServiceIdTest() { - // TODO: test natServiceId - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPointTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPointTest.java deleted file mode 100644 index 3d91701d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetAccessPointTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NetAccessPoint */ -public class NetAccessPointTest { - private final NetAccessPoint model = new NetAccessPoint(); - - /** Model tests for NetAccessPoint */ - @Test - public void testNetAccessPoint() { - // TODO: test NetAccessPoint - } - - /** Test the property 'netAccessPointId' */ - @Test - public void netAccessPointIdTest() { - // TODO: test netAccessPointId - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'routeTableIds' */ - @Test - public void routeTableIdsTest() { - // TODO: test routeTableIds - } - - /** Test the property 'serviceName' */ - @Test - public void serviceNameTest() { - // TODO: test serviceName - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringStateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringStateTest.java deleted file mode 100644 index d0d48d1c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringStateTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NetPeeringState */ -public class NetPeeringStateTest { - private final NetPeeringState model = new NetPeeringState(); - - /** Model tests for NetPeeringState */ - @Test - public void testNetPeeringState() { - // TODO: test NetPeeringState - } - - /** Test the property 'message' */ - @Test - public void messageTest() { - // TODO: test message - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringTest.java deleted file mode 100644 index 0f8bc1a8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetPeeringTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NetPeering */ -public class NetPeeringTest { - private final NetPeering model = new NetPeering(); - - /** Model tests for NetPeering */ - @Test - public void testNetPeering() { - // TODO: test NetPeering - } - - /** Test the property 'accepterNet' */ - @Test - public void accepterNetTest() { - // TODO: test accepterNet - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } - - /** Test the property 'sourceNet' */ - @Test - public void sourceNetTest() { - // TODO: test sourceNet - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetTest.java deleted file mode 100644 index d63d349b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Net */ -public class NetTest { - private final Net model = new Net(); - - /** Model tests for Net */ - @Test - public void testNet() { - // TODO: test Net - } - - /** Test the property 'dhcpOptionsSetId' */ - @Test - public void dhcpOptionsSetIdTest() { - // TODO: test dhcpOptionsSetId - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'tenancy' */ - @Test - public void tenancyTest() { - // TODO: test tenancy - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLinkTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLinkTest.java deleted file mode 100644 index f14bbfc7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NetToVirtualGatewayLinkTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NetToVirtualGatewayLink */ -public class NetToVirtualGatewayLinkTest { - private final NetToVirtualGatewayLink model = new NetToVirtualGatewayLink(); - - /** Model tests for NetToVirtualGatewayLink */ - @Test - public void testNetToVirtualGatewayLink() { - // TODO: test NetToVirtualGatewayLink - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreationTest.java deleted file mode 100644 index 0a8e0ea6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicForVmCreationTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NicForVmCreation */ -public class NicForVmCreationTest { - private final NicForVmCreation model = new NicForVmCreation(); - - /** Model tests for NicForVmCreation */ - @Test - public void testNicForVmCreation() { - // TODO: test NicForVmCreation - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'deviceNumber' */ - @Test - public void deviceNumberTest() { - // TODO: test deviceNumber - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'secondaryPrivateIpCount' */ - @Test - public void secondaryPrivateIpCountTest() { - // TODO: test secondaryPrivateIpCount - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicLightTest.java deleted file mode 100644 index cc7284e5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicLightTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for NicLight */ -public class NicLightTest { - private final NicLight model = new NicLight(); - - /** Model tests for NicLight */ - @Test - public void testNicLight() { - // TODO: test NicLight - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'isSourceDestChecked' */ - @Test - public void isSourceDestCheckedTest() { - // TODO: test isSourceDestChecked - } - - /** Test the property 'linkNic' */ - @Test - public void linkNicTest() { - // TODO: test linkNic - } - - /** Test the property 'linkPublicIp' */ - @Test - public void linkPublicIpTest() { - // TODO: test linkPublicIp - } - - /** Test the property 'macAddress' */ - @Test - public void macAddressTest() { - // TODO: test macAddress - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateDnsName' */ - @Test - public void privateDnsNameTest() { - // TODO: test privateDnsName - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicTest.java deleted file mode 100644 index 8464e021..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/NicTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Nic */ -public class NicTest { - private final Nic model = new Nic(); - - /** Model tests for Nic */ - @Test - public void testNic() { - // TODO: test Nic - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'isSourceDestChecked' */ - @Test - public void isSourceDestCheckedTest() { - // TODO: test isSourceDestChecked - } - - /** Test the property 'linkNic' */ - @Test - public void linkNicTest() { - // TODO: test linkNic - } - - /** Test the property 'linkPublicIp' */ - @Test - public void linkPublicIpTest() { - // TODO: test linkPublicIp - } - - /** Test the property 'macAddress' */ - @Test - public void macAddressTest() { - // TODO: test macAddress - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateDnsName' */ - @Test - public void privateDnsNameTest() { - // TODO: test privateDnsName - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKeyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKeyTest.java deleted file mode 100644 index a096e5c1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuApiKeyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for OsuApiKey */ -public class OsuApiKeyTest { - private final OsuApiKey model = new OsuApiKey(); - - /** Model tests for OsuApiKey */ - @Test - public void testOsuApiKey() { - // TODO: test OsuApiKey - } - - /** Test the property 'apiKeyId' */ - @Test - public void apiKeyIdTest() { - // TODO: test apiKeyId - } - - /** Test the property 'secretKey' */ - @Test - public void secretKeyTest() { - // TODO: test secretKey - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTaskTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTaskTest.java deleted file mode 100644 index 862abef2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportImageExportTaskTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for OsuExportImageExportTask */ -public class OsuExportImageExportTaskTest { - private final OsuExportImageExportTask model = new OsuExportImageExportTask(); - - /** Model tests for OsuExportImageExportTask */ - @Test - public void testOsuExportImageExportTask() { - // TODO: test OsuExportImageExportTask - } - - /** Test the property 'diskImageFormat' */ - @Test - public void diskImageFormatTest() { - // TODO: test diskImageFormat - } - - /** Test the property 'osuBucket' */ - @Test - public void osuBucketTest() { - // TODO: test osuBucket - } - - /** Test the property 'osuManifestUrl' */ - @Test - public void osuManifestUrlTest() { - // TODO: test osuManifestUrl - } - - /** Test the property 'osuPrefix' */ - @Test - public void osuPrefixTest() { - // TODO: test osuPrefix - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTaskTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTaskTest.java deleted file mode 100644 index b085c797..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportSnapshotExportTaskTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for OsuExportSnapshotExportTask */ -public class OsuExportSnapshotExportTaskTest { - private final OsuExportSnapshotExportTask model = new OsuExportSnapshotExportTask(); - - /** Model tests for OsuExportSnapshotExportTask */ - @Test - public void testOsuExportSnapshotExportTask() { - // TODO: test OsuExportSnapshotExportTask - } - - /** Test the property 'diskImageFormat' */ - @Test - public void diskImageFormatTest() { - // TODO: test diskImageFormat - } - - /** Test the property 'osuBucket' */ - @Test - public void osuBucketTest() { - // TODO: test osuBucket - } - - /** Test the property 'osuPrefix' */ - @Test - public void osuPrefixTest() { - // TODO: test osuPrefix - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreateTest.java deleted file mode 100644 index 625353ae..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/OsuExportToCreateTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for OsuExportToCreate */ -public class OsuExportToCreateTest { - private final OsuExportToCreate model = new OsuExportToCreate(); - - /** Model tests for OsuExportToCreate */ - @Test - public void testOsuExportToCreate() { - // TODO: test OsuExportToCreate - } - - /** Test the property 'diskImageFormat' */ - @Test - public void diskImageFormatTest() { - // TODO: test diskImageFormat - } - - /** Test the property 'osuApiKey' */ - @Test - public void osuApiKeyTest() { - // TODO: test osuApiKey - } - - /** Test the property 'osuBucket' */ - @Test - public void osuBucketTest() { - // TODO: test osuBucket - } - - /** Test the property 'osuManifestUrl' */ - @Test - public void osuManifestUrlTest() { - // TODO: test osuManifestUrl - } - - /** Test the property 'osuPrefix' */ - @Test - public void osuPrefixTest() { - // TODO: test osuPrefix - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreationTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreationTest.java deleted file mode 100644 index 75c944d5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceCreationTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PermissionsOnResourceCreation */ -public class PermissionsOnResourceCreationTest { - private final PermissionsOnResourceCreation model = new PermissionsOnResourceCreation(); - - /** Model tests for PermissionsOnResourceCreation */ - @Test - public void testPermissionsOnResourceCreation() { - // TODO: test PermissionsOnResourceCreation - } - - /** Test the property 'additions' */ - @Test - public void additionsTest() { - // TODO: test additions - } - - /** Test the property 'removals' */ - @Test - public void removalsTest() { - // TODO: test removals - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceTest.java deleted file mode 100644 index 7ae4dbe1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PermissionsOnResourceTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PermissionsOnResource */ -public class PermissionsOnResourceTest { - private final PermissionsOnResource model = new PermissionsOnResource(); - - /** Model tests for PermissionsOnResource */ - @Test - public void testPermissionsOnResource() { - // TODO: test PermissionsOnResource - } - - /** Test the property 'accountIds' */ - @Test - public void accountIdsTest() { - // TODO: test accountIds - } - - /** Test the property 'globalPermission' */ - @Test - public void globalPermissionTest() { - // TODO: test globalPermission - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase1OptionsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase1OptionsTest.java deleted file mode 100644 index ab3bd9cb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase1OptionsTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Phase1Options */ -public class Phase1OptionsTest { - private final Phase1Options model = new Phase1Options(); - - /** Model tests for Phase1Options */ - @Test - public void testPhase1Options() { - // TODO: test Phase1Options - } - - /** Test the property 'dpdTimeoutAction' */ - @Test - public void dpdTimeoutActionTest() { - // TODO: test dpdTimeoutAction - } - - /** Test the property 'dpdTimeoutSeconds' */ - @Test - public void dpdTimeoutSecondsTest() { - // TODO: test dpdTimeoutSeconds - } - - /** Test the property 'ikeVersions' */ - @Test - public void ikeVersionsTest() { - // TODO: test ikeVersions - } - - /** Test the property 'phase1DhGroupNumbers' */ - @Test - public void phase1DhGroupNumbersTest() { - // TODO: test phase1DhGroupNumbers - } - - /** Test the property 'phase1EncryptionAlgorithms' */ - @Test - public void phase1EncryptionAlgorithmsTest() { - // TODO: test phase1EncryptionAlgorithms - } - - /** Test the property 'phase1IntegrityAlgorithms' */ - @Test - public void phase1IntegrityAlgorithmsTest() { - // TODO: test phase1IntegrityAlgorithms - } - - /** Test the property 'phase1LifetimeSeconds' */ - @Test - public void phase1LifetimeSecondsTest() { - // TODO: test phase1LifetimeSeconds - } - - /** Test the property 'replayWindowSize' */ - @Test - public void replayWindowSizeTest() { - // TODO: test replayWindowSize - } - - /** Test the property 'startupAction' */ - @Test - public void startupActionTest() { - // TODO: test startupAction - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase2OptionsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase2OptionsTest.java deleted file mode 100644 index d26d4ff9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/Phase2OptionsTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Phase2Options */ -public class Phase2OptionsTest { - private final Phase2Options model = new Phase2Options(); - - /** Model tests for Phase2Options */ - @Test - public void testPhase2Options() { - // TODO: test Phase2Options - } - - /** Test the property 'phase2DhGroupNumbers' */ - @Test - public void phase2DhGroupNumbersTest() { - // TODO: test phase2DhGroupNumbers - } - - /** Test the property 'phase2EncryptionAlgorithms' */ - @Test - public void phase2EncryptionAlgorithmsTest() { - // TODO: test phase2EncryptionAlgorithms - } - - /** Test the property 'phase2IntegrityAlgorithms' */ - @Test - public void phase2IntegrityAlgorithmsTest() { - // TODO: test phase2IntegrityAlgorithms - } - - /** Test the property 'phase2LifetimeSeconds' */ - @Test - public void phase2LifetimeSecondsTest() { - // TODO: test phase2LifetimeSeconds - } - - /** Test the property 'preSharedKey' */ - @Test - public void preSharedKeyTest() { - // TODO: test preSharedKey - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PlacementTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PlacementTest.java deleted file mode 100644 index 61a03317..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PlacementTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Placement */ -public class PlacementTest { - private final Placement model = new Placement(); - - /** Model tests for Placement */ - @Test - public void testPlacement() { - // TODO: test Placement - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'tenancy' */ - @Test - public void tenancyTest() { - // TODO: test tenancy - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyTest.java deleted file mode 100644 index 07dcc9f1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Policy */ -public class PolicyTest { - private final Policy model = new Policy(); - - /** Model tests for Policy */ - @Test - public void testPolicy() { - // TODO: test Policy - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'isLinkable' */ - @Test - public void isLinkableTest() { - // TODO: test isLinkable - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'orn' */ - @Test - public void ornTest() { - // TODO: test orn - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'policyDefaultVersionId' */ - @Test - public void policyDefaultVersionIdTest() { - // TODO: test policyDefaultVersionId - } - - /** Test the property 'policyId' */ - @Test - public void policyIdTest() { - // TODO: test policyId - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } - - /** Test the property 'resourcesCount' */ - @Test - public void resourcesCountTest() { - // TODO: test resourcesCount - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersionTest.java deleted file mode 100644 index 675e51a2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PolicyVersionTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PolicyVersion */ -public class PolicyVersionTest { - private final PolicyVersion model = new PolicyVersion(); - - /** Model tests for PolicyVersion */ - @Test - public void testPolicyVersion() { - // TODO: test PolicyVersion - } - - /** Test the property 'body' */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'defaultVersion' */ - @Test - public void defaultVersionTest() { - // TODO: test defaultVersion - } - - /** Test the property 'versionId' */ - @Test - public void versionIdTest() { - // TODO: test versionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVmTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVmTest.java deleted file mode 100644 index f14cd34f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightForVmTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PrivateIpLightForVm */ -public class PrivateIpLightForVmTest { - private final PrivateIpLightForVm model = new PrivateIpLightForVm(); - - /** Model tests for PrivateIpLightForVm */ - @Test - public void testPrivateIpLightForVm() { - // TODO: test PrivateIpLightForVm - } - - /** Test the property 'isPrimary' */ - @Test - public void isPrimaryTest() { - // TODO: test isPrimary - } - - /** Test the property 'linkPublicIp' */ - @Test - public void linkPublicIpTest() { - // TODO: test linkPublicIp - } - - /** Test the property 'privateDnsName' */ - @Test - public void privateDnsNameTest() { - // TODO: test privateDnsName - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightTest.java deleted file mode 100644 index 6666869e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpLightTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PrivateIpLight */ -public class PrivateIpLightTest { - private final PrivateIpLight model = new PrivateIpLight(); - - /** Model tests for PrivateIpLight */ - @Test - public void testPrivateIpLight() { - // TODO: test PrivateIpLight - } - - /** Test the property 'isPrimary' */ - @Test - public void isPrimaryTest() { - // TODO: test isPrimary - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpTest.java deleted file mode 100644 index 6ea2c4e7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PrivateIpTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PrivateIp */ -public class PrivateIpTest { - private final PrivateIp model = new PrivateIp(); - - /** Model tests for PrivateIp */ - @Test - public void testPrivateIp() { - // TODO: test PrivateIp - } - - /** Test the property 'isPrimary' */ - @Test - public void isPrimaryTest() { - // TODO: test isPrimary - } - - /** Test the property 'linkPublicIp' */ - @Test - public void linkPublicIpTest() { - // TODO: test linkPublicIp - } - - /** Test the property 'privateDnsName' */ - @Test - public void privateDnsNameTest() { - // TODO: test privateDnsName - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ProductTypeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ProductTypeTest.java deleted file mode 100644 index 758bfc64..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ProductTypeTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ProductType */ -public class ProductTypeTest { - private final ProductType model = new ProductType(); - - /** Model tests for ProductType */ - @Test - public void testProductType() { - // TODO: test ProductType - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'productTypeId' */ - @Test - public void productTypeIdTest() { - // TODO: test productTypeId - } - - /** Test the property 'vendor' */ - @Test - public void vendorTest() { - // TODO: test vendor - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLightTest.java deleted file mode 100644 index 714b95cd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpLightTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PublicIpLight */ -public class PublicIpLightTest { - private final PublicIpLight model = new PublicIpLight(); - - /** Model tests for PublicIpLight */ - @Test - public void testPublicIpLight() { - // TODO: test PublicIpLight - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpTest.java deleted file mode 100644 index b54cde3b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PublicIpTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PublicIp */ -public class PublicIpTest { - private final PublicIp model = new PublicIp(); - - /** Model tests for PublicIp */ - @Test - public void testPublicIp() { - // TODO: test PublicIp - } - - /** Test the property 'linkPublicIpId' */ - @Test - public void linkPublicIpIdTest() { - // TODO: test linkPublicIpId - } - - /** Test the property 'nicAccountId' */ - @Test - public void nicAccountIdTest() { - // TODO: test nicAccountId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'publicIpId' */ - @Test - public void publicIpIdTest() { - // TODO: test publicIpId - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequestTest.java deleted file mode 100644 index 77a95089..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PutUserGroupPolicyRequest */ -public class PutUserGroupPolicyRequestTest { - private final PutUserGroupPolicyRequest model = new PutUserGroupPolicyRequest(); - - /** Model tests for PutUserGroupPolicyRequest */ - @Test - public void testPutUserGroupPolicyRequest() { - // TODO: test PutUserGroupPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyDocument' */ - @Test - public void policyDocumentTest() { - // TODO: test policyDocument - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponseTest.java deleted file mode 100644 index ba7fcb43..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/PutUserGroupPolicyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for PutUserGroupPolicyResponse */ -public class PutUserGroupPolicyResponseTest { - private final PutUserGroupPolicyResponse model = new PutUserGroupPolicyResponse(); - - /** Model tests for PutUserGroupPolicyResponse */ - @Test - public void testPutUserGroupPolicyResponse() { - // TODO: test PutUserGroupPolicyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTest.java deleted file mode 100644 index 922736d1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Quota */ -public class QuotaTest { - private final Quota model = new Quota(); - - /** Model tests for Quota */ - @Test - public void testQuota() { - // TODO: test Quota - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'maxValue' */ - @Test - public void maxValueTest() { - // TODO: test maxValue - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'quotaCollection' */ - @Test - public void quotaCollectionTest() { - // TODO: test quotaCollection - } - - /** Test the property 'shortDescription' */ - @Test - public void shortDescriptionTest() { - // TODO: test shortDescription - } - - /** Test the property 'usedValue' */ - @Test - public void usedValueTest() { - // TODO: test usedValue - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypesTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypesTest.java deleted file mode 100644 index 3a798500..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/QuotaTypesTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for QuotaTypes */ -public class QuotaTypesTest { - private final QuotaTypes model = new QuotaTypes(); - - /** Model tests for QuotaTypes */ - @Test - public void testQuotaTypes() { - // TODO: test QuotaTypes - } - - /** Test the property 'quotaType' */ - @Test - public void quotaTypeTest() { - // TODO: test quotaType - } - - /** Test the property 'quotas' */ - @Test - public void quotasTest() { - // TODO: test quotas - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequestTest.java deleted file mode 100644 index 07d02b0e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAccessKeysRequest */ -public class ReadAccessKeysRequestTest { - private final ReadAccessKeysRequest model = new ReadAccessKeysRequest(); - - /** Model tests for ReadAccessKeysRequest */ - @Test - public void testReadAccessKeysRequest() { - // TODO: test ReadAccessKeysRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponseTest.java deleted file mode 100644 index 9625b20c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccessKeysResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAccessKeysResponse */ -public class ReadAccessKeysResponseTest { - private final ReadAccessKeysResponse model = new ReadAccessKeysResponse(); - - /** Model tests for ReadAccessKeysResponse */ - @Test - public void testReadAccessKeysResponse() { - // TODO: test ReadAccessKeysResponse - } - - /** Test the property 'accessKeys' */ - @Test - public void accessKeysTest() { - // TODO: test accessKeys - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequestTest.java deleted file mode 100644 index 16d7428f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAccountsRequest */ -public class ReadAccountsRequestTest { - private final ReadAccountsRequest model = new ReadAccountsRequest(); - - /** Model tests for ReadAccountsRequest */ - @Test - public void testReadAccountsRequest() { - // TODO: test ReadAccountsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponseTest.java deleted file mode 100644 index 35080eac..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAccountsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAccountsResponse */ -public class ReadAccountsResponseTest { - private final ReadAccountsResponse model = new ReadAccountsResponse(); - - /** Model tests for ReadAccountsResponse */ - @Test - public void testReadAccountsResponse() { - // TODO: test ReadAccountsResponse - } - - /** Test the property 'accounts' */ - @Test - public void accountsTest() { - // TODO: test accounts - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequestTest.java deleted file mode 100644 index b60719a7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAdminPasswordRequest */ -public class ReadAdminPasswordRequestTest { - private final ReadAdminPasswordRequest model = new ReadAdminPasswordRequest(); - - /** Model tests for ReadAdminPasswordRequest */ - @Test - public void testReadAdminPasswordRequest() { - // TODO: test ReadAdminPasswordRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponseTest.java deleted file mode 100644 index 478ddded..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadAdminPasswordResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadAdminPasswordResponse */ -public class ReadAdminPasswordResponseTest { - private final ReadAdminPasswordResponse model = new ReadAdminPasswordResponse(); - - /** Model tests for ReadAdminPasswordResponse */ - @Test - public void testReadAdminPasswordResponse() { - // TODO: test ReadAdminPasswordResponse - } - - /** Test the property 'adminPassword' */ - @Test - public void adminPasswordTest() { - // TODO: test adminPassword - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequestTest.java deleted file mode 100644 index 6bbff32b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiAccessPolicyRequest */ -public class ReadApiAccessPolicyRequestTest { - private final ReadApiAccessPolicyRequest model = new ReadApiAccessPolicyRequest(); - - /** Model tests for ReadApiAccessPolicyRequest */ - @Test - public void testReadApiAccessPolicyRequest() { - // TODO: test ReadApiAccessPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponseTest.java deleted file mode 100644 index 62a5e1b6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiAccessPolicyResponse */ -public class ReadApiAccessPolicyResponseTest { - private final ReadApiAccessPolicyResponse model = new ReadApiAccessPolicyResponse(); - - /** Model tests for ReadApiAccessPolicyResponse */ - @Test - public void testReadApiAccessPolicyResponse() { - // TODO: test ReadApiAccessPolicyResponse - } - - /** Test the property 'apiAccessPolicy' */ - @Test - public void apiAccessPolicyTest() { - // TODO: test apiAccessPolicy - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequestTest.java deleted file mode 100644 index 12c6c6c3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiAccessRulesRequest */ -public class ReadApiAccessRulesRequestTest { - private final ReadApiAccessRulesRequest model = new ReadApiAccessRulesRequest(); - - /** Model tests for ReadApiAccessRulesRequest */ - @Test - public void testReadApiAccessRulesRequest() { - // TODO: test ReadApiAccessRulesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponseTest.java deleted file mode 100644 index c86bfddf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiAccessRulesResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiAccessRulesResponse */ -public class ReadApiAccessRulesResponseTest { - private final ReadApiAccessRulesResponse model = new ReadApiAccessRulesResponse(); - - /** Model tests for ReadApiAccessRulesResponse */ - @Test - public void testReadApiAccessRulesResponse() { - // TODO: test ReadApiAccessRulesResponse - } - - /** Test the property 'apiAccessRules' */ - @Test - public void apiAccessRulesTest() { - // TODO: test apiAccessRules - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequestTest.java deleted file mode 100644 index 16f0e9ce..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiLogsRequest */ -public class ReadApiLogsRequestTest { - private final ReadApiLogsRequest model = new ReadApiLogsRequest(); - - /** Model tests for ReadApiLogsRequest */ - @Test - public void testReadApiLogsRequest() { - // TODO: test ReadApiLogsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } - - /** Test the property 'with' */ - @Test - public void withTest() { - // TODO: test with - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponseTest.java deleted file mode 100644 index f6da7124..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadApiLogsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadApiLogsResponse */ -public class ReadApiLogsResponseTest { - private final ReadApiLogsResponse model = new ReadApiLogsResponse(); - - /** Model tests for ReadApiLogsResponse */ - @Test - public void testReadApiLogsResponse() { - // TODO: test ReadApiLogsResponse - } - - /** Test the property 'logs' */ - @Test - public void logsTest() { - // TODO: test logs - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequestTest.java deleted file mode 100644 index a53fd9b6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCasRequest */ -public class ReadCasRequestTest { - private final ReadCasRequest model = new ReadCasRequest(); - - /** Model tests for ReadCasRequest */ - @Test - public void testReadCasRequest() { - // TODO: test ReadCasRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponseTest.java deleted file mode 100644 index 9d70ab1e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCasResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCasResponse */ -public class ReadCasResponseTest { - private final ReadCasResponse model = new ReadCasResponse(); - - /** Model tests for ReadCasResponse */ - @Test - public void testReadCasResponse() { - // TODO: test ReadCasResponse - } - - /** Test the property 'cas' */ - @Test - public void casTest() { - // TODO: test cas - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequestTest.java deleted file mode 100644 index c864fe37..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCatalogRequest */ -public class ReadCatalogRequestTest { - private final ReadCatalogRequest model = new ReadCatalogRequest(); - - /** Model tests for ReadCatalogRequest */ - @Test - public void testReadCatalogRequest() { - // TODO: test ReadCatalogRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponseTest.java deleted file mode 100644 index 4b203a98..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCatalogResponse */ -public class ReadCatalogResponseTest { - private final ReadCatalogResponse model = new ReadCatalogResponse(); - - /** Model tests for ReadCatalogResponse */ - @Test - public void testReadCatalogResponse() { - // TODO: test ReadCatalogResponse - } - - /** Test the property 'catalog' */ - @Test - public void catalogTest() { - // TODO: test catalog - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequestTest.java deleted file mode 100644 index 121c85f9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCatalogsRequest */ -public class ReadCatalogsRequestTest { - private final ReadCatalogsRequest model = new ReadCatalogsRequest(); - - /** Model tests for ReadCatalogsRequest */ - @Test - public void testReadCatalogsRequest() { - // TODO: test ReadCatalogsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponseTest.java deleted file mode 100644 index 05e9dec3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadCatalogsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadCatalogsResponse */ -public class ReadCatalogsResponseTest { - private final ReadCatalogsResponse model = new ReadCatalogsResponse(); - - /** Model tests for ReadCatalogsResponse */ - @Test - public void testReadCatalogsResponse() { - // TODO: test ReadCatalogsResponse - } - - /** Test the property 'catalogs' */ - @Test - public void catalogsTest() { - // TODO: test catalogs - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequestTest.java deleted file mode 100644 index 009e2321..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadClientGatewaysRequest */ -public class ReadClientGatewaysRequestTest { - private final ReadClientGatewaysRequest model = new ReadClientGatewaysRequest(); - - /** Model tests for ReadClientGatewaysRequest */ - @Test - public void testReadClientGatewaysRequest() { - // TODO: test ReadClientGatewaysRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponseTest.java deleted file mode 100644 index c16f636b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadClientGatewaysResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadClientGatewaysResponse */ -public class ReadClientGatewaysResponseTest { - private final ReadClientGatewaysResponse model = new ReadClientGatewaysResponse(); - - /** Model tests for ReadClientGatewaysResponse */ - @Test - public void testReadClientGatewaysResponse() { - // TODO: test ReadClientGatewaysResponse - } - - /** Test the property 'clientGateways' */ - @Test - public void clientGatewaysTest() { - // TODO: test clientGateways - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequestTest.java deleted file mode 100644 index eee643a5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadConsoleOutputRequest */ -public class ReadConsoleOutputRequestTest { - private final ReadConsoleOutputRequest model = new ReadConsoleOutputRequest(); - - /** Model tests for ReadConsoleOutputRequest */ - @Test - public void testReadConsoleOutputRequest() { - // TODO: test ReadConsoleOutputRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponseTest.java deleted file mode 100644 index d62ca141..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsoleOutputResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadConsoleOutputResponse */ -public class ReadConsoleOutputResponseTest { - private final ReadConsoleOutputResponse model = new ReadConsoleOutputResponse(); - - /** Model tests for ReadConsoleOutputResponse */ - @Test - public void testReadConsoleOutputResponse() { - // TODO: test ReadConsoleOutputResponse - } - - /** Test the property 'consoleOutput' */ - @Test - public void consoleOutputTest() { - // TODO: test consoleOutput - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequestTest.java deleted file mode 100644 index 9880b237..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadConsumptionAccountRequest */ -public class ReadConsumptionAccountRequestTest { - private final ReadConsumptionAccountRequest model = new ReadConsumptionAccountRequest(); - - /** Model tests for ReadConsumptionAccountRequest */ - @Test - public void testReadConsumptionAccountRequest() { - // TODO: test ReadConsumptionAccountRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'fromDate' */ - @Test - public void fromDateTest() { - // TODO: test fromDate - } - - /** Test the property 'overall' */ - @Test - public void overallTest() { - // TODO: test overall - } - - /** Test the property 'showPrice' */ - @Test - public void showPriceTest() { - // TODO: test showPrice - } - - /** Test the property 'toDate' */ - @Test - public void toDateTest() { - // TODO: test toDate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponseTest.java deleted file mode 100644 index b4b9439d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadConsumptionAccountResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadConsumptionAccountResponse */ -public class ReadConsumptionAccountResponseTest { - private final ReadConsumptionAccountResponse model = new ReadConsumptionAccountResponse(); - - /** Model tests for ReadConsumptionAccountResponse */ - @Test - public void testReadConsumptionAccountResponse() { - // TODO: test ReadConsumptionAccountResponse - } - - /** Test the property 'consumptionEntries' */ - @Test - public void consumptionEntriesTest() { - // TODO: test consumptionEntries - } - - /** Test the property 'currency' */ - @Test - public void currencyTest() { - // TODO: test currency - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequestTest.java deleted file mode 100644 index 77686917..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDedicatedGroupsRequest */ -public class ReadDedicatedGroupsRequestTest { - private final ReadDedicatedGroupsRequest model = new ReadDedicatedGroupsRequest(); - - /** Model tests for ReadDedicatedGroupsRequest */ - @Test - public void testReadDedicatedGroupsRequest() { - // TODO: test ReadDedicatedGroupsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponseTest.java deleted file mode 100644 index 3f0140c1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDedicatedGroupsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDedicatedGroupsResponse */ -public class ReadDedicatedGroupsResponseTest { - private final ReadDedicatedGroupsResponse model = new ReadDedicatedGroupsResponse(); - - /** Model tests for ReadDedicatedGroupsResponse */ - @Test - public void testReadDedicatedGroupsResponse() { - // TODO: test ReadDedicatedGroupsResponse - } - - /** Test the property 'dedicatedGroups' */ - @Test - public void dedicatedGroupsTest() { - // TODO: test dedicatedGroups - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequestTest.java deleted file mode 100644 index 1536bb39..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDhcpOptionsRequest */ -public class ReadDhcpOptionsRequestTest { - private final ReadDhcpOptionsRequest model = new ReadDhcpOptionsRequest(); - - /** Model tests for ReadDhcpOptionsRequest */ - @Test - public void testReadDhcpOptionsRequest() { - // TODO: test ReadDhcpOptionsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponseTest.java deleted file mode 100644 index 781c7efd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDhcpOptionsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDhcpOptionsResponse */ -public class ReadDhcpOptionsResponseTest { - private final ReadDhcpOptionsResponse model = new ReadDhcpOptionsResponse(); - - /** Model tests for ReadDhcpOptionsResponse */ - @Test - public void testReadDhcpOptionsResponse() { - // TODO: test ReadDhcpOptionsResponse - } - - /** Test the property 'dhcpOptionsSets' */ - @Test - public void dhcpOptionsSetsTest() { - // TODO: test dhcpOptionsSets - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequestTest.java deleted file mode 100644 index 1503fff3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDirectLinkInterfacesRequest */ -public class ReadDirectLinkInterfacesRequestTest { - private final ReadDirectLinkInterfacesRequest model = new ReadDirectLinkInterfacesRequest(); - - /** Model tests for ReadDirectLinkInterfacesRequest */ - @Test - public void testReadDirectLinkInterfacesRequest() { - // TODO: test ReadDirectLinkInterfacesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponseTest.java deleted file mode 100644 index 4c7f394c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinkInterfacesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDirectLinkInterfacesResponse */ -public class ReadDirectLinkInterfacesResponseTest { - private final ReadDirectLinkInterfacesResponse model = new ReadDirectLinkInterfacesResponse(); - - /** Model tests for ReadDirectLinkInterfacesResponse */ - @Test - public void testReadDirectLinkInterfacesResponse() { - // TODO: test ReadDirectLinkInterfacesResponse - } - - /** Test the property 'directLinkInterfaces' */ - @Test - public void directLinkInterfacesTest() { - // TODO: test directLinkInterfaces - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequestTest.java deleted file mode 100644 index a66ded01..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDirectLinksRequest */ -public class ReadDirectLinksRequestTest { - private final ReadDirectLinksRequest model = new ReadDirectLinksRequest(); - - /** Model tests for ReadDirectLinksRequest */ - @Test - public void testReadDirectLinksRequest() { - // TODO: test ReadDirectLinksRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponseTest.java deleted file mode 100644 index df845397..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadDirectLinksResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadDirectLinksResponse */ -public class ReadDirectLinksResponseTest { - private final ReadDirectLinksResponse model = new ReadDirectLinksResponse(); - - /** Model tests for ReadDirectLinksResponse */ - @Test - public void testReadDirectLinksResponse() { - // TODO: test ReadDirectLinksResponse - } - - /** Test the property 'directLinks' */ - @Test - public void directLinksTest() { - // TODO: test directLinks - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequestTest.java deleted file mode 100644 index 2591afcd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadFlexibleGpuCatalogRequest */ -public class ReadFlexibleGpuCatalogRequestTest { - private final ReadFlexibleGpuCatalogRequest model = new ReadFlexibleGpuCatalogRequest(); - - /** Model tests for ReadFlexibleGpuCatalogRequest */ - @Test - public void testReadFlexibleGpuCatalogRequest() { - // TODO: test ReadFlexibleGpuCatalogRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponseTest.java deleted file mode 100644 index ac8e7d36..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpuCatalogResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadFlexibleGpuCatalogResponse */ -public class ReadFlexibleGpuCatalogResponseTest { - private final ReadFlexibleGpuCatalogResponse model = new ReadFlexibleGpuCatalogResponse(); - - /** Model tests for ReadFlexibleGpuCatalogResponse */ - @Test - public void testReadFlexibleGpuCatalogResponse() { - // TODO: test ReadFlexibleGpuCatalogResponse - } - - /** Test the property 'flexibleGpuCatalog' */ - @Test - public void flexibleGpuCatalogTest() { - // TODO: test flexibleGpuCatalog - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequestTest.java deleted file mode 100644 index e8c8b595..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadFlexibleGpusRequest */ -public class ReadFlexibleGpusRequestTest { - private final ReadFlexibleGpusRequest model = new ReadFlexibleGpusRequest(); - - /** Model tests for ReadFlexibleGpusRequest */ - @Test - public void testReadFlexibleGpusRequest() { - // TODO: test ReadFlexibleGpusRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponseTest.java deleted file mode 100644 index b8f4892e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadFlexibleGpusResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadFlexibleGpusResponse */ -public class ReadFlexibleGpusResponseTest { - private final ReadFlexibleGpusResponse model = new ReadFlexibleGpusResponse(); - - /** Model tests for ReadFlexibleGpusResponse */ - @Test - public void testReadFlexibleGpusResponse() { - // TODO: test ReadFlexibleGpusResponse - } - - /** Test the property 'flexibleGpus' */ - @Test - public void flexibleGpusTest() { - // TODO: test flexibleGpus - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequestTest.java deleted file mode 100644 index cf31ade8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadImageExportTasksRequest */ -public class ReadImageExportTasksRequestTest { - private final ReadImageExportTasksRequest model = new ReadImageExportTasksRequest(); - - /** Model tests for ReadImageExportTasksRequest */ - @Test - public void testReadImageExportTasksRequest() { - // TODO: test ReadImageExportTasksRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponseTest.java deleted file mode 100644 index c16ec19c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImageExportTasksResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadImageExportTasksResponse */ -public class ReadImageExportTasksResponseTest { - private final ReadImageExportTasksResponse model = new ReadImageExportTasksResponse(); - - /** Model tests for ReadImageExportTasksResponse */ - @Test - public void testReadImageExportTasksResponse() { - // TODO: test ReadImageExportTasksResponse - } - - /** Test the property 'imageExportTasks' */ - @Test - public void imageExportTasksTest() { - // TODO: test imageExportTasks - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequestTest.java deleted file mode 100644 index f7da52a9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadImagesRequest */ -public class ReadImagesRequestTest { - private final ReadImagesRequest model = new ReadImagesRequest(); - - /** Model tests for ReadImagesRequest */ - @Test - public void testReadImagesRequest() { - // TODO: test ReadImagesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponseTest.java deleted file mode 100644 index 9937b43c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadImagesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadImagesResponse */ -public class ReadImagesResponseTest { - private final ReadImagesResponse model = new ReadImagesResponse(); - - /** Model tests for ReadImagesResponse */ - @Test - public void testReadImagesResponse() { - // TODO: test ReadImagesResponse - } - - /** Test the property 'images' */ - @Test - public void imagesTest() { - // TODO: test images - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequestTest.java deleted file mode 100644 index 80826c19..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadInternetServicesRequest */ -public class ReadInternetServicesRequestTest { - private final ReadInternetServicesRequest model = new ReadInternetServicesRequest(); - - /** Model tests for ReadInternetServicesRequest */ - @Test - public void testReadInternetServicesRequest() { - // TODO: test ReadInternetServicesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponseTest.java deleted file mode 100644 index 25a72958..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadInternetServicesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadInternetServicesResponse */ -public class ReadInternetServicesResponseTest { - private final ReadInternetServicesResponse model = new ReadInternetServicesResponse(); - - /** Model tests for ReadInternetServicesResponse */ - @Test - public void testReadInternetServicesResponse() { - // TODO: test ReadInternetServicesResponse - } - - /** Test the property 'internetServices' */ - @Test - public void internetServicesTest() { - // TODO: test internetServices - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequestTest.java deleted file mode 100644 index 8a0a6af6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadKeypairsRequest */ -public class ReadKeypairsRequestTest { - private final ReadKeypairsRequest model = new ReadKeypairsRequest(); - - /** Model tests for ReadKeypairsRequest */ - @Test - public void testReadKeypairsRequest() { - // TODO: test ReadKeypairsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponseTest.java deleted file mode 100644 index 76626558..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadKeypairsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadKeypairsResponse */ -public class ReadKeypairsResponseTest { - private final ReadKeypairsResponse model = new ReadKeypairsResponse(); - - /** Model tests for ReadKeypairsResponse */ - @Test - public void testReadKeypairsResponse() { - // TODO: test ReadKeypairsResponse - } - - /** Test the property 'keypairs' */ - @Test - public void keypairsTest() { - // TODO: test keypairs - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFiltersTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFiltersTest.java deleted file mode 100644 index a8953baf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesFiltersTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLinkedPoliciesFilters */ -public class ReadLinkedPoliciesFiltersTest { - private final ReadLinkedPoliciesFilters model = new ReadLinkedPoliciesFilters(); - - /** Model tests for ReadLinkedPoliciesFilters */ - @Test - public void testReadLinkedPoliciesFilters() { - // TODO: test ReadLinkedPoliciesFilters - } - - /** Test the property 'pathPrefix' */ - @Test - public void pathPrefixTest() { - // TODO: test pathPrefix - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequestTest.java deleted file mode 100644 index 1fd1aaf6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLinkedPoliciesRequest */ -public class ReadLinkedPoliciesRequestTest { - private final ReadLinkedPoliciesRequest model = new ReadLinkedPoliciesRequest(); - - /** Model tests for ReadLinkedPoliciesRequest */ - @Test - public void testReadLinkedPoliciesRequest() { - // TODO: test ReadLinkedPoliciesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponseTest.java deleted file mode 100644 index 417c98d6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLinkedPoliciesResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLinkedPoliciesResponse */ -public class ReadLinkedPoliciesResponseTest { - private final ReadLinkedPoliciesResponse model = new ReadLinkedPoliciesResponse(); - - /** Model tests for ReadLinkedPoliciesResponse */ - @Test - public void testReadLinkedPoliciesResponse() { - // TODO: test ReadLinkedPoliciesResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'maxResultsTruncated' */ - @Test - public void maxResultsTruncatedTest() { - // TODO: test maxResultsTruncated - } - - /** Test the property 'policies' */ - @Test - public void policiesTest() { - // TODO: test policies - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequestTest.java deleted file mode 100644 index 84048b57..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadListenerRulesRequest */ -public class ReadListenerRulesRequestTest { - private final ReadListenerRulesRequest model = new ReadListenerRulesRequest(); - - /** Model tests for ReadListenerRulesRequest */ - @Test - public void testReadListenerRulesRequest() { - // TODO: test ReadListenerRulesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponseTest.java deleted file mode 100644 index 9eb25105..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadListenerRulesResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadListenerRulesResponse */ -public class ReadListenerRulesResponseTest { - private final ReadListenerRulesResponse model = new ReadListenerRulesResponse(); - - /** Model tests for ReadListenerRulesResponse */ - @Test - public void testReadListenerRulesResponse() { - // TODO: test ReadListenerRulesResponse - } - - /** Test the property 'listenerRules' */ - @Test - public void listenerRulesTest() { - // TODO: test listenerRules - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequestTest.java deleted file mode 100644 index 8215565e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLoadBalancerTagsRequest */ -public class ReadLoadBalancerTagsRequestTest { - private final ReadLoadBalancerTagsRequest model = new ReadLoadBalancerTagsRequest(); - - /** Model tests for ReadLoadBalancerTagsRequest */ - @Test - public void testReadLoadBalancerTagsRequest() { - // TODO: test ReadLoadBalancerTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerNames' */ - @Test - public void loadBalancerNamesTest() { - // TODO: test loadBalancerNames - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponseTest.java deleted file mode 100644 index aa28826c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancerTagsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLoadBalancerTagsResponse */ -public class ReadLoadBalancerTagsResponseTest { - private final ReadLoadBalancerTagsResponse model = new ReadLoadBalancerTagsResponse(); - - /** Model tests for ReadLoadBalancerTagsResponse */ - @Test - public void testReadLoadBalancerTagsResponse() { - // TODO: test ReadLoadBalancerTagsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequestTest.java deleted file mode 100644 index 12d6bc58..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLoadBalancersRequest */ -public class ReadLoadBalancersRequestTest { - private final ReadLoadBalancersRequest model = new ReadLoadBalancersRequest(); - - /** Model tests for ReadLoadBalancersRequest */ - @Test - public void testReadLoadBalancersRequest() { - // TODO: test ReadLoadBalancersRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponseTest.java deleted file mode 100644 index 5b4899df..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLoadBalancersResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLoadBalancersResponse */ -public class ReadLoadBalancersResponseTest { - private final ReadLoadBalancersResponse model = new ReadLoadBalancersResponse(); - - /** Model tests for ReadLoadBalancersResponse */ - @Test - public void testReadLoadBalancersResponse() { - // TODO: test ReadLoadBalancersResponse - } - - /** Test the property 'loadBalancers' */ - @Test - public void loadBalancersTest() { - // TODO: test loadBalancers - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequestTest.java deleted file mode 100644 index 40f7cdf3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLocationsRequest */ -public class ReadLocationsRequestTest { - private final ReadLocationsRequest model = new ReadLocationsRequest(); - - /** Model tests for ReadLocationsRequest */ - @Test - public void testReadLocationsRequest() { - // TODO: test ReadLocationsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponseTest.java deleted file mode 100644 index e67d157a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadLocationsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadLocationsResponse */ -public class ReadLocationsResponseTest { - private final ReadLocationsResponse model = new ReadLocationsResponse(); - - /** Model tests for ReadLocationsResponse */ - @Test - public void testReadLocationsResponse() { - // TODO: test ReadLocationsResponse - } - - /** Test the property 'locations' */ - @Test - public void locationsTest() { - // TODO: test locations - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequestTest.java deleted file mode 100644 index 4b277ff9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupRequestTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadManagedPoliciesLinkedToUserGroupRequest */ -public class ReadManagedPoliciesLinkedToUserGroupRequestTest { - private final ReadManagedPoliciesLinkedToUserGroupRequest model = - new ReadManagedPoliciesLinkedToUserGroupRequest(); - - /** Model tests for ReadManagedPoliciesLinkedToUserGroupRequest */ - @Test - public void testReadManagedPoliciesLinkedToUserGroupRequest() { - // TODO: test ReadManagedPoliciesLinkedToUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponseTest.java deleted file mode 100644 index df98148c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadManagedPoliciesLinkedToUserGroupResponseTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadManagedPoliciesLinkedToUserGroupResponse */ -public class ReadManagedPoliciesLinkedToUserGroupResponseTest { - private final ReadManagedPoliciesLinkedToUserGroupResponse model = - new ReadManagedPoliciesLinkedToUserGroupResponse(); - - /** Model tests for ReadManagedPoliciesLinkedToUserGroupResponse */ - @Test - public void testReadManagedPoliciesLinkedToUserGroupResponse() { - // TODO: test ReadManagedPoliciesLinkedToUserGroupResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'maxResultsTruncated' */ - @Test - public void maxResultsTruncatedTest() { - // TODO: test maxResultsTruncated - } - - /** Test the property 'policies' */ - @Test - public void policiesTest() { - // TODO: test policies - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequestTest.java deleted file mode 100644 index 91108a72..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNatServicesRequest */ -public class ReadNatServicesRequestTest { - private final ReadNatServicesRequest model = new ReadNatServicesRequest(); - - /** Model tests for ReadNatServicesRequest */ - @Test - public void testReadNatServicesRequest() { - // TODO: test ReadNatServicesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponseTest.java deleted file mode 100644 index d42954e2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNatServicesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNatServicesResponse */ -public class ReadNatServicesResponseTest { - private final ReadNatServicesResponse model = new ReadNatServicesResponse(); - - /** Model tests for ReadNatServicesResponse */ - @Test - public void testReadNatServicesResponse() { - // TODO: test ReadNatServicesResponse - } - - /** Test the property 'natServices' */ - @Test - public void natServicesTest() { - // TODO: test natServices - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequestTest.java deleted file mode 100644 index f0c6ed4e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetAccessPointServicesRequest */ -public class ReadNetAccessPointServicesRequestTest { - private final ReadNetAccessPointServicesRequest model = new ReadNetAccessPointServicesRequest(); - - /** Model tests for ReadNetAccessPointServicesRequest */ - @Test - public void testReadNetAccessPointServicesRequest() { - // TODO: test ReadNetAccessPointServicesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponseTest.java deleted file mode 100644 index 47fe1b44..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointServicesResponseTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetAccessPointServicesResponse */ -public class ReadNetAccessPointServicesResponseTest { - private final ReadNetAccessPointServicesResponse model = - new ReadNetAccessPointServicesResponse(); - - /** Model tests for ReadNetAccessPointServicesResponse */ - @Test - public void testReadNetAccessPointServicesResponse() { - // TODO: test ReadNetAccessPointServicesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'services' */ - @Test - public void servicesTest() { - // TODO: test services - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequestTest.java deleted file mode 100644 index 8d85d774..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetAccessPointsRequest */ -public class ReadNetAccessPointsRequestTest { - private final ReadNetAccessPointsRequest model = new ReadNetAccessPointsRequest(); - - /** Model tests for ReadNetAccessPointsRequest */ - @Test - public void testReadNetAccessPointsRequest() { - // TODO: test ReadNetAccessPointsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponseTest.java deleted file mode 100644 index ad03065a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetAccessPointsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetAccessPointsResponse */ -public class ReadNetAccessPointsResponseTest { - private final ReadNetAccessPointsResponse model = new ReadNetAccessPointsResponse(); - - /** Model tests for ReadNetAccessPointsResponse */ - @Test - public void testReadNetAccessPointsResponse() { - // TODO: test ReadNetAccessPointsResponse - } - - /** Test the property 'netAccessPoints' */ - @Test - public void netAccessPointsTest() { - // TODO: test netAccessPoints - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequestTest.java deleted file mode 100644 index 3c60acf4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetPeeringsRequest */ -public class ReadNetPeeringsRequestTest { - private final ReadNetPeeringsRequest model = new ReadNetPeeringsRequest(); - - /** Model tests for ReadNetPeeringsRequest */ - @Test - public void testReadNetPeeringsRequest() { - // TODO: test ReadNetPeeringsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponseTest.java deleted file mode 100644 index de13743e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetPeeringsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetPeeringsResponse */ -public class ReadNetPeeringsResponseTest { - private final ReadNetPeeringsResponse model = new ReadNetPeeringsResponse(); - - /** Model tests for ReadNetPeeringsResponse */ - @Test - public void testReadNetPeeringsResponse() { - // TODO: test ReadNetPeeringsResponse - } - - /** Test the property 'netPeerings' */ - @Test - public void netPeeringsTest() { - // TODO: test netPeerings - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequestTest.java deleted file mode 100644 index de91e264..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetsRequest */ -public class ReadNetsRequestTest { - private final ReadNetsRequest model = new ReadNetsRequest(); - - /** Model tests for ReadNetsRequest */ - @Test - public void testReadNetsRequest() { - // TODO: test ReadNetsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponseTest.java deleted file mode 100644 index 5b9d8295..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNetsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNetsResponse */ -public class ReadNetsResponseTest { - private final ReadNetsResponse model = new ReadNetsResponse(); - - /** Model tests for ReadNetsResponse */ - @Test - public void testReadNetsResponse() { - // TODO: test ReadNetsResponse - } - - /** Test the property 'nets' */ - @Test - public void netsTest() { - // TODO: test nets - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequestTest.java deleted file mode 100644 index 8ea72ac1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNicsRequest */ -public class ReadNicsRequestTest { - private final ReadNicsRequest model = new ReadNicsRequest(); - - /** Model tests for ReadNicsRequest */ - @Test - public void testReadNicsRequest() { - // TODO: test ReadNicsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponseTest.java deleted file mode 100644 index 53d05eeb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadNicsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadNicsResponse */ -public class ReadNicsResponseTest { - private final ReadNicsResponse model = new ReadNicsResponse(); - - /** Model tests for ReadNicsResponse */ - @Test - public void testReadNicsResponse() { - // TODO: test ReadNicsResponse - } - - /** Test the property 'nics' */ - @Test - public void nicsTest() { - // TODO: test nics - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFiltersTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFiltersTest.java deleted file mode 100644 index 2974fc71..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesFiltersTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPoliciesFilters */ -public class ReadPoliciesFiltersTest { - private final ReadPoliciesFilters model = new ReadPoliciesFilters(); - - /** Model tests for ReadPoliciesFilters */ - @Test - public void testReadPoliciesFilters() { - // TODO: test ReadPoliciesFilters - } - - /** Test the property 'onlyLinked' */ - @Test - public void onlyLinkedTest() { - // TODO: test onlyLinked - } - - /** Test the property 'pathPrefix' */ - @Test - public void pathPrefixTest() { - // TODO: test pathPrefix - } - - /** Test the property 'scope' */ - @Test - public void scopeTest() { - // TODO: test scope - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequestTest.java deleted file mode 100644 index 7c38075b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPoliciesRequest */ -public class ReadPoliciesRequestTest { - private final ReadPoliciesRequest model = new ReadPoliciesRequest(); - - /** Model tests for ReadPoliciesRequest */ - @Test - public void testReadPoliciesRequest() { - // TODO: test ReadPoliciesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponseTest.java deleted file mode 100644 index 87d45569..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPoliciesResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPoliciesResponse */ -public class ReadPoliciesResponseTest { - private final ReadPoliciesResponse model = new ReadPoliciesResponse(); - - /** Model tests for ReadPoliciesResponse */ - @Test - public void testReadPoliciesResponse() { - // TODO: test ReadPoliciesResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'maxResultsTruncated' */ - @Test - public void maxResultsTruncatedTest() { - // TODO: test maxResultsTruncated - } - - /** Test the property 'policies' */ - @Test - public void policiesTest() { - // TODO: test policies - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequestTest.java deleted file mode 100644 index 7f2020d3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyRequest */ -public class ReadPolicyRequestTest { - private final ReadPolicyRequest model = new ReadPolicyRequest(); - - /** Model tests for ReadPolicyRequest */ - @Test - public void testReadPolicyRequest() { - // TODO: test ReadPolicyRequest - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponseTest.java deleted file mode 100644 index 2f79e984..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyResponse */ -public class ReadPolicyResponseTest { - private final ReadPolicyResponse model = new ReadPolicyResponse(); - - /** Model tests for ReadPolicyResponse */ - @Test - public void testReadPolicyResponse() { - // TODO: test ReadPolicyResponse - } - - /** Test the property 'policy' */ - @Test - public void policyTest() { - // TODO: test policy - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequestTest.java deleted file mode 100644 index 931f3f26..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyVersionRequest */ -public class ReadPolicyVersionRequestTest { - private final ReadPolicyVersionRequest model = new ReadPolicyVersionRequest(); - - /** Model tests for ReadPolicyVersionRequest */ - @Test - public void testReadPolicyVersionRequest() { - // TODO: test ReadPolicyVersionRequest - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'versionId' */ - @Test - public void versionIdTest() { - // TODO: test versionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponseTest.java deleted file mode 100644 index 3e78781c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyVersionResponse */ -public class ReadPolicyVersionResponseTest { - private final ReadPolicyVersionResponse model = new ReadPolicyVersionResponse(); - - /** Model tests for ReadPolicyVersionResponse */ - @Test - public void testReadPolicyVersionResponse() { - // TODO: test ReadPolicyVersionResponse - } - - /** Test the property 'policyVersion' */ - @Test - public void policyVersionTest() { - // TODO: test policyVersion - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequestTest.java deleted file mode 100644 index 6f9e9aa2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyVersionsRequest */ -public class ReadPolicyVersionsRequestTest { - private final ReadPolicyVersionsRequest model = new ReadPolicyVersionsRequest(); - - /** Model tests for ReadPolicyVersionsRequest */ - @Test - public void testReadPolicyVersionsRequest() { - // TODO: test ReadPolicyVersionsRequest - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponseTest.java deleted file mode 100644 index 03b71cfd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPolicyVersionsResponseTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPolicyVersionsResponse */ -public class ReadPolicyVersionsResponseTest { - private final ReadPolicyVersionsResponse model = new ReadPolicyVersionsResponse(); - - /** Model tests for ReadPolicyVersionsResponse */ - @Test - public void testReadPolicyVersionsResponse() { - // TODO: test ReadPolicyVersionsResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'policyVersions' */ - @Test - public void policyVersionsTest() { - // TODO: test policyVersions - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequestTest.java deleted file mode 100644 index 193b7d11..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadProductTypesRequest */ -public class ReadProductTypesRequestTest { - private final ReadProductTypesRequest model = new ReadProductTypesRequest(); - - /** Model tests for ReadProductTypesRequest */ - @Test - public void testReadProductTypesRequest() { - // TODO: test ReadProductTypesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponseTest.java deleted file mode 100644 index f0707ad4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadProductTypesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadProductTypesResponse */ -public class ReadProductTypesResponseTest { - private final ReadProductTypesResponse model = new ReadProductTypesResponse(); - - /** Model tests for ReadProductTypesResponse */ - @Test - public void testReadProductTypesResponse() { - // TODO: test ReadProductTypesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'productTypes' */ - @Test - public void productTypesTest() { - // TODO: test productTypes - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequestTest.java deleted file mode 100644 index 8acbc908..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicCatalogRequest */ -public class ReadPublicCatalogRequestTest { - private final ReadPublicCatalogRequest model = new ReadPublicCatalogRequest(); - - /** Model tests for ReadPublicCatalogRequest */ - @Test - public void testReadPublicCatalogRequest() { - // TODO: test ReadPublicCatalogRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponseTest.java deleted file mode 100644 index ca58952a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicCatalogResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicCatalogResponse */ -public class ReadPublicCatalogResponseTest { - private final ReadPublicCatalogResponse model = new ReadPublicCatalogResponse(); - - /** Model tests for ReadPublicCatalogResponse */ - @Test - public void testReadPublicCatalogResponse() { - // TODO: test ReadPublicCatalogResponse - } - - /** Test the property 'catalog' */ - @Test - public void catalogTest() { - // TODO: test catalog - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequestTest.java deleted file mode 100644 index b0cdfe26..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicIpRangesRequest */ -public class ReadPublicIpRangesRequestTest { - private final ReadPublicIpRangesRequest model = new ReadPublicIpRangesRequest(); - - /** Model tests for ReadPublicIpRangesRequest */ - @Test - public void testReadPublicIpRangesRequest() { - // TODO: test ReadPublicIpRangesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponseTest.java deleted file mode 100644 index d35b61ce..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpRangesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicIpRangesResponse */ -public class ReadPublicIpRangesResponseTest { - private final ReadPublicIpRangesResponse model = new ReadPublicIpRangesResponse(); - - /** Model tests for ReadPublicIpRangesResponse */ - @Test - public void testReadPublicIpRangesResponse() { - // TODO: test ReadPublicIpRangesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequestTest.java deleted file mode 100644 index 461c3aeb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicIpsRequest */ -public class ReadPublicIpsRequestTest { - private final ReadPublicIpsRequest model = new ReadPublicIpsRequest(); - - /** Model tests for ReadPublicIpsRequest */ - @Test - public void testReadPublicIpsRequest() { - // TODO: test ReadPublicIpsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponseTest.java deleted file mode 100644 index 28dc80c9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadPublicIpsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadPublicIpsResponse */ -public class ReadPublicIpsResponseTest { - private final ReadPublicIpsResponse model = new ReadPublicIpsResponse(); - - /** Model tests for ReadPublicIpsResponse */ - @Test - public void testReadPublicIpsResponse() { - // TODO: test ReadPublicIpsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'publicIps' */ - @Test - public void publicIpsTest() { - // TODO: test publicIps - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequestTest.java deleted file mode 100644 index 90235f43..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadQuotasRequest */ -public class ReadQuotasRequestTest { - private final ReadQuotasRequest model = new ReadQuotasRequest(); - - /** Model tests for ReadQuotasRequest */ - @Test - public void testReadQuotasRequest() { - // TODO: test ReadQuotasRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponseTest.java deleted file mode 100644 index 8cdb26d4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadQuotasResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadQuotasResponse */ -public class ReadQuotasResponseTest { - private final ReadQuotasResponse model = new ReadQuotasResponse(); - - /** Model tests for ReadQuotasResponse */ - @Test - public void testReadQuotasResponse() { - // TODO: test ReadQuotasResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'quotaTypes' */ - @Test - public void quotaTypesTest() { - // TODO: test quotaTypes - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequestTest.java deleted file mode 100644 index 0a7131e5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadRegionsRequest */ -public class ReadRegionsRequestTest { - private final ReadRegionsRequest model = new ReadRegionsRequest(); - - /** Model tests for ReadRegionsRequest */ - @Test - public void testReadRegionsRequest() { - // TODO: test ReadRegionsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponseTest.java deleted file mode 100644 index c53374ca..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRegionsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadRegionsResponse */ -public class ReadRegionsResponseTest { - private final ReadRegionsResponse model = new ReadRegionsResponse(); - - /** Model tests for ReadRegionsResponse */ - @Test - public void testReadRegionsResponse() { - // TODO: test ReadRegionsResponse - } - - /** Test the property 'regions' */ - @Test - public void regionsTest() { - // TODO: test regions - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequestTest.java deleted file mode 100644 index bd03951d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadRouteTablesRequest */ -public class ReadRouteTablesRequestTest { - private final ReadRouteTablesRequest model = new ReadRouteTablesRequest(); - - /** Model tests for ReadRouteTablesRequest */ - @Test - public void testReadRouteTablesRequest() { - // TODO: test ReadRouteTablesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponseTest.java deleted file mode 100644 index c6a070b0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadRouteTablesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadRouteTablesResponse */ -public class ReadRouteTablesResponseTest { - private final ReadRouteTablesResponse model = new ReadRouteTablesResponse(); - - /** Model tests for ReadRouteTablesResponse */ - @Test - public void testReadRouteTablesResponse() { - // TODO: test ReadRouteTablesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTables' */ - @Test - public void routeTablesTest() { - // TODO: test routeTables - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequestTest.java deleted file mode 100644 index 03c04238..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSecretAccessKeyRequest */ -public class ReadSecretAccessKeyRequestTest { - private final ReadSecretAccessKeyRequest model = new ReadSecretAccessKeyRequest(); - - /** Model tests for ReadSecretAccessKeyRequest */ - @Test - public void testReadSecretAccessKeyRequest() { - // TODO: test ReadSecretAccessKeyRequest - } - - /** Test the property 'accessKeyId' */ - @Test - public void accessKeyIdTest() { - // TODO: test accessKeyId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponseTest.java deleted file mode 100644 index ab2bf20f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecretAccessKeyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSecretAccessKeyResponse */ -public class ReadSecretAccessKeyResponseTest { - private final ReadSecretAccessKeyResponse model = new ReadSecretAccessKeyResponse(); - - /** Model tests for ReadSecretAccessKeyResponse */ - @Test - public void testReadSecretAccessKeyResponse() { - // TODO: test ReadSecretAccessKeyResponse - } - - /** Test the property 'accessKey' */ - @Test - public void accessKeyTest() { - // TODO: test accessKey - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequestTest.java deleted file mode 100644 index 9bfa68bc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSecurityGroupsRequest */ -public class ReadSecurityGroupsRequestTest { - private final ReadSecurityGroupsRequest model = new ReadSecurityGroupsRequest(); - - /** Model tests for ReadSecurityGroupsRequest */ - @Test - public void testReadSecurityGroupsRequest() { - // TODO: test ReadSecurityGroupsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponseTest.java deleted file mode 100644 index 9dfd3e16..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSecurityGroupsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSecurityGroupsResponse */ -public class ReadSecurityGroupsResponseTest { - private final ReadSecurityGroupsResponse model = new ReadSecurityGroupsResponse(); - - /** Model tests for ReadSecurityGroupsResponse */ - @Test - public void testReadSecurityGroupsResponse() { - // TODO: test ReadSecurityGroupsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequestTest.java deleted file mode 100644 index 17e7bd5f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadServerCertificatesRequest */ -public class ReadServerCertificatesRequestTest { - private final ReadServerCertificatesRequest model = new ReadServerCertificatesRequest(); - - /** Model tests for ReadServerCertificatesRequest */ - @Test - public void testReadServerCertificatesRequest() { - // TODO: test ReadServerCertificatesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponseTest.java deleted file mode 100644 index 5fa79c75..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadServerCertificatesResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadServerCertificatesResponse */ -public class ReadServerCertificatesResponseTest { - private final ReadServerCertificatesResponse model = new ReadServerCertificatesResponse(); - - /** Model tests for ReadServerCertificatesResponse */ - @Test - public void testReadServerCertificatesResponse() { - // TODO: test ReadServerCertificatesResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'serverCertificates' */ - @Test - public void serverCertificatesTest() { - // TODO: test serverCertificates - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequestTest.java deleted file mode 100644 index 7f4e3505..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSnapshotExportTasksRequest */ -public class ReadSnapshotExportTasksRequestTest { - private final ReadSnapshotExportTasksRequest model = new ReadSnapshotExportTasksRequest(); - - /** Model tests for ReadSnapshotExportTasksRequest */ - @Test - public void testReadSnapshotExportTasksRequest() { - // TODO: test ReadSnapshotExportTasksRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponseTest.java deleted file mode 100644 index 1bf1997e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotExportTasksResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSnapshotExportTasksResponse */ -public class ReadSnapshotExportTasksResponseTest { - private final ReadSnapshotExportTasksResponse model = new ReadSnapshotExportTasksResponse(); - - /** Model tests for ReadSnapshotExportTasksResponse */ - @Test - public void testReadSnapshotExportTasksResponse() { - // TODO: test ReadSnapshotExportTasksResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'snapshotExportTasks' */ - @Test - public void snapshotExportTasksTest() { - // TODO: test snapshotExportTasks - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequestTest.java deleted file mode 100644 index 0f1e3c3c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSnapshotsRequest */ -public class ReadSnapshotsRequestTest { - private final ReadSnapshotsRequest model = new ReadSnapshotsRequest(); - - /** Model tests for ReadSnapshotsRequest */ - @Test - public void testReadSnapshotsRequest() { - // TODO: test ReadSnapshotsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponseTest.java deleted file mode 100644 index 946c0d91..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSnapshotsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSnapshotsResponse */ -public class ReadSnapshotsResponseTest { - private final ReadSnapshotsResponse model = new ReadSnapshotsResponse(); - - /** Model tests for ReadSnapshotsResponse */ - @Test - public void testReadSnapshotsResponse() { - // TODO: test ReadSnapshotsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'snapshots' */ - @Test - public void snapshotsTest() { - // TODO: test snapshots - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequestTest.java deleted file mode 100644 index c62a33d2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSubnetsRequest */ -public class ReadSubnetsRequestTest { - private final ReadSubnetsRequest model = new ReadSubnetsRequest(); - - /** Model tests for ReadSubnetsRequest */ - @Test - public void testReadSubnetsRequest() { - // TODO: test ReadSubnetsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponseTest.java deleted file mode 100644 index 0ca3fe86..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubnetsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSubnetsResponse */ -public class ReadSubnetsResponseTest { - private final ReadSubnetsResponse model = new ReadSubnetsResponse(); - - /** Model tests for ReadSubnetsResponse */ - @Test - public void testReadSubnetsResponse() { - // TODO: test ReadSubnetsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'subnets' */ - @Test - public void subnetsTest() { - // TODO: test subnets - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequestTest.java deleted file mode 100644 index 695483c4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSubregionsRequest */ -public class ReadSubregionsRequestTest { - private final ReadSubregionsRequest model = new ReadSubregionsRequest(); - - /** Model tests for ReadSubregionsRequest */ - @Test - public void testReadSubregionsRequest() { - // TODO: test ReadSubregionsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponseTest.java deleted file mode 100644 index 7db6069e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadSubregionsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadSubregionsResponse */ -public class ReadSubregionsResponseTest { - private final ReadSubregionsResponse model = new ReadSubregionsResponse(); - - /** Model tests for ReadSubregionsResponse */ - @Test - public void testReadSubregionsResponse() { - // TODO: test ReadSubregionsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'subregions' */ - @Test - public void subregionsTest() { - // TODO: test subregions - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequestTest.java deleted file mode 100644 index eb72180f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadTagsRequest */ -public class ReadTagsRequestTest { - private final ReadTagsRequest model = new ReadTagsRequest(); - - /** Model tests for ReadTagsRequest */ - @Test - public void testReadTagsRequest() { - // TODO: test ReadTagsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponseTest.java deleted file mode 100644 index c3d0c0c6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadTagsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadTagsResponse */ -public class ReadTagsResponseTest { - private final ReadTagsResponse model = new ReadTagsResponse(); - - /** Model tests for ReadTagsResponse */ - @Test - public void testReadTagsResponse() { - // TODO: test ReadTagsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequestTest.java deleted file mode 100644 index 4b0fd4d2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupPoliciesRequest */ -public class ReadUserGroupPoliciesRequestTest { - private final ReadUserGroupPoliciesRequest model = new ReadUserGroupPoliciesRequest(); - - /** Model tests for ReadUserGroupPoliciesRequest */ - @Test - public void testReadUserGroupPoliciesRequest() { - // TODO: test ReadUserGroupPoliciesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponseTest.java deleted file mode 100644 index 62644eeb..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPoliciesResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupPoliciesResponse */ -public class ReadUserGroupPoliciesResponseTest { - private final ReadUserGroupPoliciesResponse model = new ReadUserGroupPoliciesResponse(); - - /** Model tests for ReadUserGroupPoliciesResponse */ - @Test - public void testReadUserGroupPoliciesResponse() { - // TODO: test ReadUserGroupPoliciesResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'maxResultsTruncated' */ - @Test - public void maxResultsTruncatedTest() { - // TODO: test maxResultsTruncated - } - - /** Test the property 'policies' */ - @Test - public void policiesTest() { - // TODO: test policies - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequestTest.java deleted file mode 100644 index 4952a4ab..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupPolicyRequest */ -public class ReadUserGroupPolicyRequestTest { - private final ReadUserGroupPolicyRequest model = new ReadUserGroupPolicyRequest(); - - /** Model tests for ReadUserGroupPolicyRequest */ - @Test - public void testReadUserGroupPolicyRequest() { - // TODO: test ReadUserGroupPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyName' */ - @Test - public void policyNameTest() { - // TODO: test policyName - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponseTest.java deleted file mode 100644 index d73eb1e5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupPolicyResponse */ -public class ReadUserGroupPolicyResponseTest { - private final ReadUserGroupPolicyResponse model = new ReadUserGroupPolicyResponse(); - - /** Model tests for ReadUserGroupPolicyResponse */ - @Test - public void testReadUserGroupPolicyResponse() { - // TODO: test ReadUserGroupPolicyResponse - } - - /** Test the property 'policy' */ - @Test - public void policyTest() { - // TODO: test policy - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequestTest.java deleted file mode 100644 index 90964368..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupRequest */ -public class ReadUserGroupRequestTest { - private final ReadUserGroupRequest model = new ReadUserGroupRequest(); - - /** Model tests for ReadUserGroupRequest */ - @Test - public void testReadUserGroupRequest() { - // TODO: test ReadUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponseTest.java deleted file mode 100644 index d27b758a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupResponse */ -public class ReadUserGroupResponseTest { - private final ReadUserGroupResponse model = new ReadUserGroupResponse(); - - /** Model tests for ReadUserGroupResponse */ - @Test - public void testReadUserGroupResponse() { - // TODO: test ReadUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'userGroup' */ - @Test - public void userGroupTest() { - // TODO: test userGroup - } - - /** Test the property 'users' */ - @Test - public void usersTest() { - // TODO: test users - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequestTest.java deleted file mode 100644 index 16bee20d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupsPerUserRequest */ -public class ReadUserGroupsPerUserRequestTest { - private final ReadUserGroupsPerUserRequest model = new ReadUserGroupsPerUserRequest(); - - /** Model tests for ReadUserGroupsPerUserRequest */ - @Test - public void testReadUserGroupsPerUserRequest() { - // TODO: test ReadUserGroupsPerUserRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } - - /** Test the property 'userPath' */ - @Test - public void userPathTest() { - // TODO: test userPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponseTest.java deleted file mode 100644 index 9d04bc40..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsPerUserResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupsPerUserResponse */ -public class ReadUserGroupsPerUserResponseTest { - private final ReadUserGroupsPerUserResponse model = new ReadUserGroupsPerUserResponse(); - - /** Model tests for ReadUserGroupsPerUserResponse */ - @Test - public void testReadUserGroupsPerUserResponse() { - // TODO: test ReadUserGroupsPerUserResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'userGroups' */ - @Test - public void userGroupsTest() { - // TODO: test userGroups - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequestTest.java deleted file mode 100644 index 620d54c4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupsRequest */ -public class ReadUserGroupsRequestTest { - private final ReadUserGroupsRequest model = new ReadUserGroupsRequest(); - - /** Model tests for ReadUserGroupsRequest */ - @Test - public void testReadUserGroupsRequest() { - // TODO: test ReadUserGroupsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'firstItem' */ - @Test - public void firstItemTest() { - // TODO: test firstItem - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponseTest.java deleted file mode 100644 index 29de6f3b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUserGroupsResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUserGroupsResponse */ -public class ReadUserGroupsResponseTest { - private final ReadUserGroupsResponse model = new ReadUserGroupsResponse(); - - /** Model tests for ReadUserGroupsResponse */ - @Test - public void testReadUserGroupsResponse() { - // TODO: test ReadUserGroupsResponse - } - - /** Test the property 'hasMoreItems' */ - @Test - public void hasMoreItemsTest() { - // TODO: test hasMoreItems - } - - /** Test the property 'maxResultsLimit' */ - @Test - public void maxResultsLimitTest() { - // TODO: test maxResultsLimit - } - - /** Test the property 'maxResultsTruncated' */ - @Test - public void maxResultsTruncatedTest() { - // TODO: test maxResultsTruncated - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'userGroups' */ - @Test - public void userGroupsTest() { - // TODO: test userGroups - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequestTest.java deleted file mode 100644 index f7adb9a8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersRequestTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUsersRequest */ -public class ReadUsersRequestTest { - private final ReadUsersRequest model = new ReadUsersRequest(); - - /** Model tests for ReadUsersRequest */ - @Test - public void testReadUsersRequest() { - // TODO: test ReadUsersRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponseTest.java deleted file mode 100644 index 59a0dab8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadUsersResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadUsersResponse */ -public class ReadUsersResponseTest { - private final ReadUsersResponse model = new ReadUsersResponse(); - - /** Model tests for ReadUsersResponse */ - @Test - public void testReadUsersResponse() { - // TODO: test ReadUsersResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'users' */ - @Test - public void usersTest() { - // TODO: test users - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequestTest.java deleted file mode 100644 index f0a11bab..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVirtualGatewaysRequest */ -public class ReadVirtualGatewaysRequestTest { - private final ReadVirtualGatewaysRequest model = new ReadVirtualGatewaysRequest(); - - /** Model tests for ReadVirtualGatewaysRequest */ - @Test - public void testReadVirtualGatewaysRequest() { - // TODO: test ReadVirtualGatewaysRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponseTest.java deleted file mode 100644 index fef77ee2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVirtualGatewaysResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVirtualGatewaysResponse */ -public class ReadVirtualGatewaysResponseTest { - private final ReadVirtualGatewaysResponse model = new ReadVirtualGatewaysResponse(); - - /** Model tests for ReadVirtualGatewaysResponse */ - @Test - public void testReadVirtualGatewaysResponse() { - // TODO: test ReadVirtualGatewaysResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'virtualGateways' */ - @Test - public void virtualGatewaysTest() { - // TODO: test virtualGateways - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequestTest.java deleted file mode 100644 index 9fab429d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmGroupsRequest */ -public class ReadVmGroupsRequestTest { - private final ReadVmGroupsRequest model = new ReadVmGroupsRequest(); - - /** Model tests for ReadVmGroupsRequest */ - @Test - public void testReadVmGroupsRequest() { - // TODO: test ReadVmGroupsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponseTest.java deleted file mode 100644 index 486f17e4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmGroupsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmGroupsResponse */ -public class ReadVmGroupsResponseTest { - private final ReadVmGroupsResponse model = new ReadVmGroupsResponse(); - - /** Model tests for ReadVmGroupsResponse */ - @Test - public void testReadVmGroupsResponse() { - // TODO: test ReadVmGroupsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmGroups' */ - @Test - public void vmGroupsTest() { - // TODO: test vmGroups - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequestTest.java deleted file mode 100644 index 21235744..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmTemplatesRequest */ -public class ReadVmTemplatesRequestTest { - private final ReadVmTemplatesRequest model = new ReadVmTemplatesRequest(); - - /** Model tests for ReadVmTemplatesRequest */ - @Test - public void testReadVmTemplatesRequest() { - // TODO: test ReadVmTemplatesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponseTest.java deleted file mode 100644 index 37b61673..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTemplatesResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmTemplatesResponse */ -public class ReadVmTemplatesResponseTest { - private final ReadVmTemplatesResponse model = new ReadVmTemplatesResponse(); - - /** Model tests for ReadVmTemplatesResponse */ - @Test - public void testReadVmTemplatesResponse() { - // TODO: test ReadVmTemplatesResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmTemplates' */ - @Test - public void vmTemplatesTest() { - // TODO: test vmTemplates - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequestTest.java deleted file mode 100644 index 1621464a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmTypesRequest */ -public class ReadVmTypesRequestTest { - private final ReadVmTypesRequest model = new ReadVmTypesRequest(); - - /** Model tests for ReadVmTypesRequest */ - @Test - public void testReadVmTypesRequest() { - // TODO: test ReadVmTypesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponseTest.java deleted file mode 100644 index b34b62dc..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmTypesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmTypesResponse */ -public class ReadVmTypesResponseTest { - private final ReadVmTypesResponse model = new ReadVmTypesResponse(); - - /** Model tests for ReadVmTypesResponse */ - @Test - public void testReadVmTypesResponse() { - // TODO: test ReadVmTypesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmTypes' */ - @Test - public void vmTypesTest() { - // TODO: test vmTypes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequestTest.java deleted file mode 100644 index 2661712e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsHealthRequest */ -public class ReadVmsHealthRequestTest { - private final ReadVmsHealthRequest model = new ReadVmsHealthRequest(); - - /** Model tests for ReadVmsHealthRequest */ - @Test - public void testReadVmsHealthRequest() { - // TODO: test ReadVmsHealthRequest - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponseTest.java deleted file mode 100644 index 1d9bdb83..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsHealthResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsHealthResponse */ -public class ReadVmsHealthResponseTest { - private final ReadVmsHealthResponse model = new ReadVmsHealthResponse(); - - /** Model tests for ReadVmsHealthResponse */ - @Test - public void testReadVmsHealthResponse() { - // TODO: test ReadVmsHealthResponse - } - - /** Test the property 'backendVmHealth' */ - @Test - public void backendVmHealthTest() { - // TODO: test backendVmHealth - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequestTest.java deleted file mode 100644 index 4ac678f9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsRequest */ -public class ReadVmsRequestTest { - private final ReadVmsRequest model = new ReadVmsRequest(); - - /** Model tests for ReadVmsRequest */ - @Test - public void testReadVmsRequest() { - // TODO: test ReadVmsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponseTest.java deleted file mode 100644 index 393eee3c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsResponse */ -public class ReadVmsResponseTest { - private final ReadVmsResponse model = new ReadVmsResponse(); - - /** Model tests for ReadVmsResponse */ - @Test - public void testReadVmsResponse() { - // TODO: test ReadVmsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vms' */ - @Test - public void vmsTest() { - // TODO: test vms - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequestTest.java deleted file mode 100644 index e4a6f1c9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsStateRequest */ -public class ReadVmsStateRequestTest { - private final ReadVmsStateRequest model = new ReadVmsStateRequest(); - - /** Model tests for ReadVmsStateRequest */ - @Test - public void testReadVmsStateRequest() { - // TODO: test ReadVmsStateRequest - } - - /** Test the property 'allVms' */ - @Test - public void allVmsTest() { - // TODO: test allVms - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponseTest.java deleted file mode 100644 index 6943e5f6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVmsStateResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVmsStateResponse */ -public class ReadVmsStateResponseTest { - private final ReadVmsStateResponse model = new ReadVmsStateResponse(); - - /** Model tests for ReadVmsStateResponse */ - @Test - public void testReadVmsStateResponse() { - // TODO: test ReadVmsStateResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmStates' */ - @Test - public void vmStatesTest() { - // TODO: test vmStates - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequestTest.java deleted file mode 100644 index 3170616f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVolumesRequest */ -public class ReadVolumesRequestTest { - private final ReadVolumesRequest model = new ReadVolumesRequest(); - - /** Model tests for ReadVolumesRequest */ - @Test - public void testReadVolumesRequest() { - // TODO: test ReadVolumesRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponseTest.java deleted file mode 100644 index 8d08b5dd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVolumesResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVolumesResponse */ -public class ReadVolumesResponseTest { - private final ReadVolumesResponse model = new ReadVolumesResponse(); - - /** Model tests for ReadVolumesResponse */ - @Test - public void testReadVolumesResponse() { - // TODO: test ReadVolumesResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'volumes' */ - @Test - public void volumesTest() { - // TODO: test volumes - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequestTest.java deleted file mode 100644 index 4126d8ea..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVpnConnectionsRequest */ -public class ReadVpnConnectionsRequestTest { - private final ReadVpnConnectionsRequest model = new ReadVpnConnectionsRequest(); - - /** Model tests for ReadVpnConnectionsRequest */ - @Test - public void testReadVpnConnectionsRequest() { - // TODO: test ReadVpnConnectionsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'filters' */ - @Test - public void filtersTest() { - // TODO: test filters - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'resultsPerPage' */ - @Test - public void resultsPerPageTest() { - // TODO: test resultsPerPage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponseTest.java deleted file mode 100644 index a698bfc0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ReadVpnConnectionsResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ReadVpnConnectionsResponse */ -public class ReadVpnConnectionsResponseTest { - private final ReadVpnConnectionsResponse model = new ReadVpnConnectionsResponse(); - - /** Model tests for ReadVpnConnectionsResponse */ - @Test - public void testReadVpnConnectionsResponse() { - // TODO: test ReadVpnConnectionsResponse - } - - /** Test the property 'nextPageToken' */ - @Test - public void nextPageTokenTest() { - // TODO: test nextPageToken - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vpnConnections' */ - @Test - public void vpnConnectionsTest() { - // TODO: test vpnConnections - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequestTest.java deleted file mode 100644 index 09cd39d0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RebootVmsRequest */ -public class RebootVmsRequestTest { - private final RebootVmsRequest model = new RebootVmsRequest(); - - /** Model tests for RebootVmsRequest */ - @Test - public void testRebootVmsRequest() { - // TODO: test RebootVmsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponseTest.java deleted file mode 100644 index 2d51786e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RebootVmsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RebootVmsResponse */ -public class RebootVmsResponseTest { - private final RebootVmsResponse model = new RebootVmsResponse(); - - /** Model tests for RebootVmsResponse */ - @Test - public void testRebootVmsResponse() { - // TODO: test RebootVmsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegionTest.java deleted file mode 100644 index 8a187323..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegionTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Region */ -public class RegionTest { - private final Region model = new Region(); - - /** Model tests for Region */ - @Test - public void testRegion() { - // TODO: test Region - } - - /** Test the property 'endpoint' */ - @Test - public void endpointTest() { - // TODO: test endpoint - } - - /** Test the property 'regionName' */ - @Test - public void regionNameTest() { - // TODO: test regionName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequestTest.java deleted file mode 100644 index 14f79bb1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RegisterVmsInLoadBalancerRequest */ -public class RegisterVmsInLoadBalancerRequestTest { - private final RegisterVmsInLoadBalancerRequest model = new RegisterVmsInLoadBalancerRequest(); - - /** Model tests for RegisterVmsInLoadBalancerRequest */ - @Test - public void testRegisterVmsInLoadBalancerRequest() { - // TODO: test RegisterVmsInLoadBalancerRequest - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponseTest.java deleted file mode 100644 index 24dbf47d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RegisterVmsInLoadBalancerResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RegisterVmsInLoadBalancerResponse */ -public class RegisterVmsInLoadBalancerResponseTest { - private final RegisterVmsInLoadBalancerResponse model = new RegisterVmsInLoadBalancerResponse(); - - /** Model tests for RegisterVmsInLoadBalancerResponse */ - @Test - public void testRegisterVmsInLoadBalancerResponse() { - // TODO: test RegisterVmsInLoadBalancerResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequestTest.java deleted file mode 100644 index 043262c2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RejectNetPeeringRequest */ -public class RejectNetPeeringRequestTest { - private final RejectNetPeeringRequest model = new RejectNetPeeringRequest(); - - /** Model tests for RejectNetPeeringRequest */ - @Test - public void testRejectNetPeeringRequest() { - // TODO: test RejectNetPeeringRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponseTest.java deleted file mode 100644 index e08e999f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RejectNetPeeringResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RejectNetPeeringResponse */ -public class RejectNetPeeringResponseTest { - private final RejectNetPeeringResponse model = new RejectNetPeeringResponse(); - - /** Model tests for RejectNetPeeringResponse */ - @Test - public void testRejectNetPeeringResponse() { - // TODO: test RejectNetPeeringResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequestTest.java deleted file mode 100644 index 57392b1a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RemoveUserFromUserGroupRequest */ -public class RemoveUserFromUserGroupRequestTest { - private final RemoveUserFromUserGroupRequest model = new RemoveUserFromUserGroupRequest(); - - /** Model tests for RemoveUserFromUserGroupRequest */ - @Test - public void testRemoveUserFromUserGroupRequest() { - // TODO: test RemoveUserFromUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } - - /** Test the property 'userGroupPath' */ - @Test - public void userGroupPathTest() { - // TODO: test userGroupPath - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } - - /** Test the property 'userPath' */ - @Test - public void userPathTest() { - // TODO: test userPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponseTest.java deleted file mode 100644 index 111f17bd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RemoveUserFromUserGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RemoveUserFromUserGroupResponse */ -public class RemoveUserFromUserGroupResponseTest { - private final RemoveUserFromUserGroupResponse model = new RemoveUserFromUserGroupResponse(); - - /** Model tests for RemoveUserFromUserGroupResponse */ - @Test - public void testRemoveUserFromUserGroupResponse() { - // TODO: test RemoveUserFromUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTagTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTagTest.java deleted file mode 100644 index 9b9b7008..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceLoadBalancerTagTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ResourceLoadBalancerTag */ -public class ResourceLoadBalancerTagTest { - private final ResourceLoadBalancerTag model = new ResourceLoadBalancerTag(); - - /** Model tests for ResourceLoadBalancerTag */ - @Test - public void testResourceLoadBalancerTag() { - // TODO: test ResourceLoadBalancerTag - } - - /** Test the property 'key' */ - @Test - public void keyTest() { - // TODO: test key - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceTagTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceTagTest.java deleted file mode 100644 index 625241ee..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResourceTagTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ResourceTag */ -public class ResourceTagTest { - private final ResourceTag model = new ResourceTag(); - - /** Model tests for ResourceTag */ - @Test - public void testResourceTag() { - // TODO: test ResourceTag - } - - /** Test the property 'key' */ - @Test - public void keyTest() { - // TODO: test key - } - - /** Test the property 'value' */ - @Test - public void valueTest() { - // TODO: test value - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResponseContextTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResponseContextTest.java deleted file mode 100644 index 2ce08ae6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ResponseContextTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ResponseContext */ -public class ResponseContextTest { - private final ResponseContext model = new ResponseContext(); - - /** Model tests for ResponseContext */ - @Test - public void testResponseContext() { - // TODO: test ResponseContext - } - - /** Test the property 'requestId' */ - @Test - public void requestIdTest() { - // TODO: test requestId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteLightTest.java deleted file mode 100644 index 69246035..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteLightTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RouteLight */ -public class RouteLightTest { - private final RouteLight model = new RouteLight(); - - /** Model tests for RouteLight */ - @Test - public void testRouteLight() { - // TODO: test RouteLight - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'routeType' */ - @Test - public void routeTypeTest() { - // TODO: test routeType - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGatewayTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGatewayTest.java deleted file mode 100644 index 7067dc32..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RoutePropagatingVirtualGatewayTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RoutePropagatingVirtualGateway */ -public class RoutePropagatingVirtualGatewayTest { - private final RoutePropagatingVirtualGateway model = new RoutePropagatingVirtualGateway(); - - /** Model tests for RoutePropagatingVirtualGateway */ - @Test - public void testRoutePropagatingVirtualGateway() { - // TODO: test RoutePropagatingVirtualGateway - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTableTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTableTest.java deleted file mode 100644 index 3b846f08..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTableTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for RouteTable */ -public class RouteTableTest { - private final RouteTable model = new RouteTable(); - - /** Model tests for RouteTable */ - @Test - public void testRouteTable() { - // TODO: test RouteTable - } - - /** Test the property 'linkRouteTables' */ - @Test - public void linkRouteTablesTest() { - // TODO: test linkRouteTables - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'routePropagatingVirtualGateways' */ - @Test - public void routePropagatingVirtualGatewaysTest() { - // TODO: test routePropagatingVirtualGateways - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'routes' */ - @Test - public void routesTest() { - // TODO: test routes - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTest.java deleted file mode 100644 index 7c3457e8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/RouteTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Route */ -public class RouteTest { - private final Route model = new Route(); - - /** Model tests for Route */ - @Test - public void testRoute() { - // TODO: test Route - } - - /** Test the property 'creationMethod' */ - @Test - public void creationMethodTest() { - // TODO: test creationMethod - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'destinationServiceId' */ - @Test - public void destinationServiceIdTest() { - // TODO: test destinationServiceId - } - - /** Test the property 'gatewayId' */ - @Test - public void gatewayIdTest() { - // TODO: test gatewayId - } - - /** Test the property 'natServiceId' */ - @Test - public void natServiceIdTest() { - // TODO: test natServiceId - } - - /** Test the property 'netAccessPointId' */ - @Test - public void netAccessPointIdTest() { - // TODO: test netAccessPointId - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'vmAccountId' */ - @Test - public void vmAccountIdTest() { - // TODO: test vmAccountId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequestTest.java deleted file mode 100644 index ba27cbb6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ScaleDownVmGroupRequest */ -public class ScaleDownVmGroupRequestTest { - private final ScaleDownVmGroupRequest model = new ScaleDownVmGroupRequest(); - - /** Model tests for ScaleDownVmGroupRequest */ - @Test - public void testScaleDownVmGroupRequest() { - // TODO: test ScaleDownVmGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmGroupId' */ - @Test - public void vmGroupIdTest() { - // TODO: test vmGroupId - } - - /** Test the property 'vmSubtraction' */ - @Test - public void vmSubtractionTest() { - // TODO: test vmSubtraction - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponseTest.java deleted file mode 100644 index 0dabc524..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleDownVmGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ScaleDownVmGroupResponse */ -public class ScaleDownVmGroupResponseTest { - private final ScaleDownVmGroupResponse model = new ScaleDownVmGroupResponse(); - - /** Model tests for ScaleDownVmGroupResponse */ - @Test - public void testScaleDownVmGroupResponse() { - // TODO: test ScaleDownVmGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequestTest.java deleted file mode 100644 index 04ccdfcf..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ScaleUpVmGroupRequest */ -public class ScaleUpVmGroupRequestTest { - private final ScaleUpVmGroupRequest model = new ScaleUpVmGroupRequest(); - - /** Model tests for ScaleUpVmGroupRequest */ - @Test - public void testScaleUpVmGroupRequest() { - // TODO: test ScaleUpVmGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmAddition' */ - @Test - public void vmAdditionTest() { - // TODO: test vmAddition - } - - /** Test the property 'vmGroupId' */ - @Test - public void vmGroupIdTest() { - // TODO: test vmGroupId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponseTest.java deleted file mode 100644 index 38a1e6c6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ScaleUpVmGroupResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ScaleUpVmGroupResponse */ -public class ScaleUpVmGroupResponseTest { - private final ScaleUpVmGroupResponse model = new ScaleUpVmGroupResponse(); - - /** Model tests for ScaleUpVmGroupResponse */ - @Test - public void testScaleUpVmGroupResponse() { - // TODO: test ScaleUpVmGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLightTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLightTest.java deleted file mode 100644 index 09fa4035..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupLightTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SecurityGroupLight */ -public class SecurityGroupLightTest { - private final SecurityGroupLight model = new SecurityGroupLight(); - - /** Model tests for SecurityGroupLight */ - @Test - public void testSecurityGroupLight() { - // TODO: test SecurityGroupLight - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRuleTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRuleTest.java deleted file mode 100644 index 2e5d431c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupRuleTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SecurityGroupRule */ -public class SecurityGroupRuleTest { - private final SecurityGroupRule model = new SecurityGroupRule(); - - /** Model tests for SecurityGroupRule */ - @Test - public void testSecurityGroupRule() { - // TODO: test SecurityGroupRule - } - - /** Test the property 'fromPortRange' */ - @Test - public void fromPortRangeTest() { - // TODO: test fromPortRange - } - - /** Test the property 'ipProtocol' */ - @Test - public void ipProtocolTest() { - // TODO: test ipProtocol - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** Test the property 'securityGroupsMembers' */ - @Test - public void securityGroupsMembersTest() { - // TODO: test securityGroupsMembers - } - - /** Test the property 'serviceIds' */ - @Test - public void serviceIdsTest() { - // TODO: test serviceIds - } - - /** Test the property 'toPortRange' */ - @Test - public void toPortRangeTest() { - // TODO: test toPortRange - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupTest.java deleted file mode 100644 index ce8c8464..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SecurityGroup */ -public class SecurityGroupTest { - private final SecurityGroup model = new SecurityGroup(); - - /** Model tests for SecurityGroup */ - @Test - public void testSecurityGroup() { - // TODO: test SecurityGroup - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'inboundRules' */ - @Test - public void inboundRulesTest() { - // TODO: test inboundRules - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'outboundRules' */ - @Test - public void outboundRulesTest() { - // TODO: test outboundRules - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMemberTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMemberTest.java deleted file mode 100644 index 13e86a73..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SecurityGroupsMemberTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SecurityGroupsMember */ -public class SecurityGroupsMemberTest { - private final SecurityGroupsMember model = new SecurityGroupsMember(); - - /** Model tests for SecurityGroupsMember */ - @Test - public void testSecurityGroupsMember() { - // TODO: test SecurityGroupsMember - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'securityGroupId' */ - @Test - public void securityGroupIdTest() { - // TODO: test securityGroupId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificateTest.java deleted file mode 100644 index 8387c303..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServerCertificateTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for ServerCertificate */ -public class ServerCertificateTest { - private final ServerCertificate model = new ServerCertificate(); - - /** Model tests for ServerCertificate */ - @Test - public void testServerCertificate() { - // TODO: test ServerCertificate - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'id' */ - @Test - public void idTest() { - // TODO: test id - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'orn' */ - @Test - public void ornTest() { - // TODO: test orn - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'uploadDate' */ - @Test - public void uploadDateTest() { - // TODO: test uploadDate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServiceTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServiceTest.java deleted file mode 100644 index 319b9df3..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/ServiceTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Service */ -public class ServiceTest { - private final Service model = new Service(); - - /** Model tests for Service */ - @Test - public void testService() { - // TODO: test Service - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** Test the property 'serviceId' */ - @Test - public void serviceIdTest() { - // TODO: test serviceId - } - - /** Test the property 'serviceName' */ - @Test - public void serviceNameTest() { - // TODO: test serviceName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequestTest.java deleted file mode 100644 index 63b1a58c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SetDefaultPolicyVersionRequest */ -public class SetDefaultPolicyVersionRequestTest { - private final SetDefaultPolicyVersionRequest model = new SetDefaultPolicyVersionRequest(); - - /** Model tests for SetDefaultPolicyVersionRequest */ - @Test - public void testSetDefaultPolicyVersionRequest() { - // TODO: test SetDefaultPolicyVersionRequest - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'versionId' */ - @Test - public void versionIdTest() { - // TODO: test versionId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponseTest.java deleted file mode 100644 index 4e764ccd..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SetDefaultPolicyVersionResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SetDefaultPolicyVersionResponse */ -public class SetDefaultPolicyVersionResponseTest { - private final SetDefaultPolicyVersionResponse model = new SetDefaultPolicyVersionResponse(); - - /** Model tests for SetDefaultPolicyVersionResponse */ - @Test - public void testSetDefaultPolicyVersionResponse() { - // TODO: test SetDefaultPolicyVersionResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTaskTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTaskTest.java deleted file mode 100644 index efab873f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotExportTaskTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SnapshotExportTask */ -public class SnapshotExportTaskTest { - private final SnapshotExportTask model = new SnapshotExportTask(); - - /** Model tests for SnapshotExportTask */ - @Test - public void testSnapshotExportTask() { - // TODO: test SnapshotExportTask - } - - /** Test the property 'comment' */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** Test the property 'osuExport' */ - @Test - public void osuExportTest() { - // TODO: test osuExport - } - - /** Test the property 'progress' */ - @Test - public void progressTest() { - // TODO: test progress - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'taskId' */ - @Test - public void taskIdTest() { - // TODO: test taskId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotTest.java deleted file mode 100644 index 9fc6af15..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SnapshotTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Snapshot */ -public class SnapshotTest { - private final Snapshot model = new Snapshot(); - - /** Model tests for Snapshot */ - @Test - public void testSnapshot() { - // TODO: test Snapshot - } - - /** Test the property 'accountAlias' */ - @Test - public void accountAliasTest() { - // TODO: test accountAlias - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'permissionsToCreateVolume' */ - @Test - public void permissionsToCreateVolumeTest() { - // TODO: test permissionsToCreateVolume - } - - /** Test the property 'progress' */ - @Test - public void progressTest() { - // TODO: test progress - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } - - /** Test the property 'volumeSize' */ - @Test - public void volumeSizeTest() { - // TODO: test volumeSize - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceNetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceNetTest.java deleted file mode 100644 index 19f50b64..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceNetTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SourceNet */ -public class SourceNetTest { - private final SourceNet model = new SourceNet(); - - /** Model tests for SourceNet */ - @Test - public void testSourceNet() { - // TODO: test SourceNet - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroupTest.java deleted file mode 100644 index ffc3b57c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SourceSecurityGroupTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for SourceSecurityGroup */ -public class SourceSecurityGroupTest { - private final SourceSecurityGroup model = new SourceSecurityGroup(); - - /** Model tests for SourceSecurityGroup */ - @Test - public void testSourceSecurityGroup() { - // TODO: test SourceSecurityGroup - } - - /** Test the property 'securityGroupAccountId' */ - @Test - public void securityGroupAccountIdTest() { - // TODO: test securityGroupAccountId - } - - /** Test the property 'securityGroupName' */ - @Test - public void securityGroupNameTest() { - // TODO: test securityGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequestTest.java deleted file mode 100644 index d0e10315..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for StartVmsRequest */ -public class StartVmsRequestTest { - private final StartVmsRequest model = new StartVmsRequest(); - - /** Model tests for StartVmsRequest */ - @Test - public void testStartVmsRequest() { - // TODO: test StartVmsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponseTest.java deleted file mode 100644 index 74e8ec9f..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StartVmsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for StartVmsResponse */ -public class StartVmsResponseTest { - private final StartVmsResponse model = new StartVmsResponse(); - - /** Model tests for StartVmsResponse */ - @Test - public void testStartVmsResponse() { - // TODO: test StartVmsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vms' */ - @Test - public void vmsTest() { - // TODO: test vms - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StateCommentTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/StateCommentTest.java deleted file mode 100644 index e31d0dc6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StateCommentTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for StateComment */ -public class StateCommentTest { - private final StateComment model = new StateComment(); - - /** Model tests for StateComment */ - @Test - public void testStateComment() { - // TODO: test StateComment - } - - /** Test the property 'stateCode' */ - @Test - public void stateCodeTest() { - // TODO: test stateCode - } - - /** Test the property 'stateMessage' */ - @Test - public void stateMessageTest() { - // TODO: test stateMessage - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequestTest.java deleted file mode 100644 index 055b625a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for StopVmsRequest */ -public class StopVmsRequestTest { - private final StopVmsRequest model = new StopVmsRequest(); - - /** Model tests for StopVmsRequest */ - @Test - public void testStopVmsRequest() { - // TODO: test StopVmsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'forceStop' */ - @Test - public void forceStopTest() { - // TODO: test forceStop - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponseTest.java deleted file mode 100644 index 85fd4039..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/StopVmsResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for StopVmsResponse */ -public class StopVmsResponseTest { - private final StopVmsResponse model = new StopVmsResponse(); - - /** Model tests for StopVmsResponse */ - @Test - public void testStopVmsResponse() { - // TODO: test StopVmsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vms' */ - @Test - public void vmsTest() { - // TODO: test vms - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubnetTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubnetTest.java deleted file mode 100644 index 9bdccb60..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubnetTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Subnet */ -public class SubnetTest { - private final Subnet model = new Subnet(); - - /** Model tests for Subnet */ - @Test - public void testSubnet() { - // TODO: test Subnet - } - - /** Test the property 'availableIpsCount' */ - @Test - public void availableIpsCountTest() { - // TODO: test availableIpsCount - } - - /** Test the property 'ipRange' */ - @Test - public void ipRangeTest() { - // TODO: test ipRange - } - - /** Test the property 'mapPublicIpOnLaunch' */ - @Test - public void mapPublicIpOnLaunchTest() { - // TODO: test mapPublicIpOnLaunch - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubregionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubregionTest.java deleted file mode 100644 index 4b5e3386..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/SubregionTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Subregion */ -public class SubregionTest { - private final Subregion model = new Subregion(); - - /** Model tests for Subregion */ - @Test - public void testSubregion() { - // TODO: test Subregion - } - - /** Test the property 'locationCode' */ - @Test - public void locationCodeTest() { - // TODO: test locationCode - } - - /** Test the property 'regionName' */ - @Test - public void regionNameTest() { - // TODO: test regionName - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/TagTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/TagTest.java deleted file mode 100644 index 8e0e3903..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/TagTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Tag */ -public class TagTest { - private final Tag model = new Tag(); - - /** Model tests for Tag */ - @Test - public void testTag() { - // TODO: test Tag - } - - /** Test the property 'key' */ - @Test - public void keyTest() { - // TODO: test key - } - - /** Test the property 'resourceId' */ - @Test - public void resourceIdTest() { - // TODO: test resourceId - } - - /** Test the property 'resourceType' */ - @Test - public void resourceTypeTest() { - // TODO: test resourceType - } - - /** Test the property 'value' */ - @Test - public void valueTest() { - // TODO: test value - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequestTest.java deleted file mode 100644 index 7935e319..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkFlexibleGpuRequest */ -public class UnlinkFlexibleGpuRequestTest { - private final UnlinkFlexibleGpuRequest model = new UnlinkFlexibleGpuRequest(); - - /** Model tests for UnlinkFlexibleGpuRequest */ - @Test - public void testUnlinkFlexibleGpuRequest() { - // TODO: test UnlinkFlexibleGpuRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flexibleGpuId' */ - @Test - public void flexibleGpuIdTest() { - // TODO: test flexibleGpuId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponseTest.java deleted file mode 100644 index dfdab0ad..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkFlexibleGpuResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkFlexibleGpuResponse */ -public class UnlinkFlexibleGpuResponseTest { - private final UnlinkFlexibleGpuResponse model = new UnlinkFlexibleGpuResponse(); - - /** Model tests for UnlinkFlexibleGpuResponse */ - @Test - public void testUnlinkFlexibleGpuResponse() { - // TODO: test UnlinkFlexibleGpuResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequestTest.java deleted file mode 100644 index 69fffa61..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkInternetServiceRequest */ -public class UnlinkInternetServiceRequestTest { - private final UnlinkInternetServiceRequest model = new UnlinkInternetServiceRequest(); - - /** Model tests for UnlinkInternetServiceRequest */ - @Test - public void testUnlinkInternetServiceRequest() { - // TODO: test UnlinkInternetServiceRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'internetServiceId' */ - @Test - public void internetServiceIdTest() { - // TODO: test internetServiceId - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponseTest.java deleted file mode 100644 index afc861c1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkInternetServiceResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkInternetServiceResponse */ -public class UnlinkInternetServiceResponseTest { - private final UnlinkInternetServiceResponse model = new UnlinkInternetServiceResponse(); - - /** Model tests for UnlinkInternetServiceResponse */ - @Test - public void testUnlinkInternetServiceResponse() { - // TODO: test UnlinkInternetServiceResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequestTest.java deleted file mode 100644 index 4389d248..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesRequestTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkLoadBalancerBackendMachinesRequest */ -public class UnlinkLoadBalancerBackendMachinesRequestTest { - private final UnlinkLoadBalancerBackendMachinesRequest model = - new UnlinkLoadBalancerBackendMachinesRequest(); - - /** Model tests for UnlinkLoadBalancerBackendMachinesRequest */ - @Test - public void testUnlinkLoadBalancerBackendMachinesRequest() { - // TODO: test UnlinkLoadBalancerBackendMachinesRequest - } - - /** Test the property 'backendIps' */ - @Test - public void backendIpsTest() { - // TODO: test backendIps - } - - /** Test the property 'backendVmIds' */ - @Test - public void backendVmIdsTest() { - // TODO: test backendVmIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponseTest.java deleted file mode 100644 index 6bace71b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkLoadBalancerBackendMachinesResponseTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkLoadBalancerBackendMachinesResponse */ -public class UnlinkLoadBalancerBackendMachinesResponseTest { - private final UnlinkLoadBalancerBackendMachinesResponse model = - new UnlinkLoadBalancerBackendMachinesResponse(); - - /** Model tests for UnlinkLoadBalancerBackendMachinesResponse */ - @Test - public void testUnlinkLoadBalancerBackendMachinesResponse() { - // TODO: test UnlinkLoadBalancerBackendMachinesResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequestTest.java deleted file mode 100644 index ce9d9c93..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkManagedPolicyFromUserGroupRequest */ -public class UnlinkManagedPolicyFromUserGroupRequestTest { - private final UnlinkManagedPolicyFromUserGroupRequest model = - new UnlinkManagedPolicyFromUserGroupRequest(); - - /** Model tests for UnlinkManagedPolicyFromUserGroupRequest */ - @Test - public void testUnlinkManagedPolicyFromUserGroupRequest() { - // TODO: test UnlinkManagedPolicyFromUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponseTest.java deleted file mode 100644 index 83e97ff6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkManagedPolicyFromUserGroupResponseTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkManagedPolicyFromUserGroupResponse */ -public class UnlinkManagedPolicyFromUserGroupResponseTest { - private final UnlinkManagedPolicyFromUserGroupResponse model = - new UnlinkManagedPolicyFromUserGroupResponse(); - - /** Model tests for UnlinkManagedPolicyFromUserGroupResponse */ - @Test - public void testUnlinkManagedPolicyFromUserGroupResponse() { - // TODO: test UnlinkManagedPolicyFromUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequestTest.java deleted file mode 100644 index c681e446..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkNicRequest */ -public class UnlinkNicRequestTest { - private final UnlinkNicRequest model = new UnlinkNicRequest(); - - /** Model tests for UnlinkNicRequest */ - @Test - public void testUnlinkNicRequest() { - // TODO: test UnlinkNicRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'linkNicId' */ - @Test - public void linkNicIdTest() { - // TODO: test linkNicId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponseTest.java deleted file mode 100644 index 6386e539..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkNicResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkNicResponse */ -public class UnlinkNicResponseTest { - private final UnlinkNicResponse model = new UnlinkNicResponse(); - - /** Model tests for UnlinkNicResponse */ - @Test - public void testUnlinkNicResponse() { - // TODO: test UnlinkNicResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequestTest.java deleted file mode 100644 index a3a4b596..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPolicyRequest */ -public class UnlinkPolicyRequestTest { - private final UnlinkPolicyRequest model = new UnlinkPolicyRequest(); - - /** Model tests for UnlinkPolicyRequest */ - @Test - public void testUnlinkPolicyRequest() { - // TODO: test UnlinkPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'policyOrn' */ - @Test - public void policyOrnTest() { - // TODO: test policyOrn - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponseTest.java deleted file mode 100644 index 053cdd51..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPolicyResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPolicyResponse */ -public class UnlinkPolicyResponseTest { - private final UnlinkPolicyResponse model = new UnlinkPolicyResponse(); - - /** Model tests for UnlinkPolicyResponse */ - @Test - public void testUnlinkPolicyResponse() { - // TODO: test UnlinkPolicyResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequestTest.java deleted file mode 100644 index 8b54c1f5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPrivateIpsRequest */ -public class UnlinkPrivateIpsRequestTest { - private final UnlinkPrivateIpsRequest model = new UnlinkPrivateIpsRequest(); - - /** Model tests for UnlinkPrivateIpsRequest */ - @Test - public void testUnlinkPrivateIpsRequest() { - // TODO: test UnlinkPrivateIpsRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'privateIps' */ - @Test - public void privateIpsTest() { - // TODO: test privateIps - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponseTest.java deleted file mode 100644 index feec9910..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPrivateIpsResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPrivateIpsResponse */ -public class UnlinkPrivateIpsResponseTest { - private final UnlinkPrivateIpsResponse model = new UnlinkPrivateIpsResponse(); - - /** Model tests for UnlinkPrivateIpsResponse */ - @Test - public void testUnlinkPrivateIpsResponse() { - // TODO: test UnlinkPrivateIpsResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequestTest.java deleted file mode 100644 index bd851d67..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPublicIpRequest */ -public class UnlinkPublicIpRequestTest { - private final UnlinkPublicIpRequest model = new UnlinkPublicIpRequest(); - - /** Model tests for UnlinkPublicIpRequest */ - @Test - public void testUnlinkPublicIpRequest() { - // TODO: test UnlinkPublicIpRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'linkPublicIpId' */ - @Test - public void linkPublicIpIdTest() { - // TODO: test linkPublicIpId - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponseTest.java deleted file mode 100644 index 05a41b62..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkPublicIpResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkPublicIpResponse */ -public class UnlinkPublicIpResponseTest { - private final UnlinkPublicIpResponse model = new UnlinkPublicIpResponse(); - - /** Model tests for UnlinkPublicIpResponse */ - @Test - public void testUnlinkPublicIpResponse() { - // TODO: test UnlinkPublicIpResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequestTest.java deleted file mode 100644 index 0948ac1a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableRequestTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkRouteTableRequest */ -public class UnlinkRouteTableRequestTest { - private final UnlinkRouteTableRequest model = new UnlinkRouteTableRequest(); - - /** Model tests for UnlinkRouteTableRequest */ - @Test - public void testUnlinkRouteTableRequest() { - // TODO: test UnlinkRouteTableRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'linkRouteTableId' */ - @Test - public void linkRouteTableIdTest() { - // TODO: test linkRouteTableId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponseTest.java deleted file mode 100644 index 35d27757..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkRouteTableResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkRouteTableResponse */ -public class UnlinkRouteTableResponseTest { - private final UnlinkRouteTableResponse model = new UnlinkRouteTableResponse(); - - /** Model tests for UnlinkRouteTableResponse */ - @Test - public void testUnlinkRouteTableResponse() { - // TODO: test UnlinkRouteTableResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequestTest.java deleted file mode 100644 index c0a5a8a1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkVirtualGatewayRequest */ -public class UnlinkVirtualGatewayRequestTest { - private final UnlinkVirtualGatewayRequest model = new UnlinkVirtualGatewayRequest(); - - /** Model tests for UnlinkVirtualGatewayRequest */ - @Test - public void testUnlinkVirtualGatewayRequest() { - // TODO: test UnlinkVirtualGatewayRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponseTest.java deleted file mode 100644 index 6c4aedb2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVirtualGatewayResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkVirtualGatewayResponse */ -public class UnlinkVirtualGatewayResponseTest { - private final UnlinkVirtualGatewayResponse model = new UnlinkVirtualGatewayResponse(); - - /** Model tests for UnlinkVirtualGatewayResponse */ - @Test - public void testUnlinkVirtualGatewayResponse() { - // TODO: test UnlinkVirtualGatewayResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequestTest.java deleted file mode 100644 index 789174ec..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkVolumeRequest */ -public class UnlinkVolumeRequestTest { - private final UnlinkVolumeRequest model = new UnlinkVolumeRequest(); - - /** Model tests for UnlinkVolumeRequest */ - @Test - public void testUnlinkVolumeRequest() { - // TODO: test UnlinkVolumeRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'forceUnlink' */ - @Test - public void forceUnlinkTest() { - // TODO: test forceUnlink - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponseTest.java deleted file mode 100644 index e47faa81..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UnlinkVolumeResponseTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UnlinkVolumeResponse */ -public class UnlinkVolumeResponseTest { - private final UnlinkVolumeResponse model = new UnlinkVolumeResponse(); - - /** Model tests for UnlinkVolumeResponse */ - @Test - public void testUnlinkVolumeResponse() { - // TODO: test UnlinkVolumeResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequestTest.java deleted file mode 100644 index 7edf31e0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateAccessKeyRequest */ -public class UpdateAccessKeyRequestTest { - private final UpdateAccessKeyRequest model = new UpdateAccessKeyRequest(); - - /** Model tests for UpdateAccessKeyRequest */ - @Test - public void testUpdateAccessKeyRequest() { - // TODO: test UpdateAccessKeyRequest - } - - /** Test the property 'accessKeyId' */ - @Test - public void accessKeyIdTest() { - // TODO: test accessKeyId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'expirationDate' */ - @Test - public void expirationDateTest() { - // TODO: test expirationDate - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponseTest.java deleted file mode 100644 index 56fde914..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccessKeyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateAccessKeyResponse */ -public class UpdateAccessKeyResponseTest { - private final UpdateAccessKeyResponse model = new UpdateAccessKeyResponse(); - - /** Model tests for UpdateAccessKeyResponse */ - @Test - public void testUpdateAccessKeyResponse() { - // TODO: test UpdateAccessKeyResponse - } - - /** Test the property 'accessKey' */ - @Test - public void accessKeyTest() { - // TODO: test accessKey - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequestTest.java deleted file mode 100644 index 076b5486..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountRequestTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateAccountRequest */ -public class UpdateAccountRequestTest { - private final UpdateAccountRequest model = new UpdateAccountRequest(); - - /** Model tests for UpdateAccountRequest */ - @Test - public void testUpdateAccountRequest() { - // TODO: test UpdateAccountRequest - } - - /** Test the property 'additionalEmails' */ - @Test - public void additionalEmailsTest() { - // TODO: test additionalEmails - } - - /** Test the property 'city' */ - @Test - public void cityTest() { - // TODO: test city - } - - /** Test the property 'companyName' */ - @Test - public void companyNameTest() { - // TODO: test companyName - } - - /** Test the property 'country' */ - @Test - public void countryTest() { - // TODO: test country - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'email' */ - @Test - public void emailTest() { - // TODO: test email - } - - /** Test the property 'firstName' */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** Test the property 'jobTitle' */ - @Test - public void jobTitleTest() { - // TODO: test jobTitle - } - - /** Test the property 'lastName' */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** Test the property 'mobileNumber' */ - @Test - public void mobileNumberTest() { - // TODO: test mobileNumber - } - - /** Test the property 'phoneNumber' */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** Test the property 'stateProvince' */ - @Test - public void stateProvinceTest() { - // TODO: test stateProvince - } - - /** Test the property 'vatNumber' */ - @Test - public void vatNumberTest() { - // TODO: test vatNumber - } - - /** Test the property 'zipCode' */ - @Test - public void zipCodeTest() { - // TODO: test zipCode - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponseTest.java deleted file mode 100644 index 20e25768..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateAccountResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateAccountResponse */ -public class UpdateAccountResponseTest { - private final UpdateAccountResponse model = new UpdateAccountResponse(); - - /** Model tests for UpdateAccountResponse */ - @Test - public void testUpdateAccountResponse() { - // TODO: test UpdateAccountResponse - } - - /** Test the property 'account' */ - @Test - public void accountTest() { - // TODO: test account - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequestTest.java deleted file mode 100644 index 4a547b74..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateApiAccessPolicyRequest */ -public class UpdateApiAccessPolicyRequestTest { - private final UpdateApiAccessPolicyRequest model = new UpdateApiAccessPolicyRequest(); - - /** Model tests for UpdateApiAccessPolicyRequest */ - @Test - public void testUpdateApiAccessPolicyRequest() { - // TODO: test UpdateApiAccessPolicyRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'maxAccessKeyExpirationSeconds' */ - @Test - public void maxAccessKeyExpirationSecondsTest() { - // TODO: test maxAccessKeyExpirationSeconds - } - - /** Test the property 'requireTrustedEnv' */ - @Test - public void requireTrustedEnvTest() { - // TODO: test requireTrustedEnv - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponseTest.java deleted file mode 100644 index 952d8661..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessPolicyResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateApiAccessPolicyResponse */ -public class UpdateApiAccessPolicyResponseTest { - private final UpdateApiAccessPolicyResponse model = new UpdateApiAccessPolicyResponse(); - - /** Model tests for UpdateApiAccessPolicyResponse */ - @Test - public void testUpdateApiAccessPolicyResponse() { - // TODO: test UpdateApiAccessPolicyResponse - } - - /** Test the property 'apiAccessPolicy' */ - @Test - public void apiAccessPolicyTest() { - // TODO: test apiAccessPolicy - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequestTest.java deleted file mode 100644 index 8280a3c2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleRequestTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateApiAccessRuleRequest */ -public class UpdateApiAccessRuleRequestTest { - private final UpdateApiAccessRuleRequest model = new UpdateApiAccessRuleRequest(); - - /** Model tests for UpdateApiAccessRuleRequest */ - @Test - public void testUpdateApiAccessRuleRequest() { - // TODO: test UpdateApiAccessRuleRequest - } - - /** Test the property 'apiAccessRuleId' */ - @Test - public void apiAccessRuleIdTest() { - // TODO: test apiAccessRuleId - } - - /** Test the property 'caIds' */ - @Test - public void caIdsTest() { - // TODO: test caIds - } - - /** Test the property 'cns' */ - @Test - public void cnsTest() { - // TODO: test cns - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'ipRanges' */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponseTest.java deleted file mode 100644 index 9d350d4e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateApiAccessRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateApiAccessRuleResponse */ -public class UpdateApiAccessRuleResponseTest { - private final UpdateApiAccessRuleResponse model = new UpdateApiAccessRuleResponse(); - - /** Model tests for UpdateApiAccessRuleResponse */ - @Test - public void testUpdateApiAccessRuleResponse() { - // TODO: test UpdateApiAccessRuleResponse - } - - /** Test the property 'apiAccessRule' */ - @Test - public void apiAccessRuleTest() { - // TODO: test apiAccessRule - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequestTest.java deleted file mode 100644 index 38eab407..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateCaRequest */ -public class UpdateCaRequestTest { - private final UpdateCaRequest model = new UpdateCaRequest(); - - /** Model tests for UpdateCaRequest */ - @Test - public void testUpdateCaRequest() { - // TODO: test UpdateCaRequest - } - - /** Test the property 'caId' */ - @Test - public void caIdTest() { - // TODO: test caId - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponseTest.java deleted file mode 100644 index 443bc596..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateCaResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateCaResponse */ -public class UpdateCaResponseTest { - private final UpdateCaResponse model = new UpdateCaResponse(); - - /** Model tests for UpdateCaResponse */ - @Test - public void testUpdateCaResponse() { - // TODO: test UpdateCaResponse - } - - /** Test the property 'ca' */ - @Test - public void caTest() { - // TODO: test ca - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequestTest.java deleted file mode 100644 index 26cb9858..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateDedicatedGroupRequest */ -public class UpdateDedicatedGroupRequestTest { - private final UpdateDedicatedGroupRequest model = new UpdateDedicatedGroupRequest(); - - /** Model tests for UpdateDedicatedGroupRequest */ - @Test - public void testUpdateDedicatedGroupRequest() { - // TODO: test UpdateDedicatedGroupRequest - } - - /** Test the property 'dedicatedGroupId' */ - @Test - public void dedicatedGroupIdTest() { - // TODO: test dedicatedGroupId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponseTest.java deleted file mode 100644 index 056429a5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDedicatedGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateDedicatedGroupResponse */ -public class UpdateDedicatedGroupResponseTest { - private final UpdateDedicatedGroupResponse model = new UpdateDedicatedGroupResponse(); - - /** Model tests for UpdateDedicatedGroupResponse */ - @Test - public void testUpdateDedicatedGroupResponse() { - // TODO: test UpdateDedicatedGroupResponse - } - - /** Test the property 'dedicatedGroup' */ - @Test - public void dedicatedGroupTest() { - // TODO: test dedicatedGroup - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequestTest.java deleted file mode 100644 index 85735c83..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateDirectLinkInterfaceRequest */ -public class UpdateDirectLinkInterfaceRequestTest { - private final UpdateDirectLinkInterfaceRequest model = new UpdateDirectLinkInterfaceRequest(); - - /** Model tests for UpdateDirectLinkInterfaceRequest */ - @Test - public void testUpdateDirectLinkInterfaceRequest() { - // TODO: test UpdateDirectLinkInterfaceRequest - } - - /** Test the property 'directLinkInterfaceId' */ - @Test - public void directLinkInterfaceIdTest() { - // TODO: test directLinkInterfaceId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'mtu' */ - @Test - public void mtuTest() { - // TODO: test mtu - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponseTest.java deleted file mode 100644 index 25318ec7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateDirectLinkInterfaceResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateDirectLinkInterfaceResponse */ -public class UpdateDirectLinkInterfaceResponseTest { - private final UpdateDirectLinkInterfaceResponse model = new UpdateDirectLinkInterfaceResponse(); - - /** Model tests for UpdateDirectLinkInterfaceResponse */ - @Test - public void testUpdateDirectLinkInterfaceResponse() { - // TODO: test UpdateDirectLinkInterfaceResponse - } - - /** Test the property 'directLinkInterface' */ - @Test - public void directLinkInterfaceTest() { - // TODO: test directLinkInterface - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequestTest.java deleted file mode 100644 index 6ec47564..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateFlexibleGpuRequest */ -public class UpdateFlexibleGpuRequestTest { - private final UpdateFlexibleGpuRequest model = new UpdateFlexibleGpuRequest(); - - /** Model tests for UpdateFlexibleGpuRequest */ - @Test - public void testUpdateFlexibleGpuRequest() { - // TODO: test UpdateFlexibleGpuRequest - } - - /** Test the property 'deleteOnVmDeletion' */ - @Test - public void deleteOnVmDeletionTest() { - // TODO: test deleteOnVmDeletion - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'flexibleGpuId' */ - @Test - public void flexibleGpuIdTest() { - // TODO: test flexibleGpuId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponseTest.java deleted file mode 100644 index b69bc9b6..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateFlexibleGpuResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateFlexibleGpuResponse */ -public class UpdateFlexibleGpuResponseTest { - private final UpdateFlexibleGpuResponse model = new UpdateFlexibleGpuResponse(); - - /** Model tests for UpdateFlexibleGpuResponse */ - @Test - public void testUpdateFlexibleGpuResponse() { - // TODO: test UpdateFlexibleGpuResponse - } - - /** Test the property 'flexibleGpu' */ - @Test - public void flexibleGpuTest() { - // TODO: test flexibleGpu - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequestTest.java deleted file mode 100644 index 259e3478..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateImageRequest */ -public class UpdateImageRequestTest { - private final UpdateImageRequest model = new UpdateImageRequest(); - - /** Model tests for UpdateImageRequest */ - @Test - public void testUpdateImageRequest() { - // TODO: test UpdateImageRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'permissionsToLaunch' */ - @Test - public void permissionsToLaunchTest() { - // TODO: test permissionsToLaunch - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponseTest.java deleted file mode 100644 index e322c04b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateImageResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateImageResponse */ -public class UpdateImageResponseTest { - private final UpdateImageResponse model = new UpdateImageResponse(); - - /** Model tests for UpdateImageResponse */ - @Test - public void testUpdateImageResponse() { - // TODO: test UpdateImageResponse - } - - /** Test the property 'image' */ - @Test - public void imageTest() { - // TODO: test image - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequestTest.java deleted file mode 100644 index 8d2155f2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateListenerRuleRequest */ -public class UpdateListenerRuleRequestTest { - private final UpdateListenerRuleRequest model = new UpdateListenerRuleRequest(); - - /** Model tests for UpdateListenerRuleRequest */ - @Test - public void testUpdateListenerRuleRequest() { - // TODO: test UpdateListenerRuleRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'hostPattern' */ - @Test - public void hostPatternTest() { - // TODO: test hostPattern - } - - /** Test the property 'listenerRuleName' */ - @Test - public void listenerRuleNameTest() { - // TODO: test listenerRuleName - } - - /** Test the property 'pathPattern' */ - @Test - public void pathPatternTest() { - // TODO: test pathPattern - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponseTest.java deleted file mode 100644 index f37d3f5b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateListenerRuleResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateListenerRuleResponse */ -public class UpdateListenerRuleResponseTest { - private final UpdateListenerRuleResponse model = new UpdateListenerRuleResponse(); - - /** Model tests for UpdateListenerRuleResponse */ - @Test - public void testUpdateListenerRuleResponse() { - // TODO: test UpdateListenerRuleResponse - } - - /** Test the property 'listenerRule' */ - @Test - public void listenerRuleTest() { - // TODO: test listenerRule - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequestTest.java deleted file mode 100644 index 490653d4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerRequestTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateLoadBalancerRequest */ -public class UpdateLoadBalancerRequestTest { - private final UpdateLoadBalancerRequest model = new UpdateLoadBalancerRequest(); - - /** Model tests for UpdateLoadBalancerRequest */ - @Test - public void testUpdateLoadBalancerRequest() { - // TODO: test UpdateLoadBalancerRequest - } - - /** Test the property 'accessLog' */ - @Test - public void accessLogTest() { - // TODO: test accessLog - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'healthCheck' */ - @Test - public void healthCheckTest() { - // TODO: test healthCheck - } - - /** Test the property 'loadBalancerName' */ - @Test - public void loadBalancerNameTest() { - // TODO: test loadBalancerName - } - - /** Test the property 'loadBalancerPort' */ - @Test - public void loadBalancerPortTest() { - // TODO: test loadBalancerPort - } - - /** Test the property 'policyNames' */ - @Test - public void policyNamesTest() { - // TODO: test policyNames - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'securedCookies' */ - @Test - public void securedCookiesTest() { - // TODO: test securedCookies - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'serverCertificateId' */ - @Test - public void serverCertificateIdTest() { - // TODO: test serverCertificateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponseTest.java deleted file mode 100644 index 6271eed0..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateLoadBalancerResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateLoadBalancerResponse */ -public class UpdateLoadBalancerResponseTest { - private final UpdateLoadBalancerResponse model = new UpdateLoadBalancerResponse(); - - /** Model tests for UpdateLoadBalancerResponse */ - @Test - public void testUpdateLoadBalancerResponse() { - // TODO: test UpdateLoadBalancerResponse - } - - /** Test the property 'loadBalancer' */ - @Test - public void loadBalancerTest() { - // TODO: test loadBalancer - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequestTest.java deleted file mode 100644 index 578d379c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNetAccessPointRequest */ -public class UpdateNetAccessPointRequestTest { - private final UpdateNetAccessPointRequest model = new UpdateNetAccessPointRequest(); - - /** Model tests for UpdateNetAccessPointRequest */ - @Test - public void testUpdateNetAccessPointRequest() { - // TODO: test UpdateNetAccessPointRequest - } - - /** Test the property 'addRouteTableIds' */ - @Test - public void addRouteTableIdsTest() { - // TODO: test addRouteTableIds - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netAccessPointId' */ - @Test - public void netAccessPointIdTest() { - // TODO: test netAccessPointId - } - - /** Test the property 'removeRouteTableIds' */ - @Test - public void removeRouteTableIdsTest() { - // TODO: test removeRouteTableIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponseTest.java deleted file mode 100644 index 6d1d468e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetAccessPointResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNetAccessPointResponse */ -public class UpdateNetAccessPointResponseTest { - private final UpdateNetAccessPointResponse model = new UpdateNetAccessPointResponse(); - - /** Model tests for UpdateNetAccessPointResponse */ - @Test - public void testUpdateNetAccessPointResponse() { - // TODO: test UpdateNetAccessPointResponse - } - - /** Test the property 'netAccessPoint' */ - @Test - public void netAccessPointTest() { - // TODO: test netAccessPoint - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequestTest.java deleted file mode 100644 index 78cf8269..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNetRequest */ -public class UpdateNetRequestTest { - private final UpdateNetRequest model = new UpdateNetRequest(); - - /** Model tests for UpdateNetRequest */ - @Test - public void testUpdateNetRequest() { - // TODO: test UpdateNetRequest - } - - /** Test the property 'dhcpOptionsSetId' */ - @Test - public void dhcpOptionsSetIdTest() { - // TODO: test dhcpOptionsSetId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponseTest.java deleted file mode 100644 index c2f63112..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNetResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNetResponse */ -public class UpdateNetResponseTest { - private final UpdateNetResponse model = new UpdateNetResponse(); - - /** Model tests for UpdateNetResponse */ - @Test - public void testUpdateNetResponse() { - // TODO: test UpdateNetResponse - } - - /** Test the property 'net' */ - @Test - public void netTest() { - // TODO: test net - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequestTest.java deleted file mode 100644 index 4200e625..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNicRequest */ -public class UpdateNicRequestTest { - private final UpdateNicRequest model = new UpdateNicRequest(); - - /** Model tests for UpdateNicRequest */ - @Test - public void testUpdateNicRequest() { - // TODO: test UpdateNicRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'linkNic' */ - @Test - public void linkNicTest() { - // TODO: test linkNic - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponseTest.java deleted file mode 100644 index edd873b9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateNicResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateNicResponse */ -public class UpdateNicResponseTest { - private final UpdateNicResponse model = new UpdateNicResponse(); - - /** Model tests for UpdateNicResponse */ - @Test - public void testUpdateNicResponse() { - // TODO: test UpdateNicResponse - } - - /** Test the property 'nic' */ - @Test - public void nicTest() { - // TODO: test nic - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequestTest.java deleted file mode 100644 index ff725580..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRoutePropagationRequest */ -public class UpdateRoutePropagationRequestTest { - private final UpdateRoutePropagationRequest model = new UpdateRoutePropagationRequest(); - - /** Model tests for UpdateRoutePropagationRequest */ - @Test - public void testUpdateRoutePropagationRequest() { - // TODO: test UpdateRoutePropagationRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'enable' */ - @Test - public void enableTest() { - // TODO: test enable - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponseTest.java deleted file mode 100644 index 08ba2133..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRoutePropagationResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRoutePropagationResponse */ -public class UpdateRoutePropagationResponseTest { - private final UpdateRoutePropagationResponse model = new UpdateRoutePropagationResponse(); - - /** Model tests for UpdateRoutePropagationResponse */ - @Test - public void testUpdateRoutePropagationResponse() { - // TODO: test UpdateRoutePropagationResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTable' */ - @Test - public void routeTableTest() { - // TODO: test routeTable - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequestTest.java deleted file mode 100644 index f610d745..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteRequestTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRouteRequest */ -public class UpdateRouteRequestTest { - private final UpdateRouteRequest model = new UpdateRouteRequest(); - - /** Model tests for UpdateRouteRequest */ - @Test - public void testUpdateRouteRequest() { - // TODO: test UpdateRouteRequest - } - - /** Test the property 'destinationIpRange' */ - @Test - public void destinationIpRangeTest() { - // TODO: test destinationIpRange - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'gatewayId' */ - @Test - public void gatewayIdTest() { - // TODO: test gatewayId - } - - /** Test the property 'natServiceId' */ - @Test - public void natServiceIdTest() { - // TODO: test natServiceId - } - - /** Test the property 'netPeeringId' */ - @Test - public void netPeeringIdTest() { - // TODO: test netPeeringId - } - - /** Test the property 'nicId' */ - @Test - public void nicIdTest() { - // TODO: test nicId - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponseTest.java deleted file mode 100644 index b559ed89..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRouteResponse */ -public class UpdateRouteResponseTest { - private final UpdateRouteResponse model = new UpdateRouteResponse(); - - /** Model tests for UpdateRouteResponse */ - @Test - public void testUpdateRouteResponse() { - // TODO: test UpdateRouteResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'routeTable' */ - @Test - public void routeTableTest() { - // TODO: test routeTable - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequestTest.java deleted file mode 100644 index faa32d2b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRouteTableLinkRequest */ -public class UpdateRouteTableLinkRequestTest { - private final UpdateRouteTableLinkRequest model = new UpdateRouteTableLinkRequest(); - - /** Model tests for UpdateRouteTableLinkRequest */ - @Test - public void testUpdateRouteTableLinkRequest() { - // TODO: test UpdateRouteTableLinkRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'linkRouteTableId' */ - @Test - public void linkRouteTableIdTest() { - // TODO: test linkRouteTableId - } - - /** Test the property 'routeTableId' */ - @Test - public void routeTableIdTest() { - // TODO: test routeTableId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponseTest.java deleted file mode 100644 index a03288c5..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateRouteTableLinkResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateRouteTableLinkResponse */ -public class UpdateRouteTableLinkResponseTest { - private final UpdateRouteTableLinkResponse model = new UpdateRouteTableLinkResponse(); - - /** Model tests for UpdateRouteTableLinkResponse */ - @Test - public void testUpdateRouteTableLinkResponse() { - // TODO: test UpdateRouteTableLinkResponse - } - - /** Test the property 'linkRouteTableId' */ - @Test - public void linkRouteTableIdTest() { - // TODO: test linkRouteTableId - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequestTest.java deleted file mode 100644 index e947d386..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateServerCertificateRequest */ -public class UpdateServerCertificateRequestTest { - private final UpdateServerCertificateRequest model = new UpdateServerCertificateRequest(); - - /** Model tests for UpdateServerCertificateRequest */ - @Test - public void testUpdateServerCertificateRequest() { - // TODO: test UpdateServerCertificateRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'newName' */ - @Test - public void newNameTest() { - // TODO: test newName - } - - /** Test the property 'newPath' */ - @Test - public void newPathTest() { - // TODO: test newPath - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponseTest.java deleted file mode 100644 index c4725d87..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateServerCertificateResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateServerCertificateResponse */ -public class UpdateServerCertificateResponseTest { - private final UpdateServerCertificateResponse model = new UpdateServerCertificateResponse(); - - /** Model tests for UpdateServerCertificateResponse */ - @Test - public void testUpdateServerCertificateResponse() { - // TODO: test UpdateServerCertificateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'serverCertificate' */ - @Test - public void serverCertificateTest() { - // TODO: test serverCertificate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequestTest.java deleted file mode 100644 index 560b6cf8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateSnapshotRequest */ -public class UpdateSnapshotRequestTest { - private final UpdateSnapshotRequest model = new UpdateSnapshotRequest(); - - /** Model tests for UpdateSnapshotRequest */ - @Test - public void testUpdateSnapshotRequest() { - // TODO: test UpdateSnapshotRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'permissionsToCreateVolume' */ - @Test - public void permissionsToCreateVolumeTest() { - // TODO: test permissionsToCreateVolume - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponseTest.java deleted file mode 100644 index 587b47ba..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSnapshotResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateSnapshotResponse */ -public class UpdateSnapshotResponseTest { - private final UpdateSnapshotResponse model = new UpdateSnapshotResponse(); - - /** Model tests for UpdateSnapshotResponse */ - @Test - public void testUpdateSnapshotResponse() { - // TODO: test UpdateSnapshotResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'snapshot' */ - @Test - public void snapshotTest() { - // TODO: test snapshot - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequestTest.java deleted file mode 100644 index 44b35784..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetRequestTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateSubnetRequest */ -public class UpdateSubnetRequestTest { - private final UpdateSubnetRequest model = new UpdateSubnetRequest(); - - /** Model tests for UpdateSubnetRequest */ - @Test - public void testUpdateSubnetRequest() { - // TODO: test UpdateSubnetRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'mapPublicIpOnLaunch' */ - @Test - public void mapPublicIpOnLaunchTest() { - // TODO: test mapPublicIpOnLaunch - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponseTest.java deleted file mode 100644 index 5e34cbda..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateSubnetResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateSubnetResponse */ -public class UpdateSubnetResponseTest { - private final UpdateSubnetResponse model = new UpdateSubnetResponse(); - - /** Model tests for UpdateSubnetResponse */ - @Test - public void testUpdateSubnetResponse() { - // TODO: test UpdateSubnetResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'subnet' */ - @Test - public void subnetTest() { - // TODO: test subnet - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequestTest.java deleted file mode 100644 index bbf95fee..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateUserGroupRequest */ -public class UpdateUserGroupRequestTest { - private final UpdateUserGroupRequest model = new UpdateUserGroupRequest(); - - /** Model tests for UpdateUserGroupRequest */ - @Test - public void testUpdateUserGroupRequest() { - // TODO: test UpdateUserGroupRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'newPath' */ - @Test - public void newPathTest() { - // TODO: test newPath - } - - /** Test the property 'newUserGroupName' */ - @Test - public void newUserGroupNameTest() { - // TODO: test newUserGroupName - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userGroupName' */ - @Test - public void userGroupNameTest() { - // TODO: test userGroupName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponseTest.java deleted file mode 100644 index 08b569a8..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserGroupResponseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateUserGroupResponse */ -public class UpdateUserGroupResponseTest { - private final UpdateUserGroupResponse model = new UpdateUserGroupResponse(); - - /** Model tests for UpdateUserGroupResponse */ - @Test - public void testUpdateUserGroupResponse() { - // TODO: test UpdateUserGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'userGroup' */ - @Test - public void userGroupTest() { - // TODO: test userGroup - } - - /** Test the property 'users' */ - @Test - public void usersTest() { - // TODO: test users - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequestTest.java deleted file mode 100644 index 957c0ea2..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserRequestTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateUserRequest */ -public class UpdateUserRequestTest { - private final UpdateUserRequest model = new UpdateUserRequest(); - - /** Model tests for UpdateUserRequest */ - @Test - public void testUpdateUserRequest() { - // TODO: test UpdateUserRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'newPath' */ - @Test - public void newPathTest() { - // TODO: test newPath - } - - /** Test the property 'newUserName' */ - @Test - public void newUserNameTest() { - // TODO: test newUserName - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponseTest.java deleted file mode 100644 index 1fe3ee9c..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateUserResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateUserResponse */ -public class UpdateUserResponseTest { - private final UpdateUserResponse model = new UpdateUserResponse(); - - /** Model tests for UpdateUserResponse */ - @Test - public void testUpdateUserResponse() { - // TODO: test UpdateUserResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'user' */ - @Test - public void userTest() { - // TODO: test user - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequestTest.java deleted file mode 100644 index 6ff66210..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupRequestTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmGroupRequest */ -public class UpdateVmGroupRequestTest { - private final UpdateVmGroupRequest model = new UpdateVmGroupRequest(); - - /** Model tests for UpdateVmGroupRequest */ - @Test - public void testUpdateVmGroupRequest() { - // TODO: test UpdateVmGroupRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmGroupId' */ - @Test - public void vmGroupIdTest() { - // TODO: test vmGroupId - } - - /** Test the property 'vmGroupName' */ - @Test - public void vmGroupNameTest() { - // TODO: test vmGroupName - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponseTest.java deleted file mode 100644 index e5ca6c29..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmGroupResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmGroupResponse */ -public class UpdateVmGroupResponseTest { - private final UpdateVmGroupResponse model = new UpdateVmGroupResponse(); - - /** Model tests for UpdateVmGroupResponse */ - @Test - public void testUpdateVmGroupResponse() { - // TODO: test UpdateVmGroupResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmGroup' */ - @Test - public void vmGroupTest() { - // TODO: test vmGroup - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequestTest.java deleted file mode 100644 index c5fdb8e1..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmRequestTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmRequest */ -public class UpdateVmRequestTest { - private final UpdateVmRequest model = new UpdateVmRequest(); - - /** Model tests for UpdateVmRequest */ - @Test - public void testUpdateVmRequest() { - // TODO: test UpdateVmRequest - } - - /** Test the property 'blockDeviceMappings' */ - @Test - public void blockDeviceMappingsTest() { - // TODO: test blockDeviceMappings - } - - /** Test the property 'bsuOptimized' */ - @Test - public void bsuOptimizedTest() { - // TODO: test bsuOptimized - } - - /** Test the property 'deletionProtection' */ - @Test - public void deletionProtectionTest() { - // TODO: test deletionProtection - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'isSourceDestChecked' */ - @Test - public void isSourceDestCheckedTest() { - // TODO: test isSourceDestChecked - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'nestedVirtualization' */ - @Test - public void nestedVirtualizationTest() { - // TODO: test nestedVirtualization - } - - /** Test the property 'performance' */ - @Test - public void performanceTest() { - // TODO: test performance - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'userData' */ - @Test - public void userDataTest() { - // TODO: test userData - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } - - /** Test the property 'vmInitiatedShutdownBehavior' */ - @Test - public void vmInitiatedShutdownBehaviorTest() { - // TODO: test vmInitiatedShutdownBehavior - } - - /** Test the property 'vmType' */ - @Test - public void vmTypeTest() { - // TODO: test vmType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponseTest.java deleted file mode 100644 index 6519c013..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmResponse */ -public class UpdateVmResponseTest { - private final UpdateVmResponse model = new UpdateVmResponse(); - - /** Model tests for UpdateVmResponse */ - @Test - public void testUpdateVmResponse() { - // TODO: test UpdateVmResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vm' */ - @Test - public void vmTest() { - // TODO: test vm - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequestTest.java deleted file mode 100644 index 50bfb628..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmTemplateRequest */ -public class UpdateVmTemplateRequestTest { - private final UpdateVmTemplateRequest model = new UpdateVmTemplateRequest(); - - /** Model tests for UpdateVmTemplateRequest */ - @Test - public void testUpdateVmTemplateRequest() { - // TODO: test UpdateVmTemplateRequest - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } - - /** Test the property 'vmTemplateName' */ - @Test - public void vmTemplateNameTest() { - // TODO: test vmTemplateName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponseTest.java deleted file mode 100644 index 429fae3e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVmTemplateResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVmTemplateResponse */ -public class UpdateVmTemplateResponseTest { - private final UpdateVmTemplateResponse model = new UpdateVmTemplateResponse(); - - /** Model tests for UpdateVmTemplateResponse */ - @Test - public void testUpdateVmTemplateResponse() { - // TODO: test UpdateVmTemplateResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vmTemplate' */ - @Test - public void vmTemplateTest() { - // TODO: test vmTemplate - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequestTest.java deleted file mode 100644 index 84640b72..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVolumeRequest */ -public class UpdateVolumeRequestTest { - private final UpdateVolumeRequest model = new UpdateVolumeRequest(); - - /** Model tests for UpdateVolumeRequest */ - @Test - public void testUpdateVolumeRequest() { - // TODO: test UpdateVolumeRequest - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'iops' */ - @Test - public void iopsTest() { - // TODO: test iops - } - - /** Test the property 'size' */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } - - /** Test the property 'volumeType' */ - @Test - public void volumeTypeTest() { - // TODO: test volumeType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponseTest.java deleted file mode 100644 index 62429864..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVolumeResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVolumeResponse */ -public class UpdateVolumeResponseTest { - private final UpdateVolumeResponse model = new UpdateVolumeResponse(); - - /** Model tests for UpdateVolumeResponse */ - @Test - public void testUpdateVolumeResponse() { - // TODO: test UpdateVolumeResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'volume' */ - @Test - public void volumeTest() { - // TODO: test volume - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequestTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequestTest.java deleted file mode 100644 index 079bec05..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVpnConnectionRequest */ -public class UpdateVpnConnectionRequestTest { - private final UpdateVpnConnectionRequest model = new UpdateVpnConnectionRequest(); - - /** Model tests for UpdateVpnConnectionRequest */ - @Test - public void testUpdateVpnConnectionRequest() { - // TODO: test UpdateVpnConnectionRequest - } - - /** Test the property 'clientGatewayId' */ - @Test - public void clientGatewayIdTest() { - // TODO: test clientGatewayId - } - - /** Test the property 'dryRun' */ - @Test - public void dryRunTest() { - // TODO: test dryRun - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } - - /** Test the property 'vpnConnectionId' */ - @Test - public void vpnConnectionIdTest() { - // TODO: test vpnConnectionId - } - - /** Test the property 'vpnOptions' */ - @Test - public void vpnOptionsTest() { - // TODO: test vpnOptions - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponseTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponseTest.java deleted file mode 100644 index 9ee28c09..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UpdateVpnConnectionResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateVpnConnectionResponse */ -public class UpdateVpnConnectionResponseTest { - private final UpdateVpnConnectionResponse model = new UpdateVpnConnectionResponse(); - - /** Model tests for UpdateVpnConnectionResponse */ - @Test - public void testUpdateVpnConnectionResponse() { - // TODO: test UpdateVpnConnectionResponse - } - - /** Test the property 'responseContext' */ - @Test - public void responseContextTest() { - // TODO: test responseContext - } - - /** Test the property 'vpnConnection' */ - @Test - public void vpnConnectionTest() { - // TODO: test vpnConnection - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserGroupTest.java deleted file mode 100644 index 9712a889..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserGroupTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UserGroup */ -public class UserGroupTest { - private final UserGroup model = new UserGroup(); - - /** Model tests for UserGroup */ - @Test - public void testUserGroup() { - // TODO: test UserGroup - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'orn' */ - @Test - public void ornTest() { - // TODO: test orn - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userGroupId' */ - @Test - public void userGroupIdTest() { - // TODO: test userGroupId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserTest.java deleted file mode 100644 index d83f9c2a..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/UserTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for User */ -public class UserTest { - private final User model = new User(); - - /** Model tests for User */ - @Test - public void testUser() { - // TODO: test User - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'lastModificationDate' */ - @Test - public void lastModificationDateTest() { - // TODO: test lastModificationDate - } - - /** Test the property 'path' */ - @Test - public void pathTest() { - // TODO: test path - } - - /** Test the property 'userId' */ - @Test - public void userIdTest() { - // TODO: test userId - } - - /** Test the property 'userName' */ - @Test - public void userNameTest() { - // TODO: test userName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetryTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetryTest.java deleted file mode 100644 index 81325a3e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VgwTelemetryTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VgwTelemetry */ -public class VgwTelemetryTest { - private final VgwTelemetry model = new VgwTelemetry(); - - /** Model tests for VgwTelemetry */ - @Test - public void testVgwTelemetry() { - // TODO: test VgwTelemetry - } - - /** Test the property 'acceptedRouteCount' */ - @Test - public void acceptedRouteCountTest() { - // TODO: test acceptedRouteCount - } - - /** Test the property 'lastStateChangeDate' */ - @Test - public void lastStateChangeDateTest() { - // TODO: test lastStateChangeDate - } - - /** Test the property 'outsideIpAddress' */ - @Test - public void outsideIpAddressTest() { - // TODO: test outsideIpAddress - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'stateDescription' */ - @Test - public void stateDescriptionTest() { - // TODO: test stateDescription - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VirtualGatewayTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VirtualGatewayTest.java deleted file mode 100644 index db7e11a9..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VirtualGatewayTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VirtualGateway */ -public class VirtualGatewayTest { - private final VirtualGateway model = new VirtualGateway(); - - /** Model tests for VirtualGateway */ - @Test - public void testVirtualGateway() { - // TODO: test VirtualGateway - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'netToVirtualGatewayLinks' */ - @Test - public void netToVirtualGatewayLinksTest() { - // TODO: test netToVirtualGatewayLinks - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmGroupTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmGroupTest.java deleted file mode 100644 index cb6eae5b..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmGroupTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VmGroup */ -public class VmGroupTest { - private final VmGroup model = new VmGroup(); - - /** Model tests for VmGroup */ - @Test - public void testVmGroup() { - // TODO: test VmGroup - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'positioningStrategy' */ - @Test - public void positioningStrategyTest() { - // TODO: test positioningStrategy - } - - /** Test the property 'securityGroupIds' */ - @Test - public void securityGroupIdsTest() { - // TODO: test securityGroupIds - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmCount' */ - @Test - public void vmCountTest() { - // TODO: test vmCount - } - - /** Test the property 'vmGroupId' */ - @Test - public void vmGroupIdTest() { - // TODO: test vmGroupId - } - - /** Test the property 'vmGroupName' */ - @Test - public void vmGroupNameTest() { - // TODO: test vmGroupName - } - - /** Test the property 'vmIds' */ - @Test - public void vmIdsTest() { - // TODO: test vmIds - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStateTest.java deleted file mode 100644 index 991e1245..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStateTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VmState */ -public class VmStateTest { - private final VmState model = new VmState(); - - /** Model tests for VmState */ - @Test - public void testVmState() { - // TODO: test VmState - } - - /** Test the property 'currentState' */ - @Test - public void currentStateTest() { - // TODO: test currentState - } - - /** Test the property 'previousState' */ - @Test - public void previousStateTest() { - // TODO: test previousState - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStatesTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStatesTest.java deleted file mode 100644 index 1cee900d..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmStatesTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VmStates */ -public class VmStatesTest { - private final VmStates model = new VmStates(); - - /** Model tests for VmStates */ - @Test - public void testVmStates() { - // TODO: test VmStates - } - - /** Test the property 'maintenanceEvents' */ - @Test - public void maintenanceEventsTest() { - // TODO: test maintenanceEvents - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } - - /** Test the property 'vmState' */ - @Test - public void vmStateTest() { - // TODO: test vmState - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTemplateTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTemplateTest.java deleted file mode 100644 index 4a6aa52e..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTemplateTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VmTemplate */ -public class VmTemplateTest { - private final VmTemplate model = new VmTemplate(); - - /** Model tests for VmTemplate */ - @Test - public void testVmTemplate() { - // TODO: test VmTemplate - } - - /** Test the property 'cpuCores' */ - @Test - public void cpuCoresTest() { - // TODO: test cpuCores - } - - /** Test the property 'cpuGeneration' */ - @Test - public void cpuGenerationTest() { - // TODO: test cpuGeneration - } - - /** Test the property 'cpuPerformance' */ - @Test - public void cpuPerformanceTest() { - // TODO: test cpuPerformance - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'description' */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'ram' */ - @Test - public void ramTest() { - // TODO: test ram - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vmTemplateId' */ - @Test - public void vmTemplateIdTest() { - // TODO: test vmTemplateId - } - - /** Test the property 'vmTemplateName' */ - @Test - public void vmTemplateNameTest() { - // TODO: test vmTemplateName - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTest.java deleted file mode 100644 index 432502c7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTest.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Vm */ -public class VmTest { - private final Vm model = new Vm(); - - /** Model tests for Vm */ - @Test - public void testVm() { - // TODO: test Vm - } - - /** Test the property 'architecture' */ - @Test - public void architectureTest() { - // TODO: test architecture - } - - /** Test the property 'blockDeviceMappings' */ - @Test - public void blockDeviceMappingsTest() { - // TODO: test blockDeviceMappings - } - - /** Test the property 'bsuOptimized' */ - @Test - public void bsuOptimizedTest() { - // TODO: test bsuOptimized - } - - /** Test the property 'clientToken' */ - @Test - public void clientTokenTest() { - // TODO: test clientToken - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'deletionProtection' */ - @Test - public void deletionProtectionTest() { - // TODO: test deletionProtection - } - - /** Test the property 'hypervisor' */ - @Test - public void hypervisorTest() { - // TODO: test hypervisor - } - - /** Test the property 'imageId' */ - @Test - public void imageIdTest() { - // TODO: test imageId - } - - /** Test the property 'isSourceDestChecked' */ - @Test - public void isSourceDestCheckedTest() { - // TODO: test isSourceDestChecked - } - - /** Test the property 'keypairName' */ - @Test - public void keypairNameTest() { - // TODO: test keypairName - } - - /** Test the property 'launchNumber' */ - @Test - public void launchNumberTest() { - // TODO: test launchNumber - } - - /** Test the property 'nestedVirtualization' */ - @Test - public void nestedVirtualizationTest() { - // TODO: test nestedVirtualization - } - - /** Test the property 'netId' */ - @Test - public void netIdTest() { - // TODO: test netId - } - - /** Test the property 'nics' */ - @Test - public void nicsTest() { - // TODO: test nics - } - - /** Test the property 'osFamily' */ - @Test - public void osFamilyTest() { - // TODO: test osFamily - } - - /** Test the property 'performance' */ - @Test - public void performanceTest() { - // TODO: test performance - } - - /** Test the property 'placement' */ - @Test - public void placementTest() { - // TODO: test placement - } - - /** Test the property 'privateDnsName' */ - @Test - public void privateDnsNameTest() { - // TODO: test privateDnsName - } - - /** Test the property 'privateIp' */ - @Test - public void privateIpTest() { - // TODO: test privateIp - } - - /** Test the property 'productCodes' */ - @Test - public void productCodesTest() { - // TODO: test productCodes - } - - /** Test the property 'publicDnsName' */ - @Test - public void publicDnsNameTest() { - // TODO: test publicDnsName - } - - /** Test the property 'publicIp' */ - @Test - public void publicIpTest() { - // TODO: test publicIp - } - - /** Test the property 'reservationId' */ - @Test - public void reservationIdTest() { - // TODO: test reservationId - } - - /** Test the property 'rootDeviceName' */ - @Test - public void rootDeviceNameTest() { - // TODO: test rootDeviceName - } - - /** Test the property 'rootDeviceType' */ - @Test - public void rootDeviceTypeTest() { - // TODO: test rootDeviceType - } - - /** Test the property 'securityGroups' */ - @Test - public void securityGroupsTest() { - // TODO: test securityGroups - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'stateReason' */ - @Test - public void stateReasonTest() { - // TODO: test stateReason - } - - /** Test the property 'subnetId' */ - @Test - public void subnetIdTest() { - // TODO: test subnetId - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'userData' */ - @Test - public void userDataTest() { - // TODO: test userData - } - - /** Test the property 'vmId' */ - @Test - public void vmIdTest() { - // TODO: test vmId - } - - /** Test the property 'vmInitiatedShutdownBehavior' */ - @Test - public void vmInitiatedShutdownBehaviorTest() { - // TODO: test vmInitiatedShutdownBehavior - } - - /** Test the property 'vmType' */ - @Test - public void vmTypeTest() { - // TODO: test vmType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTypeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTypeTest.java deleted file mode 100644 index 468eb9f4..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VmTypeTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VmType */ -public class VmTypeTest { - private final VmType model = new VmType(); - - /** Model tests for VmType */ - @Test - public void testVmType() { - // TODO: test VmType - } - - /** Test the property 'bsuOptimized' */ - @Test - public void bsuOptimizedTest() { - // TODO: test bsuOptimized - } - - /** Test the property 'ephemeralsType' */ - @Test - public void ephemeralsTypeTest() { - // TODO: test ephemeralsType - } - - /** Test the property 'eth' */ - @Test - public void ethTest() { - // TODO: test eth - } - - /** Test the property 'gpu' */ - @Test - public void gpuTest() { - // TODO: test gpu - } - - /** Test the property 'maxPrivateIps' */ - @Test - public void maxPrivateIpsTest() { - // TODO: test maxPrivateIps - } - - /** Test the property 'memorySize' */ - @Test - public void memorySizeTest() { - // TODO: test memorySize - } - - /** Test the property 'vcoreCount' */ - @Test - public void vcoreCountTest() { - // TODO: test vcoreCount - } - - /** Test the property 'vmTypeName' */ - @Test - public void vmTypeNameTest() { - // TODO: test vmTypeName - } - - /** Test the property 'volumeCount' */ - @Test - public void volumeCountTest() { - // TODO: test volumeCount - } - - /** Test the property 'volumeSize' */ - @Test - public void volumeSizeTest() { - // TODO: test volumeSize - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VolumeTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VolumeTest.java deleted file mode 100644 index a3091c27..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VolumeTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for Volume */ -public class VolumeTest { - private final Volume model = new Volume(); - - /** Model tests for Volume */ - @Test - public void testVolume() { - // TODO: test Volume - } - - /** Test the property 'creationDate' */ - @Test - public void creationDateTest() { - // TODO: test creationDate - } - - /** Test the property 'iops' */ - @Test - public void iopsTest() { - // TODO: test iops - } - - /** Test the property 'linkedVolumes' */ - @Test - public void linkedVolumesTest() { - // TODO: test linkedVolumes - } - - /** Test the property 'size' */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** Test the property 'snapshotId' */ - @Test - public void snapshotIdTest() { - // TODO: test snapshotId - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'subregionName' */ - @Test - public void subregionNameTest() { - // TODO: test subregionName - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'volumeId' */ - @Test - public void volumeIdTest() { - // TODO: test volumeId - } - - /** Test the property 'volumeType' */ - @Test - public void volumeTypeTest() { - // TODO: test volumeType - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnConnectionTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnConnectionTest.java deleted file mode 100644 index 7541c722..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnConnectionTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VpnConnection */ -public class VpnConnectionTest { - private final VpnConnection model = new VpnConnection(); - - /** Model tests for VpnConnection */ - @Test - public void testVpnConnection() { - // TODO: test VpnConnection - } - - /** Test the property 'clientGatewayConfiguration' */ - @Test - public void clientGatewayConfigurationTest() { - // TODO: test clientGatewayConfiguration - } - - /** Test the property 'clientGatewayId' */ - @Test - public void clientGatewayIdTest() { - // TODO: test clientGatewayId - } - - /** Test the property 'connectionType' */ - @Test - public void connectionTypeTest() { - // TODO: test connectionType - } - - /** Test the property 'routes' */ - @Test - public void routesTest() { - // TODO: test routes - } - - /** Test the property 'state' */ - @Test - public void stateTest() { - // TODO: test state - } - - /** Test the property 'staticRoutesOnly' */ - @Test - public void staticRoutesOnlyTest() { - // TODO: test staticRoutesOnly - } - - /** Test the property 'tags' */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** Test the property 'vgwTelemetries' */ - @Test - public void vgwTelemetriesTest() { - // TODO: test vgwTelemetries - } - - /** Test the property 'virtualGatewayId' */ - @Test - public void virtualGatewayIdTest() { - // TODO: test virtualGatewayId - } - - /** Test the property 'vpnConnectionId' */ - @Test - public void vpnConnectionIdTest() { - // TODO: test vpnConnectionId - } - - /** Test the property 'vpnOptions' */ - @Test - public void vpnOptionsTest() { - // TODO: test vpnOptions - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnOptionsTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnOptionsTest.java deleted file mode 100644 index f6619172..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/VpnOptionsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VpnOptions */ -public class VpnOptionsTest { - private final VpnOptions model = new VpnOptions(); - - /** Model tests for VpnOptions */ - @Test - public void testVpnOptions() { - // TODO: test VpnOptions - } - - /** Test the property 'phase1Options' */ - @Test - public void phase1OptionsTest() { - // TODO: test phase1Options - } - - /** Test the property 'phase2Options' */ - @Test - public void phase2OptionsTest() { - // TODO: test phase2Options - } - - /** Test the property 'tunnelInsideIpRange' */ - @Test - public void tunnelInsideIpRangeTest() { - // TODO: test tunnelInsideIpRange - } -} diff --git a/src/test/java/io/github/outscale/osc_sdk_java/client/model/WithTest.java b/src/test/java/io/github/outscale/osc_sdk_java/client/model/WithTest.java deleted file mode 100644 index 085b70a7..00000000 --- a/src/test/java/io/github/outscale/osc_sdk_java/client/model/WithTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for With */ -public class WithTest { - private final With model = new With(); - - /** Model tests for With */ - @Test - public void testWith() { - // TODO: test With - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'callDuration' */ - @Test - public void callDurationTest() { - // TODO: test callDuration - } - - /** Test the property 'queryAccessKey' */ - @Test - public void queryAccessKeyTest() { - // TODO: test queryAccessKey - } - - /** Test the property 'queryApiName' */ - @Test - public void queryApiNameTest() { - // TODO: test queryApiName - } - - /** Test the property 'queryApiVersion' */ - @Test - public void queryApiVersionTest() { - // TODO: test queryApiVersion - } - - /** Test the property 'queryCallName' */ - @Test - public void queryCallNameTest() { - // TODO: test queryCallName - } - - /** Test the property 'queryDate' */ - @Test - public void queryDateTest() { - // TODO: test queryDate - } - - /** Test the property 'queryHeaderRaw' */ - @Test - public void queryHeaderRawTest() { - // TODO: test queryHeaderRaw - } - - /** Test the property 'queryHeaderSize' */ - @Test - public void queryHeaderSizeTest() { - // TODO: test queryHeaderSize - } - - /** Test the property 'queryIpAddress' */ - @Test - public void queryIpAddressTest() { - // TODO: test queryIpAddress - } - - /** Test the property 'queryPayloadRaw' */ - @Test - public void queryPayloadRawTest() { - // TODO: test queryPayloadRaw - } - - /** Test the property 'queryPayloadSize' */ - @Test - public void queryPayloadSizeTest() { - // TODO: test queryPayloadSize - } - - /** Test the property 'queryUserAgent' */ - @Test - public void queryUserAgentTest() { - // TODO: test queryUserAgent - } - - /** Test the property 'requestId' */ - @Test - public void requestIdTest() { - // TODO: test requestId - } - - /** Test the property 'responseSize' */ - @Test - public void responseSizeTest() { - // TODO: test responseSize - } - - /** Test the property 'responseStatusCode' */ - @Test - public void responseStatusCodeTest() { - // TODO: test responseStatusCode - } -} diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md deleted file mode 100644 index be767f48..00000000 --- a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Certificates - -## How to regenerate test certificate -``` -mkdir -p valid -cd valid -openssl genrsa -des3 -out myCA.key 2048 -openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem -openssl genrsa -out sdk.test.key 2048 -openssl req -new -key sdk.test.key -out sdk.test.csr -openssl x509 -req -in sdk.test.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out sdk.test.crt -days 999 -sha256 -``` \ No newline at end of file diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt deleted file mode 100644 index 4b301a44..00000000 --- a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.crt +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN CERTIFICATE----- -SU5WQUxJRENFUlQ= ------END CERTIFICATE----- diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key deleted file mode 100644 index 8e2cd392..00000000 --- a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/invalid/sdk.test.key +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -SU5WQUxJREtFWQ== ------END RSA PRIVATE KEY----- diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt deleted file mode 100644 index db722ca4..00000000 --- a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.crt +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDOTCCAiECFBBQPRih7Zp4Hmq6KxkZ8WTl+TrIMA0GCSqGSIb3DQEBCwUAMG0x -CzAJBgNVBAYTAlRTMQ0wCwYDVQQIDARUZXN0MQ0wCwYDVQQHDARUZXN0MQ0wCwYD -VQQKDARUZXN0MQ0wCwYDVQQLDARUZXN0MQ0wCwYDVQQDDARURVNUMRMwEQYJKoZI -hvcNAQkBFgRURVNUMB4XDTIyMTIxNTEyMzYxMVoXDTI1MDkwOTEyMzYxMVowRTEL -MAkGA1UEBhMCVFMxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVy -bmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAKEWaRR5Im2Gg0vcqR5kDf4qrCsxjbdnk/nNCT33WnoVdURuFAYUWYcU5St+ -LX7FGE+EZ9J5o9X/0TpaQm31fwHEGbybAAd3G25cb06wxphG/uzadtYTGuDSv47r -O/6nU0ghoa2WJEuKH2l5rqA6GjGx9ajsTTy8SnOsWc+8WPDhAhxbF1AKHa0zkLOd -m3ZZgE96IjDv4usIPyIaGcuome60LRpz8jz6PiakdnaVgmMYZJ0tgrwPY9/Fgzpa -TZ7AhDq7+IBPgPyqqYbvnPv5m0oVZy4mBFFn57k6ucqFiIBot6l7sCi4R5pFWW63 -Q0QfhK8QFdEssyJzz7Itjja2n/8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAUvc0 -UHKpyWv9RWtPfeoyna7S8sI2/p3e15xxWVJIo39VAJc2E5/O6RaTGKczG91r3B0K -ihpVJDZYG3EvTkNYcwRxjonTF0daNfO6+JwH8gLpTkAOF7v0wH3xdQUbs9m2cdVv -agwSOC5YweLWbhl6VomFZtoxtxM1rTVRACqSV70p6sP+qIPSNRLNfehVKtVnObbT -jEFwQe/UojBgaS1s46/e+GLNGfAk42cYnurQOPLUJOZobegqzhtId7+PRwAlerOo -88coDWcrOFyvFGTQ2h1pwvJ76AM5xy4qEn+Q75BgEnibRxpsYJCyE5Da+znKZyFQ -2xwVE/ZSiNroANz55w== ------END CERTIFICATE----- diff --git a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key b/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key deleted file mode 100644 index 957889f1..00000000 --- a/src/test/resources/io/github/outscale/osc_sdk_java/client/certs/valid/sdk.test.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAoRZpFHkibYaDS9ypHmQN/iqsKzGNt2eT+c0JPfdaehV1RG4U -BhRZhxTlK34tfsUYT4Rn0nmj1f/ROlpCbfV/AcQZvJsAB3cbblxvTrDGmEb+7Np2 -1hMa4NK/jus7/qdTSCGhrZYkS4ofaXmuoDoaMbH1qOxNPLxKc6xZz7xY8OECHFsX -UAodrTOQs52bdlmAT3oiMO/i6wg/IhoZy6iZ7rQtGnPyPPo+JqR2dpWCYxhknS2C -vA9j38WDOlpNnsCEOrv4gE+A/Kqphu+c+/mbShVnLiYEUWfnuTq5yoWIgGi3qXuw -KLhHmkVZbrdDRB+ErxAV0SyzInPPsi2ONraf/wIDAQABAoIBAHFMH9AEetBpwULE -CjaTzLutK7adfb03Hn6dVRi+NmaTXQ0qFu9HtMgrTBvQ/RKicTzMNXF1mGPVL0VJ -YluQRSnq0Oc0ZUra3PI8FRVVg/hqRrYz2U0r1sW1tIFCtcmfyhV7ggljBlgS55D5 -wnZzJyU4sz2CJbjH/d1ppSlUoYGYwoQu/O7XjbfmQrMV6/j7ttbmCLfjZV6wPNwo -DMfBRyK+67XXcq5xsgkxOjjxSlU2ff6zHuN8WSxORiV4l48B2uNpWN5Ud2H9/pSF -8/fVd6AmhXzK9B/odAIJHXOuObCBTldRWxyTEKmmtM5kdNFtNu2DA7TR4V4UbsMc -eo76ALECgYEAzWstN6TgsE2Iuueno7j4fixWt3x0U5JCrf84qDYS45qUfo0sSx1u -wWAw3OEN0f4xdMBDoltxQNz0fCZdGXU8lbAJslCqZmDVTBqu2NgZNxAlsLc7M4v4 -GIok/hNX8qu/GUlJjFsAK2q56LXNnsvvNVKqd0tdO8PwZcJSnfgYgWMCgYEAyMDE -HzHXJi0YCwdUBazJJPTkWWZLbyrMi4v/y8IMe3f0/gYDueKBegbTMkUlY7yjNNXa -neIVJwobM92rC5OkVWojZ6fP51U2w/dzwlHVFjrbhVmUStF5bdgYDsCnnk1GpN7N -s4m//V5vF0EnNLcXdcR3NQW34i5wrnaNRmYz17UCgYAgxFXkKGLG/LcwyT8OeLT6 -u2vhvPJ5Wj1Ur/+DpYyBzeid/zrviHRgWE2zDhs8QgX1j626OkfohtZg72WuZ+sQ -HZKOZRupVQzxJNh7Mo1jISpB9Bh3cn5Su8aG2OMQjKDhEbWvs9xlEJMzMbzo9bLk -mJkkilsG64xvTv4KwMZ37QKBgQCdYMkfL2JcMkPD+ZW78S2qxDTzhMckOigqSbFZ -WiGQ9YRhU/O92LzqHcmZgi2Cl9JWTERbO26bsUeMDH3X0IGm2FMzIpJQ5zPMwwPD -1YU4LSIE0yn20WrhWuPZRNzis+/qtiQKWLXi+hIa59/FareAgml1bqsuLHv3uUad -ZufDdQKBgFloVIZZMpaHdb6ML7RhOlfPqsetywNaN0m2TP2cKi1ulNvB4/swR9ZD -aCxMwtsPE+mPkFiUyPqGuSP/e+7w0Hz1cvRdOnuMCCUA4jX9DTc7bNLVJUV0Pqlf -hbQOh2stQ9oAI1+A9zSdHRYE/1zOYoWh9T7CtOv1DxL0AjkR0sl5 ------END RSA PRIVATE KEY----- diff --git a/templates/ApiClient.mustache b/templates/ApiClient.mustache new file mode 100644 index 00000000..8c64602c --- /dev/null +++ b/templates/ApiClient.mustache @@ -0,0 +1,893 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.time.OffsetDateTime; +{{#useJakartaEe}} +import com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider; +{{/useJakartaEe}} +{{^useJakartaEe}} +import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; +{{/useJakartaEe}} + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.GenericType; +import com.sun.jersey.api.client.config.DefaultClientConfig; +import com.sun.jersey.api.client.filter.GZIPContentEncodingFilter; +import com.sun.jersey.api.client.filter.LoggingFilter; +import com.sun.jersey.api.client.WebResource.Builder; + +import com.sun.jersey.multipart.FormDataMultiPart; +import com.sun.jersey.multipart.file.FileDataBodyPart; + +import {{javaxPackage}}.ws.rs.core.Cookie; +import {{javaxPackage}}.ws.rs.core.Response.Status.Family; +import {{javaxPackage}}.ws.rs.core.MediaType; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.TimeZone; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; + +import {{invokerPackage}}.auth.Authentication; +{{#hasHttpBasicMethods}} +import {{invokerPackage}}.auth.HttpBasicAuth; +{{/hasHttpBasicMethods}} +{{#hasHttpBearerMethods}} +import {{invokerPackage}}.auth.HttpBearerAuth; +{{/hasHttpBearerMethods}} +{{#hasApiKeyMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{/hasApiKeyMethods}} +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "{{{basePath}}}"; + protected List servers = new ArrayList({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected boolean debugging = false; + protected int connectionTimeout = 0; + + protected Client httpClient; + protected ObjectMapper objectMapper; + + protected Map authentications; + + protected int statusCode; + protected Map> responseHeaders; + + protected DateFormat dateFormat; + + public ApiClient() { + objectMapper = new ObjectMapper(); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#joda}} + objectMapper.registerModule(new JodaModule()); + {{/joda}} + objectMapper.registerModule(new JavaTimeModule()); + objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); + + dateFormat = ApiClient.buildDefaultDateFormat(); + + // Set default User-Agent. + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}osc-sdk-java/{{{artifactVersion}}}{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + rebuildHttpClient(); + } + + public static DateFormat buildDefaultDateFormat() { + return new RFC3339DateFormat(); + } + + /** + * Build the Client used to make HTTP requests with the latest settings, + * i.e. objectMapper and debugging. + * TODO: better to use the Builder Pattern? + * @return API client + */ + public ApiClient rebuildHttpClient() { + // Add the JSON serialization support to Jersey + JacksonJsonProvider jsonProvider = new JacksonJsonProvider(objectMapper); + DefaultClientConfig conf = new DefaultClientConfig(); + conf.getSingletons().add(jsonProvider); + Client client = Client.create(conf); + client.addFilter(new GZIPContentEncodingFilter({{#useGzipFeature}}true{{/useGzipFeature}}{{^useGzipFeature}}false{{/useGzipFeature}})); + if (debugging) { + client.addFilter(new LoggingFilter()); + } + this.httpClient = client; + return this; + } + + /** + * Returns the current object mapper used for JSON serialization/deserialization. + *

+ * Note: If you make changes to the object mapper, remember to set it back via + * setObjectMapper in order to trigger HTTP client rebuilding. + *

+ * @return Object mapper + */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + // Need to rebuild the Client as it depends on object mapper. + rebuildHttpClient(); + return this; + } + + public Client getHttpClient() { + return httpClient; + } + + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Gets the status code of the previous request + * @return Status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Gets the response headers of the previous request + * @return Response headers + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return Map of authentication + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + {{#hasHttpBearerMethods}} + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + * @return API client + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + {{/hasHttpBearerMethods}} + + {{#hasHttpBasicMethods}} + /** + * Helper method to set username for the first HTTP basic authentication. + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + {{/hasHttpBasicMethods}} + + {{#hasApiKeyMethods}} + /** + * Helper method to set API key value for the first API key authentication. + * @param apiKey the API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{/hasApiKeyMethods}} + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent User agent + * @return API client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return API client + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return True if debugging is on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return API client + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + // Need to rebuild the Client as it depends on the value of debugging. + rebuildHttpClient(); + return this; + } + + /** + * Connect timeout (in milliseconds). + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * @param connectionTimeout Connection timeout in milliseconds + * @return API client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.setConnectTimeout(connectionTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // Also set the date format for model (de)serialization with Date properties. + this.objectMapper.setDateFormat((DateFormat) dateFormat.clone()); + // Need to rebuild the Client as objectMapper changes. + rebuildHttpClient(); + return this; + } + + /** + * Parse the given string into Date object. + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime MIME + * @return True if MIME type is boolean + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON is supported for now). + * @param obj Object + * @param contentType Content type + * @param formParams Form parameters + * @return Object + * @throws ApiException API exception + */ + public Object serialize(Object obj, String contentType, Map formParams) throws ApiException { + if (contentType.startsWith("multipart/form-data")) { + FormDataMultiPart mp = new FormDataMultiPart(); + for (Entry param: formParams.entrySet()) { + if( param.getValue() instanceof List && !( ( List ) param.getValue() ).isEmpty() + && ( ( List ) param.getValue() ).get( 0 ) instanceof File ) { + @SuppressWarnings( "unchecked" ) + List files = ( List ) param.getValue(); + for( File file : files ) { + mp.bodyPart( new FileDataBodyPart( param.getKey(), file, MediaType.APPLICATION_OCTET_STREAM_TYPE ) ); + } + } else if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + mp.bodyPart(new FileDataBodyPart(param.getKey(), file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); + } else { + mp.field(param.getKey(), parameterToString(param.getValue()), MediaType.MULTIPART_FORM_DATA_TYPE); + } + } + return mp; + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + return this.getXWWWFormUrlencodedParams(formParams); + } else { + // We let Jersey attempt to serialize the body + return obj; + } + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + protected String buildUrl(String path, List queryParams, List collectionQueryParams) { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + + final StringBuilder url = new StringBuilder(); + url.append(baseURL).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + protected ClientResponse getAPIResponse(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames) throws ApiException { + if (body != null && !formParams.isEmpty()) { + throw new ApiException(500, "Cannot have body and form params"); + } + + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + final String url = buildUrl(path, queryParams, collectionQueryParams); + Builder builder; + if (accept == null) { + builder = httpClient.resource(url).getRequestBuilder(); + } else { + builder = httpClient.resource(url).accept(accept); + } + + for (Entry keyValue : headerParams.entrySet()) { + builder = builder.header(keyValue.getKey(), keyValue.getValue()); + } + for (Map.Entry keyValue : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(keyValue.getKey())) { + builder = builder.header(keyValue.getKey(), keyValue.getValue()); + } + } + + for (Entry keyValue : cookieParams.entrySet()) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + for (Map.Entry keyValue : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(keyValue.getKey())) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + } + + ClientResponse response = null; + + if ("GET".equals(method)) { + response = (ClientResponse) builder.get(ClientResponse.class); + } else if ("POST".equals(method)) { + response = builder.type(contentType).post(ClientResponse.class, serialize(body, contentType, formParams)); + } else if ("PUT".equals(method)) { + response = builder.type(contentType).put(ClientResponse.class, serialize(body, contentType, formParams)); + } else if ("DELETE".equals(method)) { + response = builder.type(contentType).delete(ClientResponse.class, serialize(body, contentType, formParams)); + } else if ("PATCH".equals(method)) { + response = builder.type(contentType).header("X-HTTP-Method-Override", "PATCH").post(ClientResponse.class, serialize(body, contentType, formParams)); + } else if ("HEAD".equals(method)) { + response = builder.head(); + } else { + throw new ApiException(500, "unknown method type " + method); + } + return response; + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object - if it is not binary, otherwise null + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType Return type + * @return The response body in type of string + * @throws ApiException API exception + */ + public T invokeAPI(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + + ClientResponse response = getAPIResponse(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); + + statusCode = response.getStatusInfo().getStatusCode(); + responseHeaders = response.getHeaders(); + + if(response.getStatusInfo().getStatusCode() == ClientResponse.Status.NO_CONTENT.getStatusCode()) { + return null; + } else if (response.getStatusInfo().getFamily() == Family.SUCCESSFUL) { + if (returnType == null) + return null; + else + return response.getEntity(returnType); + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = response.getEntity(String.class); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatusInfo().getStatusCode(), + message, + response.getHeaders(), + respBody); + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams Query parameters + * @param headerParams Header parameters + * @param cookieParams Cookie parameters + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + /** + * Encode the given form parameters as request body. + * @param formParams Form parameters + * @return HTTP form encoded parameters + */ + protected String getXWWWFormUrlencodedParams(Map formParams) { + StringBuilder formParamBuilder = new StringBuilder(); + + for (Entry param : formParams.entrySet()) { + String valueStr = parameterToString(param.getValue()); + try { + formParamBuilder.append(URLEncoder.encode(param.getKey(), "utf8")) + .append("=") + .append(URLEncoder.encode(valueStr, "utf8")); + formParamBuilder.append("&"); + } catch (UnsupportedEncodingException e) { + // move on to next + } + } + + String encodedFormParams = formParamBuilder.toString(); + if (encodedFormParams.endsWith("&")) { + encodedFormParams = encodedFormParams.substring(0, encodedFormParams.length() - 1); + } + + return encodedFormParams; + } +} diff --git a/templates/BeanValidationException.mustache b/templates/BeanValidationException.mustache new file mode 100644 index 00000000..d551902f --- /dev/null +++ b/templates/BeanValidationException.mustache @@ -0,0 +1,29 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Set; + +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.ValidationException; + +public class BeanValidationException extends ValidationException { + /** + * + */ + private static final long serialVersionUID = -5294733947409491364L; + Set> violations; + + public BeanValidationException(Set> violations) { + this.violations = violations; + } + + public Set> getViolations() { + return violations; + } + + public void setViolations(Set> violations) { + this.violations = violations; + } + +} diff --git a/templates/Configuration.mustache b/templates/Configuration.mustache new file mode 100644 index 00000000..c932ddf9 --- /dev/null +++ b/templates/Configuration.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + +{{>generatedAnnotation}} + +public class Configuration { + public static final String VERSION = "{{{artifactVersion}}}"; + + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; + + /** + * Get the default API client, which would be used when creating API instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + ApiClient client = defaultApiClient.get(); + if (client == null) { + client = defaultApiClient.updateAndGet(val -> { + if (val != null) { // changed by another thread + return val; + } + return apiClientFactory.get(); + }); + } + return client; + } + + /** + * Set the default API client, which would be used when creating API instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient.set(apiClient); + } + + /** + * set the callback used to create new ApiClient objects + */ + public static void setApiClientFactory(Supplier factory) { + apiClientFactory = Objects.requireNonNull(factory); + } + + private Configuration() { + } +} \ No newline at end of file diff --git a/templates/CustomInstantDeserializer.mustache b/templates/CustomInstantDeserializer.mustache new file mode 100644 index 00000000..d4a3ca97 --- /dev/null +++ b/templates/CustomInstantDeserializer.mustache @@ -0,0 +1,234 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonTokenId; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; +import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; +import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; +import com.fasterxml.jackson.datatype.threetenbp.function.Function; +import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZoneId; +import org.threeten.bp.ZonedDateTime; +import org.threeten.bp.format.DateTimeFormatter; +import org.threeten.bp.temporal.Temporal; +import org.threeten.bp.temporal.TemporalAccessor; + +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. + * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. + * + * @author Nick Williams + */ +public class CustomInstantDeserializer + extends ThreeTenDateTimeDeserializerBase { + private static final long serialVersionUID = 1L; + + public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( + Instant.class, DateTimeFormatter.ISO_INSTANT, + new Function() { + @Override + public Instant apply(TemporalAccessor temporalAccessor) { + return Instant.from(temporalAccessor); + } + }, + new Function() { + @Override + public Instant apply(FromIntegerArguments a) { + return Instant.ofEpochMilli(a.value); + } + }, + new Function() { + @Override + public Instant apply(FromDecimalArguments a) { + return Instant.ofEpochSecond(a.integer, a.fraction); + } + }, + null + ); + + public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + new Function() { + @Override + public OffsetDateTime apply(TemporalAccessor temporalAccessor) { + return OffsetDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromIntegerArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromDecimalArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { + return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); + } + } + ); + + public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + new Function() { + @Override + public ZonedDateTime apply(TemporalAccessor temporalAccessor) { + return ZonedDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromIntegerArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromDecimalArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { + return zonedDateTime.withZoneSameInstant(zoneId); + } + } + ); + + protected final Function fromMilliseconds; + + protected final Function fromNanoseconds; + + protected final Function parsedToValue; + + protected final BiFunction adjust; + + protected CustomInstantDeserializer(Class supportedType, + DateTimeFormatter parser, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust) { + super(supportedType, parser); + this.parsedToValue = parsedToValue; + this.fromMilliseconds = fromMilliseconds; + this.fromNanoseconds = fromNanoseconds; + this.adjust = adjust == null ? new BiFunction() { + @Override + public T apply(T t, ZoneId zoneId) { + return t; + } + } : adjust; + } + + @SuppressWarnings("unchecked") + protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { + super((Class) base.handledType(), f); + parsedToValue = base.parsedToValue; + fromMilliseconds = base.fromMilliseconds; + fromNanoseconds = base.fromNanoseconds; + adjust = base.adjust; + } + + @Override + protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { + if (dtf == _formatter) { + return this; + } + return new CustomInstantDeserializer(this, dtf); + } + + @Override + public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { + //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only + //string values have to be adjusted to the configured TZ. + switch (parser.getCurrentTokenId()) { + case JsonTokenId.ID_NUMBER_FLOAT: { + BigDecimal value = parser.getDecimalValue(); + long seconds = value.longValue(); + int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); + return fromNanoseconds.apply(new FromDecimalArguments( + seconds, nanoseconds, getZone(context))); + } + + case JsonTokenId.ID_NUMBER_INT: { + long timestamp = parser.getLongValue(); + if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { + return this.fromNanoseconds.apply(new FromDecimalArguments( + timestamp, 0, this.getZone(context) + )); + } + return this.fromMilliseconds.apply(new FromIntegerArguments( + timestamp, this.getZone(context) + )); + } + + case JsonTokenId.ID_STRING: { + String string = parser.getText().trim(); + if (string.length() == 0) { + return null; + } + if (string.endsWith("+0000")) { + string = string.substring(0, string.length() - 5) + "Z"; + } + T value; + try { + TemporalAccessor acc = _formatter.parse(string); + value = parsedToValue.apply(acc); + if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { + return adjust.apply(value, this.getZone(context)); + } + } catch (DateTimeException e) { + throw _peelDTE(e); + } + return value; + } + } + throw context.mappingException("Expected type float, integer, or string."); + } + + private ZoneId getZone(DeserializationContext context) { + // Instants are always in UTC, so don't waste compute cycles + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); + } + + private static class FromIntegerArguments { + public final long value; + public final ZoneId zoneId; + + private FromIntegerArguments(long value, ZoneId zoneId) { + this.value = value; + this.zoneId = zoneId; + } + } + + private static class FromDecimalArguments { + public final long integer; + public final int fraction; + public final ZoneId zoneId; + + private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { + this.integer = integer; + this.fraction = fraction; + this.zoneId = zoneId; + } + } +} diff --git a/templates/JSON.mustache b/templates/JSON.mustache new file mode 100644 index 00000000..5ef02660 --- /dev/null +++ b/templates/JSON.mustache @@ -0,0 +1,541 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.joda.time.format.DateTimeFormatter; +import org.joda.time.format.DateTimeFormatterBuilder; +import org.joda.time.format.ISODateTimeFormat; +{{/joda}} + +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +{{#jsr310}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +{{/jsr310}} +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +public class JSON { + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + {{#joda}} + private DateTimeTypeAdapter dateTimeTypeAdapter = new DateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/joda}} + {{#jsr310}} + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/jsr310}} + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + {{#models}} + {{#model}} + {{#discriminator}} + .registerTypeSelector({{classname}}.class, new TypeSelector<{{classname}}>() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + {{#mappedModels}} + classByDiscriminatorValue.put("{{mappingName}}"{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}, {{modelName}}.class); + {{/mappedModels}} + classByDiscriminatorValue.put("{{name}}"{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}, {{classname}}.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "{{{propertyBaseName}}}")); + } + }) + {{/discriminator}} + {{/model}} + {{/models}} + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + {{#disableHtmlEscaping}} + builder.disableHtmlEscaping(); + {{/disableHtmlEscaping}} + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + {{#joda}} + .registerTypeAdapter(DateTime.class, dateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + {{/joda}} + {{#jsr310}} + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + {{/jsr310}} + .registerTypeAdapter(byte[].class, byteArrayAdapter) + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; + } + + /** + * Configure the parser to be liberal in what it accepts. + * + * @param lenientOnJson Set it to true to ignore some syntax errors + * @return JSON + * @see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html + */ + public JSON setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + return this; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + {{#joda}} + /** + * Gson TypeAdapter for Joda DateTime type + */ + public static class DateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public DateTimeTypeAdapter() { + this(new DateTimeFormatterBuilder() + .append(ISODateTimeFormat.dateTime().getPrinter(), ISODateTimeFormat.dateOptionalTimeParser().getParser()) + .toFormatter()); + } + + public DateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, DateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public DateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseDateTime(date); + } + } + } + + /** + * Gson TypeAdapter for Joda LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(ISODateTimeFormat.date()); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseLocalDate(date); + } + } + } + + public JSON setDateTimeFormat(DateTimeFormatter dateFormat) { + dateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + {{/joda}} + {{#jsr310}} + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + {{/jsr310}} + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } + +} diff --git a/templates/JavaTimeFormatter.mustache b/templates/JavaTimeFormatter.mustache new file mode 100644 index 00000000..e96325c4 --- /dev/null +++ b/templates/JavaTimeFormatter.mustache @@ -0,0 +1,58 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. + * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. + */ +{{>generatedAnnotation}} + +public class JavaTimeFormatter { + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given {@code OffsetDateTime} object into string. + * + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} \ No newline at end of file diff --git a/templates/Pair.mustache b/templates/Pair.mustache new file mode 100644 index 00000000..fc7d0568 --- /dev/null +++ b/templates/Pair.mustache @@ -0,0 +1,27 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +{{>generatedAnnotation}} + +public class Pair { + private final String name; + private final String value; + + public Pair(String name, String value) { + this.name = isValidString(name) ? name : ""; + this.value = isValidString(value) ? value : ""; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private static boolean isValidString(String arg) { + return arg != null; + } +} diff --git a/templates/README.mustache b/templates/README.mustache new file mode 100644 index 00000000..157c8b6e --- /dev/null +++ b/templates/README.mustache @@ -0,0 +1,248 @@ +# {{artifactId}} + +{{appName}} + +- API version: {{appVersion}} +{{^hideGenerationTimestamp}} + +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} + +- Generator version: {{generatorVersion}} + +{{{appDescriptionWithNewLines}}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +{{#jersey2}} +2. Maven (3.8.3+)/Gradle (7.2+) +{{/jersey2}} +{{^jersey2}} +2. Maven/Gradle +{{/jersey2}} + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the '{{{artifactId}}}' jar has been published to maven central. + mavenLocal() // Needed if the '{{{artifactId}}}' jar has been published to the local maven repo. + } + + dependencies { + implementation "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar` +- `target/lib/*.jar` + +{{#jersey2}} +## Usage + +To add a HTTP proxy for the API client, use `ClientConfig`: +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import org.glassfish.jersey.apache.connector.ApacheConnectorProvider; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import {{{invokerPackage}}}.*; +import {{{package}}}.{{{classname}}}; + +... + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +ClientConfig clientConfig = defaultClient.getClientConfig(); +clientConfig.connectorProvider(new ApacheConnectorProvider()); +clientConfig.property(ClientProperties.PROXY_URI, "http://proxy_url_here"); +clientConfig.property(ClientProperties.PROXY_USERNAME, "proxy_username"); +clientConfig.property(ClientProperties.PROXY_PASSWORD, "proxy_password"); +defaultClient.setClientConfig(clientConfig); + +{{{classname}}} apiInstance = new {{{classname}}}(defaultClient); +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +{{/jersey2}} +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import {{{invokerPackage}}}.*; +import {{{invokerPackage}}}.auth.*; +import {{{modelPackage}}}.*; +import {{{package}}}.{{{classname}}}; + +public class {{{classname}}}Example { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}}{{#isHttpSignature}} + // Configure HTTP signature authorization: {{{name}}} + HttpSignatureAuth {{{name}}} = (HttpSignatureAuth) defaultClient.getAuthentication("{{{name}}}"); + // All the HTTP signature parameters below should be customized to your environment. + // Configure the keyId + {{{name}}}.setKeyId("YOUR KEY ID"); + // Configure the signature algorithm + {{{name}}}.setSigningAlgorithm(SigningAlgorithm.HS2019); + // Configure the specific cryptographic algorithm + {{{name}}}.setAlgorithm(Algorithm.ECDSA_SHA256); + // Configure the cryptographic algorithm parameters, if applicable + {{{name}}}.setAlgorithmParameterSpec(null); + // Set the cryptographic digest algorithm. + {{{name}}}.setDigestAlgorithm("SHA-256"); + // Set the HTTP headers that should be included in the HTTP signature. + {{{name}}}.setHeaders(Arrays.asList("date", "host")); + // Set the private key used to sign the HTTP messages + {{{name}}}.setPrivateKey();{{/isHttpSignature}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation for Models + +{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) +{{/model}}{{/models}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}} + +- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}} + +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} + +- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}} + +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/RFC3339DateFormat.mustache b/templates/RFC3339DateFormat.mustache new file mode 100644 index 00000000..c2c205c2 --- /dev/null +++ b/templates/RFC3339DateFormat.mustache @@ -0,0 +1,48 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +{{>generatedAnnotation}} + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} diff --git a/templates/RFC3339InstantDeserializer.mustache b/templates/RFC3339InstantDeserializer.mustache new file mode 100644 index 00000000..ea4b0799 --- /dev/null +++ b/templates/RFC3339InstantDeserializer.mustache @@ -0,0 +1,90 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import java.io.IOException; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAccessor; +import java.util.function.BiFunction; +import java.util.function.Function; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature; +import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; + +{{>generatedAnnotation}} + +public class RFC3339InstantDeserializer extends InstantDeserializer { + private static final long serialVersionUID = 1L; + private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault(); + private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + = JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault(); + + public static final RFC3339InstantDeserializer INSTANT = new RFC3339InstantDeserializer<>( + Instant.class, DateTimeFormatter.ISO_INSTANT, + Instant::from, + a -> Instant.ofEpochMilli( a.value ), + a -> Instant.ofEpochSecond( a.integer, a.fraction ), + null, + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + OffsetDateTime::from, + a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + (d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ? + d : + d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ), + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer ZONED_DATE_TIME = new RFC3339InstantDeserializer<>( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + ZonedDateTime::from, + a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + ZonedDateTime::withZoneSameInstant, + false, // keep zero offset and Z separate since zones explicitly supported + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + protected RFC3339InstantDeserializer( + Class supportedType, + DateTimeFormatter formatter, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust, + boolean replaceZeroOffsetAsZ, + boolean normalizeZoneId, + boolean readNumericStringsAsTimestamp) { + super( + supportedType, + formatter, + parsedToValue, + fromMilliseconds, + fromNanoseconds, + adjust, + replaceZeroOffsetAsZ, + normalizeZoneId, + readNumericStringsAsTimestamp + ); + } + + @Override + protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException { + return super._fromString(p, ctxt, string0.replace( ' ', 'T' )); + } +} \ No newline at end of file diff --git a/templates/RFC3339JavaTimeModule.mustache b/templates/RFC3339JavaTimeModule.mustache new file mode 100644 index 00000000..6b780cd4 --- /dev/null +++ b/templates/RFC3339JavaTimeModule.mustache @@ -0,0 +1,29 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZonedDateTime; + +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.Module.SetupContext; + +{{>generatedAnnotation}} + +public class RFC3339JavaTimeModule extends SimpleModule { + private static final long serialVersionUID = 1L; + + public RFC3339JavaTimeModule() { + super("RFC3339JavaTimeModule"); + } + + @Override + public void setupModule(SetupContext context) { + super.setupModule(context); + + addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT); + addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME); + addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME); + } + +} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ServerConfiguration.java b/templates/ServerConfiguration.mustache similarity index 62% rename from src/main/java/io/github/outscale/osc_sdk_java/client/ServerConfiguration.java rename to templates/ServerConfiguration.mustache index 0a9a2a7c..4c94d0bd 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ServerConfiguration.java +++ b/templates/ServerConfiguration.mustache @@ -1,8 +1,14 @@ -package io.github.outscale.osc_sdk_java.client; +{{>licenseInfo}} + +package {{invokerPackage}}; import java.util.Map; -/** Representing a Server configuration. */ +/** + * Representing a Server configuration. + */ +{{>generatedAnnotation}} + public class ServerConfiguration { public String URL; public String description; @@ -11,11 +17,9 @@ public class ServerConfiguration { /** * @param URL A URL to the target host. * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for - * substitution in the server's URL template. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. */ - public ServerConfiguration( - String URL, String description, Map variables) { + public ServerConfiguration(String URL, String description, Map variables) { this.URL = URL; this.description = description; this.variables = variables; @@ -31,21 +35,15 @@ public String URL(Map variables) { String url = this.URL; // go through variables and replace placeholders - for (Map.Entry variable : this.variables.entrySet()) { + for (Map.Entry variable: this.variables.entrySet()) { String name = variable.getKey(); ServerVariable serverVariable = variable.getValue(); String value = serverVariable.defaultValue; if (variables != null && variables.containsKey(name)) { value = variables.get(name); - if (serverVariable.enumValues.size() > 0 - && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException( - "The variable " - + name - + " in the server URL has invalid value " - + value - + "."); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replace("{" + name + "}", value); diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ServerVariable.java b/templates/ServerVariable.mustache similarity index 74% rename from src/main/java/io/github/outscale/osc_sdk_java/client/ServerVariable.java rename to templates/ServerVariable.mustache index 71255dad..f8261c44 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ServerVariable.java +++ b/templates/ServerVariable.mustache @@ -1,8 +1,14 @@ -package io.github.outscale.osc_sdk_java.client; +{{>licenseInfo}} + +package {{invokerPackage}}; import java.util.HashSet; -/** Representing a Server Variable for server URL template substitution. */ +/** + * Representing a Server Variable for server URL template substitution. + */ +{{>generatedAnnotation}} + public class ServerVariable { public String description; public String defaultValue; @@ -11,8 +17,7 @@ public class ServerVariable { /** * @param description A description for the server variable. * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are - * from a limited set. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. */ public ServerVariable(String description, String defaultValue, HashSet enumValues) { this.description = description; diff --git a/templates/StringUtil.mustache b/templates/StringUtil.mustache new file mode 100644 index 00000000..31af8371 --- /dev/null +++ b/templates/StringUtil.mustache @@ -0,0 +1,73 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Collection; +import java.util.Iterator; + +{{>generatedAnnotation}} + +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/templates/additionalEnumTypeAnnotations.mustache b/templates/additionalEnumTypeAnnotations.mustache new file mode 100644 index 00000000..aa524798 --- /dev/null +++ b/templates/additionalEnumTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalEnumTypeAnnotations}}{{{.}}} +{{/additionalEnumTypeAnnotations}} \ No newline at end of file diff --git a/templates/additionalModelTypeAnnotations.mustache b/templates/additionalModelTypeAnnotations.mustache new file mode 100644 index 00000000..f4871c02 --- /dev/null +++ b/templates/additionalModelTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalModelTypeAnnotations}}{{{.}}} +{{/additionalModelTypeAnnotations}} \ No newline at end of file diff --git a/templates/additionalOneOfTypeAnnotations.mustache b/templates/additionalOneOfTypeAnnotations.mustache new file mode 100644 index 00000000..283f8f91 --- /dev/null +++ b/templates/additionalOneOfTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalOneOfTypeAnnotations}}{{{.}}} +{{/additionalOneOfTypeAnnotations}} \ No newline at end of file diff --git a/templates/api.mustache b/templates/api.mustache new file mode 100644 index 00000000..3cfd92db --- /dev/null +++ b/templates/api.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}; + +import com.sun.jersey.api.client.GenericType; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.Configuration; +import {{modelPackage}}.*; +import {{invokerPackage}}.Pair; + +{{#imports}}import {{import}}; +{{/imports}} + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{.}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}}{{/allParams}} + // create path and map variables + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + {{#queryParams}} + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/queryParams}} + + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/headerParams}} + + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + + {{#formParams}}if ({{paramName}} != null) + localVarFormParams.put("{{baseName}}", {{paramName}}); + {{/formParams}} + + final String[] localVarAccepts = { + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}} + GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + {{/returnType}}{{^returnType}} + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + {{/returnType}} + } + {{/operation}} +} +{{/operations}} diff --git a/templates/apiException.mustache b/templates/apiException.mustache new file mode 100644 index 00000000..93e28ec8 --- /dev/null +++ b/templates/apiException.mustache @@ -0,0 +1,92 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + @Override + public String toString() { + return "ApiException{" + + "code=" + code + + ", responseHeaders=" + responseHeaders + + ", responseBody='" + responseBody + '\'' + + '}'; + } +} diff --git a/templates/apiOperation.mustache b/templates/apiOperation.mustache new file mode 100644 index 00000000..97adb0ea --- /dev/null +++ b/templates/apiOperation.mustache @@ -0,0 +1,28 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import io.swagger.v3.oas.models.Operation; + +public class ApiOperation { + private final String path; + private final String method; + private final Operation operation; + + public ApiOperation(String path, String method, Operation operation) { + this.path = path; + this.method = method; + this.operation = operation; + } + + public Operation getOperation() { + return operation; + } + + public String getPath() { + return path; + } + + public String getMethod() { + return method; + } +} diff --git a/templates/api_doc.mustache b/templates/api_doc.mustache new file mode 100644 index 00000000..3d320395 --- /dev/null +++ b/templates/api_doc.mustache @@ -0,0 +1,108 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example + +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/templates/api_test.mustache b/templates/api_test.mustache new file mode 100644 index 00000000..155f46e4 --- /dev/null +++ b/templates/api_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for {{classname}} + */ +class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{.}} + * + {{/summary}} + {{#notes}} + * {{.}} + * + {{/notes}} + * @throws ApiException + * if the Api call fails + */ + @Test + void {{operationId}}Test() throws ApiException { + //{{#allParams}} + //{{{dataType}}} {{paramName}} = null; + //{{/allParams}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + {{/operation}} + {{/operations}} +} diff --git a/templates/auth/ApiKeyAuth.mustache b/templates/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..8703bedd --- /dev/null +++ b/templates/auth/ApiKeyAuth.mustache @@ -0,0 +1,67 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/templates/auth/Authentication.mustache b/templates/auth/Authentication.mustache new file mode 100644 index 00000000..78bddeba --- /dev/null +++ b/templates/auth/Authentication.mustache @@ -0,0 +1,21 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams); +} diff --git a/templates/auth/HttpBasicAuth.mustache b/templates/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..be2863d6 --- /dev/null +++ b/templates/auth/HttpBasicAuth.mustache @@ -0,0 +1,43 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/auth/HttpBearerAuth.mustache b/templates/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..5290e3fb --- /dev/null +++ b/templates/auth/HttpBearerAuth.mustache @@ -0,0 +1,60 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = upperCaseBearer(scheme); + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null; + if (bearerToken == null) { + return; + } + headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme; + } +} diff --git a/templates/auth/OAuth.mustache b/templates/auth/OAuth.mustache new file mode 100644 index 00000000..a500f67c --- /dev/null +++ b/templates/auth/OAuth.mustache @@ -0,0 +1,29 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/templates/auth/OAuthFlow.mustache b/templates/auth/OAuthFlow.mustache new file mode 100644 index 00000000..8dd1cad4 --- /dev/null +++ b/templates/auth/OAuthFlow.mustache @@ -0,0 +1,15 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +/** + * OAuth flows that are supported by this client + */ +{{>generatedAnnotation}} + +public enum OAuthFlow { + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 +} diff --git a/templates/beanValidation.mustache b/templates/beanValidation.mustache new file mode 100644 index 00000000..47f7109e --- /dev/null +++ b/templates/beanValidation.mustache @@ -0,0 +1,18 @@ +{{#required}} +{{^isReadOnly}} + @NotNull +{{/isReadOnly}} +{{/required}} +{{#isContainer}} +{{^isPrimitiveType}} +{{^isEnum}} + @Valid +{{/isEnum}} +{{/isPrimitiveType}} +{{/isContainer}} +{{^isContainer}} +{{^isPrimitiveType}} + @Valid +{{/isPrimitiveType}} +{{/isContainer}} +{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/beanValidationCore.mustache b/templates/beanValidationCore.mustache new file mode 100644 index 00000000..ff4ffe26 --- /dev/null +++ b/templates/beanValidationCore.mustache @@ -0,0 +1,20 @@ +{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}"){{/isByteArray}}{{/pattern}}{{! +minLength && maxLength set +}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +minLength set, maxLength not +}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! +minLength not set, maxLength set +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! +@Size: minItems && maxItems set +}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems set, maxItems not +}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems not set && maxItems set +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! +check for integer or long / all others=decimal type with @Decimal* +isInteger set +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! +isLong set +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! +Not Integer, not Long => we have a decimal value! +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/templates/beanValidationQueryParams.mustache b/templates/beanValidationQueryParams.mustache new file mode 100644 index 00000000..0f99bffd --- /dev/null +++ b/templates/beanValidationQueryParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull {{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/build.gradle.mustache b/templates/build.gradle.mustache new file mode 100644 index 00000000..6557a7c7 --- /dev/null +++ b/templates/build.gradle.mustache @@ -0,0 +1,174 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + archiveClassifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } + + task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } +} + +ext { + swagger_annotations_version = "1.6.3" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + {{#useBeanValidation}} + bean_validation_version = "3.0.2" + {{/useBeanValidation}} + jersey_version = "1.19.4" + jodatime_version = "2.9.9" + junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "com.sun.jersey:jersey-client:$jersey_version" + implementation "com.sun.jersey.contribs:jersey-multipart:$jersey_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} + testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/templates/build.sbt.mustache b/templates/build.sbt.mustache new file mode 100644 index 00000000..46409041 --- /dev/null +++ b/templates/build.sbt.mustache @@ -0,0 +1 @@ +# TODO diff --git a/templates/enum_outer_doc.mustache b/templates/enum_outer_doc.mustache new file mode 100644 index 00000000..20c512aa --- /dev/null +++ b/templates/enum_outer_doc.mustache @@ -0,0 +1,7 @@ +# {{classname}} + +## Enum + +{{#allowableValues}}{{#enumVars}} +* `{{name}}` (value: `{{{value}}}`) +{{/enumVars}}{{/allowableValues}} diff --git a/templates/generatedAnnotation.mustache b/templates/generatedAnnotation.mustache new file mode 100644 index 00000000..e05689d5 --- /dev/null +++ b/templates/generatedAnnotation.mustache @@ -0,0 +1 @@ +@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}, comments = "Generator version: {{generatorVersion}}") \ No newline at end of file diff --git a/templates/git_push.sh.mustache b/templates/git_push.sh.mustache new file mode 100644 index 00000000..0e3776ae --- /dev/null +++ b/templates/git_push.sh.mustache @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="{{{gitHost}}}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="{{{gitUserId}}}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="{{{gitRepoId}}}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="{{{releaseNote}}}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/templates/gitignore.mustache b/templates/gitignore.mustache new file mode 100644 index 00000000..a530464a --- /dev/null +++ b/templates/gitignore.mustache @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/templates/gradle-wrapper.jar b/templates/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e6441136f3d4ba8a0da8d277868979cfbc8ad796 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vSTxF-Vi3+ZOI=Thq2} zyQgjYY1_7^ZQHh{?P))4+qUiQJLi1&{yE>h?~jU%tjdV0h|FENbM3X(KnJdPKc?~k zh=^Ixv*+smUll!DTWH!jrV*wSh*(mx0o6}1@JExzF(#9FXgmTXVoU+>kDe68N)dkQ zH#_98Zv$}lQwjKL@yBd;U(UD0UCl322=pav<=6g>03{O_3oKTq;9bLFX1ia*lw;#K zOiYDcBJf)82->83N_Y(J7Kr_3lE)hAu;)Q(nUVydv+l+nQ$?|%MWTy`t>{havFSQloHwiIkGK9YZ79^9?AZo0ZyQlVR#}lF%dn5n%xYksXf8gnBm=wO7g_^! zauQ-bH1Dc@3ItZ-9D_*pH}p!IG7j8A_o94#~>$LR|TFq zZ-b00*nuw|-5C2lJDCw&8p5N~Z1J&TrcyErds&!l3$eSz%`(*izc;-?HAFD9AHb-| z>)id`QCrzRws^9(#&=pIx9OEf2rmlob8sK&xPCWS+nD~qzU|qG6KwA{zbikcfQrdH z+ zQg>O<`K4L8rN7`GJB0*3<3`z({lWe#K!4AZLsI{%z#ja^OpfjU{!{)x0ZH~RB0W5X zTwN^w=|nA!4PEU2=LR05x~}|B&ZP?#pNgDMwD*ajI6oJqv!L81gu=KpqH22avXf0w zX3HjbCI!n9>l046)5rr5&v5ja!xkKK42zmqHzPx$9Nn_MZk`gLeSLgC=LFf;H1O#B zn=8|^1iRrujHfbgA+8i<9jaXc;CQBAmQvMGQPhFec2H1knCK2x!T`e6soyrqCamX% zTQ4dX_E*8so)E*TB$*io{$c6X)~{aWfaqdTh=xEeGvOAN9H&-t5tEE-qso<+C!2>+ zskX51H-H}#X{A75wqFe-J{?o8Bx|>fTBtl&tcbdR|132Ztqu5X0i-pisB-z8n71%q%>EF}yy5?z=Ve`}hVh{Drv1YWL zW=%ug_&chF11gDv3D6B)Tz5g54H0mDHNjuKZ+)CKFk4Z|$RD zfRuKLW`1B>B?*RUfVd0+u8h3r-{@fZ{k)c!93t1b0+Q9vOaRnEn1*IL>5Z4E4dZ!7 ztp4GP-^1d>8~LMeb}bW!(aAnB1tM_*la=Xx)q(I0Y@__Zd$!KYb8T2VBRw%e$iSdZ zkwdMwd}eV9q*;YvrBFTv1>1+}{H!JK2M*C|TNe$ZSA>UHKk);wz$(F$rXVc|sI^lD zV^?_J!3cLM;GJuBMbftbaRUs$;F}HDEDtIeHQ)^EJJ1F9FKJTGH<(Jj`phE6OuvE) zqK^K`;3S{Y#1M@8yRQwH`?kHMq4tHX#rJ>5lY3DM#o@or4&^_xtBC(|JpGTfrbGkA z2Tu+AyT^pHannww!4^!$5?@5v`LYy~T`qs7SYt$JgrY(w%C+IWA;ZkwEF)u5sDvOK zGk;G>Mh&elvXDcV69J_h02l&O;!{$({fng9Rlc3ID#tmB^FIG^w{HLUpF+iB`|
NnX)EH+Nua)3Y(c z&{(nX_ht=QbJ%DzAya}!&uNu!4V0xI)QE$SY__m)SAKcN0P(&JcoK*Lxr@P zY&P=}&B3*UWNlc|&$Oh{BEqwK2+N2U$4WB7Fd|aIal`FGANUa9E-O)!gV`((ZGCc$ zBJA|FFrlg~9OBp#f7aHodCe{6= zay$6vN~zj1ddMZ9gQ4p32(7wD?(dE>KA2;SOzXRmPBiBc6g`eOsy+pVcHu=;Yd8@{ zSGgXf@%sKKQz~;!J;|2fC@emm#^_rnO0esEn^QxXgJYd`#FPWOUU5b;9eMAF zZhfiZb|gk8aJIw*YLp4!*(=3l8Cp{(%p?ho22*vN9+5NLV0TTazNY$B5L6UKUrd$n zjbX%#m7&F#U?QNOBXkiiWB*_tk+H?N3`vg;1F-I+83{M2!8<^nydGr5XX}tC!10&e z7D36bLaB56WrjL&HiiMVtpff|K%|*{t*ltt^5ood{FOG0<>k&1h95qPio)2`eL${YAGIx(b4VN*~nKn6E~SIQUuRH zQ+5zP6jfnP$S0iJ@~t!Ai3o`X7biohli;E zT#yXyl{bojG@-TGZzpdVDXhbmF%F9+-^YSIv|MT1l3j zrxOFq>gd2%U}?6}8mIj?M zc077Zc9fq(-)4+gXv?Az26IO6eV`RAJz8e3)SC7~>%rlzDwySVx*q$ygTR5kW2ds- z!HBgcq0KON9*8Ff$X0wOq$`T7ml(@TF)VeoF}x1OttjuVHn3~sHrMB++}f7f9H%@f z=|kP_?#+fve@{0MlbkC9tyvQ_R?lRdRJ@$qcB(8*jyMyeME5ns6ypVI1Xm*Zr{DuS zZ!1)rQfa89c~;l~VkCiHI|PCBd`S*2RLNQM8!g9L6?n`^evQNEwfO@&JJRme+uopQX0%Jo zgd5G&#&{nX{o?TQwQvF1<^Cg3?2co;_06=~Hcb6~4XWpNFL!WU{+CK;>gH%|BLOh7@!hsa(>pNDAmpcuVO-?;Bic17R}^|6@8DahH)G z!EmhsfunLL|3b=M0MeK2vqZ|OqUqS8npxwge$w-4pFVXFq$_EKrZY?BuP@Az@(k`L z`ViQBSk`y+YwRT;&W| z2e3UfkCo^uTA4}Qmmtqs+nk#gNr2W4 zTH%hhErhB)pkXR{B!q5P3-OM+M;qu~f>}IjtF%>w{~K-0*jPVLl?Chz&zIdxp}bjx zStp&Iufr58FTQ36AHU)0+CmvaOpKF;W@sMTFpJ`j;3d)J_$tNQI^c<^1o<49Z(~K> z;EZTBaVT%14(bFw2ob@?JLQ2@(1pCdg3S%E4*dJ}dA*v}_a4_P(a`cHnBFJxNobAv zf&Zl-Yt*lhn-wjZsq<9v-IsXxAxMZ58C@e0!rzhJ+D@9^3~?~yllY^s$?&oNwyH!#~6x4gUrfxplCvK#!f z$viuszW>MFEcFL?>ux*((!L$;R?xc*myjRIjgnQX79@UPD$6Dz0jutM@7h_pq z0Zr)#O<^y_K6jfY^X%A-ip>P%3saX{!v;fxT-*0C_j4=UMH+Xth(XVkVGiiKE#f)q z%Jp=JT)uy{&}Iq2E*xr4YsJ5>w^=#-mRZ4vPXpI6q~1aFwi+lQcimO45V-JXP;>(Q zo={U`{=_JF`EQj87Wf}{Qy35s8r1*9Mxg({CvOt}?Vh9d&(}iI-quvs-rm~P;eRA@ zG5?1HO}puruc@S{YNAF3vmUc2B4!k*yi))<5BQmvd3tr}cIs#9)*AX>t`=~{f#Uz0 z0&Nk!7sSZwJe}=)-R^$0{yeS!V`Dh7w{w5rZ9ir!Z7Cd7dwZcK;BT#V0bzTt>;@Cl z#|#A!-IL6CZ@eHH!CG>OO8!%G8&8t4)Ro@}USB*k>oEUo0LsljsJ-%5Mo^MJF2I8- z#v7a5VdJ-Cd%(a+y6QwTmi+?f8Nxtm{g-+WGL>t;s#epv7ug>inqimZCVm!uT5Pf6 ziEgQt7^%xJf#!aPWbuC_3Nxfb&CFbQy!(8ANpkWLI4oSnH?Q3f?0k1t$3d+lkQs{~(>06l&v|MpcFsyAv zin6N!-;pggosR*vV=DO(#+}4ps|5$`udE%Kdmp?G7B#y%H`R|i8skKOd9Xzx8xgR$>Zo2R2Ytktq^w#ul4uicxW#{ zFjG_RNlBroV_n;a7U(KIpcp*{M~e~@>Q#Av90Jc5v%0c>egEdY4v3%|K1XvB{O_8G zkTWLC>OZKf;XguMH2-Pw{BKbFzaY;4v2seZV0>^7Q~d4O=AwaPhP3h|!hw5aqOtT@ z!SNz}$of**Bl3TK209@F=Tn1+mgZa8yh(Png%Zd6Mt}^NSjy)etQrF zme*llAW=N_8R*O~d2!apJnF%(JcN??=`$qs3Y+~xs>L9x`0^NIn!8mMRFA_tg`etw z3k{9JAjnl@ygIiJcNHTy02GMAvBVqEss&t2<2mnw!; zU`J)0>lWiqVqo|ex7!+@0i>B~BSU1A_0w#Ee+2pJx0BFiZ7RDHEvE*ptc9md(B{&+ zKE>TM)+Pd>HEmdJao7U@S>nL(qq*A)#eLOuIfAS@j`_sK0UEY6OAJJ-kOrHG zjHx`g!9j*_jRcJ%>CE9K2MVf?BUZKFHY?EpV6ai7sET-tqk=nDFh-(65rhjtlKEY% z@G&cQ<5BKatfdA1FKuB=i>CCC5(|9TMW%K~GbA4}80I5%B}(gck#Wlq@$nO3%@QP_ z8nvPkJFa|znk>V92cA!K1rKtr)skHEJD;k8P|R8RkCq1Rh^&}Evwa4BUJz2f!2=MH zo4j8Y$YL2313}H~F7@J7mh>u%556Hw0VUOz-Un@ZASCL)y8}4XXS`t1AC*^>PLwIc zUQok5PFS=*#)Z!3JZN&eZ6ZDP^-c@StY*t20JhCnbMxXf=LK#;`4KHEqMZ-Ly9KsS zI2VUJGY&PmdbM+iT)zek)#Qc#_i4uH43 z@T5SZBrhNCiK~~esjsO9!qBpaWK<`>!-`b71Y5ReXQ4AJU~T2Njri1CEp5oKw;Lnm)-Y@Z3sEY}XIgSy%xo=uek(kAAH5MsV$V3uTUsoTzxp_rF=tx zV07vlJNKtJhCu`b}*#m&5LV4TAE&%KtHViDAdv#c^x`J7bg z&N;#I2GkF@SIGht6p-V}`!F_~lCXjl1BdTLIjD2hH$J^YFN`7f{Q?OHPFEM$65^!u zNwkelo*5+$ZT|oQ%o%;rBX$+?xhvjb)SHgNHE_yP%wYkkvXHS{Bf$OiKJ5d1gI0j< zF6N}Aq=(WDo(J{e-uOecxPD>XZ@|u-tgTR<972`q8;&ZD!cep^@B5CaqFz|oU!iFj zU0;6fQX&~15E53EW&w1s9gQQ~Zk16X%6 zjG`j0yq}4deX2?Tr(03kg>C(!7a|b9qFI?jcE^Y>-VhudI@&LI6Qa}WQ>4H_!UVyF z((cm&!3gmq@;BD#5P~0;_2qgZhtJS|>WdtjY=q zLnHH~Fm!cxw|Z?Vw8*~?I$g#9j&uvgm7vPr#&iZgPP~v~BI4jOv;*OQ?jYJtzO<^y z7-#C={r7CO810!^s(MT!@@Vz_SVU)7VBi(e1%1rvS!?PTa}Uv`J!EP3s6Y!xUgM^8 z4f!fq<3Wer_#;u!5ECZ|^c1{|q_lh3m^9|nsMR1#Qm|?4Yp5~|er2?W^7~cl;_r4WSme_o68J9p03~Hc%X#VcX!xAu%1`R!dfGJCp zV*&m47>s^%Ib0~-2f$6oSgn3jg8m%UA;ArcdcRyM5;}|r;)?a^D*lel5C`V5G=c~k zy*w_&BfySOxE!(~PI$*dwG><+-%KT5p?whOUMA*k<9*gi#T{h3DAxzAPxN&Xws8o9Cp*`PA5>d9*Z-ynV# z9yY*1WR^D8|C%I@vo+d8r^pjJ$>eo|j>XiLWvTWLl(^;JHCsoPgem6PvegHb-OTf| zvTgsHSa;BkbG=(NgPO|CZu9gUCGr$8*EoH2_Z#^BnxF0yM~t`|9ws_xZ8X8iZYqh! zAh;HXJ)3P&)Q0(&F>!LN0g#bdbis-cQxyGn9Qgh`q+~49Fqd2epikEUw9caM%V6WgP)532RMRW}8gNS%V%Hx7apSz}tn@bQy!<=lbhmAH=FsMD?leawbnP5BWM0 z5{)@EEIYMu5;u)!+HQWhQ;D3_Cm_NADNeb-f56}<{41aYq8p4=93d=-=q0Yx#knGYfXVt z+kMxlus}t2T5FEyCN~!}90O_X@@PQpuy;kuGz@bWft%diBTx?d)_xWd_-(!LmVrh**oKg!1CNF&LX4{*j|) zIvjCR0I2UUuuEXh<9}oT_zT#jOrJAHNLFT~Ilh9hGJPI1<5`C-WA{tUYlyMeoy!+U zhA#=p!u1R7DNg9u4|QfED-2TuKI}>p#2P9--z;Bbf4Op*;Q9LCbO&aL2i<0O$ByoI z!9;Ght733FC>Pz>$_mw(F`zU?`m@>gE`9_p*=7o=7av`-&ifU(^)UU`Kg3Kw`h9-1 z6`e6+im=|m2v`pN(2dE%%n8YyQz;#3Q-|x`91z?gj68cMrHl}C25|6(_dIGk*8cA3 zRHB|Nwv{@sP4W+YZM)VKI>RlB`n=Oj~Rzx~M+Khz$N$45rLn6k1nvvD^&HtsMA4`s=MmuOJID@$s8Ph4E zAmSV^+s-z8cfv~Yd(40Sh4JG#F~aB>WFoX7ykaOr3JaJ&Lb49=B8Vk-SQT9%7TYhv z?-Pprt{|=Y5ZQ1?od|A<_IJU93|l4oAfBm?3-wk{O<8ea+`}u%(kub(LFo2zFtd?4 zwpN|2mBNywv+d^y_8#<$r>*5+$wRTCygFLcrwT(qc^n&@9r+}Kd_u@Ithz(6Qb4}A zWo_HdBj#V$VE#l6pD0a=NfB0l^6W^g`vm^sta>Tly?$E&{F?TTX~DsKF~poFfmN%2 z4x`Dc{u{Lkqz&y!33;X}weD}&;7p>xiI&ZUb1H9iD25a(gI|`|;G^NwJPv=1S5e)j z;U;`?n}jnY6rA{V^ zxTd{bK)Gi^odL3l989DQlN+Zs39Xe&otGeY(b5>rlIqfc7Ap4}EC?j<{M=hlH{1+d zw|c}}yx88_xQr`{98Z!d^FNH77=u(p-L{W6RvIn40f-BldeF-YD>p6#)(Qzf)lfZj z?3wAMtPPp>vMehkT`3gToPd%|D8~4`5WK{`#+}{L{jRUMt zrFz+O$C7y8$M&E4@+p+oV5c%uYzbqd2Y%SSgYy#xh4G3hQv>V*BnuKQhBa#=oZB~w{azUB+q%bRe_R^ z>fHBilnRTUfaJ201czL8^~Ix#+qOHSO)A|xWLqOxB$dT2W~)e-r9;bm=;p;RjYahB z*1hegN(VKK+ztr~h1}YP@6cfj{e#|sS`;3tJhIJK=tVJ-*h-5y9n*&cYCSdg#EHE# zSIx=r#qOaLJoVVf6v;(okg6?*L_55atl^W(gm^yjR?$GplNP>BZsBYEf_>wM0Lc;T zhf&gpzOWNxS>m+mN92N0{;4uw`P+9^*|-1~$uXpggj4- z^SFc4`uzj2OwdEVT@}Q`(^EcQ_5(ZtXTql*yGzdS&vrS_w>~~ra|Nb5abwf}Y!uq6R5f&6g2ge~2p(%c< z@O)cz%%rr4*cRJ5f`n@lvHNk@lE1a*96Kw6lJ~B-XfJW%?&-y?;E&?1AacU@`N`!O z6}V>8^%RZ7SQnZ-z$(jsX`amu*5Fj8g!3RTRwK^`2_QHe;_2y_n|6gSaGyPmI#kA0sYV<_qOZc#-2BO%hX)f$s-Z3xlI!ub z^;3ru11DA`4heAu%}HIXo&ctujzE2!6DIGE{?Zs>2}J+p&C$rc7gJC35gxhflorvsb%sGOxpuWhF)dL_&7&Z99=5M0b~Qa;Mo!j&Ti_kXW!86N%n= zSC@6Lw>UQ__F&+&Rzv?gscwAz8IP!n63>SP)^62(HK98nGjLY2*e^OwOq`3O|C92? z;TVhZ2SK%9AGW4ZavTB9?)mUbOoF`V7S=XM;#3EUpR+^oHtdV!GK^nXzCu>tpR|89 zdD{fnvCaN^^LL%amZ^}-E+214g&^56rpdc@yv0b<3}Ys?)f|fXN4oHf$six)-@<;W&&_kj z-B}M5U*1sb4)77aR=@%I?|Wkn-QJVuA96an25;~!gq(g1@O-5VGo7y&E_srxL6ZfS z*R%$gR}dyONgju*D&?geiSj7SZ@ftyA|}(*Y4KbvU!YLsi1EDQQCnb+-cM=K1io78o!v*);o<XwjaQH%)uIP&Zm?)Nfbfn;jIr z)d#!$gOe3QHp}2NBak@yYv3m(CPKkwI|{;d=gi552u?xj9ObCU^DJFQp4t4e1tPzM zvsRIGZ6VF+{6PvqsplMZWhz10YwS={?`~O0Ec$`-!klNUYtzWA^f9m7tkEzCy<_nS z=&<(awFeZvt51>@o_~>PLs05CY)$;}Oo$VDO)?l-{CS1Co=nxjqben*O1BR>#9`0^ zkwk^k-wcLCLGh|XLjdWv0_Hg54B&OzCE^3NCP}~OajK-LuRW53CkV~Su0U>zN%yQP zH8UH#W5P3-!ToO-2k&)}nFe`t+mdqCxxAHgcifup^gKpMObbox9LFK;LP3}0dP-UW z?Zo*^nrQ6*$FtZ(>kLCc2LY*|{!dUn$^RW~m9leoF|@Jy|M5p-G~j%+P0_#orRKf8 zvuu5<*XO!B?1E}-*SY~MOa$6c%2cM+xa8}_8x*aVn~57v&W(0mqN1W`5a7*VN{SUH zXz98DDyCnX2EPl-`Lesf`=AQT%YSDb`$%;(jUTrNen$NPJrlpPDP}prI>Ml!r6bCT;mjsg@X^#&<}CGf0JtR{Ecwd&)2zuhr#nqdgHj+g2n}GK9CHuwO zk>oZxy{vcOL)$8-}L^iVfJHAGfwN$prHjYV0ju}8%jWquw>}_W6j~m<}Jf!G?~r5&Rx)!9JNX!ts#SGe2HzobV5); zpj@&`cNcO&q+%*<%D7za|?m5qlmFK$=MJ_iv{aRs+BGVrs)98BlN^nMr{V_fcl_;jkzRju+c-y?gqBC_@J0dFLq-D9@VN&-`R9U;nv$Hg?>$oe4N&Ht$V_(JR3TG^! zzJsbQbi zFE6-{#9{G{+Z}ww!ycl*7rRdmU#_&|DqPfX3CR1I{Kk;bHwF6jh0opI`UV2W{*|nn zf_Y@%wW6APb&9RrbEN=PQRBEpM(N1w`81s=(xQj6 z-eO0k9=Al|>Ej|Mw&G`%q8e$2xVz1v4DXAi8G};R$y)ww638Y=9y$ZYFDM$}vzusg zUf+~BPX>(SjA|tgaFZr_e0{)+z9i6G#lgt=F_n$d=beAt0Sa0a7>z-?vcjl3e+W}+ z1&9=|vC=$co}-Zh*%3588G?v&U7%N1Qf-wNWJ)(v`iO5KHSkC5&g7CrKu8V}uQGcfcz zmBz#Lbqwqy#Z~UzHgOQ;Q-rPxrRNvl(&u6ts4~0=KkeS;zqURz%!-ERppmd%0v>iRlEf+H$yl{_8TMJzo0 z>n)`On|7=WQdsqhXI?#V{>+~}qt-cQbokEbgwV3QvSP7&hK4R{Z{aGHVS3;+h{|Hz z6$Js}_AJr383c_+6sNR|$qu6dqHXQTc6?(XWPCVZv=)D#6_;D_8P-=zOGEN5&?~8S zl5jQ?NL$c%O)*bOohdNwGIKM#jSAC?BVY={@A#c9GmX0=T(0G}xs`-%f3r=m6-cpK z!%waekyAvm9C3%>sixdZj+I(wQlbB4wv9xKI*T13DYG^T%}zZYJ|0$Oj^YtY+d$V$ zAVudSc-)FMl|54n=N{BnZTM|!>=bhaja?o7s+v1*U$!v!qQ%`T-6fBvmdPbVmro&d zk07TOp*KuxRUSTLRrBj{mjsnF8`d}rMViY8j`jo~Hp$fkv9F_g(jUo#Arp;Xw0M$~ zRIN!B22~$kx;QYmOkos@%|5k)!QypDMVe}1M9tZfkpXKGOxvKXB!=lo`p?|R1l=tA zp(1}c6T3Fwj_CPJwVsYtgeRKg?9?}%oRq0F+r+kdB=bFUdVDRPa;E~~>2$w}>O>v=?|e>#(-Lyx?nbg=ckJ#5U6;RT zNvHhXk$P}m9wSvFyU3}=7!y?Y z=fg$PbV8d7g25&-jOcs{%}wTDKm>!Vk);&rr;O1nvO0VrU&Q?TtYVU=ir`te8SLlS zKSNmV=+vF|ATGg`4$N1uS|n??f}C_4Sz!f|4Ly8#yTW-FBfvS48Tef|-46C(wEO_%pPhUC5$-~Y?!0vFZ^Gu`x=m7X99_?C-`|h zfmMM&Y@zdfitA@KPw4Mc(YHcY1)3*1xvW9V-r4n-9ZuBpFcf{yz+SR{ zo$ZSU_|fgwF~aakGr(9Be`~A|3)B=9`$M-TWKipq-NqRDRQc}ABo*s_5kV%doIX7LRLRau_gd@Rd_aLFXGSU+U?uAqh z8qusWWcvgQ&wu{|sRXmv?sl=xc<$6AR$+cl& zFNh5q1~kffG{3lDUdvEZu5c(aAG~+64FxdlfwY^*;JSS|m~CJusvi-!$XR`6@XtY2 znDHSz7}_Bx7zGq-^5{stTRy|I@N=>*y$zz>m^}^{d&~h;0kYiq8<^Wq7Dz0w31ShO^~LUfW6rfitR0(=3;Uue`Y%y@ex#eKPOW zO~V?)M#AeHB2kovn1v=n^D?2{2jhIQd9t|_Q+c|ZFaWt+r&#yrOu-!4pXAJuxM+Cx z*H&>eZ0v8Y`t}8{TV6smOj=__gFC=eah)mZt9gwz>>W$!>b3O;Rm^Ig*POZP8Rl0f zT~o=Nu1J|lO>}xX&#P58%Yl z83`HRs5#32Qm9mdCrMlV|NKNC+Z~ z9OB8xk5HJ>gBLi+m@(pvpw)1(OaVJKs*$Ou#@Knd#bk+V@y;YXT?)4eP9E5{J%KGtYinNYJUH9PU3A}66c>Xn zZ{Bn0<;8$WCOAL$^NqTjwM?5d=RHgw3!72WRo0c;+houoUA@HWLZM;^U$&sycWrFd zE7ekt9;kb0`lps{>R(}YnXlyGY}5pPd9zBpgXeJTY_jwaJGSJQC#-KJqmh-;ad&F- z-Y)E>!&`Rz!HtCz>%yOJ|v(u7P*I$jqEY3}(Z-orn4 zlI?CYKNl`6I){#2P1h)y(6?i;^z`N3bxTV%wNvQW+eu|x=kbj~s8rhCR*0H=iGkSj zk23lr9kr|p7#qKL=UjgO`@UnvzU)`&fI>1Qs7ubq{@+lK{hH* zvl6eSb9%yngRn^T<;jG1SVa)eA>T^XX=yUS@NCKpk?ovCW1D@!=@kn;l_BrG;hOTC z6K&H{<8K#dI(A+zw-MWxS+~{g$tI7|SfP$EYKxA}LlVO^sT#Oby^grkdZ^^lA}uEF zBSj$weBJG{+Bh@Yffzsw=HyChS(dtLE3i*}Zj@~!_T-Ay7z=B)+*~3|?w`Zd)Co2t zC&4DyB!o&YgSw+fJn6`sn$e)29`kUwAc+1MND7YjV%lO;H2}fNy>hD#=gT ze+-aFNpyKIoXY~Vq-}OWPBe?Rfu^{ps8>Xy%42r@RV#*QV~P83jdlFNgkPN=T|Kt7 zV*M`Rh*30&AWlb$;ae130e@}Tqi3zx2^JQHpM>j$6x`#{mu%tZlwx9Gj@Hc92IuY* zarmT|*d0E~vt6<+r?W^UW0&#U&)8B6+1+;k^2|FWBRP9?C4Rk)HAh&=AS8FS|NQaZ z2j!iZ)nbEyg4ZTp-zHwVlfLC~tXIrv(xrP8PAtR{*c;T24ycA-;auWsya-!kF~CWZ zw_uZ|%urXgUbc@x=L=_g@QJ@m#5beS@6W195Hn7>_}z@Xt{DIEA`A&V82bc^#!q8$ zFh?z_Vn|ozJ;NPd^5uu(9tspo8t%&-U9Ckay-s@DnM*R5rtu|4)~e)`z0P-sy?)kc zs_k&J@0&0!q4~%cKL)2l;N*T&0;mqX5T{Qy60%JtKTQZ-xb%KOcgqwJmb%MOOKk7N zgq})R_6**{8A|6H?fO+2`#QU)p$Ei2&nbj6TpLSIT^D$|`TcSeh+)}VMb}LmvZ{O| ze*1IdCt3+yhdYVxcM)Q_V0bIXLgr6~%JS<<&dxIgfL=Vnx4YHuU@I34JXA|+$_S3~ zy~X#gO_X!cSs^XM{yzDGNM>?v(+sF#<0;AH^YrE8smx<36bUsHbN#y57K8WEu(`qHvQ6cAZPo=J5C(lSmUCZ57Rj6cx!e^rfaI5%w}unz}4 zoX=nt)FVNV%QDJH`o!u9olLD4O5fl)xp+#RloZlaA92o3x4->?rB4`gS$;WO{R;Z3>cG3IgFX2EA?PK^M}@%1%A;?f6}s&CV$cIyEr#q5;yHdNZ9h{| z-=dX+a5elJoDo?Eq&Og!nN6A)5yYpnGEp}?=!C-V)(*~z-+?kY1Q7qs#Rsy%hu_60rdbB+QQNr?S1 z?;xtjUv|*E3}HmuNyB9aFL5H~3Ho0UsmuMZELp1a#CA1g`P{-mT?BchuLEtK}!QZ=3AWakRu~?f9V~3F;TV`5%9Pcs_$gq&CcU}r8gOO zC2&SWPsSG{&o-LIGTBqp6SLQZPvYKp$$7L4WRRZ0BR$Kf0I0SCFkqveCp@f)o8W)! z$%7D1R`&j7W9Q9CGus_)b%+B#J2G;l*FLz#s$hw{BHS~WNLODV#(!u_2Pe&tMsq={ zdm7>_WecWF#D=?eMjLj=-_z`aHMZ=3_-&E8;ibPmM}61i6J3is*=dKf%HC>=xbj4$ zS|Q-hWQ8T5mWde6h@;mS+?k=89?1FU<%qH9B(l&O>k|u_aD|DY*@~(`_pb|B#rJ&g zR0(~(68fpUPz6TdS@4JT5MOPrqDh5_H(eX1$P2SQrkvN8sTxwV>l0)Qq z0pzTuvtEAKRDkKGhhv^jk%|HQ1DdF%5oKq5BS>szk-CIke{%js?~%@$uaN3^Uz6Wf z_iyx{bZ(;9y4X&>LPV=L=d+A}7I4GkK0c1Xts{rrW1Q7apHf-))`BgC^0^F(>At1* za@e7{lq%yAkn*NH8Q1{@{lKhRg*^TfGvv!Sn*ed*x@6>M%aaqySxR|oNadYt1mpUZ z6H(rupHYf&Z z29$5g#|0MX#aR6TZ$@eGxxABRKakDYtD%5BmKp;HbG_ZbT+=81E&=XRk6m_3t9PvD zr5Cqy(v?gHcYvYvXkNH@S#Po~q(_7MOuCAB8G$a9BC##gw^5mW16cML=T=ERL7wsk zzNEayTG?mtB=x*wc@ifBCJ|irFVMOvH)AFRW8WE~U()QT=HBCe@s$dA9O!@`zAAT) zaOZ7l6vyR+Nk_OOF!ZlZmjoImKh)dxFbbR~z(cMhfeX1l7S_`;h|v3gI}n9$sSQ>+3@AFAy9=B_y$)q;Wdl|C-X|VV3w8 z2S#>|5dGA8^9%Bu&fhmVRrTX>Z7{~3V&0UpJNEl0=N32euvDGCJ>#6dUSi&PxFW*s zS`}TB>?}H(T2lxBJ!V#2taV;q%zd6fOr=SGHpoSG*4PDaiG0pdb5`jelVipkEk%FV zThLc@Hc_AL1#D&T4D=w@UezYNJ%0=f3iVRuVL5H?eeZM}4W*bomebEU@e2d`M<~uW zf#Bugwf`VezG|^Qbt6R_=U0}|=k;mIIakz99*>FrsQR{0aQRP6ko?5<7bkDN8evZ& zB@_KqQG?ErKL=1*ZM9_5?Pq%lcS4uLSzN(Mr5=t6xHLS~Ym`UgM@D&VNu8e?_=nSFtF$u@hpPSmI4Vo_t&v?>$~K4y(O~Rb*(MFy_igM7 z*~yYUyR6yQgzWnWMUgDov!!g=lInM+=lOmOk4L`O?{i&qxy&D*_qorRbDwj6?)!ef z#JLd7F6Z2I$S0iYI={rZNk*<{HtIl^mx=h>Cim*04K4+Z4IJtd*-)%6XV2(MCscPiw_a+y*?BKbTS@BZ3AUao^%Zi#PhoY9Vib4N>SE%4>=Jco0v zH_Miey{E;FkdlZSq)e<{`+S3W=*ttvD#hB8w=|2aV*D=yOV}(&p%0LbEWH$&@$X3x~CiF-?ejQ*N+-M zc8zT@3iwkdRT2t(XS`d7`tJQAjRmKAhiw{WOqpuvFp`i@Q@!KMhwKgsA}%@sw8Xo5Y=F zhRJZg)O4uqNWj?V&&vth*H#je6T}}p_<>!Dr#89q@uSjWv~JuW(>FqoJ5^ho0%K?E z9?x_Q;kmcsQ@5=}z@tdljMSt9-Z3xn$k)kEjK|qXS>EfuDmu(Z8|(W?gY6-l z@R_#M8=vxKMAoi&PwnaIYw2COJM@atcgfr=zK1bvjW?9B`-+Voe$Q+H$j!1$Tjn+* z&LY<%)L@;zhnJlB^Og6I&BOR-m?{IW;tyYC%FZ!&Z>kGjHJ6cqM-F z&19n+e1=9AH1VrVeHrIzqlC`w9=*zfmrerF?JMzO&|Mmv;!4DKc(sp+jy^Dx?(8>1 zH&yS_4yL7m&GWX~mdfgH*AB4{CKo;+egw=PrvkTaoBU+P-4u?E|&!c z)DKc;>$$B6u*Zr1SjUh2)FeuWLWHl5TH(UHWkf zLs>7px!c5n;rbe^lO@qlYLzlDVp(z?6rPZel=YB)Uv&n!2{+Mb$-vQl=xKw( zve&>xYx+jW_NJh!FV||r?;hdP*jOXYcLCp>DOtJ?2S^)DkM{{Eb zS$!L$e_o0(^}n3tA1R3-$SNvgBq;DOEo}fNc|tB%%#g4RA3{|euq)p+xd3I8^4E&m zFrD%}nvG^HUAIKe9_{tXB;tl|G<%>yk6R;8L2)KUJw4yHJXUOPM>(-+jxq4R;z8H#>rnJy*)8N+$wA$^F zN+H*3t)eFEgxLw+Nw3};4WV$qj&_D`%ADV2%r zJCPCo%{=z7;`F98(us5JnT(G@sKTZ^;2FVitXyLe-S5(hV&Ium+1pIUB(CZ#h|g)u zSLJJ<@HgrDiA-}V_6B^x1>c9B6%~847JkQ!^KLZ2skm;q*edo;UA)~?SghG8;QbHh z_6M;ouo_1rq9=x$<`Y@EA{C%6-pEV}B(1#sDoe_e1s3^Y>n#1Sw;N|}8D|s|VPd+g z-_$QhCz`vLxxrVMx3ape1xu3*wjx=yKSlM~nFgkNWb4?DDr*!?U)L_VeffF<+!j|b zZ$Wn2$TDv3C3V@BHpSgv3JUif8%hk%OsGZ=OxH@8&4`bbf$`aAMchl^qN>Eyu3JH} z9-S!x8-s4fE=lad%Pkp8hAs~u?|uRnL48O|;*DEU! zuS0{cpk%1E0nc__2%;apFsTm0bKtd&A0~S3Cj^?72-*Owk3V!ZG*PswDfS~}2<8le z5+W^`Y(&R)yVF*tU_s!XMcJS`;(Tr`J0%>p=Z&InR%D3@KEzzI+-2)HK zuoNZ&o=wUC&+*?ofPb0a(E6(<2Amd6%uSu_^-<1?hsxs~0K5^f(LsGqgEF^+0_H=uNk9S0bb!|O8d?m5gQjUKevPaO+*VfSn^2892K~%crWM8+6 z25@V?Y@J<9w%@NXh-2!}SK_(X)O4AM1-WTg>sj1{lj5@=q&dxE^9xng1_z9w9DK>| z6Iybcd0e zyi;Ew!KBRIfGPGytQ6}z}MeXCfLY0?9%RiyagSp_D1?N&c{ zyo>VbJ4Gy`@Fv+5cKgUgs~na$>BV{*em7PU3%lloy_aEovR+J7TfQKh8BJXyL6|P8un-Jnq(ghd!_HEOh$zlv2$~y3krgeH;9zC}V3f`uDtW(%mT#944DQa~^8ZI+zAUu4U(j0YcDfKR$bK#gvn_{JZ>|gZ5+)u?T$w7Q%F^;!Wk?G z(le7r!ufT*cxS}PR6hIVtXa)i`d$-_1KkyBU>qmgz-=T};uxx&sKgv48akIWQ89F{ z0XiY?WM^~;|T8zBOr zs#zuOONzH?svv*jokd5SK8wG>+yMC)LYL|vLqm^PMHcT=`}V$=nIRHe2?h)8WQa6O zPAU}d`1y(>kZiP~Gr=mtJLMu`i<2CspL|q2DqAgAD^7*$xzM`PU4^ga`ilE134XBQ z99P(LhHU@7qvl9Yzg$M`+dlS=x^(m-_3t|h>S}E0bcFMn=C|KamQ)=w2^e)35p`zY zRV8X?d;s^>Cof2SPR&nP3E+-LCkS0J$H!eh8~k0qo$}00b=7!H_I2O+Ro@3O$nPdm ztmbOO^B+IHzQ5w>@@@J4cKw5&^_w6s!s=H%&byAbUtczPQ7}wfTqxxtQNfn*u73Qw zGuWsrky_ajPx-5`R<)6xHf>C(oqGf_Fw|-U*GfS?xLML$kv;h_pZ@Kk$y0X(S+K80 z6^|z)*`5VUkawg}=z`S;VhZhxyDfrE0$(PMurAxl~<>lfZa>JZ288ULK7D` zl9|#L^JL}Y$j*j`0-K6kH#?bRmg#5L3iB4Z)%iF@SqT+Lp|{i`m%R-|ZE94Np7Pa5 zCqC^V3}B(FR340pmF*qaa}M}+h6}mqE~7Sh!9bDv9YRT|>vBNAqv09zXHMlcuhKD| zcjjA(b*XCIwJ33?CB!+;{)vX@9xns_b-VO{i0y?}{!sdXj1GM8+$#v>W7nw;+O_9B z_{4L;C6ol?(?W0<6taGEn1^uG=?Q3i29sE`RfYCaV$3DKc_;?HsL?D_fSYg}SuO5U zOB_f4^vZ_x%o`5|C@9C5+o=mFy@au{s)sKw!UgC&L35aH(sgDxRE2De%(%OT=VUdN ziVLEmdOvJ&5*tCMKRyXctCwQu_RH%;m*$YK&m;jtbdH#Ak~13T1^f89tn`A%QEHWs~jnY~E}p_Z$XC z=?YXLCkzVSK+Id`xZYTegb@W8_baLt-Fq`Tv|=)JPbFsKRm)4UW;yT+J`<)%#ue9DPOkje)YF2fsCilK9MIIK>p*`fkoD5nGfmLwt)!KOT+> zOFq*VZktDDyM3P5UOg`~XL#cbzC}eL%qMB=Q5$d89MKuN#$6|4gx_Jt0Gfn8w&q}%lq4QU%6#jT*MRT% zrLz~C8FYKHawn-EQWN1B75O&quS+Z81(zN)G>~vN8VwC+e+y(`>HcxC{MrJ;H1Z4k zZWuv$w_F0-Ub%MVcpIc){4PGL^I7M{>;hS?;eH!;gmcOE66z3;Z1Phqo(t zVP(Hg6q#0gIKgsg7L7WE!{Y#1nI(45tx2{$34dDd#!Z0NIyrm)HOn5W#7;f4pQci# zDW!FI(g4e668kI9{2+mLwB+=#9bfqgX%!B34V-$wwSN(_cm*^{y0jQtv*4}eO^sOV z*9xoNvX)c9isB}Tgx&ZRjp3kwhTVK?r9;n!x>^XYT z@Q^7zp{rkIs{2mUSE^2!Gf6$6;j~&4=-0cSJJDizZp6LTe8b45;{AKM%v99}{{FfC zz709%u0mC=1KXTo(=TqmZQ;c?$M3z(!xah>aywrj40sc2y3rKFw4jCq+Y+u=CH@_V zxz|qeTwa>+<|H%8Dz5u>ZI5MmjTFwXS-Fv!TDd*`>3{krWoNVx$<133`(ftS?ZPyY z&4@ah^3^i`vL$BZa>O|Nt?ucewzsF)0zX3qmM^|waXr=T0pfIb0*$AwU=?Ipl|1Y; z*Pk6{C-p4MY;j@IJ|DW>QHZQJcp;Z~?8(Q+Kk3^0qJ}SCk^*n4W zu9ZFwLHUx-$6xvaQ)SUQcYd6fF8&x)V`1bIuX@>{mE$b|Yd(qomn3;bPwnDUc0F=; zh*6_((%bqAYQWQ~odER?h>1mkL4kpb3s7`0m@rDKGU*oyF)$j~Ffd4fXV$?`f~rHf zB%Y)@5SXZvfwm10RY5X?TEo)PK_`L6qgBp=#>fO49$D zDq8Ozj0q6213tV5Qq=;fZ0$|KroY{Dz=l@lU^J)?Ko@ti20TRplXzphBi>XGx4bou zEWrkNjz0t5j!_ke{g5I#PUlEU$Km8g8TE|XK=MkU@PT4T><2OVamoK;wJ}3X0L$vX zgd7gNa359*nc)R-0!`2X@FOTB`+oETOPc=ubp5R)VQgY+5BTZZJ2?9QwnO=dnulIUF3gFn;BODC2)65)HeVd%t86sL7Rv^Y+nbn+&l z6BAJY(ETvwI)Ts$aiE8rht4KD*qNyE{8{x6R|%akbTBzw;2+6Echkt+W+`u^XX z_z&x%nNUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/templates/gradlew.mustache b/templates/gradlew.mustache new file mode 100644 index 00000000..9d0ce634 --- /dev/null +++ b/templates/gradlew.mustache @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while +APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path +[ -h "$app_path" ] +do +ls=$( ls -ld "$app_path" ) +link=${ls#*' -> '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { +echo "$*" +} >&2 + +die () { +echo +echo "$*" +echo +exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +else +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/templates/jackson_annotations.mustache b/templates/jackson_annotations.mustache new file mode 100644 index 00000000..4fbaf983 --- /dev/null +++ b/templates/jackson_annotations.mustache @@ -0,0 +1,14 @@ +{{! + If this is map and items are nullable, make sure that nulls are included. + To determine what JsonInclude.Include method to use, consider the following: + * If the field is required, always include it, even if it is null. + * Else use custom behaviour, IOW use whatever is defined on the object mapper + }} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}}) +{{#withXml}} + @JacksonXmlProperty(localName = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#isXmlAttribute}}, isAttribute = true{{/isXmlAttribute}}{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isContainer}} + @JacksonXmlElementWrapper({{#isXmlWrapped}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}", {{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}{{/isXmlWrapped}}useWrapping = {{isXmlWrapped}}) + {{/isContainer}} +{{/withXml}} \ No newline at end of file diff --git a/templates/javaBuilder.mustache b/templates/javaBuilder.mustache new file mode 100644 index 00000000..4a0e102b --- /dev/null +++ b/templates/javaBuilder.mustache @@ -0,0 +1,82 @@ +public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/parentModel}}{ + + private {{classname}} instance; + + public Builder() { + this(new {{classname}}()); + } + + protected Builder({{classname}} instance) { + {{#parentModel}} + super(instance); + {{/parentModel}} + this.instance = instance; + } + + {{#vars}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.instance.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#vendorExtensions.x-is-jackson-optional-nullable}} + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { + this.instance.{{name}} = {{name}}; + return this; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{/vars}} + +{{#parentVars}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}} + super.{{name}}({{name}}); + return this; + } + {{#vendorExtensions.x-is-jackson-optional-nullable}} + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { + this.instance.{{name}} = {{name}}; + return this; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/parentVars}} + + /** + * returns a built {{classname}} instance. + * + * The builder is not reusable. + */ + public {{classname}} build() { + try { + return this.instance; + } finally { + // ensure that this.instance is not reused{{#parentModel}} + super.build();{{/parentModel}} + this.instance = null; + } + } + + @Override + public String toString() { + return getClass() + "=(" + instance + ")"; + } + } + + /** + * Create a builder with no initialized field. + */ + public static {{classname}}.Builder builder() { + return new {{classname}}.Builder(); + } + + /** + * Create a builder with a shallow copy of this instance. + */ + public {{classname}}.Builder toBuilder() { + return new {{classname}}.Builder(){{#allVars}} + .{{name}}({{getter}}()){{/allVars}}; + } diff --git a/templates/libraries/apache-httpclient/ApiClient.mustache b/templates/libraries/apache-httpclient/ApiClient.mustache new file mode 100644 index 00000000..75fd34ae --- /dev/null +++ b/templates/libraries/apache-httpclient/ApiClient.mustache @@ -0,0 +1,1137 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JavaType; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + +import org.apache.hc.client5.http.cookie.BasicCookieStore; +import org.apache.hc.client5.http.cookie.Cookie; +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.cookie.BasicClientCookie; +import org.apache.hc.client5.http.protocol.HttpClientContext; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.HttpStatus; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.http.ParseException; +import org.apache.hc.core5.http.io.entity.ByteArrayEntity; +import org.apache.hc.core5.http.io.entity.EntityUtils; +import org.apache.hc.core5.http.io.entity.FileEntity; +import org.apache.hc.core5.http.io.entity.StringEntity; +import org.apache.hc.core5.http.io.support.ClassicRequestBuilder; +import org.apache.hc.core5.http.message.BasicNameValuePair; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.function.Supplier; +import java.util.TimeZone; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.InputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.charset.UnsupportedCharsetException; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.nio.file.Paths; +import java.lang.reflect.Type; +import java.net.URI; + +import java.text.DateFormat; + +import {{invokerPackage}}.auth.Authentication; +{{#hasHttpBasicMethods}} +import {{invokerPackage}}.auth.HttpBasicAuth; +{{/hasHttpBasicMethods}} +{{#hasHttpBearerMethods}} +import {{invokerPackage}}.auth.HttpBearerAuth; +{{/hasHttpBearerMethods}} +{{#hasApiKeyMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{/hasApiKeyMethods}} +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "{{{basePath}}}"; + protected List servers = new ArrayList({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected boolean debugging = false; + protected int connectionTimeout = 0; + + protected CloseableHttpClient httpClient; + protected ObjectMapper objectMapper; + protected String tempFolderPath = null; + + protected Map authentications; + + protected ThreadLocal lastStatusCode = new ThreadLocal<>(); + protected ThreadLocal>> lastResponseHeaders = new ThreadLocal<>(); + + protected DateFormat dateFormat; + + // Methods that can have a request body + protected static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH"); + + public ApiClient(CloseableHttpClient httpClient) { + objectMapper = new ObjectMapper(); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#joda}} + objectMapper.registerModule(new JodaModule()); + {{/joda}} + objectMapper.registerModule(new JavaTimeModule()); + {{#openApiNullable}} + objectMapper.registerModule(new JsonNullableModule()); + {{/openApiNullable}} + objectMapper.registerModule(new RFC3339JavaTimeModule()); + objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); + + dateFormat = ApiClient.buildDefaultDateFormat(); + + // Set default User-Agent. + setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + this.httpClient = httpClient; + } + + public ApiClient() { + this(HttpClients.createDefault()); + } + + public static DateFormat buildDefaultDateFormat() { + return new RFC3339DateFormat(); + } + + /** + * Returns the current object mapper used for JSON serialization/deserialization. + *

+ * Note: If you make changes to the object mapper, remember to set it back via + * setObjectMapper in order to trigger HTTP client rebuilding. + *

+ * @return Object mapper + */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + /** + * Sets the object mapper. + * + * @param objectMapper object mapper + * @return API client + */ + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + return this; + } + + public CloseableHttpClient getHttpClient() { + return httpClient; + } + + /** + * Sets the HTTP client. + * + * @param httpClient HTTP client + * @return API client + */ + public ApiClient setHttpClient(CloseableHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + public String getBasePath() { + return basePath; + } + + /** + * Sets the base path. + * + * @param basePath base path + * @return API client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + /** + * Sets the server. + * + * @param servers a list of server configuration + * @return API client + */ + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + /** + * Sets the server index. + * + * @param serverIndex server index + * @return API client + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + /** + * Sets the server variables. + * + * @param serverVariables server variables + * @return API client + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Gets the status code of the previous request + * + * @return Status code + */ + @Deprecated + public int getStatusCode() { + return lastStatusCode.get(); + } + + /** + * Gets the response headers of the previous request + * @return Response headers + */ + @Deprecated + public Map> getResponseHeaders() { + return lastResponseHeaders.get(); + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return Map of authentication + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + {{#hasHttpBearerMethods}} + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + * @return API client + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + {{/hasHttpBearerMethods}} + + {{#hasHttpBasicMethods}} + /** + * Helper method to set username for the first HTTP basic authentication. + * @param username Username + * @return API client + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password Password + * @return API client + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + {{/hasHttpBasicMethods}} + + {{#hasApiKeyMethods}} + /** + * Helper method to set API key value for the first API key authentication. + * @param apiKey the API key + * @return API client + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix API key prefix + * @return API client + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{/hasApiKeyMethods}} + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken Access token + * @return API client + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent User agent + * @return API client + */ + public final ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Set temp folder path + * @param tempFolderPath Temp folder path + * @return API client + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return API client + */ + public final ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return True if debugging is on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return API client + */ + public ApiClient setDebugging(boolean debugging) { + // TODO: implement debugging mode + this.debugging = debugging; + return this; + } + + /** + * Connect timeout (in milliseconds). + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * @param connectionTimeout Connection timeout in milliseconds + * @return API client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // Also set the date format for model (de)serialization with Date properties. + this.objectMapper.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, escapeString(parameterToString(value)))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime MIME + * @return True if MIME type is boolean + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Transforms response headers into map. + * + * @param headers HTTP headers + * @return a map of string array + */ + protected Map> transformResponseHeaders(Header[] headers) { + Map> headersMap = new HashMap<>(); + for (Header header : headers) { + List valuesList = headersMap.get(header.getName()); + if (valuesList != null) { + valuesList.add(header.getValue()); + } else { + valuesList = new ArrayList<>(); + valuesList.add(header.getValue()); + headersMap.put(header.getName(), valuesList); + } + } + return headersMap; + } + + /** + * Parse content type object from header value + */ + protected ContentType getContentType(String headerValue) throws ApiException { + try { + return ContentType.parse(headerValue); + } catch (UnsupportedCharsetException e) { + throw new ApiException("Could not parse content type " + headerValue); + } + } + + /** + * Get content type of a response or null if one was not provided + */ + protected String getResponseMimeType(HttpResponse response) throws ApiException { + Header contentTypeHeader = response.getFirstHeader("Content-Type"); + if (contentTypeHeader != null) { + return getContentType(contentTypeHeader.getValue()).getMimeType(); + } + return null; + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON is supported for now). + * @param obj Object + * @param contentType Content type + * @param formParams Form parameters + * @return Object + * @throws ApiException API exception + */ + public HttpEntity serialize(Object obj, Map formParams, ContentType contentType) throws ApiException { + String mimeType = contentType.getMimeType(); + if (isJsonMime(mimeType)) { + try { + return new StringEntity(objectMapper.writeValueAsString(obj), contentType.withCharset(StandardCharsets.UTF_8)); + } catch (JsonProcessingException e) { + throw new ApiException(e); + } + } else if (mimeType.equals(ContentType.MULTIPART_FORM_DATA.getMimeType())) { + MultipartEntityBuilder multiPartBuilder = MultipartEntityBuilder.create(); + for (Entry paramEntry : formParams.entrySet()) { + Object value = paramEntry.getValue(); + if (value instanceof File) { + multiPartBuilder.addBinaryBody(paramEntry.getKey(), (File) value); + } else if (value instanceof byte[]) { + multiPartBuilder.addBinaryBody(paramEntry.getKey(), (byte[]) value); + } else { + Charset charset = contentType.getCharset(); + if (charset != null) { + ContentType customContentType = ContentType.create(ContentType.TEXT_PLAIN.getMimeType(), charset); + multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue()), + customContentType); + } else { + multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue())); + } + } + } + return multiPartBuilder.build(); + } else if (mimeType.equals(ContentType.APPLICATION_FORM_URLENCODED.getMimeType())) { + List formValues = new ArrayList<>(); + for (Entry paramEntry : formParams.entrySet()) { + formValues.add(new BasicNameValuePair(paramEntry.getKey(), parameterToString(paramEntry.getValue()))); + } + return new UrlEncodedFormEntity(formValues, contentType.getCharset()); + } else { + // Handle files with unknown content type + if (obj instanceof File) { + return new FileEntity((File) obj, contentType); + } else if (obj instanceof byte[]) { + return new ByteArrayEntity((byte[]) obj, contentType); + } + throw new ApiException("Serialization for content type '" + contentType + "' not supported"); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param valueType Return type + * @return Deserialized object + * @throws ApiException API exception + * @throws IOException IO exception + */ + @SuppressWarnings("unchecked") + public T deserialize(CloseableHttpResponse response, TypeReference valueType) throws ApiException, IOException, ParseException { + if (valueType == null) { + return null; + } + HttpEntity entity = response.getEntity(); + Type valueRawType = valueType.getType(); + if (valueRawType.equals(byte[].class)) { + return (T) EntityUtils.toByteArray(entity); + } else if (valueRawType.equals(File.class)) { + return (T) downloadFileFromResponse(response); + } + String mimeType = getResponseMimeType(response); + if (mimeType == null || isJsonMime(mimeType)) { + // Assume json if no mime type + // convert input stream to string + String content = EntityUtils.toString(entity); + + if ("".equals(content)) { // returns null for empty body + return null; + } + + return objectMapper.readValue(content, valueType); + } else if (mimeType.toLowerCase().startsWith("text/")) { + // convert input stream to string + return (T) EntityUtils.toString(entity); + } else { + Map> responseHeaders = transformResponseHeaders(response.getHeaders()); + throw new ApiException( + "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'", + response.getCode(), + responseHeaders, + EntityUtils.toString(entity) + ); + } + } + + protected File downloadFileFromResponse(CloseableHttpResponse response) throws IOException { + Header contentDispositionHeader = response.getFirstHeader("Content-Disposition"); + String contentDisposition = contentDispositionHeader == null ? null : contentDispositionHeader.getValue(); + File file = prepareDownloadFile(contentDisposition); + Files.copy(response.getEntity().getContent(), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } + + protected File prepareDownloadFile(String contentDisposition) throws IOException { + String filename = null; + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Returns the URL of the client as defined by the server (if exists) or the base path. + * + * @return The URL for the client. + */ + public String getBaseURL() { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + return baseURL; + } + + /** + * Build full URL by concatenating base URL, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param urlQueryDeepObject URL query string of the deep object parameters + * @return The full URL + */ + protected String buildUrl(String path, List queryParams, List collectionQueryParams, String urlQueryDeepObject) { + String baseURL = getBaseURL(); + + final StringBuilder url = new StringBuilder(); + url.append(baseURL).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // query parameter value already escaped as part of parameterToPair + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + if (urlQueryDeepObject != null && urlQueryDeepObject.length() > 0) { + url.append(url.toString().contains("?") ? "&" : "?"); + url.append(urlQueryDeepObject); + } + + return url.toString(); + } + + protected boolean isSuccessfulStatus(int statusCode) { + return statusCode >= 200 && statusCode < 300; + } + + protected boolean isBodyAllowed(String method) { + return bodyMethods.contains(method); + } + + protected Cookie buildCookie(String key, String value, URI uri) { + BasicClientCookie cookie = new BasicClientCookie(key, value); + cookie.setDomain(uri.getHost()); + cookie.setPath("/"); + return cookie; + } + + protected T processResponse(CloseableHttpResponse response, TypeReference returnType) throws ApiException, IOException, ParseException { + int statusCode = response.getCode(); + lastStatusCode.set(statusCode); + if (statusCode == HttpStatus.SC_NO_CONTENT) { + return null; + } + + Map> responseHeaders = transformResponseHeaders(response.getHeaders()); + lastResponseHeaders.set(responseHeaders); + + if (isSuccessfulStatus(statusCode)) { + return this.deserialize(response, returnType); + } else { + String message = EntityUtils.toString(response.getEntity()); + throw new ApiException(message, statusCode, responseHeaders, message); + } + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param urlQueryDeepObject A URL query string for deep object parameters + * @param body The request body object - if it is not binary, otherwise null + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType Return type + * @return The response body in type of string + * @throws ApiException API exception + */ + public T invokeAPI( + String path, + String method, + List queryParams, + List collectionQueryParams, + String urlQueryDeepObject, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + TypeReference returnType) throws ApiException { + if (body != null && !formParams.isEmpty()) { + throw new ApiException("Cannot have body and form params"); + } + + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + final String url = buildUrl(path, queryParams, collectionQueryParams, urlQueryDeepObject); + + ClassicRequestBuilder builder = ClassicRequestBuilder.create(method); + builder.setUri(url); + + if (accept != null) { + builder.addHeader("Accept", accept); + } + for (Entry keyValue : headerParams.entrySet()) { + builder.addHeader(keyValue.getKey(), keyValue.getValue()); + } + for (Map.Entry keyValue : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(keyValue.getKey())) { + builder.addHeader(keyValue.getKey(), keyValue.getValue()); + } + } + + BasicCookieStore store = new BasicCookieStore(); + for (Entry keyValue : cookieParams.entrySet()) { + store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri())); + } + for (Entry keyValue : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(keyValue.getKey())) { + store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri())); + } + } + + HttpClientContext context = HttpClientContext.create(); + context.setCookieStore(store); + + ContentType contentTypeObj = getContentType(contentType); + if (body != null || !formParams.isEmpty()) { + if (isBodyAllowed(method)) { + // Add entity if we have content and a valid method + builder.setEntity(serialize(body, formParams, contentTypeObj)); + } else { + throw new ApiException("method " + method + " does not support a request body"); + } + } else { + // for empty body + builder.setEntity(new StringEntity("", contentTypeObj)); + } + + try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) { + return processResponse(response, returnType); + } catch (IOException | ParseException e) { + throw new ApiException(e); + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams Query parameters + * @param headerParams Header parameters + * @param cookieParams Cookie parameters + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } +} diff --git a/templates/libraries/apache-httpclient/BaseApi.mustache b/templates/libraries/apache-httpclient/BaseApi.mustache new file mode 100644 index 00000000..f046b199 --- /dev/null +++ b/templates/libraries/apache-httpclient/BaseApi.mustache @@ -0,0 +1,111 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.Collections; +import java.util.Map; + +{{>generatedAnnotation}} + +public abstract class BaseApi { + + protected ApiClient apiClient; + + public BaseApi() { + this(Configuration.getDefaultApiClient()); + } + + public BaseApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @throws ApiException if fails to make API call. + */ + public void invokeAPI(String url, String method) throws ApiException { + invokeAPI(url, method, null, null, Collections.emptyMap()); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param additionalHeaders Additional headers for the request. + * @throws ApiException if fails to make API call. + */ + public void invokeAPI(String url, String method, Map additionalHeaders) throws ApiException { + invokeAPI(url, method, null, null, additionalHeaders); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @throws ApiException if fails to make API call. + */ + public void invokeAPI(String url, String method, Object request) throws ApiException { + invokeAPI(url, method, request, null, Collections.emptyMap()); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @param additionalHeaders Additional headers for the request. + * @throws ApiException if fails to make API call. + */ + public void invokeAPI(String url, String method, Object request, Map additionalHeaders) throws ApiException { + invokeAPI(url, method, request, null, additionalHeaders); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param returnType The return type. + * @return The API response in the specified type. + * @throws ApiException if fails to make API call. + */ + public T invokeAPI(String url, String method, TypeReference returnType) throws ApiException { + return invokeAPI(url, method, null, returnType, Collections.emptyMap()); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @param returnType The return type. + * @return The API response in the specified type. + * @throws ApiException if fails to make API call. + */ + public T invokeAPI(String url, String method, Object request, TypeReference returnType) throws ApiException { + return invokeAPI(url, method, request, returnType, Collections.emptyMap()); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @param returnType The return type. + * @param additionalHeaders Additional headers for the request. + * @return The API response in the specified type. + * @throws ApiException if fails to make API call. + */ + public abstract T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException; +} diff --git a/templates/libraries/apache-httpclient/README.mustache b/templates/libraries/apache-httpclient/README.mustache new file mode 100644 index 00000000..b50e7db0 --- /dev/null +++ b/templates/libraries/apache-httpclient/README.mustache @@ -0,0 +1,209 @@ +# {{artifactId}} + +{{appName}} + +- API version: {{appVersion}} +{{^hideGenerationTimestamp}} + +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} + +- Generator version: {{generatorVersion}} + +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import {{{invokerPackage}}}.*; +import {{{invokerPackage}}}.auth.*; +import {{{modelPackage}}}.*; +import {{{package}}}.{{{classname}}}; + +public class {{{classname}}}Example { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}}{{#isHttpSignature}} + // Configure HTTP signature authorization: {{{name}}} + HttpSignatureAuth {{{name}}} = (HttpSignatureAuth) defaultClient.getAuthentication("{{{name}}}"); + // All the HTTP signature parameters below should be customized to your environment. + // Configure the keyId + {{{name}}}.setKeyId("YOUR KEY ID"); + // Configure the signature algorithm + {{{name}}}.setSigningAlgorithm(SigningAlgorithm.HS2019); + // Configure the specific cryptographic algorithm + {{{name}}}.setAlgorithm(Algorithm.ECDSA_SHA256); + // Configure the cryptographic algorithm parameters, if applicable + {{{name}}}.setAlgorithmParameterSpec(null); + // Set the cryptographic digest algorithm. + {{{name}}}.setDigestAlgorithm("SHA-256"); + // Set the HTTP headers that should be included in the HTTP signature. + {{{name}}}.setHeaders(Arrays.asList("date", "host")); + // Set the private key used to sign the HTTP messages + {{{name}}}.setPrivateKey();{{/isHttpSignature}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation for Models + +{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) +{{/model}}{{/models}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}} + +- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}} + +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} + +- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}} + +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/apache-httpclient/api.mustache b/templates/libraries/apache-httpclient/api.mustache new file mode 100644 index 00000000..a11a0367 --- /dev/null +++ b/templates/libraries/apache-httpclient/api.mustache @@ -0,0 +1,244 @@ +{{>licenseInfo}} +package {{package}}; + +import com.fasterxml.jackson.core.type.TypeReference; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.BaseApi; +import {{invokerPackage}}.Configuration; +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} +import {{invokerPackage}}.Pair; + +{{#imports}}import {{import}}; +{{/imports}} + + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringJoiner; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} extends BaseApi { + + public {{classname}}() { + super(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + super(apiClient); + } + + {{#operation}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}Collections.emptyMap()); + } + + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + * @param additionalHeaders additionalHeaders for this call + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}Map additionalHeaders) throws ApiException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}}{{/allParams}} + // create path and map variables + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString(apiClient.parameterToString({{{paramName}}}))){{/pathParams}}; + + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + {{#queryParams}} + {{#isDeepObject}} + localVarQueryParameterBaseName = "{{{baseName}}}"; + {{#isArray}} + for (int i=0; i < {{paramName}}.size(); i++) { + localVarQueryStringJoiner.add({{paramName}}.get(i).toUrlQueryString(String.format("{{baseName}}[%d]", i))); + } + {{/isArray}} + {{^isArray}} + localVarQueryStringJoiner.add({{paramName}}.toUrlQueryString("{{baseName}}")); + {{/isArray}} + {{/isDeepObject}} + {{^isDeepObject}} + {{#isExplode}} + {{#hasVars}} + {{#vars}} + {{#isArray}} + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{^isArray}} + localVarQueryParams.addAll(apiClient.parameterToPair("{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{/vars}} + {{/hasVars}} + {{^hasVars}} + {{#isModel}} + localVarQueryStringJoiner.add({{paramName}}.toUrlQueryString()); + {{/isModel}} + {{^isModel}} + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/isModel}} + {{/hasVars}} + {{/isExplode}} + {{^isExplode}} + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/isExplode}} + {{/isDeepObject}} + {{/queryParams}} + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/headerParams}} + + localVarHeaderParams.putAll(additionalHeaders); + + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + + {{#formParams}}if ({{paramName}} != null) + localVarFormParams.put("{{baseName}}", {{paramName}}); + {{/formParams}} + + final String[] localVarAccepts = { + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}} + TypeReference<{{{returnType}}}> localVarReturnType = new TypeReference<{{{returnType}}}>() {}; + return apiClient.invokeAPI( + {{/returnType}} + {{^returnType}} + apiClient.invokeAPI( + {{/returnType}} + localVarPath, + "{{httpMethod}}", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}} + ); + } + + {{#-last}} + @Override + public T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException { + String localVarPath = url.replace(apiClient.getBaseURL(), ""); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarHeaderParams.putAll(additionalHeaders); + + final String[] localVarAccepts = { + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + return apiClient.invokeAPI( + localVarPath, + method, + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + request, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + returnType + ); + } + {{/-last}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/apache-httpclient/api_test.mustache b/templates/libraries/apache-httpclient/api_test.mustache new file mode 100644 index 00000000..05b2bf9f --- /dev/null +++ b/templates/libraries/apache-httpclient/api_test.mustache @@ -0,0 +1,57 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{/summary}} + {{#notes}} + * {{notes}} + * + {{/notes}} + * @throws ApiException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/apache-httpclient/build.gradle.mustache b/templates/libraries/apache-httpclient/build.gradle.mustache new file mode 100644 index 00000000..7a2ea073 --- /dev/null +++ b/templates/libraries/apache-httpclient/build.gradle.mustache @@ -0,0 +1,145 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } + + task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } +} + +ext { + swagger_annotations_version = "1.6.6" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + httpclient_version = "5.1.3" + jodatime_version = "2.9.9" + junit_version = "4.13.2" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.apache.httpcomponents.client5:httpclient5:$httpclient_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "junit:junit:$junit_version" +} diff --git a/templates/libraries/apache-httpclient/pom.mustache b/templates/libraries/apache-httpclient/pom.mustache new file mode 100644 index 00000000..3a506ca3 --- /dev/null +++ b/templates/libraries/apache-httpclient/pom.mustache @@ -0,0 +1,369 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + + org.apache.httpcomponents.client5 + httpclient5 + ${httpclient-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{^useJakartaEe}} + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#useJakartaEe}} + + com.fasterxml.jackson.jakarta.rs + jackson-jakarta-rs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + 5.4.3.Final + + {{/performBeanValidation}} + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 5.2.1 + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + 5.10.2 + + diff --git a/templates/libraries/feign/ApiClient.mustache b/templates/libraries/feign/ApiClient.mustache new file mode 100644 index 00000000..077e7099 --- /dev/null +++ b/templates/libraries/feign/ApiClient.mustache @@ -0,0 +1,386 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; + +{{#jackson}} +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +{{/jackson}} +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +{{#jackson}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{/jackson}} + +import feign.Feign; +import feign.RequestInterceptor; +import feign.form.FormEncoder; +{{#jackson}} +import feign.jackson.JacksonDecoder; +import feign.jackson.JacksonEncoder; +{{/jackson}} +{{#gson}} +import feign.gson.GsonDecoder; +import feign.gson.GsonEncoder; +{{/gson}} +import feign.slf4j.Slf4jLogger; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#jackson}} +import {{invokerPackage}}.ApiResponseDecoder; +{{/jackson}} + +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.ApiErrorDecoder; +import {{invokerPackage}}.auth.OAuth; +import {{invokerPackage}}.auth.OAuth.AccessTokenListener; +import {{invokerPackage}}.auth.OAuthFlow; +import {{invokerPackage}}.auth.OauthPasswordGrant; +import {{invokerPackage}}.auth.OauthClientCredentialsGrant; +import feign.Retryer; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +public class ApiClient { + protected static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + public interface Api {} + + {{#jackson}} + protected ObjectMapper objectMapper; + {{/jackson}} + protected String basePath = "{{{basePath}}}"; + protected Map apiAuthorizations; + protected Feign.Builder feignBuilder; + + public ApiClient() { + apiAuthorizations = new LinkedHashMap(); + {{#jackson}} + objectMapper = createObjectMapper(); + feignBuilder = Feign.builder() + .encoder(new FormEncoder(new JacksonEncoder(objectMapper))) + .decoder(new ApiResponseDecoder(objectMapper)) + {{#hasOAuthMethods}} + .errorDecoder(new ApiErrorDecoder()) + .retryer(new Retryer.Default(0, 0, 2)) + {{/hasOAuthMethods}} + .logger(new Slf4jLogger()); + {{/jackson}} + {{#gson}} + feignBuilder = Feign.builder() + .encoder(new FormEncoder(new GsonEncoder())) + .decoder(new GsonDecoder()) + {{#hasOAuthMethods}} + .errorDecoder(new ApiErrorDecoder()) + .retryer(new Retryer.Default(0, 0, 2)) + {{/hasOAuthMethods}} + .logger(new Slf4jLogger()); + {{/gson}} + } + + public ApiClient(String[] authNames) { + this(); + for(String authName : authNames) { + log.log(Level.FINE, "Creating authentication {0}", authName); + {{#hasAuthMethods}} + RequestInterceptor auth = null; + {{#authMethods}}if ("{{name}}".equals(authName)) { + {{#isBasicBasic}} + auth = new HttpBasicAuth(); + {{/isBasicBasic}} + {{#isBasicBearer}} + auth = new HttpBearerAuth("{{scheme}}"); + {{/isBasicBearer}} + {{#isApiKey}} + auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); + {{/isApiKey}} + {{#isOAuth}} + auth = buildOauthRequestInterceptor(OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, "{{{authorizationUrl}}}", "{{{tokenUrl}}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); + {{/isOAuth}} + } else {{/authMethods}}{ + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + } + if (auth != null) { + addAuthorization(authName, auth); + } + {{/hasAuthMethods}} + {{^hasAuthMethods}} + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + {{/hasAuthMethods}} + } + } + + /** + * Basic constructor for single auth name + * @param authName + */ + public ApiClient(String authName) { + this(new String[]{authName}); + } + + /** + * Helper constructor for single api key + * @param authName + * @param apiKey + */ + public ApiClient(String authName, String apiKey) { + this(authName); + this.setApiKey(apiKey); + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + public Map getApiAuthorizations() { + return apiAuthorizations; + } + + public void setApiAuthorizations(Map apiAuthorizations) { + this.apiAuthorizations = apiAuthorizations; + } + + public Feign.Builder getFeignBuilder() { + return feignBuilder; + } + + public ApiClient setFeignBuilder(Feign.Builder feignBuilder) { + this.feignBuilder = feignBuilder; + return this; + } + + {{#jackson}} + protected ObjectMapper createObjectMapper() { + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#failOnUnknownProperties}} + objectMapper.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.setDateFormat(new RFC3339DateFormat()); + {{#joda}} + objectMapper.registerModule(new JodaModule()); + {{/joda}} + objectMapper.registerModule(new JavaTimeModule()); + objectMapper.registerModule(new RFC3339JavaTimeModule()); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + objectMapper.registerModule(jnm); + {{/openApiNullable}} + return objectMapper; + } + {{/jackson}} + + {{#hasOAuthMethods}} + protected RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { + switch (flow) { + case PASSWORD: + return new OauthPasswordGrant(tokenUrl, scopes); + case APPLICATION: + return new OauthClientCredentialsGrant(authorizationUrl, tokenUrl, scopes); + default: + throw new RuntimeException("Oauth flow \"" + flow + "\" is not implemented"); + } + } + + {{/hasOAuthMethods}} + + {{#jackson}} + public ObjectMapper getObjectMapper(){ + return objectMapper; + } + + public void setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + } + {{/jackson}} + + /** + * Creates a feign client for given API interface. + * + * Usage: + * ApiClient apiClient = new ApiClient(); + * apiClient.setBasePath("http://localhost:8080"); + * XYZApi api = apiClient.buildClient(XYZApi.class); + * XYZResponse response = api.someMethod(...); + * @param Type + * @param clientClass Client class + * @return The Client + */ + public T buildClient(Class clientClass) { + return feignBuilder.target(clientClass, basePath); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) return null; + if (StringUtil.containsIgnoreCase(accepts, "application/json")) return "application/json"; + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) return "application/json"; + if (StringUtil.containsIgnoreCase(contentTypes, "application/json")) return "application/json"; + return contentTypes[0]; + } + + /** + * Helper method to configure the bearer token. + * @param bearerToken the bearer token. + */ + public void setBearerToken(String bearerToken) { + HttpBearerAuth apiAuthorization = getAuthorization(HttpBearerAuth.class); + apiAuthorization.setBearerToken(bearerToken); + } + + /** + * Helper method to configure the supplier of bearer tokens. + * @param tokenSupplier the supplier of bearer tokens. + */ + public void setBearerToken(Supplier tokenSupplier) { + HttpBearerAuth apiAuthorization = getAuthorization(HttpBearerAuth.class); + apiAuthorization.setBearerToken(tokenSupplier); + } + + /** + * Helper method to configure the first api key found + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + ApiKeyAuth apiAuthorization = getAuthorization(ApiKeyAuth.class); + apiAuthorization.setApiKey(apiKey); + } + + /** + * Helper method to configure the username/password for basic auth + * @param username Username + * @param password Password + */ + public void setCredentials(String username, String password) { + HttpBasicAuth apiAuthorization = getAuthorization(HttpBasicAuth.class); + apiAuthorization.setCredentials(username, password); + } + + {{#hasOAuthMethods}} + /** + * Helper method to configure the client credentials for Oauth + * @param clientId Client ID + * @param clientSecret Client secret + */ + public void setClientCredentials(String clientId, String clientSecret) { + OauthClientCredentialsGrant authorization = getAuthorization(OauthClientCredentialsGrant.class); + authorization.configure(clientId, clientSecret); + } + + /** + * Helper method to configure the username/password for Oauth password grant + * @param username Username + * @param password Password + * @param clientId Client ID + * @param clientSecret Client secret + */ + public void setOauthPassword(String username, String password, String clientId, String clientSecret) { + OauthPasswordGrant apiAuthorization = getAuthorization(OauthPasswordGrant.class); + apiAuthorization.configure(username, password, clientId, clientSecret); + } + + /** + * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) + * @param accessToken Access Token + * @param expiresIn Validity period in seconds + */ + public void setAccessToken(String accessToken, Integer expiresIn) { + OAuth apiAuthorization = getAuthorization(OAuth.class); + apiAuthorization.setAccessToken(accessToken, expiresIn); + } + + /** + * Helper method to configure the oauth accessCode/implicit flow parameters + * @param clientId Client ID + * @param clientSecret Client secret + * @param redirectURI Redirect URI + */ + public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { + throw new RuntimeException("Not implemented"); + } + + /** + * Configures a listener which is notified when a new access token is received. + * @param accessTokenListener Access token listener + */ + public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + OAuth apiAuthorization = getAuthorization(OAuth.class); + apiAuthorization.registerAccessTokenListener(accessTokenListener); + } + + {{/hasOAuthMethods}} + /** + * Gets request interceptor based on authentication name + * @param authName Authentication name + * @return Request Interceptor + */ + public RequestInterceptor getAuthorization(String authName) { + return apiAuthorizations.get(authName); + } + + /** + * Adds an authorization to be used by the client + * @param authName Authentication name + * @param authorization Request interceptor + */ + public void addAuthorization(String authName, RequestInterceptor authorization) { + if (apiAuthorizations.containsKey(authName)) { + throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); + } + apiAuthorizations.put(authName, authorization); + feignBuilder.requestInterceptor(authorization); + } + + protected T getAuthorization(Class type) { + return (T) apiAuthorizations.values() + .stream() + .filter(requestInterceptor -> type.isAssignableFrom(requestInterceptor.getClass())) + .findFirst() + .orElseThrow(() -> new RuntimeException("No Oauth authentication or OAuth configured!")); + } +} diff --git a/templates/libraries/feign/ApiResponseDecoder.mustache b/templates/libraries/feign/ApiResponseDecoder.mustache new file mode 100644 index 00000000..9062b648 --- /dev/null +++ b/templates/libraries/feign/ApiResponseDecoder.mustache @@ -0,0 +1,39 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.databind.ObjectMapper; +import feign.Response; +import feign.Types; +import feign.jackson.JacksonDecoder; + +import java.io.IOException; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; + +import {{modelPackage}}.ApiResponse; + +public class ApiResponseDecoder extends JacksonDecoder { + + public ApiResponseDecoder(ObjectMapper mapper) { + super(mapper); + } + + @Override + public Object decode(Response response, Type type) throws IOException { + //Detects if the type is an instance of the parameterized class ApiResponse + if (type instanceof ParameterizedType && Types.getRawType(type).isAssignableFrom(ApiResponse.class)) { + //The ApiResponse class has a single type parameter, the Dto class itself + Type responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0]; + Object body = super.decode(response, responseBodyType); + Map> responseHeaders = Collections.unmodifiableMap(response.headers()); + return new ApiResponse<>(response.status(), responseHeaders, body); + } else { + //The response is not encapsulated in the ApiResponse, decode the Dto as normal + return super.decode(response, type); + } + } +} diff --git a/templates/libraries/feign/EncodingUtils.mustache b/templates/libraries/feign/EncodingUtils.mustache new file mode 100644 index 00000000..2312fc63 --- /dev/null +++ b/templates/libraries/feign/EncodingUtils.mustache @@ -0,0 +1,88 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** +* Utilities to support Swagger encoding formats in Feign. +*/ +public final class EncodingUtils { + + /** + * Private constructor. Do not construct this class. + */ + private EncodingUtils() {} + + /** + *

Encodes a collection of query parameters according to the Swagger + * collection format.

+ * + *

Of the various collection formats defined by Swagger ("csv", "tsv", + * etc), Feign only natively supports "multi". This utility generates the + * other format types so it will be properly processed by Feign.

+ * + *

Note, as part of reformatting, it URL encodes the parameters as + * well.

+ * @param parameters The collection object to be formatted. This object will + * not be changed. + * @param collectionFormat The Swagger collection format (eg, "csv", "tsv", + * "pipes"). See the + * + * OpenAPI Spec for more details. + * @return An object that will be correctly formatted by Feign. + */ + public static Object encodeCollection(Collection parameters, + String collectionFormat) { + if (parameters == null) { + return parameters; + } + List stringValues = new ArrayList<>(parameters.size()); + for (Object parameter : parameters) { + // ignore null values (same behavior as Feign) + if (parameter != null) { + stringValues.add(encode(parameter)); + } + } + // Feign natively handles single-element lists and the "multi" format. + if (stringValues.size() < 2 || "multi".equals(collectionFormat)) { + return stringValues; + } + // Otherwise return a formatted String + String[] stringArray = stringValues.toArray(new String[0]); + switch (collectionFormat) { + case "csv": + default: + return StringUtil.join(stringArray, ","); + case "ssv": + return StringUtil.join(stringArray, " "); + case "tsv": + return StringUtil.join(stringArray, "\t"); + case "pipes": + return StringUtil.join(stringArray, "|"); + } + } + + /** + * URL encode a single query parameter. + * @param parameter The query parameter to encode. This object will not be + * changed. + * @return The URL encoded string representation of the parameter. If the + * parameter is null, returns null. + */ + public static String encode(Object parameter) { + if (parameter == null) { + return null; + } + try { + return URLEncoder.encode(parameter.toString(), "UTF-8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } +} diff --git a/templates/libraries/feign/ParamExpander.mustache b/templates/libraries/feign/ParamExpander.mustache new file mode 100644 index 00000000..88f0ae22 --- /dev/null +++ b/templates/libraries/feign/ParamExpander.mustache @@ -0,0 +1,24 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import feign.Param; + +import java.text.DateFormat; +import java.util.Date; + +/** + * Param Expander to convert {@link Date} to RFC3339 + */ +public class ParamExpander implements Param.Expander { + + private static final DateFormat dateformat = new RFC3339DateFormat(); + + @Override + public String expand(Object value) { + if (value instanceof Date) { + return dateformat.format(value); + } + return value.toString(); + } +} diff --git a/templates/libraries/feign/README.mustache b/templates/libraries/feign/README.mustache new file mode 100644 index 00000000..c3d94874 --- /dev/null +++ b/templates/libraries/feign/README.mustache @@ -0,0 +1,77 @@ +# {{artifactId}} + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + {{groupId}} + {{artifactId}} + {{artifactVersion}} + compile + + +``` + +And to use the api you can follow the examples below: + +```java + + //Set bearer token manually + ApiClient apiClient = new ApiClient("petstore_auth_client"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setAccessToken("TOKEN", 10000); + + //Use api key + ApiClient apiClient = new ApiClient("api_key", "API KEY"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + + //Use http basic authentication + ApiClient apiClient = new ApiClient("basicAuth"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setCredentials("username", "password"); + + //Oauth password + ApiClient apiClient = new ApiClient("oauth_password"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); + + //Oauth client credentials flow + ApiClient apiClient = new ApiClient("oauth_client_credentials"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setClientCredentials("client_id", "client_secret"); + + PetApi petApi = apiClient.buildClient(PetApi.class); + Pet petById = petApi.getPetById(12345L); + + System.out.println(petById); + } +``` + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/feign/additional_properties.mustache b/templates/libraries/feign/additional_properties.mustache new file mode 100644 index 00000000..8e718279 --- /dev/null +++ b/templates/libraries/feign/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/feign/api.mustache b/templates/libraries/feign/api.mustache new file mode 100644 index 00000000..0ec95e7a --- /dev/null +++ b/templates/libraries/feign/api.mustache @@ -0,0 +1,194 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.EncodingUtils; +{{#legacyDates}} +import {{invokerPackage}}.ParamExpander; +{{/legacyDates}} +import {{modelPackage}}.ApiResponse; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +import feign.*; + +{{>generatedAnnotation}} + +public interface {{classname}} extends ApiClient.Api { + +{{#operations}}{{#operation}} + /** + * {{summary}} + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} +{{/allParams}} +{{#returnType}} + * @return {{.}} +{{/returnType}} +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ +{{#isDeprecated}} + @Deprecated +{{/isDeprecated}} + @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") + @Headers({ +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, + {{/-last}}{{/headerParams}} + }) + {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^isFormParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isFormParam}}{{#isFormParam}}@Param("{{baseName}}") {{/isFormParam}}{{/isBodyParam}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + /** + * {{summary}} + * Similar to {{operationId}} but it also returns the http response headers . + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} +{{/allParams}} +{{#returnType}} + * @return A ApiResponse that wraps the response boyd and the http headers. +{{/returnType}} +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ +{{#isDeprecated}} + @Deprecated +{{/isDeprecated}} + @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") + @Headers({ +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, + {{/-last}}{{/headerParams}} + }) + ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{nickname}}WithHttpInfo({{#allParams}}{{^isBodyParam}}{{^isFormParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isFormParam}}{{#isFormParam}}@Param("{{baseName}}") {{/isFormParam}}{{/isBodyParam}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + + {{#hasQueryParams}} + /** + * {{summary}} + * {{notes}} + * Note, this is equivalent to the other {{operationId}} method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link {{operationIdCamelCase}}QueryParams} class that allows for + * building up this map in a fluent style. + {{#allParams}} + {{^isQueryParam}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/isQueryParam}} + {{/allParams}} + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + {{#queryParams}} + *
  • {{paramName}} - {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
  • + {{/queryParams}} + *
+ {{#returnType}} + * @return {{.}} + {{/returnType}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") + @Headers({ +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, + {{/-last}}{{/headerParams}} + }) + {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^isFormParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isFormParam}}{{#isFormParam}}@Param("{{baseName}}") {{/isFormParam}}{{/isBodyParam}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) {{operationIdCamelCase}}QueryParams queryParams); + + /** + * {{summary}} + * {{notes}} + * Note, this is equivalent to the other {{operationId}} that receives the query parameters as a map, + * but this one also exposes the Http response headers + {{#allParams}} + {{^isQueryParam}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/isQueryParam}} + {{/allParams}} + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + {{#queryParams}} + *
  • {{paramName}} - {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
  • + {{/queryParams}} + *
+ {{#returnType}} + * @return {{.}} + {{/returnType}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") + @Headers({ + {{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", + {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, + {{/-last}}{{/headerParams}} + }) + ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{nickname}}WithHttpInfo({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^isFormParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isFormParam}}{{#isFormParam}}@Param("{{baseName}}") {{/isFormParam}}{{/isBodyParam}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) {{operationIdCamelCase}}QueryParams queryParams); + + + /** + * A convenience class for generating query parameters for the + * {{operationId}} method in a fluent style. + */ + public static class {{operationIdCamelCase}}QueryParams extends HashMap { + {{#queryParams}} + public {{operationIdCamelCase}}QueryParams {{paramName}}({{>nullable_var_annotations}} final {{{dataType}}} value) { + {{#collectionFormat}} + put("{{baseName}}", EncodingUtils.encodeCollection(value, "{{collectionFormat}}")); + {{/collectionFormat}} + {{^collectionFormat}} + put("{{baseName}}", EncodingUtils.encode(value)); + {{/collectionFormat}} + return this; + } + {{/queryParams}} + } + {{/hasQueryParams}} + {{/operation}} +{{/operations}} +} diff --git a/templates/libraries/feign/api_test.mustache b/templates/libraries/feign/api_test.mustache new file mode 100644 index 00000000..62521123 --- /dev/null +++ b/templates/libraries/feign/api_test.mustache @@ -0,0 +1,75 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +class {{classname}}Test { + + private {{classname}} api; + + @BeforeEach + public void setup() { + api = new ApiClient().buildClient({{classname}}.class); + } + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + */ + @Test + void {{operationId}}Test() { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + + {{#hasQueryParams}} + /** + * {{summary}} + * + * {{notes}} + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ + @Test + void {{operationId}}TestQueryMap() { + {{#allParams}} + {{^isQueryParam}} + {{{dataType}}} {{paramName}} = null; + {{/isQueryParam}} + {{/allParams}} + {{classname}}.{{operationIdCamelCase}}QueryParams queryParams = new {{classname}}.{{operationIdCamelCase}}QueryParams() + {{#queryParams}} + .{{paramName}}(null){{#-last}};{{/-last}} + {{/queryParams}} + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{^isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/allParams}}queryParams); + + // TODO: test validations + } + {{/hasQueryParams}} + {{/operation}}{{/operations}} +} diff --git a/templates/libraries/feign/auth/ApiErrorDecoder.mustache b/templates/libraries/feign/auth/ApiErrorDecoder.mustache new file mode 100644 index 00000000..aeea7f97 --- /dev/null +++ b/templates/libraries/feign/auth/ApiErrorDecoder.mustache @@ -0,0 +1,29 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.util.Date; + +import feign.Response; +import feign.RetryableException; +import feign.codec.ErrorDecoder; + +/** + * Error decoder that makes the HTTP 401 and 403 Retryable. Sometimes the 401 or 403 may indicate an expired token + * All the other HTTP status are handled by the {@link feign.codec.ErrorDecoder.Default} decoder + */ +public class ApiErrorDecoder implements ErrorDecoder { + + private final Default defaultErrorDecoder = new Default(); + + @Override + public Exception decode(String methodKey, Response response) { + //401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + Exception httpException = defaultErrorDecoder.decode(methodKey, response); + if (response.status() == 401 || response.status() == 403) { + return new RetryableException(response.status(), "Received status " + response.status() + " trying to renew access token", + response.request().httpMethod(), httpException, (Date) null, response.request()); + } + return httpException; + } +} \ No newline at end of file diff --git a/templates/libraries/feign/auth/ApiKeyAuth.mustache b/templates/libraries/feign/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..bf7e32c1 --- /dev/null +++ b/templates/libraries/feign/auth/ApiKeyAuth.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; + +public class ApiKeyAuth implements RequestInterceptor { + private final String location; + private final String paramName; + + private String apiKey; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + @Override + public void apply(RequestTemplate template) { + if ("query".equals(location)) { + template.query(paramName, apiKey); + } else if ("header".equals(location)) { + template.header(paramName, apiKey); + } else if ("cookie".equals(location)) { + template.header("Cookie", String.format("%s=%s", paramName, apiKey)); + } + } +} diff --git a/templates/libraries/feign/auth/DefaultApi20Impl.mustache b/templates/libraries/feign/auth/DefaultApi20Impl.mustache new file mode 100644 index 00000000..9fee98bd --- /dev/null +++ b/templates/libraries/feign/auth/DefaultApi20Impl.mustache @@ -0,0 +1,50 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor; +import com.github.scribejava.core.extractors.TokenExtractor; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth2.bearersignature.BearerSignature; +import com.github.scribejava.core.oauth2.bearersignature.BearerSignatureURIQueryParameter; +import com.github.scribejava.core.oauth2.clientauthentication.ClientAuthentication; +import com.github.scribejava.core.oauth2.clientauthentication.RequestBodyAuthenticationScheme; + +{{>generatedAnnotation}} + +public class DefaultApi20Impl extends DefaultApi20 { + + private final String accessTokenEndpoint; + private final String authorizationBaseUrl; + + protected DefaultApi20Impl(String authorizationBaseUrl, String accessTokenEndpoint) { + this.authorizationBaseUrl = authorizationBaseUrl; + this.accessTokenEndpoint = accessTokenEndpoint; + } + + @Override + public String getAccessTokenEndpoint() { + return accessTokenEndpoint; + } + + @Override + protected String getAuthorizationBaseUrl() { + return authorizationBaseUrl; + } + + @Override + public BearerSignature getBearerSignature() { + return BearerSignatureURIQueryParameter.instance(); + } + + @Override + public ClientAuthentication getClientAuthentication() { + return RequestBodyAuthenticationScheme.instance(); + } + + @Override + public TokenExtractor getAccessTokenExtractor() { + return OAuth2AccessTokenJsonExtractor.instance(); + } +} \ No newline at end of file diff --git a/templates/libraries/feign/auth/HttpBasicAuth.mustache b/templates/libraries/feign/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..d95589b6 --- /dev/null +++ b/templates/libraries/feign/auth/HttpBasicAuth.mustache @@ -0,0 +1,43 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; +import feign.auth.BasicAuthRequestInterceptor; + +/** + * An interceptor that adds the request header needed to use HTTP basic authentication. + */ +public class HttpBasicAuth implements RequestInterceptor { + + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setCredentials(String username, String password) { + this.username = username; + this.password = password; + } + + @Override + public void apply(RequestTemplate template) { + RequestInterceptor requestInterceptor = new BasicAuthRequestInterceptor(username, password); + requestInterceptor.apply(template); + } +} diff --git a/templates/libraries/feign/auth/HttpBearerAuth.mustache b/templates/libraries/feign/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..466c1b2a --- /dev/null +++ b/templates/libraries/feign/auth/HttpBearerAuth.mustache @@ -0,0 +1,61 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; +import java.util.Optional; +import java.util.function.Supplier; + +/** + * An interceptor that adds the request header needed to use HTTP bearer authentication. + */ +public class HttpBearerAuth implements RequestInterceptor { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void apply(RequestTemplate template) { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + template.header("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/feign/auth/OAuth.mustache b/templates/libraries/feign/auth/OAuth.mustache new file mode 100644 index 00000000..1baa48c1 --- /dev/null +++ b/templates/libraries/feign/auth/OAuth.mustache @@ -0,0 +1,99 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth.OAuth20Service; +import feign.RequestInterceptor; +import feign.RequestTemplate; + +import java.util.Collection; + +{{>generatedAnnotation}} + +public abstract class OAuth implements RequestInterceptor { + + //https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4 + static final int LEEWAY_SECONDS = 10; + + static final int MILLIS_PER_SECOND = 1000; + + public interface AccessTokenListener { + void notify(OAuth2AccessToken token); + } + + private volatile String accessToken; + private Long expirationTimeSeconds; + private AccessTokenListener accessTokenListener; + + protected OAuth20Service service; + protected String scopes; + protected String authorizationUrl; + protected String tokenUrl; + + public OAuth(String authorizationUrl, String tokenUrl, String scopes) { + this.scopes = scopes; + this.authorizationUrl = authorizationUrl; + this.tokenUrl = tokenUrl; + } + + @Override + public void apply(RequestTemplate template) { + // If the request already have an authorization (eg. Basic auth), do nothing + if (requestContainsNonOauthAuthorization(template)) { + return; + } + String accessToken = getAccessToken(); + if (accessToken != null) { + template.removeHeader("Authorization"); + template.header("Authorization", "Bearer " + accessToken); + } + } + + private boolean requestContainsNonOauthAuthorization(RequestTemplate template) { + Collection authorizations = template.headers().get("Authorization"); + if (authorizations == null) { + return false; + } + return !authorizations.stream() + .anyMatch(authHeader -> !authHeader.equalsIgnoreCase("Bearer")); + } + + private synchronized void updateAccessToken() { + OAuth2AccessToken accessTokenResponse; + accessTokenResponse = getOAuth2AccessToken(); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn()); + if (accessTokenListener != null) { + accessTokenListener.notify(accessTokenResponse); + } + } + } + + abstract OAuth2AccessToken getOAuth2AccessToken(); + + abstract OAuthFlow getFlow(); + + public synchronized void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + this.accessTokenListener = accessTokenListener; + } + + public synchronized String getAccessToken() { + // If first time, get the token + if (expirationTimeSeconds == null || System.currentTimeMillis() >= expirationTimeSeconds * MILLIS_PER_SECOND) { + updateAccessToken(); + } + return accessToken; + } + + /** + * Manually sets the access token + * @param accessToken The access token + * @param expiresIn Seconds until the token expires + */ + public synchronized void setAccessToken(String accessToken, Integer expiresIn) { + this.accessToken = accessToken; + this.expirationTimeSeconds = expiresIn == null ? null : System.currentTimeMillis() / MILLIS_PER_SECOND + expiresIn - LEEWAY_SECONDS; + } + +} diff --git a/templates/libraries/feign/auth/OauthClientCredentialsGrant.mustache b/templates/libraries/feign/auth/OauthClientCredentialsGrant.mustache new file mode 100644 index 00000000..95a6195a --- /dev/null +++ b/templates/libraries/feign/auth/OauthClientCredentialsGrant.mustache @@ -0,0 +1,42 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.model.OAuth2AccessToken; + +{{>generatedAnnotation}} + +public class OauthClientCredentialsGrant extends OAuth { + + public OauthClientCredentialsGrant(String authorizationUrl, String tokenUrl, String scopes) { + super(authorizationUrl, tokenUrl, scopes); + } + + @Override + protected OAuth2AccessToken getOAuth2AccessToken() { + try { + return service.getAccessTokenClientCredentialsGrant(scopes); + } catch (Exception e) { + throw new RuntimeException("Failed to get oauth token", e); + } + } + + @Override + protected OAuthFlow getFlow() { + return OAuthFlow.APPLICATION; + } + + /** + * Configures the client credentials flow + * + * @param clientId + * @param clientSecret + */ + public void configure(String clientId, String clientSecret) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .defaultScope(scopes) + .build(new DefaultApi20Impl(authorizationUrl, tokenUrl)); + } +} diff --git a/templates/libraries/feign/auth/OauthPasswordGrant.mustache b/templates/libraries/feign/auth/OauthPasswordGrant.mustache new file mode 100644 index 00000000..cc3ceb8e --- /dev/null +++ b/templates/libraries/feign/auth/OauthPasswordGrant.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.model.OAuth2AccessToken; + +{{>generatedAnnotation}} + +public class OauthPasswordGrant extends OAuth { + + private String username; + private String password; + + public OauthPasswordGrant(String tokenUrl, String scopes) { + super(null, tokenUrl, scopes); + } + + @Override + protected OAuth2AccessToken getOAuth2AccessToken() { + try { + return service.getAccessTokenPasswordGrant(username, password); + } catch (Exception e) { + throw new RuntimeException("Failed to get oauth token", e); + } + } + + @Override + protected OAuthFlow getFlow() { + return OAuthFlow.PASSWORD; + } + + /** + * Configures Oauth password grant flow + * Note: this flow is deprecated. + * + * @param username + * @param password + * @param clientId + * @param clientSecret + */ + public void configure(String username, String password, String clientId, String clientSecret) { + this.username = username; + this.password = password; + //TODO the clientId and secret are optional according with the RFC + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .defaultScope(scopes) + .build(new DefaultApi20Impl(authorizationUrl, tokenUrl)); + } +} diff --git a/templates/libraries/feign/build.gradle.mustache b/templates/libraries/feign/build.gradle.mustache new file mode 100644 index 00000000..28ed045c --- /dev/null +++ b/templates/libraries/feign/build.gradle.mustache @@ -0,0 +1,163 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +test { + useJUnitPlatform() +} + +ext { + swagger_annotations_version = "1.6.11" + {{#jackson}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{/jackson}} + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + feign_version = "13.5" + feign_form_version = "3.8.0" + junit_version = "5.7.0" + scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "io.github.openfeign:feign-core:$feign_version" + {{#jackson}} + implementation "io.github.openfeign:feign-jackson:$feign_version" + {{/jackson}} + implementation "io.github.openfeign:feign-slf4j:$feign_version" + {{#feign-okhttp}} + implementation "io.github.openfeign:feign-okhttp:$feign_version" + {{/feign-okhttp}} + {{#feign-hc5}} + implementation "io.github.openfeign:feign-hc5:$feign_version" + {{/feign-hc5}} + implementation "io.github.openfeign.form:feign-form:$feign_form_version" + {{#jackson}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{/jackson}} + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.brsanthu:migbase64:2.2" + implementation "com.github.scribejava:scribejava-core:$scribejava_version" + implementation "com.brsanthu:migbase64:2.2" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} + testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" + testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1" + testImplementation "org.hamcrest:hamcrest:2.2" + testImplementation "commons-io:commons-io:2.16.1" + testImplementation "ch.qos.logback:logback-classic:1.2.3" +} diff --git a/templates/libraries/feign/build.sbt.mustache b/templates/libraries/feign/build.sbt.mustache new file mode 100644 index 00000000..ca859f15 --- /dev/null +++ b/templates/libraries/feign/build.sbt.mustache @@ -0,0 +1,46 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.11" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "io.github.openfeign" % "feign-core" % "13.5" % "compile", +{{#jackson}} + "io.github.openfeign" % "feign-jackson" % "13.5" % "compile", +{{/jackson}} + "io.github.openfeign" % "feign-slf4j" % "13.5" % "compile", + "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile", +{{#feign-okhttp}} + "io.github.openfeign" % "feign-okhttp" % "13.5" % "compile", +{{/feign-okhttp}} +{{#feign-hc5}} + "io.github.openfeign" % "feign-hc5" % "13.5" % "compile", +{{/feign-hc5}} +{{#jackson}} + "com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.17.1" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.15.2" % "compile", +{{/jackson}} + "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", + "com.brsanthu" % "migbase64" % "2.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} + "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", + "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", + "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", + "org.hamcrest" % "hamcrest" % "2.2" % "test", + "commons-io" % "commons-io" % "2.16.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/templates/libraries/feign/model.mustache b/templates/libraries/feign/model.mustache new file mode 100644 index 00000000..108748f6 --- /dev/null +++ b/templates/libraries/feign/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/feign/model/ApiResponse.mustache b/templates/libraries/feign/model/ApiResponse.mustache new file mode 100644 index 00000000..9c9b1074 --- /dev/null +++ b/templates/libraries/feign/model/ApiResponse.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import java.util.Map; +import java.util.Collection; + +public class ApiResponse{ + + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } + +} \ No newline at end of file diff --git a/templates/libraries/feign/model_test.mustache b/templates/libraries/feign/model_test.mustache new file mode 100644 index 00000000..2759ff52 --- /dev/null +++ b/templates/libraries/feign/model_test.mustache @@ -0,0 +1,41 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Test; + +/** + * Model tests for {{classname}} + */ +class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/templates/libraries/feign/pojo.mustache b/templates/libraries/feign/pojo.mustache new file mode 100644 index 00000000..01df5d7c --- /dev/null +++ b/templates/libraries/feign/pojo.mustache @@ -0,0 +1,580 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{#isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/feign/additional_properties}} + + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{items.dataType}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{items.dataType}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{items.dataType}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{#items.isPrimitiveType}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isPrimitiveType}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} + +} diff --git a/templates/libraries/feign/pom.mustache b/templates/libraries/feign/pom.mustache new file mode 100644 index 00000000..8de6aa5f --- /dev/null +++ b/templates/libraries/feign/pom.mustache @@ -0,0 +1,436 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M4 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + io.github.openfeign + feign-core + ${feign-version} + + {{#jackson}} + + io.github.openfeign + feign-jackson + ${feign-version} + + {{/jackson}} + {{#gson}} + + io.github.openfeign + feign-gson + ${feign-version} + + {{/gson}} + + io.github.openfeign + feign-slf4j + ${feign-version} + + + io.github.openfeign.form + feign-form + ${feign-form-version} + + {{#feign-okhttp}} + + io.github.openfeign + feign-okhttp + ${feign-version} + + {{/feign-okhttp}} + {{#feign-hc5}} + + io.github.openfeign + feign-hc5 + ${feign-version} + + {{/feign-hc5}} + + {{#jackson}} + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{/jackson}} + {{#gson}} + + com.google.code.gson + gson + ${gson-version} + + {{/gson}} + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + {{#jackson}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{/jackson}} + + com.github.scribejava + scribejava-core + ${scribejava-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + + + + ch.qos.logback + logback-classic + 1.3.13 + test + + + org.junit.jupiter + junit-jupiter + ${junit-version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit-version} + test + + + org.hamcrest + hamcrest + 2.2 + test + + + com.github.tomakehurst + wiremock-jre8 + 2.35.1 + test + + + + UTF-8 + 1.8 + ${java.version} + ${java.version} + {{#swagger1AnnotationLibrary}} + 1.6.11 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 13.2.1 + 3.8.0 + {{#jackson}} + 2.17.1 + 2.17.1 + {{/jackson}} + {{#gson}} + 2.10.1 + {{/gson}} + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} + 5.10.0 + 1.0.0 + 8.3.3 + + diff --git a/templates/libraries/google-api-client/ApiClient.mustache b/templates/libraries/google-api-client/ApiClient.mustache new file mode 100644 index 00000000..32b3cae7 --- /dev/null +++ b/templates/libraries/google-api-client/ApiClient.mustache @@ -0,0 +1,107 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import {{apiPackage}}.*; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.google.api.client.googleapis.util.Utils; +import com.google.api.client.http.AbstractHttpContent; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.Json; + +import java.io.IOException; +import java.io.OutputStream; + +{{>generatedAnnotation}} + +public class ApiClient { + protected final String basePath; + protected final HttpRequestFactory httpRequestFactory; + protected final ObjectMapper objectMapper; + + protected static final String defaultBasePath = "{{basePath}}"; + + // A reasonable default object mapper. Client can pass in a chosen ObjectMapper anyway, this is just for reasonable defaults. + protected static ObjectMapper createDefaultObjectMapper() { + ObjectMapper objectMapper = new ObjectMapper() + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .setDateFormat(new RFC3339DateFormat()); + {{#joda}} + objectMapper.registerModule(new JodaModule()); + {{/joda}} + objectMapper.registerModule(new JavaTimeModule()); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + objectMapper.registerModule(jnm); + {{/openApiNullable}} + return objectMapper; + } + + public ApiClient() { + this(null, null, null, null); + } + + public ApiClient( + String basePath, + HttpTransport httpTransport, + HttpRequestInitializer initializer, + ObjectMapper objectMapper + ) { + this.basePath = basePath == null ? defaultBasePath : ( + basePath.endsWith("/") ? basePath.substring(0, basePath.length() - 1) : basePath + ); + this.httpRequestFactory = (httpTransport == null ? Utils.getDefaultTransport() : httpTransport).createRequestFactory(initializer); + this.objectMapper = (objectMapper == null ? createDefaultObjectMapper() : objectMapper); + } + + public HttpRequestFactory getHttpRequestFactory() { + return httpRequestFactory; + } + + public String getBasePath() { + return basePath; + } + + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + public class JacksonJsonHttpContent extends AbstractHttpContent { + /* A POJO that can be serialized with a com.fasterxml Jackson ObjectMapper */ + protected final Object data; + + public JacksonJsonHttpContent(Object data) { + super(Json.MEDIA_TYPE); + this.data = data; + } + + @Override + public void writeTo(OutputStream out) throws IOException { + objectMapper.writeValue(out, data); + } + } + + // Builder pattern to get API instances for this client. + {{#apiInfo}}{{#apis}} + public {{classname}} {{classVarName}}Api() { + return new {{classname}}(this); + } + {{/apis}}{{/apiInfo}} +} diff --git a/templates/libraries/google-api-client/api.mustache b/templates/libraries/google-api-client/api.mustache new file mode 100644 index 00000000..757ee73e --- /dev/null +++ b/templates/libraries/google-api-client/api.mustache @@ -0,0 +1,210 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; + +{{#imports}}import {{import}}; +{{/imports}} + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.json.Json; + +import {{javaxPackage}}.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(new ApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + /**{{#summary}} + * {{.}}{{/summary}}{{#notes}} + * {{.}}{{/notes}}{{#responses}} + *

{{code}}{{#message}} - {{.}}{{/message}}{{/responses}}{{#allParams}} + * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/allParams}}{{#returnType}} + * @return {{.}}{{/returnType}} + * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}}{{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + + **/ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException { + {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} + } + + /**{{#summary}} + * {{.}}{{/summary}}{{#notes}} + * {{.}}{{/notes}}{{#responses}} + *

{{code}}{{#message}} - {{.}}{{/message}}{{/responses}}{{#requiredParams}} + * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/requiredParams}} + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.{{#returnType}} + * @return {{.}}{{/returnType}} + * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}}{{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + + **/ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { + {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} + } + + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException { + {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + }{{/required}}{{/allParams}} + {{#hasPathParams}} + // create a map of path variables + final Map uriVariables = new HashMap();{{#pathParams}} + uriVariables.put("{{baseName}}", {{{paramName}}});{{/pathParams}} + {{/hasPathParams}} + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "{{{path}}}");{{#hasQueryParams}} + {{#queryParams}} + if ({{paramName}} != null) { + String key = "{{baseName}}"; + Object value = {{paramName}}; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + }{{/queryParams}}{{/hasQueryParams}} + + String localVarUrl = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} + GenericUrl genericUrl = new GenericUrl(localVarUrl); + + HttpContent content = {{#isBodyAllowed}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isBodyAllowed}}{{^isBodyAllowed}}null{{/isBodyAllowed}}; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); + }{{#bodyParam}} + + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{#isBodyParam}}java.io.InputStream {{paramName}}{{/isBodyParam}}{{^isBodyParam}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{/isBodyParam}}{{^-last}}, {{/-last}}{{/allParams}}, String mediaType) throws IOException { + {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + }{{/required}}{{/allParams}} + {{#hasPathParams}} + // create a map of path variables + final Map uriVariables = new HashMap();{{#pathParams}} + uriVariables.put("{{baseName}}", {{{paramName}}});{{/pathParams}} + {{/hasPathParams}} + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "{{{path}}}");{{#hasQueryParams}} + {{#queryParams}} + if ({{paramName}} != null) { + String key = "{{baseName}}"; + Object value = {{paramName}}; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + }{{/queryParams}}{{/hasQueryParams}} + + String localVarUrl = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} + GenericUrl genericUrl = new GenericUrl(localVarUrl); + + HttpContent content = {{#bodyParam}}{{paramName}} == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, {{paramName}}){{/bodyParam}}; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); + }{{/bodyParam}} + + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public HttpResponse {{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { + {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + }{{/required}}{{/allParams}} + {{#hasPathParams}} + // create a map of path variables + final Map uriVariables = new HashMap();{{#pathParams}} + uriVariables.put("{{baseName}}", {{{paramName}}});{{/pathParams}} + {{/hasPathParams}} + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "{{{path}}}"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params);{{#queryParams}}{{#required}} + // Add the required query param '{{paramName}}' to the map of query params + allParams.put("{{paramName}}", {{paramName}});{{/required}}{{/queryParams}} + + for (Map.Entry entry: allParams.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String localVarUrl = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} + GenericUrl genericUrl = new GenericUrl(localVarUrl); + + HttpContent content = {{#isBodyAllowed}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isBodyAllowed}}{{^isBodyAllowed}}null{{/isBodyAllowed}}; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); + } + + + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/google-api-client/api_test.mustache b/templates/libraries/google-api-client/api_test.mustache new file mode 100644 index 00000000..bfb939f9 --- /dev/null +++ b/templates/libraries/google-api-client/api_test.mustache @@ -0,0 +1,48 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for {{classname}} + */ +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + * {{summary}} + * + * {{notes}} + * + * @throws IOException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() throws IOException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + // uncomment below to test the API function + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/google-api-client/build.gradle.mustache b/templates/libraries/google-api-client/build.gradle.mustache new file mode 100644 index 00000000..c8798317 --- /dev/null +++ b/templates/libraries/google-api-client/build.gradle.mustache @@ -0,0 +1,135 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.6.3" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + google_api_client_version = "1.32.2" + jersey_common_version = "2.25.1" + jodatime_version = "2.9.9" + junit_version = "4.13.2" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "com.google.api-client:google-api-client:${google_api_client_version}" + implementation "org.glassfish.jersey.core:jersey-common:${jersey_common_version}" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + implementation "joda-time:joda-time:$jodatime_version" + {{/joda}} + {{#withXml}} + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" + {{/withXml}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "junit:junit:$junit_version" +} diff --git a/templates/libraries/google-api-client/build.sbt.mustache b/templates/libraries/google-api-client/build.sbt.mustache new file mode 100644 index 00000000..a849d22b --- /dev/null +++ b/templates/libraries/google-api-client/build.sbt.mustache @@ -0,0 +1,29 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.22", + "com.google.api-client" % "google-api-client" % "1.23.0", + "org.glassfish.jersey.core" % "jersey-common" % "2.25.1", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4.2" % "compile", + {{#withXml}} + "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.10" % "compile", + {{/withXml}} + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", + {{/joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "junit" % "junit" % "4.13.2" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/templates/libraries/google-api-client/pom.mustache b/templates/libraries/google-api-client/pom.mustache new file mode 100644 index 00000000..97c5123e --- /dev/null +++ b/templates/libraries/google-api-client/pom.mustache @@ -0,0 +1,330 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + com.google.api-client + google-api-client + ${google-api-client-version} + + + + org.glassfish.jersey.core + jersey-common + ${jersey-common-version} + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + {{/withXml}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 2.2.0 + 2.40 + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#joda}} + 2.9.9 + {{/joda}} + {{#useJakartaEe}} + 2.1.1 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + {{/useJakartaEe}} + 1.0.0 + 5.10.2 + + diff --git a/templates/libraries/jersey2/AbstractOpenApiSchema.mustache b/templates/libraries/jersey2/AbstractOpenApiSchema.mustache new file mode 100644 index 00000000..8e5c32da --- /dev/null +++ b/templates/libraries/jersey2/AbstractOpenApiSchema.mustache @@ -0,0 +1,140 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import {{invokerPackage}}.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import {{javaxPackage}}.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +{{>generatedAnnotation}} + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + +{{>libraries/jersey2/additional_properties}} + + +} diff --git a/templates/libraries/jersey2/ApiClient.mustache b/templates/libraries/jersey2/ApiClient.mustache new file mode 100644 index 00000000..dc78a917 --- /dev/null +++ b/templates/libraries/jersey2/ApiClient.mustache @@ -0,0 +1,1517 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import {{javaxPackage}}.ws.rs.client.Client; +import {{javaxPackage}}.ws.rs.client.ClientBuilder; +import {{javaxPackage}}.ws.rs.client.Entity; +import {{javaxPackage}}.ws.rs.client.Invocation; +import {{javaxPackage}}.ws.rs.client.WebTarget; +import {{javaxPackage}}.ws.rs.core.Form; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.MediaType; +import {{javaxPackage}}.ws.rs.core.Response; +import {{javaxPackage}}.ws.rs.core.Response.Status; + +{{#hasOAuthMethods}} +import com.github.scribejava.core.model.OAuth2AccessToken; +{{/hasOAuthMethods}} +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.AbstractMap.SimpleEntry; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.stream.Collectors; +import java.util.stream.Stream; +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +{{#hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.HttpSignatureAuth; +{{/hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +/** + *

ApiClient class.

+ */ +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + protected Map defaultHeaderMap = new HashMap<>(); + protected Map defaultCookieMap = new HashMap<>(); + protected String basePath = "{{{basePath}}}"; + protected String userAgent; + protected static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + protected List servers = new ArrayList<>({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + {{^variables}} + new LinkedHashMap<>() + {{/variables}} + {{#variables}} + {{#-first}} + Stream.>of( + {{/-first}} + new SimpleEntry<>("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}} + "{{{.}}}"{{^-last}},{{/-last}}{{#-last}} + ){{/-last}}{{/enumValues}}) + )){{^-last}},{{/-last}} + {{#-last}} + ).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new)) + {{/-last}} + {{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + {{^hasOperationServers}} + protected Map> operationServers = new HashMap<>(); + {{/hasOperationServers}} + {{#hasOperationServers}} + protected Map> operationServers; + + { + Map> operationServers = new HashMap<>(); + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers}} + {{#-first}} + operationServers.put("{{{classname}}}.{{{operationId}}}", new ArrayList<>(Arrays.asList( + {{/-first}} + new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + {{^variables}} + new LinkedHashMap<>() + {{/variables}} + {{#variables}} + {{#-first}} + Stream.>of( + {{/-first}} + new SimpleEntry<>("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}} + "{{{.}}}"{{^-last}},{{/-last}}{{#-last}} + ){{/-last}}{{/enumValues}}) + )){{^-last}},{{/-last}} + {{#-last}} + ).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new)) + {{/-last}} + {{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ))); + {{/-last}} + {{/servers}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + this.operationServers = operationServers; + } + + {{/hasOperationServers}} + protected Map operationServerIndex = new HashMap<>(); + protected Map> operationServerVariables = new HashMap<>(); + protected boolean debugging = false; + protected ClientConfig clientConfig; + protected int connectionTimeout = 0; + protected int readTimeout = 0; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + protected Map authenticationLookup; + + protected DateFormat dateFormat; + + /** + * Constructs a new ApiClient with default parameters. + */ + public ApiClient() { + this(null); + } + + /** + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ + public ApiClient(Map authMap) { + json = new JSON(); + httpClient = buildHttpClient(); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>(); + Authentication auth = null; + {{#authMethods}} + if (authMap != null) { + auth = authMap.get("{{name}}"); + } + {{#isBasic}} + {{#isBasicBasic}} + if (auth instanceof HttpBasicAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBasicAuth()); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + if (auth instanceof HttpBearerAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}")); + } + {{/isBasicBearer}} + {{#isHttpSignature}} + if (auth instanceof HttpSignatureAuth) { + authentications.put("{{name}}", auth); + } + {{/isHttpSignature}} + {{/isBasic}} + {{#isApiKey}} + if (auth instanceof ApiKeyAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}")); + } + {{/isApiKey}} + {{#isOAuth}} + if (auth instanceof OAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new OAuth(basePath, "{{{tokenUrl}}}")); + } + {{/isOAuth}} + {{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + // Setup authentication lookup (key: authentication alias, value: authentication name) + authenticationLookup = new HashMap<>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}} + authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}} + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * + * @return JSON + */ + public JSON getJSON() { + return json; + } + + /** + *

Getter for the field httpClient.

+ * + * @return a {@link {{javaxPackage}}.ws.rs.client.Client} object. + */ + public Client getHttpClient() { + return httpClient; + } + + /** + *

Setter for the field httpClient.

+ * + * @param httpClient a {@link {{javaxPackage}}.ws.rs.client.Client} object. + * @return a {@link ApiClient} object. + */ + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ + public String getBasePath() { + return basePath; + } + + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + * @return a {@link ApiClient} object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + {{#hasOAuthMethods}} + setOauthBasePath(basePath); + {{/hasOAuthMethods}} + return this; + } + + /** + *

Getter for the field servers.

+ * + * @return a {@link java.util.List} of servers. + */ + public List getServers() { + return servers; + } + + /** + *

Setter for the field servers.

+ * + * @param servers a {@link java.util.List} of servers. + * @return a {@link ApiClient} object. + */ + public ApiClient setServers(List servers) { + this.servers = servers; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverIndex.

+ * + * @return a {@link java.lang.Integer} object. + */ + public Integer getServerIndex() { + return serverIndex; + } + + /** + *

Setter for the field serverIndex.

+ * + * @param serverIndex the server index + * @return a {@link ApiClient} object. + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverVariables.

+ * + * @return a {@link java.util.Map} of server variables. + */ + public Map getServerVariables() { + return serverVariables; + } + + /** + *

Setter for the field serverVariables.

+ * + * @param serverVariables a {@link java.util.Map} of server variables. + * @return a {@link ApiClient} object. + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + updateBasePath(); + return this; + } + + protected void updateBasePath() { + if (serverIndex != null) { + setBasePath(servers.get(serverIndex).URL(serverVariables)); + } + } + + {{#hasOAuthMethods}} + protected void setOauthBasePath(String basePath) { + for(Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setBasePath(basePath); + } + } + } + + {{/hasOAuthMethods}} + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + * @return a {@link ApiClient} object. + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + * @return a {@link ApiClient} object. + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to configure authentications which respects aliases of API keys. + * + * @param secrets Hash map from authentication name to its secret. + * @return a {@link ApiClient} object. + */ + public ApiClient configureApiKeys(Map secrets) { + for (Map.Entry authEntry : authentications.entrySet()) { + Authentication auth = authEntry.getValue(); + if (auth instanceof ApiKeyAuth) { + String name = authEntry.getKey(); + // respect x-auth-id-alias property + name = authenticationLookup.getOrDefault(name, name); + String secret = secrets.get(name); + if (secret != null) { + ((ApiKeyAuth) auth).setApiKey(secret); + } + } + } + return this; + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set bearer token for the first Bearer authentication. + * + * @param bearerToken Bearer token + * @return a {@link ApiClient} object. + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + * @return a {@link ApiClient} object. + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials for the first OAuth2 authentication. + * + * @param clientId the client ID + * @param clientSecret the client secret + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthCredentials(String clientId, String clientSecret) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials of a public client for the first OAuth2 authentication. + * + * @param clientId the client ID + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthCredentialsForPublicClient(String clientId) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentialsForPublicClient(clientId, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the password flow for the first OAuth2 authentication. + * + * @param username the user name + * @param password the user password + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthPasswordFlow(String username, String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).usePasswordFlow(username, password); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the authorization code flow for the first OAuth2 authentication. + * + * @param code the authorization code + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthAuthorizationCodeFlow(String code) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).useAuthorizationCodeFlow(code); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the scopes for the first OAuth2 authentication. + * + * @param scope the oauth scope + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthScope(String scope) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setScope(scope); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent Http user agent + * @return a {@link ApiClient} object. + */ + public ApiClient setUserAgent(String userAgent) { + this.userAgent = userAgent; + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Get the User-Agent header's value. + * + * @return User-Agent string + */ + public String getUserAgent(){ + return userAgent; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Gets the client config. + * + * @return Client config + */ + public ClientConfig getClientConfig() { + return clientConfig; + } + + /** + * Set the client config. + * + * @param clientConfig Set the client config + * @return a {@link ApiClient} object. + */ + public ApiClient setClientConfig(ClientConfig clientConfig) { + this.clientConfig = clientConfig; + // Rebuild HTTP Client according to the new "clientConfig" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is switched on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return a {@link ApiClient} object. + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + applyDebugSetting(this.clientConfig); + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set temp folder path + * + * @param tempFolderPath Temp folder path + * @return a {@link ApiClient} object. + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + * + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout Connection timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * read timeout (in milliseconds). + * + * @return Read timeout + */ + public int getReadTimeout() { + return readTimeout; + } + + /** + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout Read timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * + * @param dateFormat Date format + * @return a {@link ApiClient} object. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList<>(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "*{@literal /}*" is also considered JSON by this method. + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + public boolean isJsonMime(String mime) { + return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches()); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String... accepts) { + if (accepts == null || accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String... contentTypes) { + if (contentTypes == null || contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception + */ + public Entity serialize(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + Entity entity; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); + } else { + addParamToMultipart(param.getValue(), param.getKey(), multiPart); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + if (isBodyNullable) { // payload is nullable + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "null" : obj, contentType); + } + } else { + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "" : obj, contentType); + } + } + } + return entity; + } + + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + protected void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @param isBodyNullable True if the body is nullable + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + if (isBodyNullable) { + return obj == null ? "null" : json.getMapper().writeValueAsString(obj); + } else { + return obj == null ? "" : json.getMapper().writeValueAsString(obj); + } + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.getRawType() == File.class) { + // Handle file downloading. + T file = (T) downloadFileFromResponse(response); + return file; + } + + // read the entity stream multiple times + response.bufferEntity(); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

Prepare the file for download from the response.

+ * + * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param operation The qualified name of the operation + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @param isBodyNullable True if the body is nullable + * @return The response body in type of string + * @throws ApiException API exception + */ + public ApiResponse invokeAPI( + String operation, + String path, + String method, + List queryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + GenericType returnType, + boolean isBodyNullable) + throws ApiException { + + String targetURL; + List serverConfigurations; + if (serverIndex != null && (serverConfigurations = operationServers.get(operation)) != null) { + int index = operationServerIndex.getOrDefault(operation, serverIndex).intValue(); + Map variables = operationServerVariables.getOrDefault(operation, serverVariables); + if (index < 0 || index >= serverConfigurations.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); + } + targetURL = serverConfigurations.get(index).URL(variables) + path; + } else { + targetURL = this.basePath + path; + } + // Not using `.target(targetURL).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + WebTarget target = httpClient.target(targetURL); + + // put all headers in one place + Map allHeaderParams = new HashMap<>(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + if (authNames != null) { + // update different parameters (e.g. headers) for authentication + updateParamsForAuth( + authNames, + queryParams, + allHeaderParams, + cookieParams, + {{#hasHttpSignatureMethods}} + serializeToString(body, formParams, contentType, isBodyNullable), + {{/hasHttpSignatureMethods}} + {{^hasHttpSignatureMethods}} + null, + {{/hasHttpSignatureMethods}} + method, + target.getUri()); + } + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); + } + } + } + + Invocation.Builder invocationBuilder = target.request(); + + if (accept != null) { + invocationBuilder = invocationBuilder.accept(accept); + } + + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + for (Entry entry : defaultCookieMap.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + Entity entity = serialize(body, formParams, contentType, isBodyNullable); + + for (Entry entry : allHeaderParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(entry.getKey(), value); + } + } + + Response response = null; + + try { + response = sendRequest(method, invocationBuilder, entity); + + final int statusCode = response.getStatusInfo().getStatusCode(); + + {{#hasOAuthMethods}} + // If OAuth is used and a status 401 is received, renew the access token and retry the request + if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) { + for (String authName : authNames) { + Authentication authentication = authentications.get(authName); + if (authentication instanceof OAuth) { + OAuth2AccessToken accessToken = ((OAuth) authentication).renewAccessToken(); + if (accessToken != null) { + invocationBuilder.header("Authorization", null); + invocationBuilder.header("Authorization", "Bearer " + accessToken.getAccessToken()); + response = sendRequest(method, invocationBuilder, entity); + } + break; + } + } + } + + {{/hasOAuthMethods}} + Map> responseHeaders = buildResponseHeaders(response); + + if (statusCode == Status.NO_CONTENT.getStatusCode()) { + return new ApiResponse(statusCode, responseHeaders); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) { + return new ApiResponse(statusCode, responseHeaders); + } else { + return new ApiResponse(statusCode, responseHeaders, deserialize(response, returnType)); + } + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), message, buildResponseHeaders(response), respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, + // just continue + } + } + } + + protected Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { + Response response; + if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else { + response = invocationBuilder.method(method); + } + return response; + } + + /** + * @deprecated Add qualified name of the operation as a first parameter. + */ + @Deprecated + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, boolean isBodyNullable) throws ApiException { + return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable); + } + + /** + * Build the Client used to make HTTP requests. + * + * @return Client + */ + protected Client buildHttpClient() { + // Create ClientConfig if it has not been initialized yet + if (clientConfig == null) { + clientConfig = getDefaultClientConfig(); + } + + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + clientBuilder = clientBuilder.withConfig(clientConfig); + customizeClientBuilder(clientBuilder); + return clientBuilder.build(); + } + + /** + * Get the default client config. + * + * @return Client config + */ + public ClientConfig getDefaultClientConfig() { + ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); + // turn off compliance validation to be able to send payloads with DELETE calls + clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + applyDebugSetting(clientConfig); + return clientConfig; + } + + protected void applyDebugSetting(ClientConfig clientConfig) { + if (debugging) { + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + // Set logger to ALL + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + } else { + // suppress warnings for payloads with DELETE calls: + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); + } + } + + /** + * Customize the client builder. + * + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. + * + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). + * + * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. + */ + protected void customizeClientBuilder(ClientBuilder clientBuilder) { + // No-op extension point + } + + /** + * Disable X.509 certificate validation in TLS connections. + * + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. + * + * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. + * @throws java.security.KeyManagementException if any. + * @throws java.security.NoSuchAlgorithmException if any. + */ + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new SecureRandom()); + clientBuilder.sslContext(sslContext); + } + + /** + *

Build the response headers.

+ * + * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. + * @return a {@link java.util.Map} of response headers. + */ + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap<>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList<>(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + continue; + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } +} \ No newline at end of file diff --git a/templates/libraries/jersey2/ApiResponse.mustache b/templates/libraries/jersey2/ApiResponse.mustache new file mode 100644 index 00000000..86c889b0 --- /dev/null +++ b/templates/libraries/jersey2/ApiResponse.mustache @@ -0,0 +1,73 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.List; +import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/templates/libraries/jersey2/JSON.mustache b/templates/libraries/jersey2/JSON.mustache new file mode 100644 index 00000000..55b6e232 --- /dev/null +++ b/templates/libraries/jersey2/JSON.mustache @@ -0,0 +1,262 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.ext.ContextResolver; + +{{>generatedAnnotation}} + +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) + .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + {{#joda}} + .addModule(new JodaModule()) + {{/joda}} + {{#openApiNullable}} + .addModule(new JsonNullableModule()) + {{/openApiNullable}} + .addModule(new RFC3339JavaTimeModule()) + .build(); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet<>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap<>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/templates/libraries/jersey2/additional_properties.mustache b/templates/libraries/jersey2/additional_properties.mustache new file mode 100644 index 00000000..2955e939 --- /dev/null +++ b/templates/libraries/jersey2/additional_properties.mustache @@ -0,0 +1,39 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap<>(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/jersey2/anyof_model.mustache b/templates/libraries/jersey2/anyof_model.mustache new file mode 100644 index 00000000..5c2c2a4e --- /dev/null +++ b/templates/libraries/jersey2/anyof_model.mustache @@ -0,0 +1,229 @@ +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + {{#discriminator}} + Class cls = JSON.getClassForElement(tree, new {{classname}}().getClass()); + if (cls != null) { + // When the OAS schema includes a discriminator, use the discriminator value to + // discriminate the anyOf schemas. + // Get the discriminator mapping value to get the class. + deserialized = tree.traverse(jp.getCodec()).readValueAs(cls); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + {{/discriminator}} + {{#composedSchemas}} + {{#anyOf}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} + try { + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match '{{classname}}'", e); + } + + {{/anyOf}} + {{/composedSchemas}} + throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap<>(); + + public {{classname}}() { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + static { + {{#anyOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/anyOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/anyOf}} + {{/composedSchemas}} +} diff --git a/templates/libraries/jersey2/api.mustache b/templates/libraries/jersey2/api.mustache new file mode 100644 index 00000000..c663d758 --- /dev/null +++ b/templates/libraries/jersey2/api.mustache @@ -0,0 +1,298 @@ +package {{package}}; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +import {{javaxPackage}}.ws.rs.core.GenericType; + +{{#imports}}import {{import}}; +{{/imports}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{.}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; + } + {{/vendorExtensions.x-group-parameters}} + + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#hasRequiredParams}} + // Check required parameters + {{#allParams}} + {{#required}} + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}} + {{/allParams}} + + {{/hasRequiredParams}} + {{#hasPathParams}} + // Path parameters + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll({{=% %=}}"\\{%baseName%}"%={{ }}=%, apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + + {{/hasPathParams}} + {{#queryParams}} + {{#-first}} + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}) + ); + {{/-first}} + {{^-first}} + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/-first}} + {{#-last}} + + {{/-last}} + {{/queryParams}} + {{#headerParams}} + {{#-first}} + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/headerParams}} + {{#cookieParams}} + {{#-first}} + // Cookie parameters + Map localVarCookieParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/cookieParams}} + {{#formParams}} + {{#-first}} + // Form parameters + Map localVarFormParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/formParams}} + String localVarAccept = apiClient.selectHeaderAccept({{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}); + String localVarContentType = apiClient.selectHeaderContentType({{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}); + {{#hasAuthMethods}} + String[] localVarAuthNames = {{=% %=}}new String[] {%#authMethods%"%name%"%^-last%, %/-last%%/authMethods%};%={{ }}=% + {{/hasAuthMethods}} + {{#returnType}} + GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; + {{/returnType}} + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, + {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); + } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#allParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{dataType}}} {{paramName}}; + {{/allParams}} + + private API{{operationId}}Request({{#pathParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) { + {{#pathParams}} + this.{{paramName}} = {{paramName}}; + {{/pathParams}} + } + {{#allParams}} + {{^isPathParam}} + + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + {{/isPathParam}} + {{/allParams}} + + /** + * Execute {{operationId}} request + {{#returnType}}* @return {{.}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData(); + } + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + } + + /** + * {{summary}} + * {{notes}}{{#pathParams}} + * @param {{paramName}} {{description}} (required){{/pathParams}} + * @return {{operationId}}Request + * @throws ApiException if fails to make API call + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + {{#externalDocs}}* {{description}} + * @see {{summary}} Documentation{{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#pathParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) throws ApiException { + return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}); + } + {{/vendorExtensions.x-group-parameters}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/jersey2/apiException.mustache b/templates/libraries/jersey2/apiException.mustache new file mode 100644 index 00000000..d957acd8 --- /dev/null +++ b/templates/libraries/jersey2/apiException.mustache @@ -0,0 +1,102 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API Exception + */ +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/templates/libraries/jersey2/api_doc.mustache b/templates/libraries/jersey2/api_doc.mustache new file mode 100644 index 00000000..26c98508 --- /dev/null +++ b/templates/libraries/jersey2/api_doc.mustache @@ -0,0 +1,124 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{{unescapedNotes}}}{{/notes}} + +### Example + +```java +{{#vendorExtensions.x-java-import}} +import {{.}}; +{{/vendorExtensions.x-java-import}} +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.model.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/templates/libraries/jersey2/api_test.mustache b/templates/libraries/jersey2/api_test.mustache new file mode 100644 index 00000000..926ba0a8 --- /dev/null +++ b/templates/libraries/jersey2/api_test.mustache @@ -0,0 +1,62 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.*; +import {{invokerPackage}}.auth.*; +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{/summary}} + {{#notes}} + * {{notes}} + * + {{/notes}} + * @throws ApiException if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + //{{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + // .execute(); + {{/vendorExtensions.x-group-parameters}} + // TODO: test validations + } + + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/jersey2/auth/ApiKeyAuth.mustache b/templates/libraries/jersey2/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..82576065 --- /dev/null +++ b/templates/libraries/jersey2/auth/ApiKeyAuth.mustache @@ -0,0 +1,69 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/templates/libraries/jersey2/auth/Authentication.mustache b/templates/libraries/jersey2/auth/Authentication.mustache new file mode 100644 index 00000000..169e3abd --- /dev/null +++ b/templates/libraries/jersey2/auth/Authentication.mustache @@ -0,0 +1,24 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/templates/libraries/jersey2/auth/HttpBasicAuth.mustache b/templates/libraries/jersey2/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..2a8774b6 --- /dev/null +++ b/templates/libraries/jersey2/auth/HttpBasicAuth.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/jersey2/auth/HttpBearerAuth.mustache b/templates/libraries/jersey2/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..cb78e479 --- /dev/null +++ b/templates/libraries/jersey2/auth/HttpBearerAuth.mustache @@ -0,0 +1,52 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/jersey2/auth/HttpSignatureAuth.mustache b/templates/libraries/jersey2/auth/HttpSignatureAuth.mustache new file mode 100644 index 00000000..ac0a77db --- /dev/null +++ b/templates/libraries/jersey2/auth/HttpSignatureAuth.mustache @@ -0,0 +1,269 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.Key; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.List; +import java.util.TimeZone; +import java.security.spec.AlgorithmParameterSpec; +import java.security.InvalidKeyException; + +import org.tomitribe.auth.signatures.Algorithm; +import org.tomitribe.auth.signatures.Signer; +import org.tomitribe.auth.signatures.Signature; +import org.tomitribe.auth.signatures.SigningAlgorithm; + +/** + * A Configuration object for the HTTP message signature security scheme. + */ +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + + // The HTTP signature algorithm. + private SigningAlgorithm signingAlgorithm; + + // The HTTP cryptographic algorithm. + private Algorithm algorithm; + + // The cryptographic parameters. + private AlgorithmParameterSpec parameterSpec; + + // The list of HTTP headers that should be included in the HTTP signature. + private List headers; + + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + // The maximum validity duration of the HTTP signature. + private Long maxSignatureValidity; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param signingAlgorithm The signature algorithm. + * @param algorithm The cryptographic algorithm. + * @param digestAlgorithm The digest algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + * @param maxSignatureValidity The maximum validity duration of the HTTP signature. + * Used to set the '(expires)' field in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, + SigningAlgorithm signingAlgorithm, + Algorithm algorithm, + String digestAlgorithm, + AlgorithmParameterSpec parameterSpec, + List headers, + Long maxSignatureValidity) { + this.keyId = keyId; + this.signingAlgorithm = signingAlgorithm; + this.algorithm = algorithm; + this.parameterSpec = parameterSpec; + this.digestAlgorithm = digestAlgorithm; + this.headers = headers; + this.maxSignatureValidity = maxSignatureValidity; + } + + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; + } + + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ + public SigningAlgorithm getSigningAlgorithm() { + return signingAlgorithm; + } + + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param signingAlgorithm The HTTP signature algorithm. + */ + public void setSigningAlgorithm(SigningAlgorithm signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + /** + * Returns the HTTP cryptographic algorithm which is used to sign HTTP requests. + */ + public Algorithm getAlgorithm() { + return algorithm; + } + + /** + * Sets the HTTP cryptographic algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + /** + * Returns the cryptographic parameters which are used to sign HTTP requests. + */ + public AlgorithmParameterSpec getAlgorithmParameterSpec() { + return parameterSpec; + } + + /** + * Sets the cryptographic parameters which are used to sign HTTP requests. + * + * @param parameterSpec The cryptographic parameters. + */ + public void setAlgorithmParameterSpec(AlgorithmParameterSpec parameterSpec) { + this.parameterSpec = parameterSpec; + } + + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ + public List getHeaders() { + return headers; + } + + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ + public void setHeaders(List headers) { + this.headers = headers; + } + + /** + * Returns the maximum validity duration of the HTTP signature. + * @return The maximum validity duration of the HTTP signature. + */ + public Long getMaxSignatureValidity() { + return maxSignatureValidity; + } + + /** + * Returns the signer instance used to sign HTTP messages. + * + * @return the signer instance. + */ + public Signer getSigner() { + return signer; + } + + /** + * Sets the signer instance used to sign HTTP messages. + * + * @param signer The signer instance to set. + */ + public void setSigner(Signer signer) { + this.signer = signer; + } + + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. + */ + public void setPrivateKey(Key key) throws InvalidKeyException, ApiException { + if (key == null) { + throw new ApiException("Private key (java.security.Key) cannot be null"); + } + signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers, maxSignatureValidity)); + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + try { + if (headers.contains("host")) { + headerParams.put("host", uri.getHost()); + } + + if (headers.contains("date")) { + SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + headerParams.put("date", dateFormat.format(Calendar.getInstance().getTime())); + } + + if (headers.contains("digest")) { + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); + } + + // construct the path with the URL-encoded path and query. + // Calling getRawPath and getRawQuery ensures the path is URL-encoded as it will be serialized + // on the wire. The HTTP signature must use the encode URL as it is sent on the wire. + String path = uri.getRawPath(); + if (uri.getRawQuery() != null && !"".equals(uri.getRawQuery())) { + path += "?" + uri.getRawQuery(); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} diff --git a/templates/libraries/jersey2/auth/OAuth.mustache b/templates/libraries/jersey2/auth/OAuth.mustache new file mode 100644 index 00000000..4725badf --- /dev/null +++ b/templates/libraries/jersey2/auth/OAuth.mustache @@ -0,0 +1,196 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.exceptions.OAuthException; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth.OAuth20Service; + +import {{javaxPackage}}.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; +import java.util.logging.Logger; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private static final Logger log = Logger.getLogger(OAuth.class.getName()); + + private String tokenUrl; + private String absoluteTokenUrl; + private OAuthFlow flow = OAuthFlow.APPLICATION; + private OAuth20Service service; + private DefaultApi20 authApi; + private String scope; + private String username; + private String password; + private String code; + private volatile OAuth2AccessToken accessToken; + + public OAuth(String basePath, String tokenUrl) { + this.tokenUrl = tokenUrl; + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + authApi = new DefaultApi20() { + @Override + public String getAccessTokenEndpoint() { + return absoluteTokenUrl; + } + + @Override + protected String getAuthorizationBaseUrl() { + throw new UnsupportedOperationException("Shouldn't get there !"); + } + }; + } + + private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { + if (!URI.create(tokenUrl).isAbsolute()) { + try { + return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); + } catch (MalformedURLException e) { + log.log(Level.SEVERE, "Couldn't create absolute token URL", e); + } + } + return tokenUrl; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + + if (accessToken == null) { + obtainAccessToken(null); + } + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + } + } + + public OAuth2AccessToken renewAccessToken() throws ApiException { + String refreshToken = null; + if (accessToken != null) { + refreshToken = accessToken.getRefreshToken(); + accessToken = null; + } + return obtainAccessToken(refreshToken); + } + + public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { + if (service == null) { + log.log(Level.FINE, "service is null in obtainAccessToken."); + return null; + } + try { + if (refreshToken != null) { + return service.refreshAccessToken(refreshToken); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException("Refreshing the access token using the refresh token failed: " + e.toString()); + } + try { + switch (flow) { + case PASSWORD: + if (username != null && password != null) { + accessToken = service.getAccessTokenPasswordGrant(username, password, scope); + } + break; + case ACCESS_CODE: + if (code != null) { + accessToken = service.getAccessToken(code); + code = null; + } + break; + case APPLICATION: + accessToken = service.getAccessTokenClientCredentialsGrant(scope); + break; + default: + log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException(e); + } + return accessToken; + } + + public OAuth2AccessToken getAccessToken() { + return accessToken; + } + + public OAuth setAccessToken(OAuth2AccessToken accessToken) { + this.accessToken = accessToken; + return this; + } + + public OAuth setAccessToken(String accessToken) { + this.accessToken = new OAuth2AccessToken(accessToken); + return this; + } + + public OAuth setScope(String scope) { + this.scope = scope; + return this; + } + + public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret).debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .build(authApi); + } + return this; + } + + public OAuth setCredentialsForPublicClient(String clientId, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecretIsEmptyStringUnsafe().debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecretIsEmptyStringUnsafe() + .build(authApi); + } + return this; + } + + public OAuth usePasswordFlow(String username, String password) { + this.flow = OAuthFlow.PASSWORD; + this.username = username; + this.password = password; + return this; + } + + public OAuth useAuthorizationCodeFlow(String code) { + this.flow = OAuthFlow.ACCESS_CODE; + this.code = code; + return this; + } + + public OAuth setFlow(OAuthFlow flow) { + this.flow = flow; + return this; + } + + public void setBasePath(String basePath) { + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + } +} diff --git a/templates/libraries/jersey2/auth/OAuthFlow.mustache b/templates/libraries/jersey2/auth/OAuthFlow.mustache new file mode 100644 index 00000000..190781fb --- /dev/null +++ b/templates/libraries/jersey2/auth/OAuthFlow.mustache @@ -0,0 +1,13 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +/** + * OAuth flows that are supported by this client + */ +public enum OAuthFlow { + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION +} diff --git a/templates/libraries/jersey2/build.gradle.mustache b/templates/libraries/jersey2/build.gradle.mustache new file mode 100644 index 00000000..d7a4443e --- /dev/null +++ b/templates/libraries/jersey2/build.gradle.mustache @@ -0,0 +1,199 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.6" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.15" + {{/swagger2AnnotationLibrary}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + {{#useBeanValidation}} + bean_validation_version = "3.0.2" + {{/useBeanValidation}} + jersey_version = "2.35" + junit_version = "5.8.2" + {{#hasOAuthMethods}} + scribejava_apis_version = "8.3.1" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + tomitribe_http_signatures_version = "1.7" + {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.glassfish.jersey.core:jersey-client:$jersey_version" + implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" + implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#hasOAuthMethods}} + implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" + {{/hasHttpSignatureMethods}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/templates/libraries/jersey2/build.sbt.mustache b/templates/libraries/jersey2/build.sbt.mustache new file mode 100644 index 00000000..fa375253 --- /dev/null +++ b/templates/libraries/jersey2/build.sbt.mustache @@ -0,0 +1,41 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + Compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.google.code.findbugs" % "jsr305" % "3.0.0", + "io.swagger" % "swagger-annotations" % "1.6.5", + "org.glassfish.jersey.core" % "jersey-client" % "2.35", + "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", + "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", + "com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile", + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.17.1" % "compile", + {{/joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.17.1" % "compile", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.6" % "compile", + {{/openApiNullable}} + {{#hasOAuthMethods}} + "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", + {{/hasHttpSignatureMethods}} + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" + ) + ) diff --git a/templates/libraries/jersey2/model.mustache b/templates/libraries/jersey2/model.mustache new file mode 100644 index 00000000..2758278a --- /dev/null +++ b/templates/libraries/jersey2/model.mustache @@ -0,0 +1,63 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +{{/withXml}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +import {{invokerPackage}}.JSON; + +{{#models}} +{{#model}} +{{#oneOf}} +{{#-first}} +import com.fasterxml.jackson.core.type.TypeReference; +{{/-first}} +{{/oneOf}} + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/jersey2/model_anyof_doc.mustache b/templates/libraries/jersey2/model_anyof_doc.mustache new file mode 100644 index 00000000..e360aa56 --- /dev/null +++ b/templates/libraries/jersey2/model_anyof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## anyOf schemas +{{#anyOf}} +* [{{{.}}}]({{{.}}}.md) +{{/anyOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#anyOf}} +import {{{package}}}.{{{.}}}; +{{/anyOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#anyOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/anyOf}} + } +} +``` diff --git a/templates/libraries/jersey2/model_doc.mustache b/templates/libraries/jersey2/model_doc.mustache new file mode 100644 index 00000000..f17263f0 --- /dev/null +++ b/templates/libraries/jersey2/model_doc.mustache @@ -0,0 +1,23 @@ +{{#models}}{{#model}} + +{{#isEnum}} +{{>enum_outer_doc}} + +{{/isEnum}} +{{^isEnum}} +{{^oneOf.isEmpty}} +{{>model_oneof_doc}} + +{{/oneOf.isEmpty}} +{{^anyOf.isEmpty}} +{{>model_anyof_doc}} + +{{/anyOf.isEmpty}} +{{^anyOf}} +{{^oneOf}} +{{>pojo_doc}} + +{{/oneOf}} +{{/anyOf}} +{{/isEnum}} +{{/model}}{{/models}} diff --git a/templates/libraries/jersey2/model_oneof_doc.mustache b/templates/libraries/jersey2/model_oneof_doc.mustache new file mode 100644 index 00000000..5fff76c9 --- /dev/null +++ b/templates/libraries/jersey2/model_oneof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## oneOf schemas +{{#oneOf}} +* [{{{.}}}]({{{.}}}.md) +{{/oneOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#oneOf}} +import {{{package}}}.{{{.}}}; +{{/oneOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#oneOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/oneOf}} + } +} +``` diff --git a/templates/libraries/jersey2/model_test.mustache b/templates/libraries/jersey2/model_test.mustache new file mode 100644 index 00000000..acd659b6 --- /dev/null +++ b/templates/libraries/jersey2/model_test.mustache @@ -0,0 +1,44 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/templates/libraries/jersey2/oneof_model.mustache b/templates/libraries/jersey2/oneof_model.mustache new file mode 100644 index 00000000..1e004710 --- /dev/null +++ b/templates/libraries/jersey2/oneof_model.mustache @@ -0,0 +1,291 @@ +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using = {{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{classname}} new{{classname}} = new {{classname}}(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}"); + switch (discriminatorValue) { + {{#mappedModels}} + case "{{{mappingName}}}": + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{modelName}}}.class); + new{{classname}}.setActualInstance(deserialized); + return new{{classname}}; + {{/mappedModels}} + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); + } + + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + {{#composedSchemas}} + {{#oneOf}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} + try { + {{^isArray}} + boolean attemptParsing = true; + {{#isPrimitiveType}} + attemptParsing = typeCoercion; //respect type coercion setting + if (!attemptParsing) { + {{#isString}} + attemptParsing |= (token == JsonToken.VALUE_STRING); + {{/isString}} + {{#isInteger}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isInteger}} + {{#isLong}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isLong}} + {{#isShort}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isShort}} + {{#isFloat}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isFloat}} + {{#isDouble}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isDouble}} + {{#isNumber}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isNumber}} + {{#isDecimal}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isDecimal}} + {{#isBoolean}} + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); + {{/isBoolean}} + {{#isNullable}} + attemptParsing |= (token == JsonToken.VALUE_NULL); + {{/isNullable}} + } + {{/isPrimitiveType}} + if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{dataType}}}'"); + } + {{/isArray}} + {{#isArray}} + if (token == JsonToken.START_ARRAY) { + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{dataType}}}'"); + } + {{/isArray}} + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema '{{{dataType}}}'", e); + } + + {{/oneOf}} + {{/composedSchemas}} + if (match == 1) { + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public {{classname}}() { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + {{/vendorExtensions.x-duplicated-data-type}} + + {{/oneOf}} + {{/composedSchemas}} + static { + {{#oneOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/oneOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/oneOf}} + {{/composedSchemas}} +} diff --git a/templates/libraries/jersey2/pojo.mustache b/templates/libraries/jersey2/pojo.mustache new file mode 100644 index 00000000..d3fa205a --- /dev/null +++ b/templates/libraries/jersey2/pojo.mustache @@ -0,0 +1,417 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +@JsonTypeName("{{name}}") +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} + {{^vendorExtensions.x-enum-as-string}} +{{>modelInnerEnum}} + + {{/vendorExtensions.x-enum-as-string}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { {{#parent}}{{#parcelableModel}} + super();{{/parcelableModel}}{{/parent}}{{#gson}}{{#discriminator}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName();{{/discriminator}}{{/gson}} + }{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}}{{#jackson}} + + @JsonCreator + public {{classname}}( + {{#readOnlyVars}} + {{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + }{{/jackson}}{{/withXml}}{{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + {{#vendorExtensions.x-enum-as-string}} + public static final Set {{{nameInSnakeCase}}}_VALUES = new HashSet<>(Arrays.asList( + {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} + )); + + {{/vendorExtensions.x-enum-as-string}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} + {{#deprecated}} + @Deprecated + {{/deprecated}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/jersey2/additional_properties}} + + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#discriminator}} + static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + } +{{/discriminator}} +} diff --git a/templates/libraries/jersey2/pom.mustache b/templates/libraries/jersey2/pom.mustache new file mode 100644 index 00000000..1373579c --- /dev/null +++ b/templates/libraries/jersey2/pom.mustache @@ -0,0 +1,431 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + false + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + + attach-javadocs + + jar + + + + + none + 1.8 + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + org.glassfish.jersey.media + jersey-media-jaxb + ${jersey-version} + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#hasHttpSignatureMethods}} + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + + com.github.scribejava + scribejava-apis + ${scribejava-apis-version} + + {{/hasOAuthMethods}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey-version} + + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 2.37 + 2.17.1 + 2.17.1 + 0.2.6 + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + 5.10.0 + {{#hasHttpSignatureMethods}} + 1.8 + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + 8.3.3 + {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} + 2.21.0 + + diff --git a/templates/libraries/jersey3/AbstractOpenApiSchema.mustache b/templates/libraries/jersey3/AbstractOpenApiSchema.mustache new file mode 100644 index 00000000..8e5c32da --- /dev/null +++ b/templates/libraries/jersey3/AbstractOpenApiSchema.mustache @@ -0,0 +1,140 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import {{invokerPackage}}.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import {{javaxPackage}}.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +{{>generatedAnnotation}} + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + +{{>libraries/jersey2/additional_properties}} + + +} diff --git a/templates/libraries/jersey3/ApiClient.mustache b/templates/libraries/jersey3/ApiClient.mustache new file mode 100644 index 00000000..dc78a917 --- /dev/null +++ b/templates/libraries/jersey3/ApiClient.mustache @@ -0,0 +1,1517 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import {{javaxPackage}}.ws.rs.client.Client; +import {{javaxPackage}}.ws.rs.client.ClientBuilder; +import {{javaxPackage}}.ws.rs.client.Entity; +import {{javaxPackage}}.ws.rs.client.Invocation; +import {{javaxPackage}}.ws.rs.client.WebTarget; +import {{javaxPackage}}.ws.rs.core.Form; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.MediaType; +import {{javaxPackage}}.ws.rs.core.Response; +import {{javaxPackage}}.ws.rs.core.Response.Status; + +{{#hasOAuthMethods}} +import com.github.scribejava.core.model.OAuth2AccessToken; +{{/hasOAuthMethods}} +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.AbstractMap.SimpleEntry; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.stream.Collectors; +import java.util.stream.Stream; +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +{{#hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.HttpSignatureAuth; +{{/hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +/** + *

ApiClient class.

+ */ +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + protected Map defaultHeaderMap = new HashMap<>(); + protected Map defaultCookieMap = new HashMap<>(); + protected String basePath = "{{{basePath}}}"; + protected String userAgent; + protected static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + protected List servers = new ArrayList<>({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + {{^variables}} + new LinkedHashMap<>() + {{/variables}} + {{#variables}} + {{#-first}} + Stream.>of( + {{/-first}} + new SimpleEntry<>("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}} + "{{{.}}}"{{^-last}},{{/-last}}{{#-last}} + ){{/-last}}{{/enumValues}}) + )){{^-last}},{{/-last}} + {{#-last}} + ).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new)) + {{/-last}} + {{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + {{^hasOperationServers}} + protected Map> operationServers = new HashMap<>(); + {{/hasOperationServers}} + {{#hasOperationServers}} + protected Map> operationServers; + + { + Map> operationServers = new HashMap<>(); + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers}} + {{#-first}} + operationServers.put("{{{classname}}}.{{{operationId}}}", new ArrayList<>(Arrays.asList( + {{/-first}} + new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + {{^variables}} + new LinkedHashMap<>() + {{/variables}} + {{#variables}} + {{#-first}} + Stream.>of( + {{/-first}} + new SimpleEntry<>("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}} + "{{{.}}}"{{^-last}},{{/-last}}{{#-last}} + ){{/-last}}{{/enumValues}}) + )){{^-last}},{{/-last}} + {{#-last}} + ).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new)) + {{/-last}} + {{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ))); + {{/-last}} + {{/servers}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + this.operationServers = operationServers; + } + + {{/hasOperationServers}} + protected Map operationServerIndex = new HashMap<>(); + protected Map> operationServerVariables = new HashMap<>(); + protected boolean debugging = false; + protected ClientConfig clientConfig; + protected int connectionTimeout = 0; + protected int readTimeout = 0; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + protected Map authenticationLookup; + + protected DateFormat dateFormat; + + /** + * Constructs a new ApiClient with default parameters. + */ + public ApiClient() { + this(null); + } + + /** + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ + public ApiClient(Map authMap) { + json = new JSON(); + httpClient = buildHttpClient(); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>(); + Authentication auth = null; + {{#authMethods}} + if (authMap != null) { + auth = authMap.get("{{name}}"); + } + {{#isBasic}} + {{#isBasicBasic}} + if (auth instanceof HttpBasicAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBasicAuth()); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + if (auth instanceof HttpBearerAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}")); + } + {{/isBasicBearer}} + {{#isHttpSignature}} + if (auth instanceof HttpSignatureAuth) { + authentications.put("{{name}}", auth); + } + {{/isHttpSignature}} + {{/isBasic}} + {{#isApiKey}} + if (auth instanceof ApiKeyAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}")); + } + {{/isApiKey}} + {{#isOAuth}} + if (auth instanceof OAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new OAuth(basePath, "{{{tokenUrl}}}")); + } + {{/isOAuth}} + {{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + // Setup authentication lookup (key: authentication alias, value: authentication name) + authenticationLookup = new HashMap<>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}} + authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}} + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * + * @return JSON + */ + public JSON getJSON() { + return json; + } + + /** + *

Getter for the field httpClient.

+ * + * @return a {@link {{javaxPackage}}.ws.rs.client.Client} object. + */ + public Client getHttpClient() { + return httpClient; + } + + /** + *

Setter for the field httpClient.

+ * + * @param httpClient a {@link {{javaxPackage}}.ws.rs.client.Client} object. + * @return a {@link ApiClient} object. + */ + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ + public String getBasePath() { + return basePath; + } + + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + * @return a {@link ApiClient} object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + {{#hasOAuthMethods}} + setOauthBasePath(basePath); + {{/hasOAuthMethods}} + return this; + } + + /** + *

Getter for the field servers.

+ * + * @return a {@link java.util.List} of servers. + */ + public List getServers() { + return servers; + } + + /** + *

Setter for the field servers.

+ * + * @param servers a {@link java.util.List} of servers. + * @return a {@link ApiClient} object. + */ + public ApiClient setServers(List servers) { + this.servers = servers; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverIndex.

+ * + * @return a {@link java.lang.Integer} object. + */ + public Integer getServerIndex() { + return serverIndex; + } + + /** + *

Setter for the field serverIndex.

+ * + * @param serverIndex the server index + * @return a {@link ApiClient} object. + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverVariables.

+ * + * @return a {@link java.util.Map} of server variables. + */ + public Map getServerVariables() { + return serverVariables; + } + + /** + *

Setter for the field serverVariables.

+ * + * @param serverVariables a {@link java.util.Map} of server variables. + * @return a {@link ApiClient} object. + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + updateBasePath(); + return this; + } + + protected void updateBasePath() { + if (serverIndex != null) { + setBasePath(servers.get(serverIndex).URL(serverVariables)); + } + } + + {{#hasOAuthMethods}} + protected void setOauthBasePath(String basePath) { + for(Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setBasePath(basePath); + } + } + } + + {{/hasOAuthMethods}} + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + * @return a {@link ApiClient} object. + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + * @return a {@link ApiClient} object. + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to configure authentications which respects aliases of API keys. + * + * @param secrets Hash map from authentication name to its secret. + * @return a {@link ApiClient} object. + */ + public ApiClient configureApiKeys(Map secrets) { + for (Map.Entry authEntry : authentications.entrySet()) { + Authentication auth = authEntry.getValue(); + if (auth instanceof ApiKeyAuth) { + String name = authEntry.getKey(); + // respect x-auth-id-alias property + name = authenticationLookup.getOrDefault(name, name); + String secret = secrets.get(name); + if (secret != null) { + ((ApiKeyAuth) auth).setApiKey(secret); + } + } + } + return this; + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set bearer token for the first Bearer authentication. + * + * @param bearerToken Bearer token + * @return a {@link ApiClient} object. + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + * @return a {@link ApiClient} object. + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials for the first OAuth2 authentication. + * + * @param clientId the client ID + * @param clientSecret the client secret + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthCredentials(String clientId, String clientSecret) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials of a public client for the first OAuth2 authentication. + * + * @param clientId the client ID + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthCredentialsForPublicClient(String clientId) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentialsForPublicClient(clientId, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the password flow for the first OAuth2 authentication. + * + * @param username the user name + * @param password the user password + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthPasswordFlow(String username, String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).usePasswordFlow(username, password); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the authorization code flow for the first OAuth2 authentication. + * + * @param code the authorization code + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthAuthorizationCodeFlow(String code) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).useAuthorizationCodeFlow(code); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the scopes for the first OAuth2 authentication. + * + * @param scope the oauth scope + * @return a {@link ApiClient} object. + */ + public ApiClient setOauthScope(String scope) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setScope(scope); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent Http user agent + * @return a {@link ApiClient} object. + */ + public ApiClient setUserAgent(String userAgent) { + this.userAgent = userAgent; + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Get the User-Agent header's value. + * + * @return User-Agent string + */ + public String getUserAgent(){ + return userAgent; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Gets the client config. + * + * @return Client config + */ + public ClientConfig getClientConfig() { + return clientConfig; + } + + /** + * Set the client config. + * + * @param clientConfig Set the client config + * @return a {@link ApiClient} object. + */ + public ApiClient setClientConfig(ClientConfig clientConfig) { + this.clientConfig = clientConfig; + // Rebuild HTTP Client according to the new "clientConfig" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is switched on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return a {@link ApiClient} object. + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + applyDebugSetting(this.clientConfig); + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set temp folder path + * + * @param tempFolderPath Temp folder path + * @return a {@link ApiClient} object. + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + * + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout Connection timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * read timeout (in milliseconds). + * + * @return Read timeout + */ + public int getReadTimeout() { + return readTimeout; + } + + /** + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout Read timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * + * @param dateFormat Date format + * @return a {@link ApiClient} object. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList<>(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "*{@literal /}*" is also considered JSON by this method. + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + public boolean isJsonMime(String mime) { + return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches()); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String... accepts) { + if (accepts == null || accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String... contentTypes) { + if (contentTypes == null || contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception + */ + public Entity serialize(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + Entity entity; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); + } else { + addParamToMultipart(param.getValue(), param.getKey(), multiPart); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + if (isBodyNullable) { // payload is nullable + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "null" : obj, contentType); + } + } else { + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "" : obj, contentType); + } + } + } + return entity; + } + + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + protected void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @param isBodyNullable True if the body is nullable + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + if (isBodyNullable) { + return obj == null ? "null" : json.getMapper().writeValueAsString(obj); + } else { + return obj == null ? "" : json.getMapper().writeValueAsString(obj); + } + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.getRawType() == File.class) { + // Handle file downloading. + T file = (T) downloadFileFromResponse(response); + return file; + } + + // read the entity stream multiple times + response.bufferEntity(); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

Prepare the file for download from the response.

+ * + * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param operation The qualified name of the operation + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @param isBodyNullable True if the body is nullable + * @return The response body in type of string + * @throws ApiException API exception + */ + public ApiResponse invokeAPI( + String operation, + String path, + String method, + List queryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + GenericType returnType, + boolean isBodyNullable) + throws ApiException { + + String targetURL; + List serverConfigurations; + if (serverIndex != null && (serverConfigurations = operationServers.get(operation)) != null) { + int index = operationServerIndex.getOrDefault(operation, serverIndex).intValue(); + Map variables = operationServerVariables.getOrDefault(operation, serverVariables); + if (index < 0 || index >= serverConfigurations.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); + } + targetURL = serverConfigurations.get(index).URL(variables) + path; + } else { + targetURL = this.basePath + path; + } + // Not using `.target(targetURL).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + WebTarget target = httpClient.target(targetURL); + + // put all headers in one place + Map allHeaderParams = new HashMap<>(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + if (authNames != null) { + // update different parameters (e.g. headers) for authentication + updateParamsForAuth( + authNames, + queryParams, + allHeaderParams, + cookieParams, + {{#hasHttpSignatureMethods}} + serializeToString(body, formParams, contentType, isBodyNullable), + {{/hasHttpSignatureMethods}} + {{^hasHttpSignatureMethods}} + null, + {{/hasHttpSignatureMethods}} + method, + target.getUri()); + } + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); + } + } + } + + Invocation.Builder invocationBuilder = target.request(); + + if (accept != null) { + invocationBuilder = invocationBuilder.accept(accept); + } + + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + for (Entry entry : defaultCookieMap.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + Entity entity = serialize(body, formParams, contentType, isBodyNullable); + + for (Entry entry : allHeaderParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(entry.getKey(), value); + } + } + + Response response = null; + + try { + response = sendRequest(method, invocationBuilder, entity); + + final int statusCode = response.getStatusInfo().getStatusCode(); + + {{#hasOAuthMethods}} + // If OAuth is used and a status 401 is received, renew the access token and retry the request + if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) { + for (String authName : authNames) { + Authentication authentication = authentications.get(authName); + if (authentication instanceof OAuth) { + OAuth2AccessToken accessToken = ((OAuth) authentication).renewAccessToken(); + if (accessToken != null) { + invocationBuilder.header("Authorization", null); + invocationBuilder.header("Authorization", "Bearer " + accessToken.getAccessToken()); + response = sendRequest(method, invocationBuilder, entity); + } + break; + } + } + } + + {{/hasOAuthMethods}} + Map> responseHeaders = buildResponseHeaders(response); + + if (statusCode == Status.NO_CONTENT.getStatusCode()) { + return new ApiResponse(statusCode, responseHeaders); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) { + return new ApiResponse(statusCode, responseHeaders); + } else { + return new ApiResponse(statusCode, responseHeaders, deserialize(response, returnType)); + } + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), message, buildResponseHeaders(response), respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, + // just continue + } + } + } + + protected Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { + Response response; + if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else { + response = invocationBuilder.method(method); + } + return response; + } + + /** + * @deprecated Add qualified name of the operation as a first parameter. + */ + @Deprecated + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, boolean isBodyNullable) throws ApiException { + return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable); + } + + /** + * Build the Client used to make HTTP requests. + * + * @return Client + */ + protected Client buildHttpClient() { + // Create ClientConfig if it has not been initialized yet + if (clientConfig == null) { + clientConfig = getDefaultClientConfig(); + } + + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + clientBuilder = clientBuilder.withConfig(clientConfig); + customizeClientBuilder(clientBuilder); + return clientBuilder.build(); + } + + /** + * Get the default client config. + * + * @return Client config + */ + public ClientConfig getDefaultClientConfig() { + ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); + // turn off compliance validation to be able to send payloads with DELETE calls + clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + applyDebugSetting(clientConfig); + return clientConfig; + } + + protected void applyDebugSetting(ClientConfig clientConfig) { + if (debugging) { + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + // Set logger to ALL + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + } else { + // suppress warnings for payloads with DELETE calls: + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); + } + } + + /** + * Customize the client builder. + * + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. + * + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). + * + * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. + */ + protected void customizeClientBuilder(ClientBuilder clientBuilder) { + // No-op extension point + } + + /** + * Disable X.509 certificate validation in TLS connections. + * + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. + * + * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. + * @throws java.security.KeyManagementException if any. + * @throws java.security.NoSuchAlgorithmException if any. + */ + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new SecureRandom()); + clientBuilder.sslContext(sslContext); + } + + /** + *

Build the response headers.

+ * + * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. + * @return a {@link java.util.Map} of response headers. + */ + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap<>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList<>(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + continue; + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } +} \ No newline at end of file diff --git a/templates/libraries/jersey3/ApiResponse.mustache b/templates/libraries/jersey3/ApiResponse.mustache new file mode 100644 index 00000000..86c889b0 --- /dev/null +++ b/templates/libraries/jersey3/ApiResponse.mustache @@ -0,0 +1,73 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.List; +import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/templates/libraries/jersey3/JSON.mustache b/templates/libraries/jersey3/JSON.mustache new file mode 100644 index 00000000..55b6e232 --- /dev/null +++ b/templates/libraries/jersey3/JSON.mustache @@ -0,0 +1,262 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.ext.ContextResolver; + +{{>generatedAnnotation}} + +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) + .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + {{#joda}} + .addModule(new JodaModule()) + {{/joda}} + {{#openApiNullable}} + .addModule(new JsonNullableModule()) + {{/openApiNullable}} + .addModule(new RFC3339JavaTimeModule()) + .build(); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet<>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap<>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/templates/libraries/jersey3/additional_properties.mustache b/templates/libraries/jersey3/additional_properties.mustache new file mode 100644 index 00000000..2955e939 --- /dev/null +++ b/templates/libraries/jersey3/additional_properties.mustache @@ -0,0 +1,39 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap<>(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/jersey3/anyof_model.mustache b/templates/libraries/jersey3/anyof_model.mustache new file mode 100644 index 00000000..5c2c2a4e --- /dev/null +++ b/templates/libraries/jersey3/anyof_model.mustache @@ -0,0 +1,229 @@ +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + {{#discriminator}} + Class cls = JSON.getClassForElement(tree, new {{classname}}().getClass()); + if (cls != null) { + // When the OAS schema includes a discriminator, use the discriminator value to + // discriminate the anyOf schemas. + // Get the discriminator mapping value to get the class. + deserialized = tree.traverse(jp.getCodec()).readValueAs(cls); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + {{/discriminator}} + {{#composedSchemas}} + {{#anyOf}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} + try { + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match '{{classname}}'", e); + } + + {{/anyOf}} + {{/composedSchemas}} + throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap<>(); + + public {{classname}}() { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + static { + {{#anyOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/anyOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/anyOf}} + {{/composedSchemas}} +} diff --git a/templates/libraries/jersey3/api.mustache b/templates/libraries/jersey3/api.mustache new file mode 100644 index 00000000..c663d758 --- /dev/null +++ b/templates/libraries/jersey3/api.mustache @@ -0,0 +1,298 @@ +package {{package}}; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +import {{javaxPackage}}.ws.rs.core.GenericType; + +{{#imports}}import {{import}}; +{{/imports}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{.}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; + } + {{/vendorExtensions.x-group-parameters}} + + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#hasRequiredParams}} + // Check required parameters + {{#allParams}} + {{#required}} + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}} + {{/allParams}} + + {{/hasRequiredParams}} + {{#hasPathParams}} + // Path parameters + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll({{=% %=}}"\\{%baseName%}"%={{ }}=%, apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + + {{/hasPathParams}} + {{#queryParams}} + {{#-first}} + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}) + ); + {{/-first}} + {{^-first}} + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/-first}} + {{#-last}} + + {{/-last}} + {{/queryParams}} + {{#headerParams}} + {{#-first}} + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/headerParams}} + {{#cookieParams}} + {{#-first}} + // Cookie parameters + Map localVarCookieParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/cookieParams}} + {{#formParams}} + {{#-first}} + // Form parameters + Map localVarFormParams = new LinkedHashMap<>(); + {{/-first}} + {{^required}}if ({{paramName}} != null) { + {{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}} + }{{/required}} + {{#-last}} + + {{/-last}} + {{/formParams}} + String localVarAccept = apiClient.selectHeaderAccept({{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}); + String localVarContentType = apiClient.selectHeaderContentType({{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}); + {{#hasAuthMethods}} + String[] localVarAuthNames = {{=% %=}}new String[] {%#authMethods%"%name%"%^-last%, %/-last%%/authMethods%};%={{ }}=% + {{/hasAuthMethods}} + {{#returnType}} + GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; + {{/returnType}} + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, + {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); + } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#allParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{dataType}}} {{paramName}}; + {{/allParams}} + + private API{{operationId}}Request({{#pathParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) { + {{#pathParams}} + this.{{paramName}} = {{paramName}}; + {{/pathParams}} + } + {{#allParams}} + {{^isPathParam}} + + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + {{/isPathParam}} + {{/allParams}} + + /** + * Execute {{operationId}} request + {{#returnType}}* @return {{.}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData(); + } + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + } + + /** + * {{summary}} + * {{notes}}{{#pathParams}} + * @param {{paramName}} {{description}} (required){{/pathParams}} + * @return {{operationId}}Request + * @throws ApiException if fails to make API call + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + {{#externalDocs}}* {{description}} + * @see {{summary}} Documentation{{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#pathParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) throws ApiException { + return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}); + } + {{/vendorExtensions.x-group-parameters}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/jersey3/apiException.mustache b/templates/libraries/jersey3/apiException.mustache new file mode 100644 index 00000000..d957acd8 --- /dev/null +++ b/templates/libraries/jersey3/apiException.mustache @@ -0,0 +1,102 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API Exception + */ +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/templates/libraries/jersey3/api_doc.mustache b/templates/libraries/jersey3/api_doc.mustache new file mode 100644 index 00000000..26c98508 --- /dev/null +++ b/templates/libraries/jersey3/api_doc.mustache @@ -0,0 +1,124 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{{unescapedNotes}}}{{/notes}} + +### Example + +```java +{{#vendorExtensions.x-java-import}} +import {{.}}; +{{/vendorExtensions.x-java-import}} +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.model.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/templates/libraries/jersey3/api_test.mustache b/templates/libraries/jersey3/api_test.mustache new file mode 100644 index 00000000..926ba0a8 --- /dev/null +++ b/templates/libraries/jersey3/api_test.mustache @@ -0,0 +1,62 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.*; +import {{invokerPackage}}.auth.*; +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{/summary}} + {{#notes}} + * {{notes}} + * + {{/notes}} + * @throws ApiException if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + //{{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + // .execute(); + {{/vendorExtensions.x-group-parameters}} + // TODO: test validations + } + + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/jersey3/auth/ApiKeyAuth.mustache b/templates/libraries/jersey3/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..82576065 --- /dev/null +++ b/templates/libraries/jersey3/auth/ApiKeyAuth.mustache @@ -0,0 +1,69 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/templates/libraries/jersey3/auth/Authentication.mustache b/templates/libraries/jersey3/auth/Authentication.mustache new file mode 100644 index 00000000..169e3abd --- /dev/null +++ b/templates/libraries/jersey3/auth/Authentication.mustache @@ -0,0 +1,24 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/templates/libraries/jersey3/auth/HttpBasicAuth.mustache b/templates/libraries/jersey3/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..2a8774b6 --- /dev/null +++ b/templates/libraries/jersey3/auth/HttpBasicAuth.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/jersey3/auth/HttpBearerAuth.mustache b/templates/libraries/jersey3/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..cb78e479 --- /dev/null +++ b/templates/libraries/jersey3/auth/HttpBearerAuth.mustache @@ -0,0 +1,52 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/jersey3/auth/HttpSignatureAuth.mustache b/templates/libraries/jersey3/auth/HttpSignatureAuth.mustache new file mode 100644 index 00000000..ac0a77db --- /dev/null +++ b/templates/libraries/jersey3/auth/HttpSignatureAuth.mustache @@ -0,0 +1,269 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.Key; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.List; +import java.util.TimeZone; +import java.security.spec.AlgorithmParameterSpec; +import java.security.InvalidKeyException; + +import org.tomitribe.auth.signatures.Algorithm; +import org.tomitribe.auth.signatures.Signer; +import org.tomitribe.auth.signatures.Signature; +import org.tomitribe.auth.signatures.SigningAlgorithm; + +/** + * A Configuration object for the HTTP message signature security scheme. + */ +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + + // The HTTP signature algorithm. + private SigningAlgorithm signingAlgorithm; + + // The HTTP cryptographic algorithm. + private Algorithm algorithm; + + // The cryptographic parameters. + private AlgorithmParameterSpec parameterSpec; + + // The list of HTTP headers that should be included in the HTTP signature. + private List headers; + + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + // The maximum validity duration of the HTTP signature. + private Long maxSignatureValidity; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param signingAlgorithm The signature algorithm. + * @param algorithm The cryptographic algorithm. + * @param digestAlgorithm The digest algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + * @param maxSignatureValidity The maximum validity duration of the HTTP signature. + * Used to set the '(expires)' field in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, + SigningAlgorithm signingAlgorithm, + Algorithm algorithm, + String digestAlgorithm, + AlgorithmParameterSpec parameterSpec, + List headers, + Long maxSignatureValidity) { + this.keyId = keyId; + this.signingAlgorithm = signingAlgorithm; + this.algorithm = algorithm; + this.parameterSpec = parameterSpec; + this.digestAlgorithm = digestAlgorithm; + this.headers = headers; + this.maxSignatureValidity = maxSignatureValidity; + } + + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; + } + + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ + public SigningAlgorithm getSigningAlgorithm() { + return signingAlgorithm; + } + + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param signingAlgorithm The HTTP signature algorithm. + */ + public void setSigningAlgorithm(SigningAlgorithm signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + /** + * Returns the HTTP cryptographic algorithm which is used to sign HTTP requests. + */ + public Algorithm getAlgorithm() { + return algorithm; + } + + /** + * Sets the HTTP cryptographic algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + /** + * Returns the cryptographic parameters which are used to sign HTTP requests. + */ + public AlgorithmParameterSpec getAlgorithmParameterSpec() { + return parameterSpec; + } + + /** + * Sets the cryptographic parameters which are used to sign HTTP requests. + * + * @param parameterSpec The cryptographic parameters. + */ + public void setAlgorithmParameterSpec(AlgorithmParameterSpec parameterSpec) { + this.parameterSpec = parameterSpec; + } + + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ + public List getHeaders() { + return headers; + } + + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ + public void setHeaders(List headers) { + this.headers = headers; + } + + /** + * Returns the maximum validity duration of the HTTP signature. + * @return The maximum validity duration of the HTTP signature. + */ + public Long getMaxSignatureValidity() { + return maxSignatureValidity; + } + + /** + * Returns the signer instance used to sign HTTP messages. + * + * @return the signer instance. + */ + public Signer getSigner() { + return signer; + } + + /** + * Sets the signer instance used to sign HTTP messages. + * + * @param signer The signer instance to set. + */ + public void setSigner(Signer signer) { + this.signer = signer; + } + + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. + */ + public void setPrivateKey(Key key) throws InvalidKeyException, ApiException { + if (key == null) { + throw new ApiException("Private key (java.security.Key) cannot be null"); + } + signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers, maxSignatureValidity)); + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + try { + if (headers.contains("host")) { + headerParams.put("host", uri.getHost()); + } + + if (headers.contains("date")) { + SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + headerParams.put("date", dateFormat.format(Calendar.getInstance().getTime())); + } + + if (headers.contains("digest")) { + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); + } + + // construct the path with the URL-encoded path and query. + // Calling getRawPath and getRawQuery ensures the path is URL-encoded as it will be serialized + // on the wire. The HTTP signature must use the encode URL as it is sent on the wire. + String path = uri.getRawPath(); + if (uri.getRawQuery() != null && !"".equals(uri.getRawQuery())) { + path += "?" + uri.getRawQuery(); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} diff --git a/templates/libraries/jersey3/auth/OAuth.mustache b/templates/libraries/jersey3/auth/OAuth.mustache new file mode 100644 index 00000000..4725badf --- /dev/null +++ b/templates/libraries/jersey3/auth/OAuth.mustache @@ -0,0 +1,196 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.exceptions.OAuthException; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth.OAuth20Service; + +import {{javaxPackage}}.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; +import java.util.logging.Logger; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private static final Logger log = Logger.getLogger(OAuth.class.getName()); + + private String tokenUrl; + private String absoluteTokenUrl; + private OAuthFlow flow = OAuthFlow.APPLICATION; + private OAuth20Service service; + private DefaultApi20 authApi; + private String scope; + private String username; + private String password; + private String code; + private volatile OAuth2AccessToken accessToken; + + public OAuth(String basePath, String tokenUrl) { + this.tokenUrl = tokenUrl; + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + authApi = new DefaultApi20() { + @Override + public String getAccessTokenEndpoint() { + return absoluteTokenUrl; + } + + @Override + protected String getAuthorizationBaseUrl() { + throw new UnsupportedOperationException("Shouldn't get there !"); + } + }; + } + + private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { + if (!URI.create(tokenUrl).isAbsolute()) { + try { + return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); + } catch (MalformedURLException e) { + log.log(Level.SEVERE, "Couldn't create absolute token URL", e); + } + } + return tokenUrl; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + + if (accessToken == null) { + obtainAccessToken(null); + } + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + } + } + + public OAuth2AccessToken renewAccessToken() throws ApiException { + String refreshToken = null; + if (accessToken != null) { + refreshToken = accessToken.getRefreshToken(); + accessToken = null; + } + return obtainAccessToken(refreshToken); + } + + public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { + if (service == null) { + log.log(Level.FINE, "service is null in obtainAccessToken."); + return null; + } + try { + if (refreshToken != null) { + return service.refreshAccessToken(refreshToken); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException("Refreshing the access token using the refresh token failed: " + e.toString()); + } + try { + switch (flow) { + case PASSWORD: + if (username != null && password != null) { + accessToken = service.getAccessTokenPasswordGrant(username, password, scope); + } + break; + case ACCESS_CODE: + if (code != null) { + accessToken = service.getAccessToken(code); + code = null; + } + break; + case APPLICATION: + accessToken = service.getAccessTokenClientCredentialsGrant(scope); + break; + default: + log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException(e); + } + return accessToken; + } + + public OAuth2AccessToken getAccessToken() { + return accessToken; + } + + public OAuth setAccessToken(OAuth2AccessToken accessToken) { + this.accessToken = accessToken; + return this; + } + + public OAuth setAccessToken(String accessToken) { + this.accessToken = new OAuth2AccessToken(accessToken); + return this; + } + + public OAuth setScope(String scope) { + this.scope = scope; + return this; + } + + public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret).debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .build(authApi); + } + return this; + } + + public OAuth setCredentialsForPublicClient(String clientId, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecretIsEmptyStringUnsafe().debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecretIsEmptyStringUnsafe() + .build(authApi); + } + return this; + } + + public OAuth usePasswordFlow(String username, String password) { + this.flow = OAuthFlow.PASSWORD; + this.username = username; + this.password = password; + return this; + } + + public OAuth useAuthorizationCodeFlow(String code) { + this.flow = OAuthFlow.ACCESS_CODE; + this.code = code; + return this; + } + + public OAuth setFlow(OAuthFlow flow) { + this.flow = flow; + return this; + } + + public void setBasePath(String basePath) { + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + } +} diff --git a/templates/libraries/jersey3/auth/OAuthFlow.mustache b/templates/libraries/jersey3/auth/OAuthFlow.mustache new file mode 100644 index 00000000..190781fb --- /dev/null +++ b/templates/libraries/jersey3/auth/OAuthFlow.mustache @@ -0,0 +1,13 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +/** + * OAuth flows that are supported by this client + */ +public enum OAuthFlow { + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION +} diff --git a/templates/libraries/jersey3/build.gradle.mustache b/templates/libraries/jersey3/build.gradle.mustache new file mode 100644 index 00000000..3c87fc23 --- /dev/null +++ b/templates/libraries/jersey3/build.gradle.mustache @@ -0,0 +1,189 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.6.5" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "2.1.0" + {{#useBeanValidation}} + bean_validation_version = "3.0.2" + {{/useBeanValidation}} + jersey_version = "3.0.4" + junit_version = "5.8.2" + {{#hasOAuthMethods}} + scribejava_apis_version = "8.3.1" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + tomitribe_http_signatures_version = "1.7" + {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.glassfish.jersey.core:jersey-client:$jersey_version" + implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" + implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#hasOAuthMethods}} + implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" + {{/hasHttpSignatureMethods}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/templates/libraries/jersey3/build.sbt.mustache b/templates/libraries/jersey3/build.sbt.mustache new file mode 100644 index 00000000..e6c7b8e5 --- /dev/null +++ b/templates/libraries/jersey3/build.sbt.mustache @@ -0,0 +1,41 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + Compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.google.code.findbugs" % "jsr305" % "3.0.0", + "io.swagger" % "swagger-annotations" % "1.6.5", + "org.glassfish.jersey.core" % "jersey-client" % "3.0.4", + "org.glassfish.jersey.inject" % "jersey-hk2" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "3.0.4", + "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "3.0.4", + "com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile", + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.17.1" % "compile", + {{/joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.17.1" % "compile", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.6" % "compile", + {{/openApiNullable}} + {{#hasOAuthMethods}} + "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", + {{/hasHttpSignatureMethods}} + "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" + ) + ) diff --git a/templates/libraries/jersey3/generatedAnnotation.mustache b/templates/libraries/jersey3/generatedAnnotation.mustache new file mode 100644 index 00000000..e05689d5 --- /dev/null +++ b/templates/libraries/jersey3/generatedAnnotation.mustache @@ -0,0 +1 @@ +@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}, comments = "Generator version: {{generatorVersion}}") \ No newline at end of file diff --git a/templates/libraries/jersey3/model.mustache b/templates/libraries/jersey3/model.mustache new file mode 100644 index 00000000..2758278a --- /dev/null +++ b/templates/libraries/jersey3/model.mustache @@ -0,0 +1,63 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +{{/withXml}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +import {{invokerPackage}}.JSON; + +{{#models}} +{{#model}} +{{#oneOf}} +{{#-first}} +import com.fasterxml.jackson.core.type.TypeReference; +{{/-first}} +{{/oneOf}} + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/jersey3/model_anyof_doc.mustache b/templates/libraries/jersey3/model_anyof_doc.mustache new file mode 100644 index 00000000..e360aa56 --- /dev/null +++ b/templates/libraries/jersey3/model_anyof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## anyOf schemas +{{#anyOf}} +* [{{{.}}}]({{{.}}}.md) +{{/anyOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#anyOf}} +import {{{package}}}.{{{.}}}; +{{/anyOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#anyOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/anyOf}} + } +} +``` diff --git a/templates/libraries/jersey3/model_doc.mustache b/templates/libraries/jersey3/model_doc.mustache new file mode 100644 index 00000000..f17263f0 --- /dev/null +++ b/templates/libraries/jersey3/model_doc.mustache @@ -0,0 +1,23 @@ +{{#models}}{{#model}} + +{{#isEnum}} +{{>enum_outer_doc}} + +{{/isEnum}} +{{^isEnum}} +{{^oneOf.isEmpty}} +{{>model_oneof_doc}} + +{{/oneOf.isEmpty}} +{{^anyOf.isEmpty}} +{{>model_anyof_doc}} + +{{/anyOf.isEmpty}} +{{^anyOf}} +{{^oneOf}} +{{>pojo_doc}} + +{{/oneOf}} +{{/anyOf}} +{{/isEnum}} +{{/model}}{{/models}} diff --git a/templates/libraries/jersey3/model_oneof_doc.mustache b/templates/libraries/jersey3/model_oneof_doc.mustache new file mode 100644 index 00000000..5fff76c9 --- /dev/null +++ b/templates/libraries/jersey3/model_oneof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## oneOf schemas +{{#oneOf}} +* [{{{.}}}]({{{.}}}.md) +{{/oneOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#oneOf}} +import {{{package}}}.{{{.}}}; +{{/oneOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#oneOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/oneOf}} + } +} +``` diff --git a/templates/libraries/jersey3/model_test.mustache b/templates/libraries/jersey3/model_test.mustache new file mode 100644 index 00000000..acd659b6 --- /dev/null +++ b/templates/libraries/jersey3/model_test.mustache @@ -0,0 +1,44 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/templates/libraries/jersey3/oneof_model.mustache b/templates/libraries/jersey3/oneof_model.mustache new file mode 100644 index 00000000..1e004710 --- /dev/null +++ b/templates/libraries/jersey3/oneof_model.mustache @@ -0,0 +1,291 @@ +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using = {{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{classname}} new{{classname}} = new {{classname}}(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}"); + switch (discriminatorValue) { + {{#mappedModels}} + case "{{{mappingName}}}": + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{modelName}}}.class); + new{{classname}}.setActualInstance(deserialized); + return new{{classname}}; + {{/mappedModels}} + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); + } + + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + {{#composedSchemas}} + {{#oneOf}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} + try { + {{^isArray}} + boolean attemptParsing = true; + {{#isPrimitiveType}} + attemptParsing = typeCoercion; //respect type coercion setting + if (!attemptParsing) { + {{#isString}} + attemptParsing |= (token == JsonToken.VALUE_STRING); + {{/isString}} + {{#isInteger}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isInteger}} + {{#isLong}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isLong}} + {{#isShort}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_INT); + {{/isShort}} + {{#isFloat}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isFloat}} + {{#isDouble}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isDouble}} + {{#isNumber}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isNumber}} + {{#isDecimal}} + attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); + {{/isDecimal}} + {{#isBoolean}} + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); + {{/isBoolean}} + {{#isNullable}} + attemptParsing |= (token == JsonToken.VALUE_NULL); + {{/isNullable}} + } + {{/isPrimitiveType}} + if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{dataType}}}'"); + } + {{/isArray}} + {{#isArray}} + if (token == JsonToken.START_ARRAY) { + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{dataType}}}'"); + } + {{/isArray}} + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema '{{{dataType}}}'", e); + } + + {{/oneOf}} + {{/composedSchemas}} + if (match == 1) { + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public {{classname}}() { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + {{/vendorExtensions.x-duplicated-data-type}} + + {{/oneOf}} + {{/composedSchemas}} + static { + {{#oneOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/oneOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/oneOf}} + {{/composedSchemas}} +} diff --git a/templates/libraries/jersey3/pojo.mustache b/templates/libraries/jersey3/pojo.mustache new file mode 100644 index 00000000..d3fa205a --- /dev/null +++ b/templates/libraries/jersey3/pojo.mustache @@ -0,0 +1,417 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +@JsonTypeName("{{name}}") +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} + {{^vendorExtensions.x-enum-as-string}} +{{>modelInnerEnum}} + + {{/vendorExtensions.x-enum-as-string}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { {{#parent}}{{#parcelableModel}} + super();{{/parcelableModel}}{{/parent}}{{#gson}}{{#discriminator}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName();{{/discriminator}}{{/gson}} + }{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}}{{#jackson}} + + @JsonCreator + public {{classname}}( + {{#readOnlyVars}} + {{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + }{{/jackson}}{{/withXml}}{{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + {{#vendorExtensions.x-enum-as-string}} + public static final Set {{{nameInSnakeCase}}}_VALUES = new HashSet<>(Arrays.asList( + {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} + )); + + {{/vendorExtensions.x-enum-as-string}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} + {{#deprecated}} + @Deprecated + {{/deprecated}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/jersey2/additional_properties}} + + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#discriminator}} + static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + } +{{/discriminator}} +} diff --git a/templates/libraries/jersey3/pom.mustache b/templates/libraries/jersey3/pom.mustache new file mode 100644 index 00000000..7a119555 --- /dev/null +++ b/templates/libraries/jersey3/pom.mustache @@ -0,0 +1,431 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + false + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + + attach-javadocs + + jar + + + + + none + 1.8 + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + org.glassfish.jersey.media + jersey-media-jaxb + ${jersey-version} + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#hasHttpSignatureMethods}} + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + + com.github.scribejava + scribejava-apis + ${scribejava-apis-version} + + {{/hasOAuthMethods}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey-version} + + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 3.1.1 + 2.17.1 + 2.17.1 + 0.2.6 + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + 5.10.0 + {{#hasHttpSignatureMethods}} + 1.8 + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + 8.3.3 + {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} + 2.21.0 + + diff --git a/templates/libraries/microprofile/README.mustache b/templates/libraries/microprofile/README.mustache new file mode 100644 index 00000000..377dfc2c --- /dev/null +++ b/templates/libraries/microprofile/README.mustache @@ -0,0 +1,19 @@ +# {{appName}} - MicroProfile Rest Client & MicroProfile Server + +{{#appDescriptionWithNewLines}} +{{{.}}} + +{{/appDescriptionWithNewLines}} +{{^microprofileServer}} +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling +REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes. +{{/microprofileServer}} + +{{#microprofileServer}} +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +The generated server contains an interface which acts as the server, you can inject it into the controller class. +This module is intended to provide additional server features, like accessing an operations response object, when multiple responses where specified. +{{/microprofileServer}} \ No newline at end of file diff --git a/templates/libraries/microprofile/additional_properties.mustache b/templates/libraries/microprofile/additional_properties.mustache new file mode 100644 index 00000000..538635ca --- /dev/null +++ b/templates/libraries/microprofile/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @com.fasterxml.jackson.annotation.JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @com.fasterxml.jackson.annotation.JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} \ No newline at end of file diff --git a/templates/libraries/microprofile/api.mustache b/templates/libraries/microprofile/api.mustache new file mode 100644 index 00000000..a77a8e1a --- /dev/null +++ b/templates/libraries/microprofile/api.mustache @@ -0,0 +1,127 @@ +{{>licenseInfo}} +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import {{rootJavaEEPackage}}.ws.rs.*; +import {{rootJavaEEPackage}}.ws.rs.core.Response; +import {{rootJavaEEPackage}}.ws.rs.core.MediaType; +{{^disableMultipart}} +import org.apache.cxf.jaxrs.ext.multipart.*; +{{/disableMultipart}} +{{#microprofileMutiny}} +import io.smallrye.mutiny.Uni; +{{/microprofileMutiny}} + +{{#useBeanValidation}} +import {{rootJavaEEPackage}}.validation.constraints.*; +import {{rootJavaEEPackage}}.validation.Valid; +{{/useBeanValidation}} + +{{#microprofileRegisterExceptionMapper}} +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +{{/microprofileRegisterExceptionMapper}} +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +{{#appName}} +/** + * {{{appName}}} + * + {{#appDescription}} + *

{{{.}}} + * + {{/appDescription}} + */ +{{/appName}} + +{{^microprofileServer}} +@RegisterRestClient{{#configKey}}(configKey="{{configKey}}"){{/configKey}}{{#configKeyFromClassName}}{{#operations}}(configKey="{{configKey}}"){{/operations}}{{/configKeyFromClassName}} +{{/microprofileServer}} +{{#microprofileRegisterExceptionMapper}} +@RegisterProvider(ApiExceptionMapper.class) +{{/microprofileRegisterExceptionMapper}} +@Path("{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}{{commonPath}}") +public interface {{classname}} { +{{#operations}} +{{#operation}} + + {{#summary}} + /** + * {{summary}} + * + {{#notes}} + * {{.}} + * + {{/notes}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{/summary}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + @{{httpMethod}} + {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} +{{#hasConsumes}} + @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }) +{{/hasConsumes}} +{{#hasProduces}} + @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) +{{/hasProduces}} +{{^singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; +{{/singleRequestParameter}} +{{#singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException; + {{#hasNonBodyParams}} + public class {{operationIdCamelCase}}Request { + + {{#queryParams}} + private {{>queryParams}}; + {{/queryParams}} + {{#headerParams}} + private {{>headerParams}}; + {{/headerParams}} + {{#pathParams}} + private {{>pathParams}}; + {{/pathParams}} + {{#formParams}} + private {{>formParams}}; + {{/formParams}} + {{#cookieParams}} + private {{>cookieParams}}; + {{/cookieParams}} + + private {{operationIdCamelCase}}Request() { + } + + public static {{operationIdCamelCase}}Request newInstance() { + return new {{operationIdCamelCase}}Request(); + } + + {{#allParams}} + {{^isBodyParam}} + /** + * Set {{paramName}}{{>formParamsNameSuffix}} + * @param {{paramName}}{{>formParamsNameSuffix}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return {{operationIdCamelCase}}Request + */ + public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}{{>cookieParamsImpl}}) { + this.{{paramName}}{{>formParamsNameSuffix}} = {{paramName}}{{>formParamsNameSuffix}}; + return this; + } + {{/isBodyParam}} + {{/allParams}} + } + {{/hasNonBodyParams}} +{{/singleRequestParameter}} +{{/operation}} +} +{{/operations}} diff --git a/templates/libraries/microprofile/api_exception.mustache b/templates/libraries/microprofile/api_exception.mustache new file mode 100644 index 00000000..63a21867 --- /dev/null +++ b/templates/libraries/microprofile/api_exception.mustache @@ -0,0 +1,23 @@ +{{>licenseInfo}} +package {{apiPackage}}; + +import {{rootJavaEEPackage}}.ws.rs.core.Response; + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + + private static final long serialVersionUID = 1L; + private Response response; + + public ApiException() { + super(); + } + + public ApiException(Response response) { + super("Api response has status code " + response.getStatus()); + this.response = response; + } + + public Response getResponse() { + return this.response; + } +} diff --git a/templates/libraries/microprofile/api_exception_mapper.mustache b/templates/libraries/microprofile/api_exception_mapper.mustache new file mode 100644 index 00000000..2842b1c8 --- /dev/null +++ b/templates/libraries/microprofile/api_exception_mapper.mustache @@ -0,0 +1,26 @@ +{{>licenseInfo}} +package {{apiPackage}}; + +import {{rootJavaEEPackage}}.ws.rs.core.MultivaluedMap; +import {{rootJavaEEPackage}}.ws.rs.core.Response; +{{#microprofileGlobalExceptionMapper}} +import {{rootJavaEEPackage}}.ws.rs.ext.Provider; +{{/microprofileGlobalExceptionMapper}} +import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; + +{{#microprofileGlobalExceptionMapper}} +@Provider +{{/microprofileGlobalExceptionMapper}} +public class ApiExceptionMapper + implements ResponseExceptionMapper { + + @Override + public boolean handles(int status, MultivaluedMap headers) { + return status >= 400; + } + + @Override + public ApiException toThrowable(Response response) { + return new ApiException(response); + } +} diff --git a/templates/libraries/microprofile/api_test.mustache b/templates/libraries/microprofile/api_test.mustache new file mode 100644 index 00000000..d9af8771 --- /dev/null +++ b/templates/libraries/microprofile/api_test.mustache @@ -0,0 +1,81 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; +{{#generateSpringBootApplication}} +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; +{{/generateSpringBootApplication}} + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + {{#appName}} + * {{{.}}} Test + * + {{/appName}} + * API tests for {{classname}} + */ +{{#generateSpringBootApplication}} +@ExtendWith(SpringExtension.class) +@SpringApplicationConfiguration(classes = SpringBootApplication.class) +@WebAppConfiguration +@IntegrationTest("server.port=0") +{{/generateSpringBootApplication}} +public class {{classname}}Test { + + private {{classname}} client; + private String baseUrl = "http://localhost:9080"; + + @BeforeEach + public void setup() throws MalformedURLException { + {{#microprofile3}} + // TODO initialize the client + {{/microprofile3}} + {{^microprofile3}} + client = RestClientBuilder.newBuilder() + .baseUrl(new URL(baseUrl)) + .register(ApiException.class) + .build({{classname}}.class); + {{/microprofile3}} + } + + {{#operations}}{{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{#notes}} + * {{.}} + * + {{/notes}} + {{/summary}} + * @throws ApiException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() { + // TODO: test validations + {{#allParams}} + {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}} + {{/allParams}} + //{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + //{{#returnType}}Assertions.assertNotNull(response);{{/returnType}} + + + } + {{/operation}}{{/operations}} +} diff --git a/templates/libraries/microprofile/beanValidation.mustache b/templates/libraries/microprofile/beanValidation.mustache new file mode 100644 index 00000000..f8724b24 --- /dev/null +++ b/templates/libraries/microprofile/beanValidation.mustache @@ -0,0 +1,6 @@ +{{#required}} +{{^isReadOnly}} + @NotNull +{{/isReadOnly}} +{{/required}} +{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/libraries/microprofile/beanValidationCookieParams.mustache b/templates/libraries/microprofile/beanValidationCookieParams.mustache new file mode 100644 index 00000000..c4ff01d7 --- /dev/null +++ b/templates/libraries/microprofile/beanValidationCookieParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/libraries/microprofile/beanValidationCore.mustache b/templates/libraries/microprofile/beanValidationCore.mustache new file mode 100644 index 00000000..b58f0a26 --- /dev/null +++ b/templates/libraries/microprofile/beanValidationCore.mustache @@ -0,0 +1,20 @@ +{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{! +minLength && maxLength set +}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +minLength set, maxLength not +}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! +minLength not set, maxLength set +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! +@Size: minItems && maxItems set +}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems set, maxItems not +}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems not set && maxItems set +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! +check for integer or long / all others=decimal type with @Decimal* +isInteger set +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! +isLong set +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! +Not Integer, not Long => we have a decimal value! +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/templates/libraries/microprofile/beanValidationHeaderParams.mustache b/templates/libraries/microprofile/beanValidationHeaderParams.mustache new file mode 100644 index 00000000..c4ff01d7 --- /dev/null +++ b/templates/libraries/microprofile/beanValidationHeaderParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/libraries/microprofile/beanValidationPathParams.mustache b/templates/libraries/microprofile/beanValidationPathParams.mustache new file mode 100644 index 00000000..051bd53c --- /dev/null +++ b/templates/libraries/microprofile/beanValidationPathParams.mustache @@ -0,0 +1 @@ +{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/libraries/microprofile/beanValidationQueryParams.mustache b/templates/libraries/microprofile/beanValidationQueryParams.mustache new file mode 100644 index 00000000..c4ff01d7 --- /dev/null +++ b/templates/libraries/microprofile/beanValidationQueryParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/templates/libraries/microprofile/bodyParams.mustache b/templates/libraries/microprofile/bodyParams.mustache new file mode 100644 index 00000000..be56da75 --- /dev/null +++ b/templates/libraries/microprofile/bodyParams.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/bodyParamsImpl.mustache b/templates/libraries/microprofile/bodyParamsImpl.mustache new file mode 100644 index 00000000..c7d1abfe --- /dev/null +++ b/templates/libraries/microprofile/bodyParamsImpl.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}{{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/client_operation.mustache b/templates/libraries/microprofile/client_operation.mustache new file mode 100644 index 00000000..403918dd --- /dev/null +++ b/templates/libraries/microprofile/client_operation.mustache @@ -0,0 +1 @@ +{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} \ No newline at end of file diff --git a/templates/libraries/microprofile/cookieParams.mustache b/templates/libraries/microprofile/cookieParams.mustache new file mode 100644 index 00000000..4cca907c --- /dev/null +++ b/templates/libraries/microprofile/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationCookieParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/cookieParamsImpl.mustache b/templates/libraries/microprofile/cookieParamsImpl.mustache new file mode 100644 index 00000000..70871f0f --- /dev/null +++ b/templates/libraries/microprofile/cookieParamsImpl.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/enumClass.mustache b/templates/libraries/microprofile/enumClass.mustache new file mode 100644 index 00000000..9315b9c9 --- /dev/null +++ b/templates/libraries/microprofile/enumClass.mustache @@ -0,0 +1,84 @@ +{{#withXml}} +@XmlType(name="{{datatypeWithEnum}}") +@XmlEnum({{dataType}}.class) +{{/withXml}} +{{^withXml}} + {{#jsonb}} + @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) + @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) + {{/jsonb}} +{{/withXml}} + {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + + {{#allowableValues}} + {{#withXml}} + {{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} + {{/withXml}} + {{^withXml}} + {{#enumVars}}{{name}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} + {{/withXml}} + {{/allowableValues}} + + + {{dataType}} value; + + {{datatypeWithEnum}} ({{dataType}} v) { + value = v; + } + + {{#jackson}} + @JsonValue + {{/jackson}} + public {{dataType}} value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + {{#withXml}} + public static {{datatypeWithEnum}} fromValue(String v) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + v + "'");{{/useNullForUnknownEnumValue}} + } + {{/withXml}} + {{^withXml}} + {{#jsonb}} + public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { + @Override + public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} + } + } + + public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { + @Override + public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value{{#isUri}}.toASCIIString(){{/isUri}}); + } + } + {{/jsonb}} + {{#jackson}} + @JsonCreator + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.equals(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } + {{/jackson}} + {{/withXml}} + } diff --git a/templates/libraries/microprofile/enumOuterClass.mustache b/templates/libraries/microprofile/enumOuterClass.mustache new file mode 100644 index 00000000..40a295f3 --- /dev/null +++ b/templates/libraries/microprofile/enumOuterClass.mustache @@ -0,0 +1,70 @@ +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +{{/jackson}} +{{#isUri}} +import java.net.URI; +{{/isUri}} + +/** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ +{{#jsonb}} +@JsonbTypeSerializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Serializer.class) +@JsonbTypeDeserializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Deserializer.class) +{{/jsonb}} +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#gson}} + {{#allowableValues}}{{#enumVars}} + @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + {{/gson}} + {{^gson}} + {{#allowableValues}}{{#enumVars}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + {{/gson}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + @Override +{{#jackson}} + @JsonValue +{{/jackson}} + public String toString() { + return String.valueOf(value); + } + +{{#jsonb}} + public static final class Deserializer implements JsonbDeserializer<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + return fromValue(parser.getString()); + } + } + + public static final class Serializer implements JsonbSerializer<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + @Override + public void serialize({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value{{#isUri}}.toASCIIString(){{/isUri}}); + } + } + +{{/jsonb}} +{{#jackson}} + @JsonCreator +{{/jackson}} + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/enumUnknownDefaultCase}}{{/useNullForUnknownEnumValue}} + } +} diff --git a/templates/libraries/microprofile/formParams.mustache b/templates/libraries/microprofile/formParams.mustache new file mode 100644 index 00000000..97216dc1 --- /dev/null +++ b/templates/libraries/microprofile/formParams.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{^isFile}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/formParamsImpl.mustache b/templates/libraries/microprofile/formParamsImpl.mustache new file mode 100644 index 00000000..2be40e1d --- /dev/null +++ b/templates/libraries/microprofile/formParamsImpl.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/formParamsNameSuffix.mustache b/templates/libraries/microprofile/formParamsNameSuffix.mustache new file mode 100644 index 00000000..a44f6d71 --- /dev/null +++ b/templates/libraries/microprofile/formParamsNameSuffix.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{#isFile}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/generatedAnnotation.mustache b/templates/libraries/microprofile/generatedAnnotation.mustache new file mode 100644 index 00000000..cf058a0f --- /dev/null +++ b/templates/libraries/microprofile/generatedAnnotation.mustache @@ -0,0 +1 @@ +@{{rootJavaEEPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}, comments = "Generator version: {{generatorVersion}}") \ No newline at end of file diff --git a/templates/libraries/microprofile/headerParams.mustache b/templates/libraries/microprofile/headerParams.mustache new file mode 100644 index 00000000..4a9009e7 --- /dev/null +++ b/templates/libraries/microprofile/headerParams.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}@HeaderParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/headerParamsImpl.mustache b/templates/libraries/microprofile/headerParamsImpl.mustache new file mode 100644 index 00000000..bd03573d --- /dev/null +++ b/templates/libraries/microprofile/headerParamsImpl.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}{{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/kumuluzee.beans.xml.mustache b/templates/libraries/microprofile/kumuluzee.beans.xml.mustache new file mode 100644 index 00000000..29549d01 --- /dev/null +++ b/templates/libraries/microprofile/kumuluzee.beans.xml.mustache @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/templates/libraries/microprofile/kumuluzee.config.yaml.mustache b/templates/libraries/microprofile/kumuluzee.config.yaml.mustache new file mode 100644 index 00000000..90f5237e --- /dev/null +++ b/templates/libraries/microprofile/kumuluzee.config.yaml.mustache @@ -0,0 +1,10 @@ +kumuluzee: + server: + http: + port: 8081 + + rest-client: + registrations: + {{#apiInfo}}{{#apis}}{{#operations}}- class: {{{invokerPackage}}}.{{{classname}}} + url: http://localhost:8080/v2 + {{/operations}}{{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/templates/libraries/microprofile/kumuluzee.pom.mustache b/templates/libraries/microprofile/kumuluzee.pom.mustache new file mode 100644 index 00000000..195aa9d4 --- /dev/null +++ b/templates/libraries/microprofile/kumuluzee.pom.mustache @@ -0,0 +1,98 @@ + + 4.0.0 + + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + 1.0.0-SNAPSHOT + + + 1.8 + 1.8 + UTF-8 + + 3.9.0 + 1.2.3 + 1.4.1 + 3.2.6 + 5.10.2 + 2.28 + + + + + + com.kumuluz.ee + kumuluzee-bom + ${kumuluzee.version} + pom + import + + + + + + + com.kumuluz.ee + kumuluzee-core + + + com.kumuluz.ee + kumuluzee-servlet-jetty + + + com.kumuluz.ee + kumuluzee-jax-rs-jersey + + + com.kumuluz.ee + kumuluzee-cdi-weld + + + com.kumuluz.ee + kumuluzee-json-p-jsonp + + + com.kumuluz.ee + kumuluzee-json-b-yasson + + + com.kumuluz.ee.rest-client + kumuluzee-rest-client + ${kumuluzee-rest-client.version} + + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf-rt-rs-extension-providers.version} + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + + + + com.kumuluz.ee + kumuluzee-maven-plugin + ${kumuluzee.version} + + + package + + repackage + + + + + + + + \ No newline at end of file diff --git a/templates/libraries/microprofile/licenseInfo.mustache b/templates/libraries/microprofile/licenseInfo.mustache new file mode 100644 index 00000000..c66209f2 --- /dev/null +++ b/templates/libraries/microprofile/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ diff --git a/templates/libraries/microprofile/model.mustache b/templates/libraries/microprofile/model.mustache new file mode 100644 index 00000000..875c73f0 --- /dev/null +++ b/templates/libraries/microprofile/model.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +{{#imports}}import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{rootJavaEEPackage}}.xml.bind.annotation.*; +import {{rootJavaEEPackage}}.xml.bind.annotation.adapters.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{rootJavaEEPackage}}.json.bind.serializer.DeserializationContext; +import {{rootJavaEEPackage}}.json.bind.serializer.JsonbDeserializer; +import {{rootJavaEEPackage}}.json.bind.serializer.JsonbSerializer; +import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; +import {{rootJavaEEPackage}}.json.stream.JsonGenerator; +import {{rootJavaEEPackage}}.json.stream.JsonParser; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; +{{#jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo; +{{/jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; +{{/jsonb}} +{{#useBeanValidation}} +import {{rootJavaEEPackage}}.validation.constraints.*; +import {{rootJavaEEPackage}}.validation.Valid; +{{/useBeanValidation}} + +{{#models}} +{{#model}} +{{#isEnum}} +{{>enumOuterClass}} + +{{/isEnum}} +{{^isEnum}} +{{>pojo}} + +{{/isEnum}} +{{/model}} +{{/models}} \ No newline at end of file diff --git a/templates/libraries/microprofile/pathParams.mustache b/templates/libraries/microprofile/pathParams.mustache new file mode 100644 index 00000000..9e8455d5 --- /dev/null +++ b/templates/libraries/microprofile/pathParams.mustache @@ -0,0 +1 @@ +{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/pathParamsImpl.mustache b/templates/libraries/microprofile/pathParamsImpl.mustache new file mode 100644 index 00000000..6829cf8c --- /dev/null +++ b/templates/libraries/microprofile/pathParamsImpl.mustache @@ -0,0 +1 @@ +{{#isPathParam}}{{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/pojo.mustache b/templates/libraries/microprofile/pojo.mustache new file mode 100644 index 00000000..b8e34e60 --- /dev/null +++ b/templates/libraries/microprofile/pojo.mustache @@ -0,0 +1,156 @@ +{{#withXml}} +{{#hasVars}}@XmlType(name = "{{classname}}", propOrder = + { {{#vars}}"{{name}}"{{^-last}}, {{/-last}}{{/vars}} } +){{/hasVars}} +{{^hasVars}}@XmlType(name = "{{classname}}"){{/hasVars}} +{{> xmlAnnotation }} + +{{/withXml}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{#description}} +/** + * {{{.}}} + */ +{{/description}} +{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#vars}}{{#isEnum}}{{^isContainer}} +{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} +{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} +{{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; +{{/jackson}} +{{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} +{{/withXml}} +{{#description}} + /** + * {{{.}}} + */ +{{/description}} + {{^withXml}} + {{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}} + {{/withXml}} +{{#vendorExtensions.x-field-extra-annotation}} +{{{vendorExtensions.x-field-extra-annotation}}} +{{/vendorExtensions.x-field-extra-annotation}} +{{#isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; +{{/isContainer}} +{{^isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; +{{/isContainer}} + {{/vars}} +{{>additional_properties}} + +{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}} + public {{classname}}() { + } + + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nillable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(value = JSON_PROPERTY_{{nameInSnakeCase}}{{#required}}, required = true{{/required}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + {{#readOnlyVars}} + this.{{name}} = {{name}}; + {{/readOnlyVars}} + } + {{/withXml}}{{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + **/ +{{#deprecated}} + @Deprecated +{{/deprecated}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}{{#jackson}}{{> jackson_annotations}}{{/jackson}} {{#withXml}}{{#isEnum}}{{^isArray}}{{^isMap}} public {{dataType}} {{getter}}() { + if ({{name}} == null) { + return null; + } + return {{name}}.value(); + }{{/isMap}}{{/isArray}}{{/isEnum}}{{/withXml}}{{^withXml}}{{#isEnum}}{{^isArray}}{{^isMap}}public {{datatypeWithEnum}} {{getter}}() { + return {{name}}; + }{{/isMap}}{{/isArray}}{{/isEnum}}{{/withXml}}{{#isEnum}}{{#isArray}}public {{{datatypeWithEnum}}} {{getter}}() { + return {{name}}; + }{{/isArray}}{{/isEnum}}{{#isEnum}}{{#isMap}}public {{{datatypeWithEnum}}} {{getter}}() { + return {{name}}; + }{{/isMap}}{{/isEnum}}{{^isEnum}}public {{{datatypeWithEnum}}} {{getter}}() { + return {{name}}; + }{{/isEnum}} + + {{^isReadOnly}} + /** + * Set {{name}} + */ +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{> jackson_annotations}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { + this.{{name}} = {{name}}; + } + + public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + this.{{name}} = {{name}}; + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + this.{{name}}.put(key, {{name}}Item); + return this; + } + {{/isMap}} + {{/isReadOnly}} + + {{/vars}} +{{>pojoOverrides}} + +} diff --git a/templates/libraries/microprofile/pojoOverrides.mustache b/templates/libraries/microprofile/pojoOverrides.mustache new file mode 100644 index 00000000..12cc9804 --- /dev/null +++ b/templates/libraries/microprofile/pojoOverrides.mustache @@ -0,0 +1,70 @@ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } \ No newline at end of file diff --git a/templates/libraries/microprofile/pom.mustache b/templates/libraries/microprofile/pom.mustache new file mode 100644 index 00000000..4fefd6db --- /dev/null +++ b/templates/libraries/microprofile/pom.mustache @@ -0,0 +1,258 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{#appDescription}} + {{.}} + {{/appDescription}} + {{artifactVersion}} + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + +{{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation.version} + provided + +{{/useBeanValidation}} + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + io.smallrye + smallrye-rest-client + ${smallrye.rest.client.version} + test + + + + io.smallrye + smallrye-config + ${smallrye.config.version} + test + + {{^disableMultipart}} + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + {{/disableMultipart}} + {{#jsonb}} + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + {{/jsonb}} + {{#jackson}} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + {{#withXml}} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} + + {{/withXml}} + {{/jackson}} + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + +{{#useBeanValidationFeature}} + + org.hibernate + hibernate-validator + ${hibernate.validator.version} + +{{/useBeanValidationFeature}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 1.8 + ${java.version} + ${java.version} + UTF-8 + + 1.5.18 + 9.2.9.v20150224 + 5.10.2 + 1.5.13 +{{#useBeanValidation}} + 3.0.2 +{{/useBeanValidation}} + 3.2.7 + 2.17.1 +{{#jackson}} + 2.17.1 +{{/jackson}} + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 + {{microprofileRestClientVersion}} + 1.2.1 + 1.3.5 + 3.2.6 + 2.2.11 + 2.2.11 + 5.2.2.Final + 1.1.0 + 2.6 + 1.9.1 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} + + diff --git a/templates/libraries/microprofile/pom_3.0.mustache b/templates/libraries/microprofile/pom_3.0.mustache new file mode 100644 index 00000000..9462e0d9 --- /dev/null +++ b/templates/libraries/microprofile/pom_3.0.mustache @@ -0,0 +1,258 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{#appDescription}} + {{.}} + {{/appDescription}} + {{artifactVersion}} + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + +{{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation.version} + provided + +{{/useBeanValidation}} + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + org.glassfish.jersey.ext.microprofile + jersey-mp-rest-client + ${jersey.mp.rest.client.version} + test + + + org.apache.geronimo.config + geronimo-config-impl + ${geronimo.config.impl.version} + test + + + {{^disableMultipart}} + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + {{/disableMultipart}} + {{#jsonb}} + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + {{/jsonb}} + {{#jackson}} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + {{#withXml}} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} + + {{/withXml}} + {{/jackson}} + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + +{{#useBeanValidationFeature}} + + org.hibernate + hibernate-validator + ${hibernate.validator.version} + +{{/useBeanValidationFeature}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 11 + ${java.version} + ${java.version} + UTF-8 + + 1.5.18 + 9.2.9.v20150224 + 5.10.2 + 1.5.13 +{{#useBeanValidation}} + 3.0.1 +{{/useBeanValidation}} + 3.2.7 + 2.17.1 +{{#jackson}} + 2.17.1 +{{/jackson}} + 2.1.0 + 2.0.0 + 3.0.0 + 2.0.1 + 3.0.0 + 3.0.1 + {{microprofileRestClientVersion}} + 3.0.4 + 1.2.3 + 3.5.1 + 3.0.2 + 3.0.2 + 7.0.4.Final + 1.1.0 + 2.6 + 1.9.1 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} + + diff --git a/templates/libraries/microprofile/queryParams.mustache b/templates/libraries/microprofile/queryParams.mustache new file mode 100644 index 00000000..38bfb9ed --- /dev/null +++ b/templates/libraries/microprofile/queryParams.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/queryParamsImpl.mustache b/templates/libraries/microprofile/queryParamsImpl.mustache new file mode 100644 index 00000000..ff797304 --- /dev/null +++ b/templates/libraries/microprofile/queryParamsImpl.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/templates/libraries/microprofile/server_operation.mustache b/templates/libraries/microprofile/server_operation.mustache new file mode 100644 index 00000000..d6fa9054 --- /dev/null +++ b/templates/libraries/microprofile/server_operation.mustache @@ -0,0 +1 @@ +{{#vendorExtensions.x-multiple-2xx-response-operation}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}Response{{/microprofileMutiny}}{{/vendorExtensions.x-multiple-2xx-response-operation}}{{^vendorExtensions.x-multiple-2xx-response-operation}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-multiple-2xx-response-operation}} \ No newline at end of file diff --git a/templates/libraries/native/AbstractOpenApiSchema.mustache b/templates/libraries/native/AbstractOpenApiSchema.mustache new file mode 100644 index 00000000..8369ee72 --- /dev/null +++ b/templates/libraries/native/AbstractOpenApiSchema.mustache @@ -0,0 +1,138 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +{{>generatedAnnotation}} + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + +{{>libraries/native/additional_properties}} + + +} diff --git a/templates/libraries/native/ApiClient.mustache b/templates/libraries/native/ApiClient.mustache new file mode 100644 index 00000000..6eae76c0 --- /dev/null +++ b/templates/libraries/native/ApiClient.mustache @@ -0,0 +1,451 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + +import java.io.InputStream; +import java.net.URI; +import java.net.URLEncoder; +import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.StringJoiner; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Configuration and utility class for API clients. + * + *

This class can be constructed and modified, then used to instantiate the + * various API classes. The API classes use the settings in this class to + * configure themselves, but otherwise do not store a link to this class.

+ * + *

This class is mutable and not synchronized, so it is not thread-safe. + * The API classes generated from this are immutable and thread-safe.

+ * + *

The setter methods of this class return the current object to facilitate + * a fluent style of configuration.

+ */ +{{>generatedAnnotation}} + +public class ApiClient { + + protected HttpClient.Builder builder; + protected ObjectMapper mapper; + protected String scheme; + protected String host; + protected int port; + protected String basePath; + protected Consumer interceptor; + protected Consumer> responseInterceptor; + protected Consumer> asyncResponseInterceptor; + protected Duration readTimeout; + protected Duration connectTimeout; + + public static String valueToString(Object value) { + if (value == null) { + return ""; + } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + return value.toString(); + } + + /** + * URL encode a string in the UTF-8 encoding. + * + * @param s String to encode. + * @return URL-encoded representation of the input string. + */ + public static String urlEncode(String s) { + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); + } + + /** + * Convert a URL query name/value parameter to a list of encoded {@link Pair} + * objects. + * + *

The value can be null, in which case an empty list is returned.

+ * + * @param name The query name parameter. + * @param value The query value, which may not be a collection but may be + * null. + * @return A singleton list of the {@link Pair} objects representing the input + * parameters, which is encoded for use in a URL. If the value is null, an + * empty list is returned. + */ + public static List parameterToPairs(String name, Object value) { + if (name == null || name.isEmpty() || value == null) { + return Collections.emptyList(); + } + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); + } + + /** + * Convert a URL query name/collection parameter to a list of encoded + * {@link Pair} objects. + * + * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc). + * @param name The query name parameter. + * @param values A collection of values for the given query name, which may be + * null. + * @return A list of {@link Pair} objects representing the input parameters, + * which is encoded for use in a URL. If the values collection is null, an + * empty list is returned. + */ + public static List parameterToPairs( + String collectionFormat, String name, Collection values) { + if (name == null || name.isEmpty() || values == null || values.isEmpty()) { + return Collections.emptyList(); + } + + // get the collection format (default: csv) + String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat; + + // create the params based on the collection format + if ("multi".equals(format)) { + return values.stream() + .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value)))) + .collect(Collectors.toList()); + } + + String delimiter; + switch(format) { + case "csv": + delimiter = urlEncode(","); + break; + case "ssv": + delimiter = urlEncode(" "); + break; + case "tsv": + delimiter = urlEncode("\t"); + break; + case "pipes": + delimiter = urlEncode("|"); + break; + default: + throw new IllegalArgumentException("Illegal collection format: " + collectionFormat); + } + + StringJoiner joiner = new StringJoiner(delimiter); + for (Object value : values) { + joiner.add(urlEncode(valueToString(value))); + } + + return Collections.singletonList(new Pair(urlEncode(name), joiner.toString())); + } + + /** + * Create an instance of ApiClient. + */ + public ApiClient() { + this.builder = createDefaultHttpClientBuilder(); + this.mapper = createDefaultObjectMapper(); + updateBaseUri("{{{basePath}}}"); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + /** + * Create an instance of ApiClient. + * + * @param builder Http client builder. + * @param mapper Object mapper. + * @param baseUri Base URI + */ + public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) { + this.builder = builder; + this.mapper = mapper; + updateBaseUri(baseUri != null ? baseUri : "{{{basePath}}}"); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + public static ObjectMapper createDefaultObjectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.registerModule(new JavaTimeModule()); + {{#openApiNullable}} + mapper.registerModule(new JsonNullableModule()); + {{/openApiNullable}} + mapper.registerModule(new RFC3339JavaTimeModule()); + return mapper; + } + + protected final String getDefaultBaseUri() { + return basePath; + } + + public static HttpClient.Builder createDefaultHttpClientBuilder() { + return HttpClient.newBuilder(); + } + + public final void updateBaseUri(String baseUri) { + URI uri = URI.create(baseUri); + scheme = uri.getScheme(); + host = uri.getHost(); + port = uri.getPort(); + basePath = uri.getRawPath(); + } + + /** + * Set a custom {@link HttpClient.Builder} object to use when creating the + * {@link HttpClient} that is used by the API client. + * + * @param builder Custom client builder. + * @return This object. + */ + public ApiClient setHttpClientBuilder(HttpClient.Builder builder) { + this.builder = builder; + return this; + } + + /** + * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}. + * + *

The returned object is immutable and thread-safe.

+ * + * @return The HTTP client. + */ + public HttpClient getHttpClient() { + return builder.build(); + } + + /** + * Set a custom {@link ObjectMapper} to serialize and deserialize the request + * and response bodies. + * + * @param mapper Custom object mapper. + * @return This object. + */ + public ApiClient setObjectMapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Get a copy of the current {@link ObjectMapper}. + * + * @return A copy of the current object mapper. + */ + public ObjectMapper getObjectMapper() { + return mapper.copy(); + } + + /** + * Set a custom host name for the target service. + * + * @param host The host name of the target service. + * @return This object. + */ + public ApiClient setHost(String host) { + this.host = host; + return this; + } + + /** + * Set a custom port number for the target service. + * + * @param port The port of the target service. Set this to -1 to reset the + * value to the default for the scheme. + * @return This object. + */ + public ApiClient setPort(int port) { + this.port = port; + return this; + } + + /** + * Set a custom base path for the target service, for example '/v2'. + * + * @param basePath The base path against which the rest of the path is + * resolved. + * @return This object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get the base URI to resolve the endpoint paths against. + * + * @return The complete base URI that the rest of the API parameters are + * resolved against. + */ + public String getBaseUri() { + return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath; + } + + /** + * Set a custom scheme for the target service, for example 'https'. + * + * @param scheme The scheme of the target service + * @return This object. + */ + public ApiClient setScheme(String scheme){ + this.scheme = scheme; + return this; + } + + /** + * Set a custom request interceptor. + * + *

A request interceptor is a mechanism for altering each request before it + * is sent. After the request has been fully configured but not yet built, the + * request builder is passed into this function for further modification, + * after which it is sent out.

+ * + *

This is useful for altering the requests in a custom manner, such as + * adding headers. It could also be used for logging and monitoring.

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setRequestInterceptor(Consumer interceptor) { + this.interceptor = interceptor; + return this; + } + + /** + * Get the custom interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer getRequestInterceptor() { + return interceptor; + } + + /** + * Set a custom response interceptor. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setResponseInterceptor(Consumer> interceptor) { + this.responseInterceptor = interceptor; + return this; + } + + /** + * Get the custom response interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getResponseInterceptor() { + return responseInterceptor; + } + + /** + * Set a custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setAsyncResponseInterceptor(Consumer> interceptor) { + this.asyncResponseInterceptor = interceptor; + return this; + } + + /** + * Get the custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getAsyncResponseInterceptor() { + return asyncResponseInterceptor; + } + + /** + * Set the read timeout for the http client. + * + *

This is the value used by default for each request, though it can be + * overridden on a per-request basis with a request interceptor.

+ * + * @param readTimeout The read timeout used by default by the http client. + * Setting this value to null resets the timeout to an + * effectively infinite value. + * @return This object. + */ + public ApiClient setReadTimeout(Duration readTimeout) { + this.readTimeout = readTimeout; + return this; + } + + /** + * Get the read timeout that was set. + * + * @return The read timeout, or null if no timeout was set. Null represents + * an infinite wait time. + */ + public Duration getReadTimeout() { + return readTimeout; + } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } +} diff --git a/templates/libraries/native/ApiResponse.mustache b/templates/libraries/native/ApiResponse.mustache new file mode 100644 index 00000000..4d9f25f3 --- /dev/null +++ b/templates/libraries/native/ApiResponse.mustache @@ -0,0 +1,60 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.List; +import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +{{>generatedAnnotation}} + +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/templates/libraries/native/JSON.mustache b/templates/libraries/native/JSON.mustache new file mode 100644 index 00000000..a2020732 --- /dev/null +++ b/templates/libraries/native/JSON.mustache @@ -0,0 +1,271 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +{{>generatedAnnotation}} + +public class JSON { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + .build(); + {{#joda}} + mapper.registerModule(new JodaModule()); + {{/joda}} + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + * + * @return the target model class. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + {{>generatedAnnotation}}{{! prevent indent}} + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + * + * @return the target model class. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + * @param visitedClasses The set of classes that have already been visited. + * + * @return true if inst is an instance of modelClass in the OpenAPI model hierarchy. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (Class childType : descendants.values()) { + if (isInstanceOf(childType, inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/templates/libraries/native/README.mustache b/templates/libraries/native/README.mustache new file mode 100644 index 00000000..fd7d4905 --- /dev/null +++ b/templates/libraries/native/README.mustache @@ -0,0 +1,191 @@ +# {{artifactId}} + +{{appName}} + +- API version: {{appVersion}} +{{^hideGenerationTimestamp}} + +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} + +- Generator version: {{generatorVersion}} + +{{{appDescriptionWithNewLines}}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 11+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import {{{invokerPackage}}}.*; +import {{{modelPackage}}}.*; +import {{{package}}}.{{{classname}}};{{#vendorExtensions.x-group-parameters}} +import {{{package}}}.{{{classname}}}.*;{{/vendorExtensions.x-group-parameters}} +{{#asyncNative}} +import java.util.concurrent.CompletableFuture; +{{/asyncNative}} + +public class {{{classname}}}Example { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure clients using the `defaultClient` object, such as + // overriding the host and port, timeout, etc. + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#hasParams}} + API{{operationId}}Request request = API{{operationId}}Request.newBuilder(){{#allParams}} + .{{paramName}}({{paramName}}){{/allParams}} + .build(); + {{/hasParams}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result{{#asyncNative}}.get(){{/asyncNative}}); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +*{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation for Models + +{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) +{{/model}}{{/models}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}} + +- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}} + +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} + +- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}} + +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/native/additional_properties.mustache b/templates/libraries/native/additional_properties.mustache new file mode 100644 index 00000000..8e718279 --- /dev/null +++ b/templates/libraries/native/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/native/anyof_model.mustache b/templates/libraries/native/anyof_model.mustache new file mode 100644 index 00000000..cd8c2c86 --- /dev/null +++ b/templates/libraries/native/anyof_model.mustache @@ -0,0 +1,364 @@ +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + {{#discriminator}} + Class cls = JSON.getClassForElement(tree, new {{classname}}().getClass()); + if (cls != null) { + // When the OAS schema includes a discriminator, use the discriminator value to + // discriminate the anyOf schemas. + // Get the discriminator mapping value to get the class. + deserialized = tree.traverse(jp.getCodec()).readValueAs(cls); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + {{/discriminator}} + {{#anyOf}} + // deserialize {{{.}}} + try { + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match '{{classname}}'", e); + } + + {{/anyOf}} + throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public {{classname}}() { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/native/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#anyOf}} + public {{classname}}({{{.}}} o) { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/anyOf}} + static { + {{#anyOf}} + schemas.put("{{{.}}}", {{{.}}}.class); + {{/anyOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#anyOf}} + if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + {{/anyOf}} + throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#anyOf}} + /** + * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{.}}}` + * @throws ClassCastException if the instance is not `{{{.}}}` + */ + public {{{.}}} get{{{.}}}() throws ClassCastException { + return ({{{.}}})super.getActualInstance(); + } + + {{/anyOf}} + +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (getActualInstance() instanceof {{{dataType}}}) { + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(_item)))); + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + if ((({{{dataType}}})getActualInstance()).get(i) != null) { + joiner.add((({{{items.dataType}}})getActualInstance()).get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + if (_item != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(_item)))); + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + if (getActualInstance().get(i) != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{#items.isPrimitiveType}} + if (getActualInstance() != null) { + for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); + } + } + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + if (getActualInstance() != null) { + for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { + if ((({{{dataType}}})getActualInstance()).get(_key) != null) { + joiner.add((({{{items.dataType}}})getActualInstance()).get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isPrimitiveType}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if (getActualInstance() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if (getActualInstance() != null) { + joiner.add((({{{dataType}}})getActualInstance()).toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if (getActualInstance() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + return joiner.toString(); + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + return null; + } +{{/supportUrlQuery}} + +} diff --git a/templates/libraries/native/api.mustache b/templates/libraries/native/api.mustache new file mode 100644 index 00000000..ddb1862c --- /dev/null +++ b/templates/libraries/native/api.mustache @@ -0,0 +1,821 @@ +{{>licenseInfo}} +package {{package}}; + +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +{{#imports}} +import {{import}}; +{{/imports}} + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +{{#hasFormParamsInSpec}} +import org.apache.http.HttpEntity; +import org.apache.http.NameValuePair; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.client.entity.UrlEncodedFormEntity; + +{{/hasFormParamsInSpec}} +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; +{{#asyncNative}} + +import java.util.concurrent.CompletableFuture; +{{/asyncNative}} + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + /** + * Utility class for extending HttpRequest.Builder functionality. + */ + private static class HttpRequestBuilderExtensions { + /** + * Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers. + * + * @param builder the HttpRequest.Builder to which headers will be added + * @param headers a map of header names and values to add; may be null + * @return the same HttpRequest.Builder instance with the additional headers set + */ + static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map headers) { + if (headers != null) { + for (Map.Entry entry : headers.entrySet()) { + builder.header(entry.getKey(), entry.getValue()); + } + } + return builder; + } + } + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + {{#asyncNative}} + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException(response.statusCode(), message, response.headers(), response.body()); + } + {{/asyncNative}} + {{^asyncNative}} + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + {{/asyncNative}} + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(HttpResponse response) throws ApiException { + try { + File file = prepareDownloadFile(response); + java.nio.file.Files.copy(response.body(), file.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

Prepare the file for download from the response.

+ * + * @param response a {@link java.net.http.HttpResponse} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + private File prepareDownloadFile(HttpResponse response) throws IOException { + String filename = null; + java.util.Optional contentDisposition = response.headers().firstValue("Content-Disposition"); + if (contentDisposition.isPresent() && !"".equals(contentDisposition.get())) { + // Get filename from the Content-Disposition header. + java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + java.util.regex.Matcher matcher = pattern.matcher(contentDisposition.get()); + if (matcher.find()) + filename = matcher.group(1); + } + File file = null; + if (filename != null) { + java.nio.file.Path tempDir = java.nio.file.Files.createTempDirectory("swagger-gen-native"); + java.nio.file.Path filePath = java.nio.file.Files.createFile(tempDir.resolve(filename)); + file = filePath.toFile(); + tempDir.toFile().deleteOnExit(); // best effort cleanup + file.deleteOnExit(); // best effort cleanup + } else { + file = java.nio.file.Files.createTempFile("download-", "").toFile(); + file.deleteOnExit(); // best effort cleanup + } + return file; + } + + {{#operation}} + {{#vendorExtensions.x-group-parameters}} + {{#hasParams}} + /** + * {{summary}} + * {{notes}} + * @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request} + {{#returnType}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} + {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest) throws ApiException { + {{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}(apiRequest, null); + } + + /** + * {{summary}} + * {{notes}} + * @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request} + * @param headers Optional headers to include in the request + {{#returnType}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} + {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest, Map headers) throws ApiException { + {{#allParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); + {{/allParams}} + {{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + } + + /** + * {{summary}} + * {{notes}} + * @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest) throws ApiException { + return {{operationId}}WithHttpInfo(apiRequest, null); + } + + /** + * {{summary}} + * {{notes}} + * @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request} + * @param headers Optional headers to include in the request + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest, Map headers) throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); + {{/allParams}} + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + } + + {{/hasParams}} + {{/vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} + {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}null); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + * @param headers Optional headers to include in the request + {{#returnType}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} + {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map headers) throws ApiException { + {{^asyncNative}} + {{#returnType}}ApiResponse<{{{.}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + {{#returnType}} + return localVarResponse.getData(); + {{/returnType}} + {{/asyncNative}} + {{#asyncNative}} + try { + HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("{{operationId}}", localVarResponse)); + } + {{#returnType}} + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + {{/returnType}} + {{^returnType}} + return CompletableFuture.completedFuture(null); + {{/returnType}} + }); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + {{/asyncNative}} + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}null); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} + {{/allParams}} + * @param headers Optional headers to include in the request + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map headers) throws ApiException { + {{^asyncNative}} + HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("{{operationId}}", localVarResponse); + } + {{#vendorExtensions.x-java-text-plain-string}} + // for plain text response + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) { + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + {{/vendorExtensions.x-java-text-plain-string}} + {{^vendorExtensions.x-java-text-plain-string}} + {{#returnType}} + {{! Fix for https://github.com/OpenAPITools/openapi-generator/issues/13968 }} + {{! This part had a bugfix for an empty response in the past, but this part of that PR was reverted because it was not doing anything. }} + {{! Keep this documentation here, because the problem is not obvious. }} + {{! `InputStream.available()` was used, but that only works for inputstreams that are already in memory, it will not give the right result if it is a remote stream. We only work with remote streams here. }} + {{! https://github.com/OpenAPITools/openapi-generator/pull/13993/commits/3e!37411d2acef0311c82e6d941a8e40b3bc0b6da }} + {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} + {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} + {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} + if (localVarResponse.body() == null) { + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + {{^isResponseFile}}{{#isResponseBinary}} + Byte[] responseValue = localVarResponse.body().readAllBytes(); + {{/isResponseBinary}}{{/isResponseFile}} + {{#isResponseFile}} + // Handle file downloading. + File responseValue = downloadFileFromResponse(localVarResponse); + {{/isResponseFile}} + {{^isResponseBinary}}{{^isResponseFile}} + String responseBody = new String(localVarResponse.body().readAllBytes()); + {{{returnType}}} responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}); + {{/isResponseFile}}{{/isResponseBinary}} + localVarResponse.body().close(); + + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + {{/returnType}} + {{^returnType}} + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + {{/returnType}} + {{/vendorExtensions.x-java-text-plain-string}} + } finally { + {{^returnType}} + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + {{/returnType}} + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + {{/asyncNative}} + {{#asyncNative}} + try { + HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("{{operationId}}", localVarResponse)); + } + {{#returnType}} + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {})) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + {{/returnType}} + {{^returnType}} + return CompletableFuture.completedFuture( + new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null) + ); + {{/returnType}} + } + ); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + {{/asyncNative}} + } + + private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map headers) throws ApiException { + {{#allParams}} + {{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}} + {{/allParams}} + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + {{! Switch delimiters for baseName so we can write constants like "{query}" }} + String localVarPath = "{{{path}}}"{{#pathParams}} + .replace({{=<% %>=}}"{<%baseName%>}"<%={{ }}=%>, ApiClient.urlEncode({{{paramName}}}.toString())){{/pathParams}}; + + {{#hasQueryParams}} + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + {{#queryParams}} + localVarQueryParameterBaseName = "{{{baseName}}}"; + {{#collectionFormat}} + localVarQueryParams.addAll(ApiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/collectionFormat}} + {{^collectionFormat}} + {{#isDeepObject}} + if ({{paramName}} != null) { + {{#isArray}} + for (int i=0; i < {{paramName}}.size(); i++) { + localVarQueryStringJoiner.add({{paramName}}.get(i).toUrlQueryString(String.format("{{baseName}}[%d]", i))); + } + {{/isArray}} + {{^isArray}} + String queryString = {{paramName}}.toUrlQueryString("{{baseName}}"); + if (!queryString.isBlank()) { + localVarQueryStringJoiner.add(queryString); + } + {{/isArray}} + } + {{/isDeepObject}} + {{^isDeepObject}} + {{#isExplode}} + {{#hasVars}} + {{#vars}} + {{#isArray}} + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{^isArray}} + localVarQueryParams.addAll(ApiClient.parameterToPairs("{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{/vars}} + {{/hasVars}} + {{^hasVars}} + {{#isModel}} + localVarQueryStringJoiner.add({{paramName}}.toUrlQueryString()); + {{/isModel}} + {{^isModel}} + localVarQueryParams.addAll(ApiClient.parameterToPairs("{{baseName}}", {{paramName}})); + {{/isModel}} + {{/hasVars}} + {{/isExplode}} + {{^isExplode}} + localVarQueryParams.addAll(ApiClient.parameterToPairs("{{baseName}}", {{paramName}})); + {{/isExplode}} + {{/isDeepObject}} + {{/collectionFormat}} + {{/queryParams}} + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + {{/hasQueryParams}} + {{^hasQueryParams}} + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + {{/hasQueryParams}} + + {{#headerParams}} + if ({{paramName}} != null) { + localVarRequestBuilder.header("{{baseName}}", {{paramName}}.toString()); + } + {{/headerParams}} + {{#bodyParam}} + localVarRequestBuilder.header("Content-Type", "{{#hasConsumes}}{{#consumes}}{{#-first}}{{{mediaType}}}{{/-first}}{{/consumes}}{{/hasConsumes}}{{#hasConsumes}}{{^consumes}}application/json{{/consumes}}{{/hasConsumes}}{{^hasConsumes}}application/json{{/hasConsumes}}"); + {{/bodyParam}} + localVarRequestBuilder.header("Accept", "{{#hasProduces}}{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{/hasProduces}}{{#hasProduces}}{{^produces}}application/json{{/produces}}{{/hasProduces}}{{^hasProduces}}application/json{{/hasProduces}}"); + + {{#bodyParam}} + {{#isString}} + localVarRequestBuilder.method("{{httpMethod}}", HttpRequest.BodyPublishers.ofString({{paramName}})); + {{/isString}} + {{^isString}} + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes({{paramName}}); + localVarRequestBuilder.method("{{httpMethod}}", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + {{/isString}} + {{/bodyParam}} + {{^bodyParam}} + {{#hasFormParams}} + {{#isMultipart}} + MultipartEntityBuilder multiPartBuilder = MultipartEntityBuilder.create(); + boolean hasFiles = false; + {{#formParams}} + {{#isArray}} + for (int i=0; i < {{paramName}}.size(); i++) { + {{#isFile}} + multiPartBuilder.addBinaryBody("{{{baseName}}}", {{paramName}}.get(i)); + hasFiles = true; + {{/isFile}} + {{^isFile}} + if ({{paramName}}.get(i) != null) { + multiPartBuilder.addTextBody("{{{baseName}}}", {{paramName}}.get(i).toString()); + } + {{/isFile}} + } + {{/isArray}} + {{^isArray}} + {{#isFile}} + multiPartBuilder.addBinaryBody("{{{baseName}}}", {{paramName}}); + hasFiles = true; + {{/isFile}} + {{^isFile}} + if ({{paramName}} != null) { + multiPartBuilder.addTextBody("{{{baseName}}}", {{paramName}}.toString()); + } + {{/isFile}} + {{/isArray}} + {{/formParams}} + HttpEntity entity = multiPartBuilder.build(); + HttpRequest.BodyPublisher formDataPublisher; + if (hasFiles) { + Pipe pipe; + try { + pipe = Pipe.open(); + } catch (IOException e) { + throw new RuntimeException(e); + } + new Thread(() -> { + try (OutputStream outputStream = Channels.newOutputStream(pipe.sink())) { + entity.writeTo(outputStream); + } catch (IOException e) { + e.printStackTrace(); + } + }).start(); + formDataPublisher = HttpRequest.BodyPublishers.ofInputStream(() -> Channels.newInputStream(pipe.source())); + } else { + ByteArrayOutputStream formOutputStream = new ByteArrayOutputStream(); + try { + entity.writeTo(formOutputStream); + } catch (IOException e) { + throw new RuntimeException(e); + } + formDataPublisher = HttpRequest.BodyPublishers + .ofInputStream(() -> new ByteArrayInputStream(formOutputStream.toByteArray())); + } + localVarRequestBuilder + .header("Content-Type", entity.getContentType().getValue()) + .method("{{httpMethod}}", formDataPublisher); + {{/isMultipart}} + {{^isMultipart}} + List formValues = new ArrayList<>(); + {{#formParams}} + {{#isArray}} + for (int i=0; i < {{paramName}}.size(); i++) { + if ({{paramName}}.get(i) != null) { + formValues.add(new BasicNameValuePair("{{{baseName}}}", {{paramName}}.get(i).toString())); + } + } + {{/isArray}} + {{^isArray}} + if ({{paramName}} != null) { + formValues.add(new BasicNameValuePair("{{{baseName}}}", {{paramName}}.toString())); + } + {{/isArray}} + {{/formParams}} + HttpEntity entity = new UrlEncodedFormEntity(formValues, java.nio.charset.StandardCharsets.UTF_8); + ByteArrayOutputStream formOutputStream = new ByteArrayOutputStream(); + try { + entity.writeTo(formOutputStream); + } catch (IOException e) { + throw new RuntimeException(e); + } + localVarRequestBuilder + .header("Content-Type", entity.getContentType().getValue()) + .method("{{httpMethod}}", HttpRequest.BodyPublishers + .ofInputStream(() -> new ByteArrayInputStream(formOutputStream.toByteArray()))); + {{/isMultipart}} + {{/hasFormParams}} + {{^hasFormParams}} + localVarRequestBuilder.method("{{httpMethod}}", HttpRequest.BodyPublishers.noBody()); + {{/hasFormParams}} + {{/bodyParam}} + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + {{#vendorExtensions.x-group-parameters}} + {{#hasParams}} + + public static final class API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#requiredParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{dataType}}} {{paramName}}; // {{description}} (required) + {{/requiredParams}} + {{#optionalParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{dataType}}} {{paramName}}; // {{description}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}) + {{/optionalParams}} + + private API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request(Builder builder) { + {{#requiredParams}} + this.{{paramName}} = builder.{{paramName}}; + {{/requiredParams}} + {{#optionalParams}} + this.{{paramName}} = builder.{{paramName}}; + {{/optionalParams}} + } + {{#allParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + public {{{dataType}}} {{paramName}}() { + return {{paramName}}; + } + {{/allParams}} + public static Builder newBuilder() { + return new Builder(); + } + + public static class Builder { + {{#requiredParams}} + private {{{dataType}}} {{paramName}}; + {{/requiredParams}} + {{#optionalParams}} + private {{{dataType}}} {{paramName}}; + {{/optionalParams}} + + {{#allParams}} + public Builder {{paramName}}({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + {{/allParams}} + public API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request build() { + return new API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request(this); + } + } + } + + {{/hasParams}} + {{/vendorExtensions.x-group-parameters}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/native/apiException.mustache b/templates/libraries/native/apiException.mustache new file mode 100644 index 00000000..e8f7e340 --- /dev/null +++ b/templates/libraries/native/apiException.mustache @@ -0,0 +1,82 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.net.http.HttpHeaders; + +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private HttpHeaders responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, HttpHeaders responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return Headers as an HttpHeaders object + */ + public HttpHeaders getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/templates/libraries/native/api_doc.mustache b/templates/libraries/native/api_doc.mustache new file mode 100644 index 00000000..2b125e1f --- /dev/null +++ b/templates/libraries/native/api_doc.mustache @@ -0,0 +1,280 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +| [**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#hasParams}}{{operationId}}Request{{/hasParams}}) +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example + +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}};{{#vendorExtensions.x-group-parameters}} +import {{{package}}}.{{{classname}}}.*;{{/vendorExtensions.x-group-parameters}} +{{#asyncNative}} +import java.util.concurrent.CompletableFuture; +{{/asyncNative}} + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#hasParams}} + API{{operationId}}Request request = API{{operationId}}Request.newBuilder(){{#allParams}} + .{{paramName}}({{paramName}}){{/allParams}} + .build(); + {{/hasParams}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result{{#asyncNative}}.get(){{/asyncNative}}); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +{{#hasParams}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| {{operationId}}Request | [**API{{operationId}}Request**]({{classname}}.md#API{{operationId}}Request)|-|-|{{/hasParams}} +{{/vendorExtensions.x-group-parameters}} + +### Return type + +{{#returnType}}{{#asyncNative}}CompletableFuture<{{/asyncNative}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{#asyncNative}}>{{/asyncNative}}{{/returnType}} +{{^returnType}}{{#asyncNative}}CompletableFuture{{/asyncNative}}{{^asyncNative}}null{{/asyncNative}} (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +## {{operationId}}WithHttpInfo + +{{^vendorExtensions.x-group-parameters}} +> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}}) +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example + +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.ApiResponse; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}};{{#vendorExtensions.x-group-parameters}} +import {{{package}}}.{{{classname}}}.*;{{/vendorExtensions.x-group-parameters}} +{{#asyncNative}} +import java.util.concurrent.CompletableFuture; +{{/asyncNative}} + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#hasParams}} + API{{operationId}}Request request = API{{operationId}}Request.newBuilder(){{#allParams}} + .{{paramName}}({{paramName}}){{/allParams}} + .build(); + {{/hasParams}} + {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#hasParams}}request{{/hasParams}}); + {{/vendorExtensions.x-group-parameters}} + System.out.println("Status code: " + response{{#asyncNative}}.get(){{/asyncNative}}.getStatusCode()); + System.out.println("Response headers: " + response{{#asyncNative}}.get(){{/asyncNative}}.getHeaders()); + {{#returnType}} + System.out.println("Response body: " + response{{#asyncNative}}.get(){{/asyncNative}}.getData()); + {{/returnType}} + {{#asyncNative}} + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + {{/asyncNative}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +{{#hasParams}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| {{operationId}}Request | [**API{{operationId}}Request**]({{classname}}.md#API{{operationId}}Request)|-|-|{{/hasParams}} +{{/vendorExtensions.x-group-parameters}} + +### Return type + +{{#returnType}}{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}>{{#asyncNative}}>{{/asyncNative}}{{/returnType}} +{{^returnType}}{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse{{#asyncNative}}>{{/asyncNative}}{{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} +{{#vendorExtensions.x-group-parameters}}{{#hasParams}} + + +## API{{operationId}}Request +### Properties +{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +{{/hasParams}}{{/vendorExtensions.x-group-parameters}} +{{/operation}} +{{/operations}} diff --git a/templates/libraries/native/api_test.mustache b/templates/libraries/native/api_test.mustache new file mode 100644 index 00000000..8558cc6f --- /dev/null +++ b/templates/libraries/native/api_test.mustache @@ -0,0 +1,63 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +{{#asyncNative}} +import java.util.concurrent.CompletableFuture; +{{/asyncNative}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} response = {{/returnType}} + {{^returnType}}{{#asyncNative}}CompletableFuture response = {{/asyncNative}}{{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}}{{#hasParams}} + {{classname}}.API{{operationId}}Request request = {{classname}}.API{{operationId}}Request.newBuilder(){{#allParams}} + .{{paramName}}({{paramName}}){{/allParams}} + .build();{{/hasParams}} + {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} response = {{/returnType}} + {{^returnType}}{{#asyncNative}}CompletableFuture response = {{/asyncNative}}{{/returnType}}api.{{operationId}}({{#hasParams}}request{{/hasParams}}); + {{/vendorExtensions.x-group-parameters}} + + // TODO: test validations + } + {{/operation}}{{/operations}} +} diff --git a/templates/libraries/native/build.gradle.mustache b/templates/libraries/native/build.gradle.mustache new file mode 100644 index 00000000..a04a9645 --- /dev/null +++ b/templates/libraries/native/build.gradle.mustache @@ -0,0 +1,140 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} + +apply plugin: 'java' +apply plugin: 'maven-publish' + +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + +// Some text from the schema is copy pasted into the source files as UTF-8 +// but the default still seems to be to use platform encoding +tasks.withType(JavaCompile) { + configure(options) { + options.encoding = 'UTF-8' + } +} +javadoc { + options.encoding = 'UTF-8' +} + +publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } +} + +task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath +} + +task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + jackson_version = "2.17.1" + {{#useJakartaEe}} + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} + jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + {{/useJakartaEe}} + junit_version = "5.10.2" + {{#hasFormParamsInSpec}} + httpmime_version = "4.5.13" + {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:0.2.1" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version" + {{/useBeanValidation}} + {{#hasFormParamsInSpec}} + implementation "org.apache.httpcomponents:httpmime:$httpmime_version" + {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/templates/libraries/native/generatedAnnotation.mustache b/templates/libraries/native/generatedAnnotation.mustache new file mode 100644 index 00000000..e05689d5 --- /dev/null +++ b/templates/libraries/native/generatedAnnotation.mustache @@ -0,0 +1 @@ +@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}, comments = "Generator version: {{generatorVersion}}") \ No newline at end of file diff --git a/templates/libraries/native/model.mustache b/templates/libraries/native/model.mustache new file mode 100644 index 00000000..b3beca8d --- /dev/null +++ b/templates/libraries/native/model.mustache @@ -0,0 +1,67 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +{{#supportUrlQuery}} +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +{{/supportUrlQuery}} +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +{{/withXml}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} + +{{#models}} +{{#model}} +{{#oneOf}} +{{#-first}} +import com.fasterxml.jackson.core.type.TypeReference; +{{/-first}} +{{/oneOf}} + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/native/modelEnum.mustache b/templates/libraries/native/modelEnum.mustache new file mode 100644 index 00000000..8072766a --- /dev/null +++ b/templates/libraries/native/modelEnum.mustache @@ -0,0 +1,120 @@ +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +{{/jackson}} +{{#gson}} +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +{{/gson}} +{{#isUri}} +import java.net.URI; +{{/isUri}} + +/** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ +{{#gson}} +@JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) +{{/gson}} +{{#jsonb}} +@JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) +@JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) +{{/jsonb}} +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#allowableValues}}{{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + +{{#jackson}} + @JsonValue +{{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + +{{#jackson}} + @JsonCreator +{{/jackson}} + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +{{/supportUrlQuery}} + +{{#gson}} + + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + @Override + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}}{{/isNumber}}; + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } +{{/gson}} +{{#jsonb}} + public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { + @Override + public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} + } + } + + public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { + @Override + public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } +{{/jsonb}} +} diff --git a/templates/libraries/native/model_anyof_doc.mustache b/templates/libraries/native/model_anyof_doc.mustache new file mode 100644 index 00000000..e360aa56 --- /dev/null +++ b/templates/libraries/native/model_anyof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## anyOf schemas +{{#anyOf}} +* [{{{.}}}]({{{.}}}.md) +{{/anyOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#anyOf}} +import {{{package}}}.{{{.}}}; +{{/anyOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#anyOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/anyOf}} + } +} +``` diff --git a/templates/libraries/native/model_doc.mustache b/templates/libraries/native/model_doc.mustache new file mode 100644 index 00000000..f17263f0 --- /dev/null +++ b/templates/libraries/native/model_doc.mustache @@ -0,0 +1,23 @@ +{{#models}}{{#model}} + +{{#isEnum}} +{{>enum_outer_doc}} + +{{/isEnum}} +{{^isEnum}} +{{^oneOf.isEmpty}} +{{>model_oneof_doc}} + +{{/oneOf.isEmpty}} +{{^anyOf.isEmpty}} +{{>model_anyof_doc}} + +{{/anyOf.isEmpty}} +{{^anyOf}} +{{^oneOf}} +{{>pojo_doc}} + +{{/oneOf}} +{{/anyOf}} +{{/isEnum}} +{{/model}}{{/models}} diff --git a/templates/libraries/native/model_oneof_doc.mustache b/templates/libraries/native/model_oneof_doc.mustache new file mode 100644 index 00000000..5fff76c9 --- /dev/null +++ b/templates/libraries/native/model_oneof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## oneOf schemas +{{#oneOf}} +* [{{{.}}}]({{{.}}}.md) +{{/oneOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#oneOf}} +import {{{package}}}.{{{.}}}; +{{/oneOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#oneOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/oneOf}} + } +} +``` diff --git a/templates/libraries/native/oneof_model.mustache b/templates/libraries/native/oneof_model.mustache new file mode 100644 index 00000000..89a044dc --- /dev/null +++ b/templates/libraries/native/oneof_model.mustache @@ -0,0 +1,397 @@ +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using = {{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{classname}} new{{classname}} = new {{classname}}(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}"); + switch (discriminatorValue) { + {{#mappedModels}} + case "{{{mappingName}}}": + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{modelName}}}.class); + new{{classname}}.setActualInstance(deserialized); + return new{{classname}}; + {{/mappedModels}} + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); + } + + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + {{#oneOf}} + // deserialize {{{.}}} + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if ({{{.}}}.class.equals(Integer.class) || {{{.}}}.class.equals(Long.class) || {{{.}}}.class.equals(Float.class) || {{{.}}}.class.equals(Double.class) || {{{.}}}.class.equals(Boolean.class) || {{{.}}}.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= (({{{.}}}.class.equals(Integer.class) || {{{.}}}.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= (({{{.}}}.class.equals(Float.class) || {{{.}}}.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= ({{{.}}}.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= ({{{.}}}.class.equals(String.class) && token == JsonToken.VALUE_STRING); + {{#isNullable}} + attemptParsing |= (token == JsonToken.VALUE_NULL); + {{/isNullable}} + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{.}}}'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema '{{{.}}}'", e); + } + + {{/oneOf}} + if (match == 1) { + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public {{classname}}() { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/native/additional_properties }} + + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#oneOf}} + public {{classname}}({{{.}}} o) { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/oneOf}} + static { + {{#oneOf}} + schemas.put("{{{.}}}", {{{.}}}.class); + {{/oneOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#oneOf}} + if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + {{/oneOf}} + throw new RuntimeException("Invalid instance type. Must be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#oneOf}} + /** + * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{.}}}` + * @throws ClassCastException if the instance is not `{{{.}}}` + */ + public {{{.}}} get{{{.}}}() throws ClassCastException { + return ({{{.}}})super.getActualInstance(); + } + + {{/oneOf}} + +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (getActualInstance() instanceof {{{dataType}}}) { + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(_item)))); + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + if ((({{{dataType}}})getActualInstance()).get(i) != null) { + joiner.add((({{{items.dataType}}})getActualInstance()).get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if (getActualInstance() != null) { + int i = 0; + for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { + if (_item != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf(_item)))); + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if (getActualInstance() != null) { + for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { + if (getActualInstance().get(i) != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{#items.isPrimitiveType}} + if (getActualInstance() != null) { + for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); + } + } + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + if (getActualInstance() != null) { + for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { + if ((({{{dataType}}})getActualInstance()).get(_key) != null) { + joiner.add((({{{items.dataType}}})getActualInstance()).get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isPrimitiveType}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if (getActualInstance() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if (getActualInstance() != null) { + joiner.add((({{{dataType}}})getActualInstance()).toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if (getActualInstance() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + return joiner.toString(); + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + return null; + } +{{/supportUrlQuery}} + +} diff --git a/templates/libraries/native/pojo.mustache b/templates/libraries/native/pojo.mustache new file mode 100644 index 00000000..283677ed --- /dev/null +++ b/templates/libraries/native/pojo.mustache @@ -0,0 +1,583 @@ +{{#discriminator}} +import {{invokerPackage}}.JSON; +{{/discriminator}} +{{#supportUrlQuery}} +import {{invokerPackage}}.ApiClient; +{{/supportUrlQuery}} +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} + {{^vendorExtensions.x-enum-as-string}} +{{>modelInnerEnum}} + + {{/vendorExtensions.x-enum-as-string}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { {{#parent}}{{#parcelableModel}} + super();{{/parcelableModel}}{{/parent}}{{#gson}}{{#discriminator}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName();{{/discriminator}}{{/gson}} + }{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}} + + {{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + }{{/withXml}}{{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + {{#vendorExtensions.x-enum-as-string}} + public static final Set {{{nameInSnakeCase}}}_VALUES = new HashSet<>(Arrays.asList( + {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} + )); + + {{/vendorExtensions.x-enum-as-string}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/native/additional_properties}} + + {{#parent}} + {{#allVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/allVars}} + {{/parent}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(_item)))); + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(_item)))); + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(_key))))); + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#discriminator}} +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); +} +{{/discriminator}} +{{#generateBuilders}} + + {{>javaBuilder}}{{! prevent indent}} +{{/generateBuilders}} +} diff --git a/templates/libraries/native/pom.mustache b/templates/libraries/native/pom.mustache new file mode 100644 index 00000000..0ccfa841 --- /dev/null +++ b/templates/libraries/native/pom.mustache @@ -0,0 +1,321 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 3 + + + 11 + + + + + + + + maven-surefire-plugin + 3.2.5 + + + conf/log4j.properties + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + 3.3.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + maven-compiler-plugin + 3.10.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#hasFormParamsInSpec}} + + org.apache.httpcomponents + httpmime + ${httpmime-version} + + {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.9 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 11 + 11 + 2.17.1 + 0.2.6 + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + {{#hasFormParamsInSpec}} + 4.5.14 + {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} + 5.10.2 + 2.27.2 + + diff --git a/templates/libraries/native/travis.mustache b/templates/libraries/native/travis.mustache new file mode 100644 index 00000000..c9464747 --- /dev/null +++ b/templates/libraries/native/travis.mustache @@ -0,0 +1,16 @@ +# +# Generated by: https://openapi-generator.tech +# +language: java +jdk: + - oraclejdk11 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/templates/libraries/okhttp-gson/AbstractOpenApiSchema.mustache b/templates/libraries/okhttp-gson/AbstractOpenApiSchema.mustache new file mode 100644 index 00000000..30e31cf3 --- /dev/null +++ b/templates/libraries/okhttp-gson/AbstractOpenApiSchema.mustache @@ -0,0 +1,137 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import {{invokerPackage}}.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +{{>generatedAnnotation}} + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + +{{>libraries/jersey2/additional_properties}} + + +} diff --git a/templates/libraries/okhttp-gson/ApiCallback.mustache b/templates/libraries/okhttp-gson/ApiCallback.mustache new file mode 100644 index 00000000..53b6a7b8 --- /dev/null +++ b/templates/libraries/okhttp-gson/ApiCallback.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java b/templates/libraries/okhttp-gson/ApiClient.mustache similarity index 58% rename from src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java rename to templates/libraries/okhttp-gson/ApiClient.mustache index 3b53f2a3..c7e2606a 100644 --- a/src/main/java/io/github/outscale/osc_sdk_java/client/ApiClient.java +++ b/templates/libraries/okhttp-gson/ApiClient.mustache @@ -1,21 +1,34 @@ -/* - * 3DS OUTSCALE API - * Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.
You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.

An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
# Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html). See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html). > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.
> For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`""`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands. See the code samples in each section of this documentation for specific examples in different programming languages. > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes. ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.
### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html).
# Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html). - * - * The version of the OpenAPI document: 1.30.0 - * Contact: support@outscale.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package io.github.outscale.osc_sdk_java.client; +{{>licenseInfo}} + +package {{invokerPackage}}; + +{{#dynamicOperations}} +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.Parameter.StyleEnum; +import io.swagger.v3.parser.OpenAPIV3Parser; +{{/dynamicOperations}} +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.joda.time.format.DateTimeFormatter; +{{/joda}} +{{#hasOAuthMethods}} +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.common.message.types.GrantType; +{{/hasOAuthMethods}} -import io.github.outscale.osc_sdk_java.client.auth.AWS4Auth; -import io.github.outscale.osc_sdk_java.client.auth.ApiKeyAuth; -import io.github.outscale.osc_sdk_java.client.auth.Authentication; -import io.github.outscale.osc_sdk_java.client.auth.HttpBasicAuth; +import javax.net.ssl.*; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -32,85 +45,109 @@ import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; import java.text.DateFormat; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.net.ssl.*; -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; -/** ApiClient class. */ +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +import {{invokerPackage}}.auth.RetryingOAuth; +import {{invokerPackage}}.auth.OAuthFlow; +{{/hasOAuthMethods}} +{{#withAWSV4Signature}} +import {{invokerPackage}}.auth.AWS4Auth; +{{/withAWSV4Signature}} +import dev.failsafe.RetryPolicy; +import dev.failsafe.RateLimiter; +import dev.failsafe.okhttp.FailsafeCall; + +/** + *

ApiClient class.

+ */ public class ApiClient { - private String backupPath = "https://api.eu-west-2.outscale.com/api/v1"; - private String basePath = null; - protected List servers = - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://api.{region}.outscale.com/api/v1", - "No description provided", - new HashMap() { - { - put( - "region", - new ServerVariable( - "No description provided", - "eu-west-2", - new HashSet( - Arrays.asList( - "ap-northeast-1", - "cloudgouv-eu-west-1", - "eu-west-2", - "us-east-2", - "us-west-1")))); - } - }))); + protected String basePath = "{{{basePath}}}"; + protected List servers = new ArrayList({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); protected Integer serverIndex = 0; protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; + protected boolean debugging = false; + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String tempFolderPath = null; + + protected Map authentications; - private Map authentications; + protected DateFormat dateFormat; + protected DateFormat datetimeFormat; + protected boolean lenientDatetimeFormat; + protected int dateLength; - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; + protected InputStream sslCaCert; + protected boolean verifyingSsl; + protected KeyManager[] keyManagers; - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; + protected OkHttpClient httpClient; + protected JSON json; + protected RetryPolicy retryPolicy; + protected RateLimiter rateLimiter; - private OkHttpClient httpClient; - private JSON json; + protected HttpLoggingInterceptor loggingInterceptor; - private HttpLoggingInterceptor loggingInterceptor; + {{#dynamicOperations}} + protected Map operationLookupMap = new HashMap<>(); - /** Basic constructor for ApiClient */ + {{/dynamicOperations}} + /** + * Basic constructor for ApiClient + */ public ApiClient() { init(); initHttpClient(); - // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "Authorization")); - authentications.put("ApiKeyAuthSec", new ApiKeyAuth("header", "Authorization")); - authentications.put("BasicAuth", new HttpBasicAuth()); - authentications.put("AWS4Auth", new AWS4Auth()); + // Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}{{#withAWSV4Signature}} + authentications.put("AWS4Auth", new AWS4Auth());{{/withAWSV4Signature}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -125,38 +162,126 @@ public ApiClient(OkHttpClient client) { httpClient = client; - // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "Authorization")); - authentications.put("ApiKeyAuthSec", new ApiKeyAuth("header", "Authorization")); - authentications.put("BasicAuth", new HttpBasicAuth()); - authentications.put("AWS4Auth", new AWS4Auth()); + // Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}{{#withAWSV4Signature}} + authentications.put("AWS4Auth", new AWS4Auth());{{/withAWSV4Signature}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } - private void initHttpClient() { + {{#hasOAuthMethods}} + {{#oauthMethods}} + {{#-first}} + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID + * + * @param clientId client ID + */ + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + * + * @param clientId client ID + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + * + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { + this(null, clientId, clientSecret, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with base path, client ID, secret, and additional parameters + * + * @param basePath base path + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String basePath, String clientId, String clientSecret, Map parameters) { + init(); + if (basePath != null) { + this.basePath = basePath; + } + + String tokenUrl = "{{{tokenUrl}}}"; + if (!"".equals(tokenUrl) && !URI.create(tokenUrl).isAbsolute()) { + URI uri = URI.create(getBasePath()); + tokenUrl = uri.getScheme() + ":" + + (uri.getAuthority() != null ? "//" + uri.getAuthority() : "") + + tokenUrl; + if (!URI.create(tokenUrl).isAbsolute()) { + throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); + } + } + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, clientSecret, parameters); + authentications.put( + "{{name}}", + retryingOAuth + ); + initHttpClient(Collections.singletonList(retryingOAuth)); + // Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{/authMethods}}{{#withAWSV4Signature}} + authentications.put("AWS4Auth", new AWS4Auth());{{/withAWSV4Signature}} + + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + {{/-first}} + {{/oauthMethods}} + {{/hasOAuthMethods}} + protected void initHttpClient() { initHttpClient(Collections.emptyList()); } - private void initHttpClient(List interceptors) { + protected void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor : interceptors) { + for (Interceptor interceptor: interceptors) { builder.addInterceptor(interceptor); } + {{#useGzipFeature}} + // Enable gzip request compression + builder.addInterceptor(new GzipRequestInterceptor()); + {{/useGzipFeature}} httpClient = builder.build(); } - private void init() { + protected void init() { verifyingSsl = true; json = new JSON(); // Set default User-Agent. - setUserAgent("osc-sdk-java/0.8.0"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); authentications = new HashMap(); + {{#dynamicOperations}} + + OpenAPI openAPI = new OpenAPIV3Parser().read("openapi/openapi.yaml"); + createOperationLookupMap(openAPI); + {{/dynamicOperations}} + + retryPolicy = RetryPolicy.ofDefaults(); } /** @@ -171,11 +296,12 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g https://api.eu-west-2.outscale.com/api/v1 + * @param basePath Base path of the URL (e.g {{{basePath}}} * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; + this.serverIndex = null; return this; } @@ -257,9 +383,9 @@ public boolean isVerifyingSsl() { } /** - * Configure whether to verify certificate and hostname when making https requests. Default to - * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types - * of cryptographic attacks. + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. * * @param verifyingSsl True to verify TLS/SSL connection * @return ApiClient @@ -280,8 +406,8 @@ public InputStream getSslCaCert() { } /** - * Configure the CA certificate to be trusted when making https requests. Use null to reset to - * default. + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. * * @param sslCaCert input stream for SSL CA cert * @return ApiClient @@ -293,7 +419,7 @@ public ApiClient setSslCaCert(InputStream sslCaCert) { } /** - * Getter for the field keyManagers. + *

Getter for the field keyManagers.

* * @return an array of {@link javax.net.ssl.KeyManager} objects */ @@ -302,8 +428,8 @@ public KeyManager[] getKeyManagers() { } /** - * Configure client keys to use for authorization in an SSL session. Use null to reset to - * default. + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. * * @param managers The KeyManagers to use * @return ApiClient @@ -315,7 +441,7 @@ public ApiClient setKeyManagers(KeyManager[] managers) { } /** - * Getter for the field dateFormat. + *

Getter for the field dateFormat.

* * @return a {@link java.text.DateFormat} object */ @@ -324,10 +450,10 @@ public DateFormat getDateFormat() { } /** - * Setter for the field dateFormat. + *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link io.github.outscale.osc_sdk_java.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { JSON.setDateFormat(dateFormat); @@ -335,21 +461,34 @@ public ApiClient setDateFormat(DateFormat dateFormat) { } /** - * Set SqlDateFormat. + *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link io.github.outscale.osc_sdk_java.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { JSON.setSqlDateFormat(dateFormat); return this; } + {{#joda}} + public ApiClient setDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + {{/joda}} + {{#jsr310}} /** - * Set OffsetDateTimeFormat. + *

Set OffsetDateTimeFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link io.github.outscale.osc_sdk_java.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { JSON.setOffsetDateTimeFormat(dateFormat); @@ -357,21 +496,22 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { } /** - * Set LocalDateFormat. + *

Set LocalDateFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link io.github.outscale.osc_sdk_java.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { JSON.setLocalDateFormat(dateFormat); return this; } + {{/jsr310}} /** - * Set LenientOnJson. + *

Set LenientOnJson.

* * @param lenientOnJson a boolean - * @return a {@link io.github.outscale.osc_sdk_java.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { JSON.setLenientOnJson(lenientOnJson); @@ -397,6 +537,31 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } + {{#hasHttpBearerMethods}} + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + {{/hasHttpBearerMethods}} + /** * Helper method to set username for the first HTTP basic authentication. * @@ -463,6 +628,14 @@ public void setApiKeyPrefix(String apiKeyPrefix) { * @param accessToken Access token */ public void setAccessToken(String accessToken) { + {{#hasOAuthMethods}} + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + {{/hasOAuthMethods}} throw new RuntimeException("No OAuth2 authentication configured!"); } @@ -474,8 +647,8 @@ public void setAccessToken(String accessToken) { * @param region Region * @param service Service to access to */ - public void setAWS4Configuration( - String accessKey, String secretKey, String region, String service) { + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + {{#withAWSV4Signature}} for (Authentication auth : authentications.values()) { if (auth instanceof AWS4Auth) { ((AWS4Auth) auth).setCredentials(accessKey, secretKey); @@ -484,6 +657,30 @@ public void setAWS4Configuration( return; } } + {{/withAWSV4Signature}} + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + {{#withAWSV4Signature}} + for (Authentication auth : authentications.values()) { + if (auth instanceof AWS4Auth) { + ((AWS4Auth) auth).setCredentials(accessKey, secretKey, sessionToken); + ((AWS4Auth) auth).setRegion(region); + ((AWS4Auth) auth).setService(service); + return; + } + } + {{/withAWSV4Signature}} throw new RuntimeException("No AWS4 authentication configured!"); } @@ -555,12 +752,11 @@ public ApiClient setDebugging(boolean debugging) { } /** - * The path of temporary folder used to store downloaded files from endpoints with file - * response. The default value is null, i.e. using the system's default temporary - * folder. + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. * - * @see createTempFile + * @see createTempFile * @return Temporary folder path */ public String getTempFolderPath() { @@ -588,18 +784,15 @@ public int getConnectTimeout() { } /** - * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values - * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = - httpClient - .newBuilder() - .connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS) - .build(); + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); return this; } @@ -613,15 +806,15 @@ public int getReadTimeout() { } /** - * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must - * be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client */ public ApiClient setReadTimeout(int readTimeout) { - httpClient = - httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); return this; } @@ -635,18 +828,35 @@ public int getWriteTimeout() { } /** - * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values - * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = - httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); return this; } + {{#hasOAuthMethods}} + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for (Authentication apiAuth : authentications.values()) { + if (apiAuth instanceof RetryingOAuth) { + RetryingOAuth retryingOAuth = (RetryingOAuth) apiAuth; + return retryingOAuth.getTokenRequestBuilder(); + } + } + return null; + } + {{/hasOAuthMethods}} + /** * Format the given parameter object into string. * @@ -656,10 +866,8 @@ public ApiClient setWriteTimeout(int writeTimeout) { public String parameterToString(Object param) { if (param == null) { return ""; - } else if (param instanceof Date - || param instanceof OffsetDateTime - || param instanceof LocalDate) { - // Serialize to json string and remove the " enclosing characters + } else if (param instanceof Date {{#joda}}|| param instanceof DateTime || param instanceof LocalDate{{/joda}}{{#jsr310}}|| param instanceof OffsetDateTime || param instanceof LocalDate{{/jsr310}}) { + //Serialize to json string and remove the " enclosing characters String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { @@ -679,7 +887,7 @@ public String parameterToString(Object param) { /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * - *

Note that {@code value} must not be a collection. + * Note that {@code value} must not be a collection. * * @param name The name of the parameter. * @param value The value of the parameter. @@ -697,17 +905,18 @@ public List parameterToPair(String name, Object value) { return params; } + {{^dynamicOperations}} /** * Formats the specified collection query parameters to a list of {@code Pair} objects. * - *

Note that the values of each of the returned Pair objects are percent-encoded. + * Note that the values of each of the returned Pair objects are percent-encoded. * * @param collectionFormat The collection format of the parameter. * @param name The name of the parameter. * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -746,6 +955,71 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } + {{/dynamicOperations}} + {{#dynamicOperations}} + public List parameterToPairs(Parameter param, Collection value) { + List params = new ArrayList(); + + // preconditions + if (param == null || param.getName() == null || param.getName().isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if (StyleEnum.FORM.equals(param.getStyle()) && Boolean.TRUE.equals(param.getExplode())) { + for (Object item : value) { + params.add(new Pair(param.getName(), escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if (StyleEnum.SPACEDELIMITED.equals(param.getStyle())) { + delimiter = escapeString(" "); + } else if (StyleEnum.PIPEDELIMITED.equals(param.getStyle())) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(param.getName(), sb.substring(delimiter.length()))); + + return params; + } + {{/dynamicOperations}} + + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ + public List freeFormParameterToPairs(Object value) { + List params = new ArrayList<>(); + + // preconditions + if (value == null || !(value instanceof Map )) { + return params; + } + + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + + for (Map.Entry entry : valuesMap.entrySet()) { + params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); + } + + return params; + } + /** * Formats the specified collection path parameter to a string value. @@ -772,7 +1046,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio delimiter = "|"; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder() ; for (Object item : value) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -782,20 +1056,24 @@ public String collectionPathParameterToString(String collectionFormat, Collectio } /** - * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif * * @param filename The filename to be sanitized * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); + return filename.replaceFirst("^.*[/\\\\]", ""); } /** - * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json - * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also - * default to JSON - * + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ @@ -805,12 +1083,13 @@ public boolean isJsonMime(String mime) { } /** - * Select the Accept header's value from the given accepts array: if JSON exists in the given - * array, use it; otherwise use all of them (joining into a string) + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, null will be returned (not to - * set the Accept header explicitly). + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { @@ -825,12 +1104,13 @@ public String selectHeaderAccept(String[] accepts) { } /** - * Select the Content-Type header's value from the given array: if JSON exists in the given - * array, use it; otherwise use the first one of the array. + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, returns null. If it - * matches "any", JSON will be used. + * @return The Content-Type header to use. If the given array is empty, + * returns null. If it matches "any", JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { @@ -865,16 +1145,15 @@ public String escapeString(String str) { } /** - * Deserialize response body to Java object, according to the return type and the Content-Type - * response header. + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. * * @param Type * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to deserialize response - * body, i.e. cannot read response body or the Content-Type of the response is not - * supported. + * @throws {{invokerPackage}}.ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") public T deserialize(Response response, Type returnType) throws ApiException { @@ -894,15 +1173,8 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - String respBody; - try { - if (response.body() != null) respBody = response.body().string(); - else respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { + ResponseBody respBody = response.body(); + if (respBody == null) { return null; } @@ -911,29 +1183,36 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( + try { + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody.byteStream(), returnType); + } else if (returnType.equals(String.class)) { + String respBodyString = respBody.string(); + if (respBodyString.isEmpty()) { + return null; + } + // Expecting string, return the raw response body. + return (T) respBodyString; + } else { + throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - respBody); + response.body().string()); + } + } catch (IOException e) { + throw new ApiException(e); } } /** - * Serialize the given Java object into request body according to the object's class and the - * request Content-Type. + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. * * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to serialize the given - * object + * @throws {{invokerPackage}}.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -963,8 +1242,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to read file content from - * response and write to disk + * @throws {{invokerPackage}}.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1012,11 +1290,14 @@ public File prepareDownloadFile(Response response) throws IOException { suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) prefix = "download-"; + if (prefix.length() < 3) + prefix = "download-"; } - if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); - else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); } /** @@ -1025,7 +1306,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to execute the call + * @throws {{invokerPackage}}.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1037,13 +1318,18 @@ public ApiResponse execute(Call call) throws ApiException { * @param returnType The return type used to deserialize HTTP response body * @param The return type corresponding to (same with) returnType * @param call Call - * @return ApiResponse object containing response status, headers and data, which is a Java - * object deserialized from response body and would be null when returnType is null. - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to execute the call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws {{invokerPackage}}.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { + FailsafeCall failsafecall = FailsafeCall + .with(retryPolicy) + .compose(call); + try { - Response response = call.execute(); + Response response = failsafecall.execute(); T data = handleResponse(response, returnType); return new ApiResponse(response.code(), response.headers().toMultimap(), data); } catch (IOException e) { @@ -1051,6 +1337,35 @@ public ApiResponse execute(Call call, Type returnType) throws ApiExceptio } } + {{#supportStreaming}} + /** + *

Execute stream.

+ * + * @param call a {@link okhttp3.Call} object + * @param returnType a {@link java.lang.reflect.Type} object + * @return a {@link java.io.InputStream} object + * @throws {{invokerPackage}}.ApiException if any. + */ + public InputStream executeStream(Call call, Type returnType) throws ApiException { + FailsafeCall failsafecall = FailsafeCall + .with(retryPolicy) + .compose(call); + + try { + Response response = failsafecall.execute(); + if (!response.isSuccessful()) { + throw new ApiException(response.code(), response.message(), response.headers().toMultimap(), null); + } + if (response.body() == null) { + return null; + } + return response.body().byteStream(); + } catch (IOException e) { + throw new ApiException(e); + } + } + + {{/supportStreaming}} /** * {@link #executeAsync(Call, Type, ApiCallback)} * @@ -1073,32 +1388,27 @@ public void executeAsync(Call call, ApiCallback callback) { */ @SuppressWarnings("unchecked") public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue( - new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure( - new ApiException(e), - response.code(), - response.headers().toMultimap()); - return; - } - callback.onSuccess( - result, response.code(), response.headers().toMultimap()); - } - }); + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); } /** @@ -1108,8 +1418,8 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws io.github.outscale.osc_sdk_java.client.ApiException If the response has an - * unsuccessful status code or fail to deserialize the response body + * @throws {{invokerPackage}}.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { if (response.isSuccessful()) { @@ -1120,11 +1430,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept try { response.body().close(); } catch (Exception e) { - throw new ApiException( - response.message(), - e, - response.code(), - response.headers().toMultimap()); + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } return null; @@ -1137,15 +1443,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept try { respBody = response.body().string(); } catch (IOException e) { - throw new ApiException( - response.message(), - e, - response.code(), - response.headers().toMultimap()); + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } - throw new ApiException( - response.message(), response.code(), response.headers().toMultimap(), respBody); + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); } } @@ -1154,8 +1455,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and - * "DELETE" + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object @@ -1165,35 +1465,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to serialize the request - * body object + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object */ - public Call buildCall( - String baseUrl, - String path, - String method, - List queryParams, - List collectionQueryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, - ApiCallback callback) - throws ApiException { - Request request = - buildRequest( - baseUrl, - path, - method, - queryParams, - collectionQueryParams, - body, - headerParams, - cookieParams, - formParams, - authNames, - callback); + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1203,8 +1478,7 @@ public Call buildCall( * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and - * "DELETE" + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object @@ -1214,37 +1488,23 @@ public Call buildCall( * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to serialize the request - * body object + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object */ - public Request buildRequest( - String baseUrl, - String path, - String method, - List queryParams, - List collectionQueryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, - ApiCallback callback) - throws ApiException { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); // prepare HTTP request body RequestBody reqBody; String contentType = headerParams.get("Content-Type"); - + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { + } else if ("multipart/form-data".equals(contentTypePure)) { reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { @@ -1252,25 +1512,18 @@ public Request buildRequest( reqBody = null; } else { // use an empty request body (for POST, PUT and PATCH) - reqBody = - RequestBody.create( - "", contentType == null ? null : MediaType.parse(contentType)); + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); } } else { reqBody = serialize(body, contentType); } + List updatedQueryParams = new ArrayList<>(queryParams); + // update parameters with authentication settings - updateParamsForAuth( - authNames, - allQueryParams, - headerParams, - cookieParams, - requestBodyToString(reqBody), - method, - URI.create(url)); - - final Request.Builder reqBuilder = new Request.Builder().url(url); + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); @@ -1299,26 +1552,21 @@ public Request buildRequest( * @param collectionQueryParams The collection query parameters * @return The full URL */ - public String buildUrl( - String baseUrl, String path, List queryParams, List collectionQueryParams) { + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { final StringBuilder url = new StringBuilder(); if (baseUrl != null) { url.append(baseUrl).append(path); } else { String baseURL; - if (basePath != null) { - baseURL = basePath; - } else if (serverIndex != null) { + if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException( - String.format( - "Invalid index %d when selecting the host settings. Must be" - + " less than %d", - serverIndex, servers.size())); + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); } baseURL = servers.get(serverIndex).URL(serverVariables); } else { - baseURL = backupPath; + baseURL = basePath; } url.append(baseURL).append(path); } @@ -1335,9 +1583,7 @@ public String buildUrl( url.append("&"); } String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())) - .append("=") - .append(escapeString(value)); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); } } } @@ -1387,13 +1633,11 @@ public void processHeaderParams(Map headerParams, Request.Builde */ public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader( - "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader( - "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } } } @@ -1408,17 +1652,10 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fails to update the parameters + * @throws {{invokerPackage}}.ApiException If fails to update the parameters */ - public void updateParamsForAuth( - String[] authNames, - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { @@ -1443,8 +1680,8 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams) } /** - * Build a multipart (file uploading) request body with the given form parameters, which could - * contain text fields and file fields. + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. * * @param formParams Form parameters in the form of Map * @return RequestBody @@ -1457,7 +1694,7 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { List list = (List) param.getValue(); - for (Object item : list) { + for (Object item: list) { if (item instanceof File) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); } else { @@ -1489,29 +1726,24 @@ public String guessContentTypeFromFile(File file) { /** * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. * - * @param mpBuilder MultipartBody.Builder + * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param file The file to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = - Headers.of( - "Content-Disposition", - "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + */ + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); } /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody - * Builder. + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. * * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param obj The complex object to add to the Header */ - private void addPartToMultiPartBuilder( - MultipartBody.Builder mpBuilder, String key, Object obj) { + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); @@ -1530,10 +1762,10 @@ private void addPartToMultiPartBuilder( } /** - * Get network interceptor to add it to the httpClient to track download progress for async - * requests. + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. */ - private Interceptor getProgressInterceptor() { + protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1541,10 +1773,9 @@ public Response intercept(Interceptor.Chain chain) throws IOException { final Response originalResponse = chain.proceed(request); if (request.tag() instanceof ApiCallback) { final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse - .newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); } return originalResponse; } @@ -1552,54 +1783,47 @@ public Response intercept(Interceptor.Chain chain) throws IOException { } /** - * Apply SSL related settings to httpClient according to the current values of verifyingSsl and - * sslCaCert. + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. */ - private void applySslSettings() { + protected void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; if (!verifyingSsl) { - trustManagers = - new TrustManager[] { - new X509TrustManager() { - @Override - public void checkClientTrusted( - java.security.cert.X509Certificate[] chain, String authType) - throws CertificateException {} - - @Override - public void checkServerTrusted( - java.security.cert.X509Certificate[] chain, String authType) - throws CertificateException {} - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[] {}; - } + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { } - }; - hostnameVerifier = - new HostnameVerifier() { + @Override - public boolean verify(String hostname, SSLSession session) { - return true; + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { } - }; + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; } else { - TrustManagerFactory trustManagerFactory = - TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); if (sslCaCert == null) { trustManagerFactory.init((KeyStore) null); } else { char[] password = null; // Any password will work. CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = - certificateFactory.generateCertificates(sslCaCert); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); if (certificates.isEmpty()) { - throw new IllegalArgumentException( - "expected non-empty set of trusted certificates"); + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); } KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; @@ -1615,12 +1839,8 @@ public boolean verify(String hostname, SSLSession session) { SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = - httpClient - .newBuilder() - .sslSocketFactory( - sslContext.getSocketFactory(), - (X509TrustManager) trustManagers[0]) + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) .hostnameVerifier(hostnameVerifier) .build(); } catch (GeneralSecurityException e) { @@ -1628,7 +1848,7 @@ public boolean verify(String hostname, SSLSession session) { } } - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1637,16 +1857,86 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti throw new AssertionError(e); } } + {{#dynamicOperations}} + + public ApiClient createOperationLookupMap(OpenAPI openAPI) { + operationLookupMap = new HashMap<>(); + for (Map.Entry pathItemEntry : openAPI.getPaths().entrySet()) { + String path = pathItemEntry.getKey(); + PathItem pathItem = pathItemEntry.getValue(); + addOperationLookupEntry(path, "GET", pathItem.getGet()); + addOperationLookupEntry(path, "PUT", pathItem.getPut()); + addOperationLookupEntry(path, "POST", pathItem.getPost()); + addOperationLookupEntry(path, "DELETE", pathItem.getDelete()); + addOperationLookupEntry(path, "OPTIONS", pathItem.getOptions()); + addOperationLookupEntry(path, "HEAD", pathItem.getHead()); + addOperationLookupEntry(path, "PATCH", pathItem.getPatch()); + addOperationLookupEntry(path, "TRACE", pathItem.getTrace()); + } + return this; + } + + protected void addOperationLookupEntry(String path, String method, Operation operation) { + if ( operation != null && operation.getOperationId() != null) { + operationLookupMap.put( + operation.getOperationId(), + new ApiOperation(path, method, operation)); + } + } + + public Map getOperationLookupMap() { + return operationLookupMap; + } + + public String fillParametersFromOperation( + Operation operation, + Map paramMap, + String path, + List queryParams, + List collectionQueryParams, + Map headerParams, + Map cookieParams + ) { + for (Map.Entry entry : paramMap.entrySet()) { + Object value = entry.getValue(); + for (Parameter param : operation.getParameters()) { + if (entry.getKey().equals(param.getName())) { + switch (param.getIn()) { + case "path": + path = path.replace("{" + param.getName() + "}", escapeString(value.toString())); + break; + case "query": + if (value instanceof Collection) { + collectionQueryParams.addAll(parameterToPairs(param, (Collection) value)); + } else { + queryParams.addAll(parameterToPair(param.getName(), value)); + } + break; + case "header": + headerParams.put(param.getName(), parameterToString(value)); + break; + case "cookie": + cookieParams.put(param.getName(), parameterToString(value)); + break; + default: + throw new IllegalStateException("Unexpected param in: " + param.getIn()); + } + + } + } + } + return path; + } + {{/dynamicOperations}} /** * Convert the HTTP request body to a string. * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body - * @throws io.github.outscale.osc_sdk_java.client.ApiException If fail to serialize the request - * body object into a string + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object into a string */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { + protected String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); @@ -1660,4 +1950,22 @@ private String requestBodyToString(RequestBody requestBody) throws ApiException // empty http request body return ""; } + + + public void setRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + } + + public RetryPolicy getRetryPolicy() { + return this.retryPolicy; + } + + public void setRateLimiter(RateLimiter rateLimiter) { + this.rateLimiter = rateLimiter; + } + + public RateLimiter getRateLimiter() { + return this.rateLimiter; + } + } diff --git a/templates/libraries/okhttp-gson/ApiResponse.mustache b/templates/libraries/okhttp-gson/ApiResponse.mustache new file mode 100644 index 00000000..cecbaac1 --- /dev/null +++ b/templates/libraries/okhttp-gson/ApiResponse.mustache @@ -0,0 +1,75 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.List; +import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API response returned by API call. + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; + this.data = data; + } + + /** + *

Get the status code.

+ * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + *

Get the headers.

+ * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + *

Get the data.

+ * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/templates/libraries/okhttp-gson/GzipRequestInterceptor.mustache b/templates/libraries/okhttp-gson/GzipRequestInterceptor.mustache new file mode 100644 index 00000000..b633aa8f --- /dev/null +++ b/templates/libraries/okhttp-gson/GzipRequestInterceptor.mustache @@ -0,0 +1,74 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/templates/libraries/okhttp-gson/JSON.mustache b/templates/libraries/okhttp-gson/JSON.mustache new file mode 100644 index 00000000..eeb26cb9 --- /dev/null +++ b/templates/libraries/okhttp-gson/JSON.mustache @@ -0,0 +1,561 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.joda.time.format.DateTimeFormatter; +import org.joda.time.format.DateTimeFormatterBuilder; +import org.joda.time.format.ISODateTimeFormat; +{{/joda}} + +import okio.ByteString; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +{{#jsr310}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +{{/jsr310}} +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + {{#joda}} + private static DateTimeTypeAdapter dateTimeTypeAdapter = new DateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/joda}} + {{#jsr310}} + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/jsr310}} + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + {{#models}} + {{#model}} + {{#discriminator}} + .registerTypeSelector({{modelPackage}}.{{classname}}.class, new TypeSelector<{{modelPackage}}.{{classname}}>() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + {{#mappedModels}} + classByDiscriminatorValue.put("{{mappingName}}"{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}, {{modelPackage}}.{{modelName}}.class); + {{/mappedModels}} + classByDiscriminatorValue.put("{{name}}"{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}, {{modelPackage}}.{{classname}}.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "{{{propertyBaseName}}}")); + } + }) + {{/discriminator}} + {{/model}} + {{/models}} + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + {{#disableHtmlEscaping}} + builder.disableHtmlEscaping(); + {{/disableHtmlEscaping}} + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + static { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + {{#joda}} + gsonBuilder.registerTypeAdapter(DateTime.class, dateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + {{/joda}} + {{#jsr310}} + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + {{/jsr310}} + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + {{#models}} + {{#model}} + {{^isEnum}} + {{^hasChildren}} + gsonBuilder.registerTypeAdapterFactory(new {{modelPackage}}.{{{classname}}}.CustomTypeAdapterFactory()); + {{/hasChildren}} + {{/isEnum}} + {{/model}} + {{/models}} + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Deserialize the given JSON InputStream to a Java object. + * + * @param Type + * @param inputStream The JSON InputStream + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(InputStream inputStream, Type returnType) throws IOException { + try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { + if (isLenientOnJson) { + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + JsonReader jsonReader = new JsonReader(reader); + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(reader, returnType); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + {{#joda}} + /** + * Gson TypeAdapter for Joda DateTime type + */ + public static class DateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public DateTimeTypeAdapter() { + this(new DateTimeFormatterBuilder() + .append(ISODateTimeFormat.dateTime().getPrinter(), ISODateTimeFormat.dateOptionalTimeParser().getParser()) + .toFormatter()); + } + + public DateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, DateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public DateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseDateTime(date); + } + } + } + + /** + * Gson TypeAdapter for Joda LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(ISODateTimeFormat.date()); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseLocalDate(date); + } + } + } + + public static void setDateTimeFormat(DateTimeFormatter dateFormat) { + dateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + {{/joda}} + {{#jsr310}} + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + {{/jsr310}} + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/templates/libraries/okhttp-gson/ProgressRequestBody.mustache b/templates/libraries/okhttp-gson/ProgressRequestBody.mustache new file mode 100644 index 00000000..71e1e2b4 --- /dev/null +++ b/templates/libraries/okhttp-gson/ProgressRequestBody.mustache @@ -0,0 +1,62 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.MediaType; +import okhttp3.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/templates/libraries/okhttp-gson/ProgressResponseBody.mustache b/templates/libraries/okhttp-gson/ProgressResponseBody.mustache new file mode 100644 index 00000000..45115940 --- /dev/null +++ b/templates/libraries/okhttp-gson/ProgressResponseBody.mustache @@ -0,0 +1,59 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.MediaType; +import okhttp3.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/templates/libraries/okhttp-gson/README.mustache b/templates/libraries/okhttp-gson/README.mustache new file mode 100644 index 00000000..de3afa6c --- /dev/null +++ b/templates/libraries/okhttp-gson/README.mustache @@ -0,0 +1,195 @@ +# {{artifactId}} + +{{appName}} +- API version: {{appVersion}} +{{^hideGenerationTimestamp}} + - Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} + - Generator version: {{generatorVersion}} + +{{{appDescriptionWithNewLines}}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + + +## Requirements + +Building the API client library requires: +1. Java 1.8+ +2. Maven (3.8.3+)/Gradle (7.2+) + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the '{{{artifactId}}}' jar has been published to maven central. + mavenLocal() // Needed if the '{{{artifactId}}}' jar has been published to the local maven repo. + } + + dependencies { + implementation "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +* `target/{{{artifactId}}}-{{{artifactVersion}}}.jar` +* `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{modelPackage}}}.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#withAWSV4Signature}} + // Configure AWS Signature V4 authorization + defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") + {{/withAWSV4Signature}} + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + .{{{paramName}}}({{{paramName}}}){{/optionalParams}} + .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation for Models + +{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) +{{/model}}{{/models}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}}- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}}- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/okhttp-gson/additional_properties.mustache b/templates/libraries/okhttp-gson/additional_properties.mustache new file mode 100644 index 00000000..bca54f84 --- /dev/null +++ b/templates/libraries/okhttp-gson/additional_properties.mustache @@ -0,0 +1,46 @@ +{{#isAdditionalPropertiesTrue}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the {{classname}} instance itself + */ + public {{classname}} putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/isAdditionalPropertiesTrue}} diff --git a/templates/libraries/okhttp-gson/anyof_model.mustache b/templates/libraries/okhttp-gson/anyof_model.mustache new file mode 100644 index 00000000..f60425d3 --- /dev/null +++ b/templates/libraries/okhttp-gson/anyof_model.mustache @@ -0,0 +1,408 @@ + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!{{classname}}.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes '{{classname}}' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + {{#composedSchemas}} + {{#anyOf}} + {{^isArray}} + {{^vendorExtensions.x-duplicated-data-type}} + final TypeAdapter<{{{dataType}}}> adapter{{{dataType}}} = gson.getDelegateAdapter(this, TypeToken.get({{{dataType}}}.class)); + {{/vendorExtensions.x-duplicated-data-type}} + {{/isArray}} + {{#isArray}} + + final Type typeInstance{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = new TypeToken<{{{dataType}}}>(){}.getType(); + final TypeAdapter<{{{dataType}}}> adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = (TypeAdapter<{{{dataType}}}>) gson.getDelegateAdapter(this, TypeToken.get(typeInstance{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}})); + {{/isArray}} + {{/anyOf}} + {{/composedSchemas}} + + return (TypeAdapter) new TypeAdapter<{{classname}}>() { + @Override + public void write(JsonWriter out, {{classname}} value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + // check if the actual instance is of the type `{{{dataType}}}` + if (value.getActualInstance() instanceof {{#isArray}}List{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}) { + {{#isPrimitiveType}} + JsonPrimitive primitive = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isArray}} + List list = (List) value.getActualInstance(); + if (!list.isEmpty() && list.get(0) instanceof {{{items.dataType}}}) { + JsonArray array = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()).getAsJsonArray(); + elementAdapter.write(out, array); + return; + } + {{/isArray}} + {{/isPrimitiveType}} + {{^isArray}} + {{^isPrimitiveType}} + JsonElement element = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()); + elementAdapter.write(out, element); + return; + {{/isPrimitiveType}} + {{/isArray}} + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + @Override + public {{classname}} read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^hasVars}} + // deserialize {{{dataType}}} + try { + // validate the JSON object to see if any exception is thrown + {{^isArray}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!jsonElement.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#isUuid}} + UUID.fromString(jsonElement.getAsString()); + {{/isUuid}} + {{^isUuid}} + {{{dataType}}}.validateJsonElement(jsonElement); + {{/isUuid}} + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isPrimitiveType}} + {{/isNumber}} + {{/isArray}} + {{#isArray}} + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{{dataType}}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isArray}} + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for {{{dataType}}} failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema '{{{dataType}}}'", e); + } + {{/hasVars}} + {{#hasVars}} + // deserialize {{{.}}} + try { + // validate the JSON object to see if any exception is thrown + {{.}}.validateJsonElement(jsonElement); + actualAdapter = adapter{{.}}; + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for {{{.}}} failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema '{{{.}}}'", e); + } + {{/hasVars}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + + throw new IOException(String.format("Failed deserialization for {{classname}}: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public {{classname}}() { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } + + public {{classname}}(Object o) { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + static { + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + schemas.put("{{{dataType}}}", {{{baseType}}}.class); + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (instance instanceof {{#isArray}}List{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}) { + {{#isArray}} + List list = (List) instance; + if (!list.isEmpty() && list.get(0) instanceof {{{items.dataType}}}) { + super.setActualInstance(instance); + return; + } + {{/isArray}} + {{^isArray}} + super.setActualInstance(instance); + return; + {{/isArray}} + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/anyOf}} + {{/composedSchemas}} + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to {{classname}} + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + {{#composedSchemas}} + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + // validate the json string with {{{dataType}}} + try { + {{^hasVars}} + {{^isArray}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!jsonElement.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#isUuid}} + UUID.fromString(jsonElement.getAsString()); + {{/isUuid}} + {{^isUuid}} + {{{dataType}}}.validateJsonElement(jsonElement); + {{/isUuid}} + {{/isPrimitiveType}} + {{/isNumber}} + {{/isArray}} + {{#isArray}} + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{{dataType}}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + {{/isArray}} + {{/hasVars}} + {{#hasVars}} + {{{.}}}.validateJsonElement(jsonElement); + return; + {{/hasVars}} + return; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for {{{dataType}}} failed with `%s`.", e.getMessage())); + // continue to the next one + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + {{/composedSchemas}} + throw new IOException(String.format("The JSON string is invalid for {{classname}} with anyOf schemas: {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of {{classname}} given an JSON string + * + * @param jsonString JSON string + * @return An instance of {{classname}} + * @throws IOException if the JSON string is invalid with respect to {{classname}} + */ + public static {{{classname}}} fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, {{{classname}}}.class); + } + + /** + * Convert an instance of {{classname}} to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/templates/libraries/okhttp-gson/api.mustache b/templates/libraries/okhttp-gson/api.mustache new file mode 100644 index 00000000..9519ce13 --- /dev/null +++ b/templates/libraries/okhttp-gson/api.mustache @@ -0,0 +1,610 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiCallback; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiException; +{{#dynamicOperations}} +import {{invokerPackage}}.ApiOperation; +{{/dynamicOperations}} +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ProgressRequestBody; +import {{invokerPackage}}.ProgressResponseBody; +{{#performBeanValidation}} +import {{invokerPackage}}.BeanValidationException; +{{/performBeanValidation}} + +import com.google.gson.reflect.TypeToken; +{{#dynamicOperations}} +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.parameters.Parameter; +{{/dynamicOperations}} + +import java.io.IOException; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.Validation; +import {{javaxPackage}}.validation.ValidatorFactory; +import {{javaxPackage}}.validation.executable.ExecutableValidator; +import java.util.Set; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +{{/performBeanValidation}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{#supportStreaming}} +import java.io.InputStream; +{{/supportStreaming}} + +{{#operations}} +public class {{classname}} { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + {{#operation}} + {{^vendorExtensions.x-group-parameters}}/** + * Build call for {{operationId}}{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { {{#servers}}"{{{url}}}"{{^-last}}, {{/-last}}{{/servers}} }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + + // create path and map variables + {{^dynamicOperations}} + String localVarPath = "{{{path}}}"{{#pathParams}} + .replace("{" + "{{baseName}}" + "}", localVarApiClient.escapeString({{#collectionFormat}}localVarApiClient.collectionPathParameterToString("{{{collectionFormat}}}", {{{paramName}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}.toString(){{/collectionFormat}})){{/pathParams}}; + {{/dynamicOperations}} + {{#dynamicOperations}} + ApiOperation apiOperation = localVarApiClient.getOperationLookupMap().get("{{{operationId}}}"); + if (apiOperation == null) { + throw new ApiException("Operation not found in OAS"); + } + Operation operation = apiOperation.getOperation(); + String localVarPath = apiOperation.getPath(); + Map paramMap = new HashMap<>(); + {{#allParams}} + {{^isFormParam}} + {{^isBodyParam}} + paramMap.put("{{baseName}}", {{paramName}}); + {{/isBodyParam}} + {{/isFormParam}} + {{/allParams}} + {{/dynamicOperations}} + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + {{#formParams}} + if ({{paramName}} != null) { + localVarFormParams.put("{{baseName}}", {{paramName}}); + } + + {{/formParams}} + {{^dynamicOperations}} + {{#queryParams}} + if ({{paramName}} != null) { + {{#isFreeFormObject}}localVarQueryParams.addAll(localVarApiClient.freeFormParameterToPairs({{paramName}}));{{/isFreeFormObject}}{{^isFreeFormObject}}{{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}}));{{/isFreeFormObject}} + } + + {{/queryParams}} + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + localVarCollectionQueryParams.add(new Pair("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}})); + + {{/isQueryParam}} + {{/constantParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + localVarHeaderParams.put("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}}); + + {{/isHeaderParam}} + {{/constantParams}} + {{#cookieParams}} + if ({{paramName}} != null) { + localVarCookieParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/cookieParams}} + {{#constantParams}} + {{#isCookieParam}} + // Set client side default value of Cookie Param "{{baseName}}". + localVarCookieParams.put("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}}); + + {{/isCookieParam}} + {{/constantParams}} + {{/dynamicOperations}} + {{#dynamicOperations}} + localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); + + {{/dynamicOperations}} + final String[] localVarAccepts = { + {{#produces}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/produces}} + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + {{#consumes}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/consumes}} + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + {{^dynamicOperations}} + {{#headerParams}} + + if ({{paramName}} != null) { + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/headerParams}} + {{/dynamicOperations}} + + String[] localVarAuthNames = new String[] { {{#withAWSV4Signature}}"AWS4Auth"{{/withAWSV4Signature}}{{#authMethods}}{{#-first}}{{#withAWSV4Signature}}, {{/withAWSV4Signature}}{{/-first}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + return localVarApiClient.buildCall(basePath, localVarPath, {{^dynamicOperations}}"{{httpMethod}}"{{/dynamicOperations}}{{#dynamicOperations}}apiOperation.getMethod(){{/dynamicOperations}}, localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + @SuppressWarnings("rawtypes") + private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { + {{^performBeanValidation}} + {{#allParams}} + {{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException("Missing the required parameter '{{paramName}}' when calling {{operationId}}(Async)"); + } + + {{/required}} + {{/allParams}} + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); + + {{/performBeanValidation}} + {{#performBeanValidation}} + try { + ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); + ExecutableValidator executableValidator = factory.getValidator().forExecutables(); + + Object[] parameterValues = { {{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }; + Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}}{{>nullable_var_annotations}} {{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}}); + Set> violations = executableValidator.validateParameters(this, method, + parameterValues); + + if (violations.size() == 0) { + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); + } else { + throw new BeanValidationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + {{/performBeanValidation}} + } + + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}}{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}} + * @return {{.}}{{/returnType}} + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{#vendorExtensions.x-streaming}} + public {{#returnType}}InputStream {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}InputStream localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + return localVarResp;{{/returnType}} + } + {{/vendorExtensions.x-streaming}} + {{^vendorExtensions.x-streaming}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + return localVarResp.getData();{{/returnType}} + } + {{/vendorExtensions.x-streaming}} + {{/vendorExtensions.x-group-parameters}} + + {{^vendorExtensions.x-group-parameters}}/** + * {{summary}} + * {{notes}}{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-streaming}} InputStream {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); + {{#returnType}} + {{#errorObjectType}} + try { + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.executeStream(localVarCall, localVarReturnType); + } catch (ApiException e) { + e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType())); + throw e; + } + {{/errorObjectType}} + {{^errorObjectType}} + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.executeStream(localVarCall, localVarReturnType); + {{/errorObjectType}} + {{/returnType}} + } + {{/vendorExtensions.x-streaming}}{{^vendorExtensions.x-streaming}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); + {{^returnType}} + return localVarApiClient.execute(localVarCall); + {{/returnType}} + {{#returnType}} + {{#errorObjectType}} + try { + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } catch (ApiException e) { + e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType())); + throw e; + } + {{/errorObjectType}} + {{^errorObjectType}} + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + {{/errorObjectType}} + {{/returnType}} + } + {{/vendorExtensions.x-streaming}} + + {{^vendorExtensions.x-group-parameters}}/** + * {{summary}} (asynchronously) + * {{notes}}{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + + okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_callback); + {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);{{/returnType}}{{^returnType}}localVarApiClient.executeAsync(localVarCall, _callback);{{/returnType}} + return localVarCall; + } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#requiredParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private final {{{dataType}}} {{paramName}}; + {{/requiredParams}} + {{#optionalParams}} + {{>nullable_var_annotations}}{{! prevent indent}} + private {{{dataType}}} {{paramName}}; + {{/optionalParams}} + + private API{{operationId}}Request({{#requiredParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) { + {{#requiredParams}} + this.{{paramName}} = {{paramName}}; + {{/requiredParams}} + } + + {{#optionalParams}} + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/optionalParams}} + /** + * Build call for {{operationId}} + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); + } + + /** + * Execute {{operationId}} request{{#returnType}} + * @return {{.}}{{/returnType}} + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{^vendorExtensions.x-streaming}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + return localVarResp.getData();{{/returnType}} + } + {{/vendorExtensions.x-streaming}} + {{#vendorExtensions.x-streaming}} + public InputStream execute() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/vendorExtensions.x-streaming}} + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{^vendorExtensions.x-streaming}} + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/vendorExtensions.x-streaming}} + {{#vendorExtensions.x-streaming}} + public InputStream executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/vendorExtensions.x-streaming}} + + /** + * Execute {{operationId}} request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public okhttp3.Call executeAsync(final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback); + } + } + + /** + * {{summary}} + * {{notes}}{{#requiredParams}} + * @param {{paramName}} {{description}} (required){{/requiredParams}} + * @return API{{operationId}}Request + {{#responses.0}} + * @http.response.details + + + + {{#responses}} + + {{/responses}} +
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#requiredParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) { + return new API{{operationId}}Request({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}); + } + {{/vendorExtensions.x-group-parameters}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/okhttp-gson/apiException.mustache b/templates/libraries/okhttp-gson/apiException.mustache new file mode 100644 index 00000000..15a012dd --- /dev/null +++ b/templates/libraries/okhttp-gson/apiException.mustache @@ -0,0 +1,196 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + + +/** + *

ApiException class.

+ */ +@SuppressWarnings("serial") +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + {{#errorObjectType}} + private {{{errorObjectType}}} errorObject = null; + {{/errorObjectType}} + + /** + *

Constructor for ApiException.

+ */ + public ApiException() {} + + /** + *

Constructor for ApiException.

+ * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } + {{#errorObjectType}} + + /** + * Get the error object. + * + * @return Error object + */ + public {{{errorObjectType}}} getErrorObject() { + return errorObject; + } + + /** + * Get the error object. + * + * @param errorObject Error object + */ + public void setErrorObject({{{errorObjectType}}} errorObject) { + this.errorObject = errorObject; + } + {{/errorObjectType}} +} diff --git a/templates/libraries/okhttp-gson/api_doc.mustache b/templates/libraries/okhttp-gson/api_doc.mustache new file mode 100644 index 00000000..dea75bd2 --- /dev/null +++ b/templates/libraries/okhttp-gson/api_doc.mustache @@ -0,0 +1,110 @@ +# {{classname}}{{#description}} +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +# **{{operationId}}**{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#withAWSV4Signature}} + // Configure AWS Signature V4 authorization + defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE") + {{/withAWSV4Signature}} + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + .{{{paramName}}}({{{paramName}}}){{/optionalParams}} + .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/templates/libraries/okhttp-gson/api_test.mustache b/templates/libraries/okhttp-gson/api_test.mustache new file mode 100644 index 00000000..b56bdf4d --- /dev/null +++ b/templates/libraries/okhttp-gson/api_test.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{#supportStreaming}} +import java.io.InputStream; +{{/supportStreaming}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{/summary}} + {{#notes}} + * {{notes}} + * + {{/notes}} + * @throws ApiException if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{#vendorExtensions.x-streaming}} + InputStream response = api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + .{{paramName}}({{paramName}}){{/optionalParams}} + .execute();{{/vendorExtensions.x-group-parameters}} + {{/vendorExtensions.x-streaming}} + {{^vendorExtensions.x-streaming}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + .{{paramName}}({{paramName}}){{/optionalParams}} + .execute();{{/vendorExtensions.x-group-parameters}} + {{/vendorExtensions.x-streaming}} + // TODO: test validations + } + + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/okhttp-gson/auth/AWS4Auth.mustache b/templates/libraries/okhttp-gson/auth/AWS4Auth.mustache new file mode 100644 index 00000000..d3f30b77 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/AWS4Auth.mustache @@ -0,0 +1,105 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.List; +import java.util.stream.Collectors; + +import software.amazon.awssdk.auth.credentials.AnonymousCredentialsProvider; +import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; +import software.amazon.awssdk.auth.credentials.AwsSessionCredentials; +import software.amazon.awssdk.auth.credentials.AwsCredentials; +import software.amazon.awssdk.auth.signer.Aws4Signer; +import software.amazon.awssdk.auth.signer.params.Aws4SignerParams; +import software.amazon.awssdk.http.ContentStreamProvider; +import software.amazon.awssdk.http.SdkHttpFullRequest; +import software.amazon.awssdk.http.SdkHttpMethod; +import software.amazon.awssdk.regions.Region; + +import okio.Buffer; + +{{>generatedAnnotation}} + +public class AWS4Auth implements Authentication { + + private AwsCredentials credentials; + private String region; + private String service; + + public AWS4Auth() { + this.credentials = AnonymousCredentialsProvider.create().resolveCredentials(); + } + + public void setCredentials(String accessKey, String secretKey) { + this.credentials = AwsBasicCredentials.create(accessKey, secretKey); + } + + public void setCredentials(String accessKey, String secretKey, String sessionToken) { + this.credentials = AwsSessionCredentials.create(accessKey, secretKey, sessionToken); + } + + public void setRegion(String region) { + this.region = region; + } + + public void setService(String service) { + this.service = service; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) + throws ApiException { + + SdkHttpFullRequest.Builder requestBuilder = + SdkHttpFullRequest.builder().uri(uri).method(SdkHttpMethod.fromValue(method)); + + ContentStreamProvider provider = new ContentStreamProvider() { + @Override + public InputStream newStream() { + InputStream is = new ByteArrayInputStream(payload.getBytes(StandardCharsets.UTF_8)); + return is; + } + }; + + requestBuilder = requestBuilder.contentStreamProvider(provider); + + SdkHttpFullRequest signableRequest = sign(requestBuilder); + + Map headers = signableRequest.headers().entrySet().stream() + .collect(Collectors.toMap(s -> s.getKey(), e -> e.getValue().get(0))); + + headerParams.putAll(headers); + } + + /** + * AWS Signature Version 4 signing. + * + * @param request {@link SdkHttpFullRequest.Builder} + * @return {@link SdkHttpFullRequest} + */ + private SdkHttpFullRequest sign(final SdkHttpFullRequest.Builder request) { + + SdkHttpFullRequest req = request.build(); + + if (this.service != null && this.region != null && this.credentials != null) { + Aws4SignerParams params = Aws4SignerParams.builder().signingName(this.service) + .signingRegion(Region.of(this.region)).awsCredentials(this.credentials).build(); + + Aws4Signer signer = Aws4Signer.create(); + + req = signer.sign(req, params); + } + + return req; + } +} diff --git a/templates/libraries/okhttp-gson/auth/ApiKeyAuth.mustache b/templates/libraries/okhttp-gson/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..ee02f7ce --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/ApiKeyAuth.mustache @@ -0,0 +1,70 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/templates/libraries/okhttp-gson/auth/Authentication.mustache b/templates/libraries/okhttp-gson/auth/Authentication.mustache new file mode 100644 index 00000000..da1e1902 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/Authentication.mustache @@ -0,0 +1,27 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} diff --git a/templates/libraries/okhttp-gson/auth/HttpBasicAuth.mustache b/templates/libraries/okhttp-gson/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..41f33670 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/HttpBasicAuth.mustache @@ -0,0 +1,44 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import okhttp3.Credentials; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/templates/libraries/okhttp-gson/auth/HttpBearerAuth.mustache b/templates/libraries/okhttp-gson/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..c0a85528 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/HttpBearerAuth.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.Pair; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/okhttp-gson/auth/OAuth.mustache b/templates/libraries/okhttp-gson/auth/OAuth.mustache new file mode 100644 index 00000000..f664362e --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/OAuth.mustache @@ -0,0 +1,32 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache b/templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache new file mode 100644 index 00000000..67d7f720 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache @@ -0,0 +1,73 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.auth; + +import okhttp3.OkHttpClient; +import okhttp3.MediaType; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class OAuthOkHttpClient implements HttpClient { + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + @Override + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/json"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(request.getBody(), mediaType) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + response.headers().toMultimap(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + @Override + public void shutdown() { + // Nothing to do here + } +} +{{/hasOAuthMethods}} diff --git a/templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache new file mode 100644 index 00000000..fbe73e72 --- /dev/null +++ b/templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -0,0 +1,214 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.Pair; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.util.Map; +import java.util.List; + +public class RetryingOAuth extends OAuth implements Interceptor { + private OAuthClient oAuthClient; + + private TokenRequestBuilder tokenRequestBuilder; + + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { + this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = tokenRequestBuilder; + } + + /** + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { + this(new OkHttpClient(), tokenRequestBuilder); + } + + /** + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ + public RetryingOAuth( + String tokenUrl, + String clientId, + OAuthFlow flow, + String clientSecret, + Map parameters + ) { + this(OAuthClientRequest.tokenLocation(tokenUrl) + .setClientId(clientId) + .setClientSecret(clientSecret)); + setFlow(flow); + if (parameters != null) { + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) throws IOException { + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already has an authorization (e.g. Basic auth), proceed with the request as is + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // Get the token if it has not yet been acquired + if (getAccessToken() == null) { + updateAccessToken(null); + } + + OAuthClientRequest oAuthRequest; + if (getAccessToken() != null) { + // Build the request + Request.Builder requestBuilder = request.newBuilder(); + + String requestAccessToken = getAccessToken(); + try { + oAuthRequest = + new OAuthBearerClientRequest(request.url().toString()). + setAccessToken(requestAccessToken). + buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + Map headers = oAuthRequest.getHeaders(); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + requestBuilder.url(oAuthRequest.getLocationUri()); + + // Execute the request + Response response = chain.proceed(requestBuilder.build()); + + // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + if ( + response != null && + ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED || + response.code() == HttpURLConnection.HTTP_FORBIDDEN ) && + updateTokenAndRetryOnAuthorizationFailure + ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept(chain, false); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } + else { + return chain.proceed(chain.request()); + } + } + + /** + * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthJSONAccessTokenResponse accessTokenResponse = + oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + } + } catch (OAuthSystemException | OAuthProblemException e) { + throw new IOException(e); + } + } + return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); + } + + /** + * Gets the token request builder + * + * @return A token request builder + */ + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + // Applying authorization to parameters is performed in the retryingIntercept method + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + // No implementation necessary + } +} +{{/hasOAuthMethods}} diff --git a/templates/libraries/okhttp-gson/build.gradle.mustache b/templates/libraries/okhttp-gson/build.gradle.mustache new file mode 100644 index 00000000..6b217a3d --- /dev/null +++ b/templates/libraries/okhttp-gson/build.gradle.mustache @@ -0,0 +1,202 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +{{#sourceFolder}} +apply plugin: 'java' +{{/sourceFolder}} +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +{{#sourceFolder}} +sourceSets { + main.java.srcDirs = ['{{sourceFolder}}'] +} + +{{/sourceFolder}} +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task) + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + jakarta_annotation_version = "1.3.5" + {{#useBeanValidation}} + bean_validation_version = "2.0.2" + {{/useBeanValidation}} +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' + {{#openApiNullable}} + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + {{/openApiNullable}} + {{#withAWSV4Signature}} + implementation 'software.amazon.awssdk:auth:2.20.157' + {{/withAWSV4Signature}} + {{#hasOAuthMethods}} + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + {{/hasOAuthMethods}} + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' + {{#joda}} + implementation 'joda-time:joda-time:2.9.9' + {{/joda}} + {{#dynamicOperations}} + implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.30' + {{/dynamicOperations}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/templates/libraries/okhttp-gson/build.sbt.mustache b/templates/libraries/okhttp-gson/build.sbt.mustache new file mode 100644 index 00000000..edc455df --- /dev/null +++ b/templates/libraries/okhttp-gson/build.sbt.mustache @@ -0,0 +1,41 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", + "com.google.code.gson" % "gson" % "2.9.1", + "org.apache.commons" % "commons-lang3" % "3.18.0", + "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + {{/openApiNullable}} + {{#withAWSV4Signature}} + "software.amazon.awssdk" % "auth" % "2.20.157", + {{/withAWSV4Signature}} + {{#hasOAuthMethods}} + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", + {{/hasOAuthMethods}} + {{#joda}} + "joda-time" % "joda-time" % "2.9.9" % "compile", + {{/joda}} + {{#dynamicOperations}} + "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.30" % "compile" + {{/dynamicOperations}} + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/templates/libraries/okhttp-gson/model.mustache b/templates/libraries/okhttp-gson/model.mustache new file mode 100644 index 00000000..3a1cca8d --- /dev/null +++ b/templates/libraries/okhttp-gson/model.mustache @@ -0,0 +1,35 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +{{/withXml}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/okhttp-gson/modelEnum.mustache b/templates/libraries/okhttp-gson/modelEnum.mustache new file mode 100644 index 00000000..f3c0e2d7 --- /dev/null +++ b/templates/libraries/okhttp-gson/modelEnum.mustache @@ -0,0 +1,85 @@ +import java.io.IOException; +{{#isUri}} +import java.net.URI; +{{/isUri}} +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ +@JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#allowableValues}}{{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } + + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + @Override + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} enumeration) throws IOException { + jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}); + } + + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}}{{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isUri}}URI.create({{/isUri}}jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{#isUri}}getAsString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}getAs{{{dataType}}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +{{/supportUrlQuery}} +} diff --git a/templates/libraries/okhttp-gson/modelInnerEnum.mustache b/templates/libraries/okhttp-gson/modelInnerEnum.mustache new file mode 100644 index 00000000..d21f03c3 --- /dev/null +++ b/templates/libraries/okhttp-gson/modelInnerEnum.mustache @@ -0,0 +1,66 @@ + /** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ + @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class) +{{#withXml}} + @XmlType(name="{{datatypeWithEnum}}") + @XmlEnum({{dataType}}.class) +{{/withXml}} + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}} + {{/enumVars}} + {{/allowableValues}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } + + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { + @Override + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} enumeration) throws IOException { + jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}); + } + + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}} {{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isUri}}URI.create({{/isUri}}jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{#isUri}}getAsString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}getAs{{{dataType}}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } diff --git a/templates/libraries/okhttp-gson/model_test.mustache b/templates/libraries/okhttp-gson/model_test.mustache new file mode 100644 index 00000000..040d319b --- /dev/null +++ b/templates/libraries/okhttp-gson/model_test.mustache @@ -0,0 +1,42 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/templates/libraries/okhttp-gson/oneof_model.mustache b/templates/libraries/okhttp-gson/oneof_model.mustache new file mode 100644 index 00000000..8f0516b5 --- /dev/null +++ b/templates/libraries/okhttp-gson/oneof_model.mustache @@ -0,0 +1,522 @@ + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}} implements {{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!{{classname}}.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes '{{classname}}' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + {{#composedSchemas}} + {{#oneOf}} + {{^isArray}} + {{^isMap}} + {{^vendorExtensions.x-duplicated-data-type}} + final TypeAdapter<{{{dataType}}}> adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = gson.getDelegateAdapter(this, TypeToken.get({{{dataType}}}.class)); + {{/vendorExtensions.x-duplicated-data-type}} + {{/isMap}} + {{/isArray}} + {{#isArray}} + + final Type typeInstance{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = new TypeToken<{{{dataType}}}>(){}.getType(); + final TypeAdapter<{{{dataType}}}> adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = (TypeAdapter<{{{dataType}}}>) gson.getDelegateAdapter(this, TypeToken.get(typeInstance{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}})); + {{/isArray}} + {{#isMap}} + final Type typeInstance{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = new TypeToken<{{{dataType}}}>(){}.getType(); + final TypeAdapter<{{{dataType}}}> adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}} = (TypeAdapter<{{{dataType}}}>) gson.getDelegateAdapter(this, TypeToken.get(typeInstance{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}})); + {{/isMap}} + {{/oneOf}} + {{/composedSchemas}} + + return (TypeAdapter) new TypeAdapter<{{classname}}>() { + @Override + public void write(JsonWriter out, {{classname}} value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + // check if the actual instance is of the type `{{{dataType}}}` + if (value.getActualInstance() instanceof {{#isArray}}List{{/isArray}}{{#isMap}}Map{{/isMap}}{{^isMap}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isMap}}) { + {{#isPrimitiveType}} + {{^isMap}} + JsonPrimitive primitive = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + {{/isMap}} + {{#isMap}} + JsonObject object = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, object); + return; + {{/isMap}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isArray}} + List list = (List) value.getActualInstance(); + if (!list.isEmpty() && list.get(0) instanceof {{{items.dataType}}}) { + JsonArray array = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()).getAsJsonArray(); + elementAdapter.write(out, array); + return; + } + {{/isArray}} + {{/isPrimitiveType}} + {{^isMap}} + {{^isArray}} + {{^isPrimitiveType}} + JsonElement element = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.toJsonTree(({{{dataType}}})value.getActualInstance()); + elementAdapter.write(out, element); + return; + {{/isPrimitiveType}} + {{/isArray}} + {{/isMap}} + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + @Override + public {{classname}} read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + JsonObject jsonObject = jsonElement.getAsJsonObject(); + + // use discriminator value for faster oneOf lookup + {{classname}} new{{classname}} = new {{classname}}(); + if (jsonObject.get("{{{propertyBaseName}}}") == null) { + log.log(Level.WARNING, "Failed to lookup discriminator value for {{classname}} as `{{{propertyBaseName}}}` was not found in the payload or the payload is empty."); + } else { + // look up the discriminator value in the field `{{{propertyBaseName}}}` + switch (jsonObject.get("{{{propertyBaseName}}}").getAsString()) { + {{#mappedModels}} + case "{{{mappingName}}}": + deserialized = adapter{{modelName}}.fromJsonTree(jsonObject); + new{{classname}}.setActualInstance(deserialized); + return new{{classname}}; + {{/mappedModels}} + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", jsonObject.get("{{{propertyBaseName}}}").getAsString())); + } + } + + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^hasVars}} + // deserialize {{{dataType}}} + try { + // validate the JSON object to see if any exception is thrown + {{^isArray}} + {{^isMap}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!jsonElement.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#isUuid}} + UUID.fromString(jsonElement.getAsString()); + {{/isUuid}} + {{^isUuid}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(jsonElement); + {{/isUuid}} + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isPrimitiveType}} + {{/isNumber}} + {{/isMap}} + {{/isArray}} + {{#isArray}} + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isArray}} + {{#isMap}} + if (!jsonElement.isJsonObject()) { + throw new IllegalArgumentException(String.format("Expected json element to be a object type in the JSON string but got `%s`", jsonElement.toString())); + } + + {{^isFreeFormObject}} + Map map = jsonElement.getAsJsonObject().asMap(); + // validate map items + for(JsonElement element : map.values()) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + {{/isFreeFormObject}} + actualAdapter = adapter{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}; + {{/isMap}} + match++; + log.log(Level.FINER, "Input data matches schema '{{{dataType}}}'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for {{{dataType}}} failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema '{{{dataType}}}'", e); + } + {{/hasVars}} + {{#hasVars}} + // deserialize {{{.}}} + try { + // validate the JSON object to see if any exception is thrown + {{.}}.validateJsonElement(jsonElement); + actualAdapter = adapter{{.}}; + match++; + log.log(Level.FINER, "Input data matches schema '{{{.}}}'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for {{{.}}} failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema '{{{.}}}'", e); + } + {{/hasVars}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + + if (match == 1) { + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public {{classname}}() { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } + + public {{classname}}(Object o) { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + static { + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + schemas.put("{{{dataType}}}", {{{baseType}}}.class); + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + } + + @Override + public Map> getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if (instance instanceof {{#isArray}}List{{/isArray}}{{#isMap}}Map{{/isMap}}{{^isMap}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isMap}}) { + {{#isArray}} + List list = (List) instance; + if (!list.isEmpty() && list.get(0) instanceof {{{items.dataType}}}) { + super.setActualInstance(instance); + return; + } + {{/isArray}} + {{^isArray}} + super.setActualInstance(instance); + return; + {{/isArray}} + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + throw new RuntimeException("Invalid instance type. Must be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + /** + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` + */ + public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); + } + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} + {{/oneOf}} + {{/composedSchemas}} + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to {{classname}} + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + // validate the json string with {{{dataType}}} + try { + {{^hasVars}} + {{^isMap}} + {{^isArray}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!jsonElement.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#isUuid}} + UUID.fromString(jsonElement.getAsString()); + {{/isUuid}} + {{^isUuid}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(jsonElement); + {{/isUuid}} + {{/isPrimitiveType}} + {{/isNumber}} + {{/isArray}} + {{/isMap}} + {{#isArray}} + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + {{/isArray}} + {{#isMap}} + if (!jsonElement.isJsonObject()) { + throw new IllegalArgumentException(String.format("Expected json element to be a object type in the JSON string but got `%s`", jsonElement.toString())); + } + + {{^isFreeFormObject}} + Map map = jsonElement.getAsJsonObject().asMap(); + // validate map items + for(JsonElement element : map.values()) { + {{#items}} + {{#isNumber}} + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isNumber}} + {{^isNumber}} + {{#isPrimitiveType}} + if (!element.getAsJsonPrimitive().is{{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}}()) { + throw new IllegalArgumentException(String.format("Expected array items to be of type {{#isBoolean}}Boolean{{/isBoolean}}{{#isString}}String{{/isString}}{{^isString}}{{^isBoolean}}Number{{/isBoolean}}{{/isString}} in the JSON string but got `%s`", jsonElement.toString())); + } + {{/isPrimitiveType}} + {{/isNumber}} + {{^isNumber}} + {{^isPrimitiveType}} + {{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}.validateJsonElement(element); + {{/isPrimitiveType}} + {{/isNumber}} + {{/items}} + } + {{/isFreeFormObject}} + {{/isMap}} + {{/hasVars}} + {{#hasVars}} + {{{.}}}.validateJsonElement(jsonElement); + validCount++; + {{/hasVars}} + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for {{{dataType}}} failed with `%s`.", e.getMessage())); + // continue to the next one + } + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + {{/composedSchemas}} + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for {{classname}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of {{classname}} given an JSON string + * + * @param jsonString JSON string + * @return An instance of {{classname}} + * @throws IOException if the JSON string is invalid with respect to {{classname}} + */ + public static {{{classname}}} fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, {{{classname}}}.class); + } + + /** + * Convert an instance of {{classname}} to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/templates/libraries/okhttp-gson/pojo.mustache b/templates/libraries/okhttp-gson/pojo.mustache new file mode 100644 index 00000000..be357cac --- /dev/null +++ b/templates/libraries/okhttp-gson/pojo.mustache @@ -0,0 +1,595 @@ +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import {{invokerPackage}}.JSON; + +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{/withXml}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super(); + {{/parcelableModel}} + {{/parent}} + {{#discriminator}} + {{#discriminator.isEnum}} +{{#readWriteVars}}{{#isDiscriminator}}{{#defaultValue}} + this.{{name}} = {{defaultValue}}; +{{/defaultValue}}{{/isDiscriminator}}{{/readWriteVars}} + {{/discriminator.isEnum}} + {{^discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + + public {{classname}}( + {{#readOnlyVars}} + {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{name}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + {{#deprecated}} + @Deprecated + {{/deprecated}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + this.{{name}} = {{name}}; + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + this.{{name}}.put(key, {{name}}Item); + return this; + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} + public {{{datatypeWithEnum}}} {{getter}}() { + return {{name}}; + } + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated +{{/deprecated}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + this.{{name}} = {{name}}; + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/okhttp-gson/additional_properties}} + + + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} && + {{/-last}}{{/vars}}{{#isAdditionalPropertiesTrue}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/isAdditionalPropertiesTrue}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#isAdditionalPropertiesTrue}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/isAdditionalPropertiesTrue}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} +{{#isAdditionalPropertiesTrue}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); +{{/isAdditionalPropertiesTrue}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + {{#hasVars}} + openapiFields = new HashSet(Arrays.asList({{#allVars}}"{{baseName}}"{{^-last}}, {{/-last}}{{/allVars}})); + {{/hasVars}} + {{^hasVars}} + openapiFields = new HashSet(0); + {{/hasVars}} + + // a set of required properties/fields (JSON key names) + {{#hasRequired}} + openapiRequiredFields = new HashSet(Arrays.asList({{#requiredVars}}"{{baseName}}"{{^-last}}, {{/-last}}{{/requiredVars}})); + {{/hasRequired}} + {{^hasRequired}} + openapiRequiredFields = new HashSet(0); + {{/hasRequired}} + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to {{classname}} + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!{{classname}}.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in {{{classname}}} is not found in the empty JSON string", {{classname}}.openapiRequiredFields.toString())); + } + } + {{^hasChildren}} + {{^isAdditionalPropertiesTrue}} + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!{{classname}}.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `{{classname}}` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + {{/isAdditionalPropertiesTrue}} + {{#requiredVars}} + {{#-first}} + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : {{classname}}.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + {{/-first}} + {{/requiredVars}} + {{/hasChildren}} + {{^discriminator}} + {{#hasVars}} + JsonObject jsonObj = jsonElement.getAsJsonObject(); + {{/hasVars}} + {{#vars}} + {{#isArray}} + {{#items.isModel}} + {{#required}} + // ensure the json data is an array + if (!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + + JsonArray jsonArray{{name}} = jsonObj.getAsJsonArray("{{{baseName}}}"); + // validate the required field `{{{baseName}}}` (array) + for (int i = 0; i < jsonArray{{name}}.size(); i++) { + {{{items.dataType}}}.validateJsonElement(jsonArray{{name}}.get(i)); + }; + {{/required}} + {{^required}} + if (jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull()) { + JsonArray jsonArray{{name}} = jsonObj.getAsJsonArray("{{{baseName}}}"); + if (jsonArray{{name}} != null) { + // ensure the json data is an array + if (!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + + // validate the optional field `{{{baseName}}}` (array) + for (int i = 0; i < jsonArray{{name}}.size(); i++) { + {{{items.dataType}}}.validateJsonElement(jsonArray{{name}}.get(i)); + }; + } + } + {{/required}} + {{/items.isModel}} + {{^items.isModel}} + {{^required}} + // ensure the optional json data is an array if present + if (jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull() && !jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + {{/required}} + {{#required}} + // ensure the required json array is present + if (jsonObj.get("{{{baseName}}}") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + {{/required}} + {{/items.isModel}} + {{/isArray}} + {{^isContainer}} + {{#isString}} + if ({{#notRequiredOrIsNullable}}(jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull()) && {{/notRequiredOrIsNullable}}!jsonObj.get("{{{baseName}}}").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be a primitive type in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + {{/isString}} + {{#isModel}} + {{#required}} + // validate the required field `{{{baseName}}}` + {{{dataType}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + {{/required}} + {{^required}} + // validate the optional field `{{{baseName}}}` + if (jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull()) { + {{{dataType}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + } + {{/required}} + {{/isModel}} + {{#isEnum}} + {{#required}} + // validate the required field `{{{baseName}}}` + {{{datatypeWithEnum}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + {{/required}} + {{^required}} + // validate the optional field `{{{baseName}}}` + if (jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull()) { + {{{datatypeWithEnum}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + } + {{/required}} + {{/isEnum}} + {{#isEnumRef}} + {{#required}} + // validate the required field `{{{baseName}}}` + {{{dataType}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + {{/required}} + {{^required}} + // validate the optional field `{{{baseName}}}` + if (jsonObj.get("{{{baseName}}}") != null && !jsonObj.get("{{{baseName}}}").isJsonNull()) { + {{{dataType}}}.validateJsonElement(jsonObj.get("{{{baseName}}}")); + } + {{/required}} + {{/isEnumRef}} + {{/isContainer}} + {{/vars}} + {{/discriminator}} + {{#hasChildren}} + {{#discriminator}} + + String discriminatorValue = jsonElement.getAsJsonObject().get("{{{propertyBaseName}}}").getAsString(); + switch (discriminatorValue) { + {{#mappedModels}} + case "{{mappingName}}": + {{modelName}}.validateJsonElement(jsonElement); + break; + {{/mappedModels}} + default: + throw new IllegalArgumentException(String.format("The value of the `{{{propertyBaseName}}}` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); + } + {{/discriminator}} + {{/hasChildren}} + } + +{{^hasChildren}} + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!{{classname}}.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes '{{classname}}' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter<{{classname}}> thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get({{classname}}.class)); + + return (TypeAdapter) new TypeAdapter<{{classname}}>() { + @Override + public void write(JsonWriter out, {{classname}} value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + {{#isAdditionalPropertiesTrue}} + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + {{/isAdditionalPropertiesTrue}} + elementAdapter.write(out, obj); + } + + @Override + public {{classname}} read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + {{#isAdditionalPropertiesTrue}} + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + {{classname}} instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + {{/isAdditionalPropertiesTrue}} + {{^isAdditionalPropertiesTrue}} + return thisAdapter.fromJsonTree(jsonElement); + {{/isAdditionalPropertiesTrue}} + } + + }.nullSafe(); + } + } +{{/hasChildren}} + + /** + * Create an instance of {{classname}} given an JSON string + * + * @param jsonString JSON string + * @return An instance of {{classname}} + * @throws IOException if the JSON string is invalid with respect to {{classname}} + */ + public static {{{classname}}} fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, {{{classname}}}.class); + } + + /** + * Convert an instance of {{classname}} to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/pom.xml.template b/templates/libraries/okhttp-gson/pom.mustache similarity index 68% rename from pom.xml.template rename to templates/libraries/okhttp-gson/pom.mustache index 4e40e785..9b78f719 100644 --- a/pom.xml.template +++ b/templates/libraries/okhttp-gson/pom.mustache @@ -1,53 +1,49 @@ 4.0.0 - io.github.outscale - osc-sdk-java + {{groupId}} + {{artifactId}} jar - osc-sdk-java - SDK_VERSION - https://github.com/outscale/osc-sdk-java - 3DS Outscale SDK + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} - scm:git:git@github.com:outscale/osc-sdk-java.git - scm:git:git@github.com:outscale/osc-sdk-java.git - https://github.com/outscale/osc-sdk-java + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} - BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause + {{licenseName}} + {{licenseUrl}} repo - 3DS Outscale - opensource@outscale.com - 3DS Outscale - https://outscale.com + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.8.1 true 128m @@ -61,7 +57,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.2.1 + 3.4.1 enforce-maven @@ -83,12 +79,12 @@ maven-surefire-plugin 2.22.2 - + loggerPath conf/log4j.properties - + -Xms512m -Xmx1500m methods 10 @@ -104,7 +100,7 @@ maven-dependency-plugin - 3.5.0 + 3.6.1 package @@ -135,7 +131,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.5.0 add_sources @@ -145,7 +141,7 @@ - src/main/java + {{{sourceFolder}}} @@ -166,7 +162,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.6.3 attach-javadocs @@ -189,7 +185,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 attach-sources @@ -241,35 +237,6 @@ - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - @@ -281,7 +248,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.1 sign-artifacts @@ -297,7 +264,21 @@ - + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} com.google.code.findbugs @@ -324,37 +305,87 @@ gson-fire ${gson-fire-version} + {{#hasOAuthMethods}} + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.2 + + {{/hasOAuthMethods}} org.apache.commons commons-lang3 ${commons-lang3-version} + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#dynamicOperations}} + + io.swagger.parser.v3 + swagger-parser-v3 + 2.0.30 + + {{/dynamicOperations}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + 5.4.3.Final + + + jakarta.el + jakarta.el-api + ${jakarta.el-version} + + {{/performBeanValidation}} + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} jakarta.annotation jakarta.annotation-api ${jakarta-annotation-version} provided + {{#openApiNullable}} org.openapitools jackson-databind-nullable ${jackson-databind-nullable-version} - - - com.amazonaws - aws-java-sdk-signer - 1.12.400 - + {{/openApiNullable}} + {{#withAWSV4Signature}} - javax.ws.rs - jsr311-api - ${jsr311-api-version} + software.amazon.awssdk + auth + 2.20.157 + {{/withAWSV4Signature}} - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-api-version} @@ -370,41 +401,54 @@ test - org.mockito - mockito-core - ${mockito-core-version} - test - - - - org.bouncycastle - bcpkix-jdk15on - 1.70 + dev.failsafe + failsafe + ${failsafe-version} - - com.squareup.okhttp3 - okhttp-tls - 4.10.0 + dev.failsafe + failsafe-okhttp + ${failsafe-version} + 1.8 ${java.version} ${java.version} - 1.8.5 + 1.9.0 + {{#swagger1AnnotationLibrary}} 1.6.6 - 4.10.0 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 4.12.0 2.10.1 - 3.12.0 - 0.2.4 + 3.18.0 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#joda}} + 2.12.0 + {{/joda}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} 1.3.5 - 5.9.2 - 1.9.2 - 3.12.4 - 2.1.1 + 2.0.2 + {{/useJakartaEe}} + {{#performBeanValidation}} + 3.0.3 + {{/performBeanValidation}} + 5.10.3 + 1.10.0 + 2.1.6 1.1.1 UTF-8 - 2.31.0 + 2.43.0 + 3.3.1 diff --git a/templates/libraries/rest-assured/ApiClient.mustache b/templates/libraries/rest-assured/ApiClient.mustache new file mode 100644 index 00000000..c52ee9ba --- /dev/null +++ b/templates/libraries/rest-assured/ApiClient.mustache @@ -0,0 +1,59 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import {{apiPackage}}.*; + +{{#imports}}import {{import}}; +{{/imports}} +import io.restassured.builder.RequestSpecBuilder; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jackson}}JacksonObjectMapper.jackson{{/jackson}}; + +public class ApiClient { + {{#basePath}} + public static final String BASE_URI = "{{.}}"; + {{/basePath}} + + protected final Config config; + + protected ApiClient(Config config) { + this.config = config; + } + + public static ApiClient api(Config config) { + return new ApiClient(config); + } + + {{#apiInfo}} + {{#apis}} + public {{classname}} {{classVarName}}() { + return {{classname}}.{{classVarName}}(config.reqSpecSupplier); + } + {{/apis}} + {{/apiInfo}} + + public static class Config { + protected Supplier reqSpecSupplier = () -> new RequestSpecBuilder() + {{#basePath}}.setBaseUri(BASE_URI){{/basePath}} + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper({{#gson}}gson(){{/gson}}{{#jackson}}jackson(){{/jackson}}))); + + /** + * Use common specification for all operations + * @param supplier supplier + * @return configuration + */ + public Config reqSpecSupplier(Supplier supplier) { + this.reqSpecSupplier = supplier; + return this; + } + + public static Config apiConfig() { + return new Config(); + } + } +} \ No newline at end of file diff --git a/templates/libraries/rest-assured/GsonObjectMapper.mustache b/templates/libraries/rest-assured/GsonObjectMapper.mustache new file mode 100644 index 00000000..320d8141 --- /dev/null +++ b/templates/libraries/rest-assured/GsonObjectMapper.mustache @@ -0,0 +1,30 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import io.restassured.mapper.ObjectMapper; +import io.restassured.mapper.ObjectMapperDeserializationContext; +import io.restassured.mapper.ObjectMapperSerializationContext; + +public class GsonObjectMapper implements ObjectMapper { + + private JSON json; + + private GsonObjectMapper() { + this.json = new JSON(); + } + + public static GsonObjectMapper gson() { + return new GsonObjectMapper(); + } + + @Override + public Object deserialize(ObjectMapperDeserializationContext context) { + return json.deserialize(context.getDataToDeserialize().asString(), context.getType()); + } + + @Override + public Object serialize(ObjectMapperSerializationContext context) { + return json.serialize(context.getObjectToSerialize()); + } +} \ No newline at end of file diff --git a/templates/libraries/rest-assured/JacksonObjectMapper.mustache b/templates/libraries/rest-assured/JacksonObjectMapper.mustache new file mode 100644 index 00000000..3d875d66 --- /dev/null +++ b/templates/libraries/rest-assured/JacksonObjectMapper.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} + +import io.restassured.internal.mapping.Jackson2Mapper; +import io.restassured.path.json.mapper.factory.Jackson2ObjectMapperFactory; + + +public class JacksonObjectMapper extends Jackson2Mapper { + + private JacksonObjectMapper() { + super(createFactory()); + } + + private static Jackson2ObjectMapperFactory createFactory() { + return (cls, charset) -> { + ObjectMapper mapper = new ObjectMapper(); + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + {{#joda}} + mapper.registerModule(new JodaModule()); + {{/joda}} + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + return mapper; + }; + } + + public static JacksonObjectMapper jackson() { + return new JacksonObjectMapper(); + } +} diff --git a/templates/libraries/rest-assured/Oper.mustache b/templates/libraries/rest-assured/Oper.mustache new file mode 100644 index 00000000..b8684665 --- /dev/null +++ b/templates/libraries/rest-assured/Oper.mustache @@ -0,0 +1,13 @@ +{{>licenseInfo}} + +package {{apiPackage}}; + +import io.restassured.response.Response; + +import java.util.function.Function; + +public interface Oper { + + T execute(Function handler); + +} diff --git a/templates/libraries/rest-assured/README.mustache b/templates/libraries/rest-assured/README.mustache new file mode 100644 index 00000000..c9877589 --- /dev/null +++ b/templates/libraries/rest-assured/README.mustache @@ -0,0 +1,42 @@ +# {{artifactId}} + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + {{groupId}} + {{artifactId}} + {{artifactVersion}} + compile + + +``` + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/rest-assured/ResponseSpecBuilders.mustache b/templates/libraries/rest-assured/ResponseSpecBuilders.mustache new file mode 100644 index 00000000..af7e7ac9 --- /dev/null +++ b/templates/libraries/rest-assured/ResponseSpecBuilders.mustache @@ -0,0 +1,31 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.response.Response; +import io.restassured.specification.ResponseSpecification; + +import java.util.function.Function; + +public class ResponseSpecBuilders { + + private ResponseSpecBuilders() { + } + + public static Function validatedWith(ResponseSpecification respSpec) { + return response -> response.then().spec(respSpec).extract().response(); + } + + public static Function validatedWith(ResponseSpecBuilder respSpec) { + return validatedWith(respSpec.build()); + } + + /** + * @param code expected status code + * @return ResponseSpecBuilder + */ + public static ResponseSpecBuilder shouldBeCode(int code) { + return new ResponseSpecBuilder().expectStatusCode(code); + } +} \ No newline at end of file diff --git a/templates/libraries/rest-assured/api.mustache b/templates/libraries/rest-assured/api.mustache new file mode 100644 index 00000000..e6da4fce --- /dev/null +++ b/templates/libraries/rest-assured/api.mustache @@ -0,0 +1,291 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#gson}} +import com.google.gson.reflect.TypeToken; +{{/gson}} +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +{{#jackson}} +import io.restassured.common.mapper.TypeRef; +{{/jackson}} +import io.restassured.http.Method; +import io.restassured.response.Response; +{{#swagger1AnnotationLibrary}} +import io.swagger.annotations.*; +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +import io.swagger.v3.oas.annotations.*; +import io.swagger.v3.oas.annotations.enums.*; +import io.swagger.v3.oas.annotations.media.*; +import io.swagger.v3.oas.annotations.responses.*; +import io.swagger.v3.oas.annotations.security.*; +{{/swagger2AnnotationLibrary}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +{{#gson}} +import {{invokerPackage}}.JSON; +{{/gson}} +import static io.restassured.http.Method.*; + +{{#swagger1AnnotationLibrary}} +@Api(value = "{{{baseName}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +@Tag(name = "{{{baseName}}}") +{{/swagger2AnnotationLibrary}} +public class {{classname}} { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private {{classname}}(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static {{classname}} {{classVarName}}(Supplier reqSpecSupplier) { + return new {{classname}}(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( +{{#operations}} +{{#operation}} + {{operationId}}(){{^-last}},{{/-last}} +{{/operation}} +{{/operations}} + ); + } +{{#operations}} +{{#operation}} + +{{#swagger1AnnotationLibrary}} + @ApiOperation(value = "{{{summary}}}", + notes = "{{{notes}}}", + nickname = "{{{operationId}}}", + tags = { {{#tags}}{{#name}}"{{{.}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} }) +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Operation(summary = "{{{summary}}}", + description = "{{{notes}}}", + operationId = "{{{operationId}}}", + tags = { {{#tags}}{{#name}}"{{{.}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) + @ApiResponses(value = { {{#responses}} + @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} }) +{{/swagger2AnnotationLibrary}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{operationIdCamelCase}}Oper {{operationId}}() { + return new {{operationIdCamelCase}}Oper(createReqSpec()); + } +{{/operation}} +{{/operations}} + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public {{classname}} reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + {{#operations}} + {{#operation}} + /** + * {{summary}} + * {{notes}} + * + {{#allParams}} + * @see #{{#isPathParam}}{{paramName}}Path{{/isPathParam}}{{#isQueryParam}}{{paramName}}Query{{/isQueryParam}}{{#isFormParam}}{{^isFile}}{{paramName}}Form{{/isFile}}{{#isFile}}{{paramName}}MultiPart{{/isFile}}{{/isFormParam}}{{#isHeaderParam}}{{paramName}}Header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * return {{.}} + {{/returnType}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public static class {{operationIdCamelCase}}Oper implements Oper { + + public static final Method REQ_METHOD = {{httpMethod}}; + public static final String REQ_URI = "{{{path}}}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public {{operationIdCamelCase}}Oper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + {{#vendorExtensions}} + {{#x-content-type}} + reqSpec.setContentType("{{{x-content-type}}}"); + {{/x-content-type}} + reqSpec.setAccept("{{#x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/x-accepts}}"); + {{/vendorExtensions}} + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * {{httpMethod}} {{{path}}} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + {{#returnType}} + + /** + * {{httpMethod}} {{{path}}} + * @param handler handler + * @return {{returnType}} + */ + public {{{returnType}}} executeAs(Function handler) { + {{#gson}}Type type = new TypeToken<{{{returnType}}}>(){}.getType(); + {{/gson}}{{#jackson}}TypeRef<{{{returnType}}}> type = new TypeRef<{{{returnType}}}>(){}; + {{/jackson}}return execute(handler).as(type); + } + {{/returnType}} + {{#bodyParams}} + + /** + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper body({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + reqSpec.setBody({{paramName}}); + return this; + } + {{/bodyParams}} + {{#headerParams}} + + public static final String {{#convert}}{{paramName}}{{/convert}}_HEADER = "{{baseName}}"; + + /** + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper {{paramName}}Header(String {{paramName}}) { + reqSpec.addHeader({{#convert}}{{paramName}}{{/convert}}_HEADER, {{paramName}}); + return this; + } + {{/headerParams}} + {{#pathParams}} + + public static final String {{#convert}}{{paramName}}{{/convert}}_PATH = "{{baseName}}"; + + /** + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper {{paramName}}Path(Object {{paramName}}) { + reqSpec.addPathParam({{#convert}}{{paramName}}{{/convert}}_PATH, {{paramName}}); + return this; + } + {{/pathParams}} + {{#queryParams}} + + public static final String {{#convert}}{{paramName}}{{/convert}}_QUERY = "{{baseName}}"; + + /** + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper {{paramName}}Query(Object... {{paramName}}) { + reqSpec.addQueryParam({{#convert}}{{paramName}}{{/convert}}_QUERY, {{paramName}}); + return this; + } + {{/queryParams}} + {{#formParams}} + {{^isFile}} + + public static final String {{#convert}}{{paramName}}{{/convert}}_FORM = "{{baseName}}"; + + /** + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper {{paramName}}Form(Object... {{paramName}}) { + reqSpec.addFormParam({{#convert}}{{paramName}}{{/convert}}_FORM, {{paramName}}); + return this; + } + {{/isFile}} + {{/formParams}} + {{#formParams}} + {{#isFile}} + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param {{paramName}} ({{dataType}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + * @return operation + */ + public {{operationIdCamelCase}}Oper {{paramName}}MultiPart({{>nullable_var_annotations}} {{{dataType}}} {{paramName}}) { + reqSpec.addMultiPart({{paramName}}); + return this; + } + {{/isFile}} + {{/formParams}} + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public {{operationIdCamelCase}}Oper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public {{operationIdCamelCase}}Oper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +{{/operation}} +{{/operations}} +} diff --git a/templates/libraries/rest-assured/api_doc.mustache b/templates/libraries/rest-assured/api_doc.mustache new file mode 100644 index 00000000..42d223ae --- /dev/null +++ b/templates/libraries/rest-assured/api_doc.mustache @@ -0,0 +1,62 @@ +# {{classname}}{{#description}} +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +# **{{operationId}}** +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example +```java +// Import classes: +//import {{invokerPackage}}.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +{{classname}} api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("{{basePath}}"))).{{classVarName}}(); + +api.{{operationId}}(){{#allParams}}{{#required}}{{#isPathParam}} + .{{paramName}}Path({{paramName}}){{/isPathParam}}{{#isQueryParam}} + .{{paramName}}Query({{paramName}}){{/isQueryParam}}{{#isFormParam}}{{^isFile}} + .{{paramName}}Form({{paramName}}){{/isFile}}{{/isFormParam}}{{#isFormParam}}{{#isFile}} + .{{paramName}}MultiPart({{paramName}}){{/isFile}}{{/isFormParam}}{{#isHeaderParam}} + .{{paramName}}Header({{paramName}}){{/isHeaderParam}}{{#isBodyParam}} + .body({{paramName}}){{/isBodyParam}}{{/required}}{{/allParams}}.execute(r -> r.prettyPeek()); +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{/operation}} +{{/operations}} diff --git a/templates/libraries/rest-assured/api_test.mustache b/templates/libraries/rest-assured/api_test.mustache new file mode 100644 index 00000000..adcbd808 --- /dev/null +++ b/templates/libraries/rest-assured/api_test.mustache @@ -0,0 +1,72 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import {{invokerPackage}}.ApiClient; +import {{apiPackage}}.{{classname}}; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jackson}}JacksonObjectMapper.jackson{{/jackson}}; + +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private {{classname}} api; + + @BeforeEach + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper({{#gson}}gson(){{/gson}}{{#jackson}}jackson(){{/jackson}}))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("{{{basePath}}}"))).{{classVarName}}(); + } +{{#operations}} +{{#operation}} + + {{#responses}} + /** + * {{message}} + */ + @Test + public void shouldSee{{code}}After{{operationIdCamelCase}}() { + {{#allParams}} + {{#isHeaderParam}}String {{paramName}} = null;{{/isHeaderParam}}{{^isHeaderParam}}{{{dataType}}} {{paramName}} = null;{{/isHeaderParam}} + {{/allParams}} + api.{{operationId}}(){{#allParams}}{{#required}}{{#isPathParam}} + .{{paramName}}Path({{paramName}}){{/isPathParam}}{{#isQueryParam}} + .{{paramName}}Query({{paramName}}){{/isQueryParam}}{{#isFormParam}}{{^isFile}} + .{{paramName}}Form({{paramName}}){{/isFile}}{{/isFormParam}}{{#isFormParam}}{{#isFile}} + .{{paramName}}MultiPart({{paramName}}){{/isFile}}{{/isFormParam}}{{#isHeaderParam}} + .{{paramName}}Header({{paramName}}){{/isHeaderParam}}{{#isBodyParam}} + .body({{paramName}}){{/isBodyParam}}{{/required}}{{/allParams}}.execute(r -> r.prettyPeek()); + // TODO: test validations + } + + {{/responses}} +{{/operation}} +{{/operations}} +} diff --git a/templates/libraries/rest-assured/build.gradle.mustache b/templates/libraries/rest-assured/build.gradle.mustache new file mode 100644 index 00000000..3ddee453 --- /dev/null +++ b/templates/libraries/rest-assured/build.gradle.mustache @@ -0,0 +1,167 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.6" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.15" + {{/swagger2AnnotationLibrary}} + rest_assured_version = "5.3.2" + junit_version = "5.10.3" +{{#jackson}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} +{{/jackson}} +{{#gson}} + gson_version = "2.10.1" + gson_fire_version = "1.9.0" +{{/gson}} +{{#joda}} + jodatime_version = "2.10.5" +{{/joda}} + okio_version = "3.6.0" + jakarta_annotation_version = "1.3.5" +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "io.rest-assured:rest-assured:$rest_assured_version" +{{#jackson}} + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#withXml}} + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" + {{/withXml}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" +{{/jackson}} +{{#gson}} + implementation "io.gsonfire:gson-fire:$gson_fire_version" + implementation 'com.google.code.gson:gson:$gson_version' +{{/gson}} +{{#joda}} + implementation "joda-time:joda-time:$jodatime_version" +{{/joda}} + implementation "com.squareup.okio:okio:$okio_version" +{{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:3.0.2" +{{/useBeanValidation}} +{{#performBeanValidation}} + implementation "org.hibernate:hibernate-validator:6.0.19.Final" +{{/performBeanValidation}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} diff --git a/templates/libraries/rest-assured/build.sbt.mustache b/templates/libraries/rest-assured/build.sbt.mustache new file mode 100644 index 00000000..9c268485 --- /dev/null +++ b/templates/libraries/rest-assured/build.sbt.mustache @@ -0,0 +1,49 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.6", + "io.rest-assured" % "rest-assured" % "4.5.1", + "io.rest-assured" % "scala-support" % "4.5.1", + "com.google.code.findbugs" % "jsr305" % "3.0.2", +{{#jackson}} + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.4", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.4", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4.2", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + {{/openApiNullable}} + {{#withXml}} + "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.13.4.1", + {{/withXml}} + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.13.4.1", + {{/joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.4.1", +{{/jackson}} +{{#gson}} + "com.google.code.gson" % "gson" % "2.8.9", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", +{{/gson}} +{{#joda}} + "joda-time" % "joda-time" % "2.10.5" % "compile", +{{/joda}} + "com.squareup.okio" % "okio" % "1.17.5" % "compile", +{{#useBeanValidation}} + "jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile", +{{/useBeanValidation}} +{{#performBeanValidation}} + "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", +{{/performBeanValidation}} + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/templates/libraries/rest-assured/pom.mustache b/templates/libraries/rest-assured/pom.mustache new file mode 100644 index 00000000..1655d52c --- /dev/null +++ b/templates/libraries/rest-assured/pom.mustache @@ -0,0 +1,370 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-maven + + enforce + + + + + 3.0.5 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + false + 1C + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + + + {{#jackson}} + + + + com.fasterxml.jackson + jackson-bom + ${jackson-version} + pom + import + + + + {{/jackson}} + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + io.rest-assured + rest-assured + ${rest-assured.version} + + {{#gson}} + + com.google.code.gson + gson + ${gson-version} + + {{/gson}} + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#gson}} + + io.gsonfire + gson-fire + ${gson-fire-version} + + {{/gson}} + {{#jackson}} + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{#withXml}} + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + {{/jackson}} + + com.squareup.okio + okio + ${okio-version} + + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + 6.0.19.Final + + {{/performBeanValidation}} + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 5.3.2 + 2.10.1 + 1.9.0 + {{#joda}} + 2.10.5 + {{/joda}} + {{#jackson}} + 2.17.1 + 2.17.1 + 0.2.6 + {{/jackson}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + 3.6.0 + 5.10.3 + + diff --git a/templates/libraries/restclient/ApiClient.mustache b/templates/libraries/restclient/ApiClient.mustache new file mode 100644 index 00000000..3dd26153 --- /dev/null +++ b/templates/libraries/restclient/ApiClient.mustache @@ -0,0 +1,891 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +{{/withXml}} +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.util.function.Consumer; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.InvalidMediaTypeException; +import org.springframework.http.MediaType; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +{{#withXml}} + import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; +{{/withXml}} +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; +import org.springframework.web.client.RestClientException; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.client.RestClient; +import org.springframework.web.client.RestClient.ResponseSpec; +import java.util.Optional; + +import java.text.DateFormat; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TimeZone; +import java.util.function.Supplier; + +import {{javaxPackage}}.annotation.Nullable; + +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{invokerPackage}}.ApiClient") +{{/generateClientAsBean}} +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + public enum CollectionFormat { + CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); + + protected final String separator; + CollectionFormat(String separator) { + this.separator = separator; + } + + protected String collectionToString(Collection collection) { + return StringUtils.collectionToDelimitedString(collection, separator); + } + } + + protected final HttpHeaders defaultHeaders = new HttpHeaders(); + protected final MultiValueMap defaultCookies = new LinkedMultiValueMap<>(); + + protected String basePath = "{{basePath}}"; + protected List servers = new ArrayList({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + + protected final RestClient restClient; + protected final DateFormat dateFormat; + protected final ObjectMapper objectMapper; + + protected Map authentications; + + + public ApiClient() { + this(null); + } + + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} + public ApiClient(RestClient restClient) { + this(restClient, createDefaultDateFormat()); + } + + public ApiClient(ObjectMapper mapper, DateFormat format) { + this(null, mapper, format); + } + + public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) { + this.objectMapper = mapper.copy(); + this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); + this.dateFormat = format; + this.init(); + } + + protected ApiClient(RestClient restClient, DateFormat format) { + this(restClient, createDefaultObjectMapper(format), format); + } + + public static DateFormat createDefaultDateFormat() { + DateFormat dateFormat = new RFC3339DateFormat(); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + return dateFormat; + } + + public static ObjectMapper createDefaultObjectMapper(@Nullable DateFormat dateFormat) { + if (null == dateFormat) { + dateFormat = createDefaultDateFormat(); + } + ObjectMapper mapper = new ObjectMapper(); + mapper.setDateFormat(dateFormat); + mapper.registerModule(new JavaTimeModule()); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + return mapper; + } + + protected void init() { + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Build the RestClientBuilder used to make RestClient. + * @param mapper ObjectMapper used for serialize/deserialize + * @return RestClient + */ + public static RestClient.Builder buildRestClientBuilder(ObjectMapper mapper) { + {{#withXml}} + XmlMapper xmlMapper = new XmlMapper(); + xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true); + {{#openApiNullable}} + xmlMapper.registerModule(new JsonNullableModule()); + {{/openApiNullable}} + + {{/withXml}} + Consumer>> messageConverters = converters -> { + converters.add(0, new MappingJackson2HttpMessageConverter(mapper)); + {{#withXml}} + converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + {{/withXml}} + }; + + return RestClient.builder().messageConverters(messageConverters); + } + + /** + * Build the RestClientBuilder used to make RestClient. + * @return RestClient + */ + public static RestClient.Builder buildRestClientBuilder() { + return buildRestClientBuilder(createDefaultObjectMapper(null)); + } + + /** + * Build the RestClient used to make HTTP requests. + * @param mapper ObjectMapper used for serialize/deserialize + * @return RestClient + */ + public static RestClient buildRestClient(ObjectMapper mapper) { + return buildRestClientBuilder(mapper).build(); + } + + /** + * Build the RestClient used to make HTTP requests. + * @return RestClient + */ + public static RestClient buildRestClient() { + return buildRestClientBuilder(createDefaultObjectMapper(null)).build(); + } + + /** + * Get the current base path + * @return String the base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set the base path, which should include the host + * @param basePath the base path + * @return ApiClient this client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return Map the currently configured authentication types + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * @param username the username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password the password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * @param apiKey the API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix the API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken the access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent the user agent string + * @return ApiClient this client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param name The header's name + * @param value The header's value + * @return ApiClient this client + */ + public ApiClient addDefaultHeader(String name, String value) { + defaultHeaders.set(name, value); + return this; + } + + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return DateFormat format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Parse the given string into Date object. + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Get the ObjectMapper used to make HTTP requests. + * @return ObjectMapper objectMapper + */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + /** + * Get the RestClient used to make HTTP requests. + * @return RestClient restClient + */ + public RestClient getRestClient() { + return restClient; + } + + /** + * Format the given parameter object into string. + * @param param the object to convert + * @return String the parameter represented as a String + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate( (Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection) param) { + if(b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Converts a parameter to a {@link MultiValueMap} containing Json-serialized values for use in REST requests + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the Json-serialized String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMapJson(CollectionFormat collectionFormat, String name, Object value) { + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + try { + return parameterToMultiValueMap(collectionFormat, name, objectMapper.writeValueAsString(value)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + List values = new ArrayList<>(); + for(Object o : valueCollection) { + try { + values.add(objectMapper.writeValueAsString(o)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + return parameterToMultiValueMap(collectionFormat, name, "[" + StringUtils.collectionToDelimitedString(values, collectionFormat.separator) + "]"); + } + + /** + * Converts a parameter to a {@link MultiValueMap} for use in REST requests + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMap(CollectionFormat collectionFormat, String name, Object value) { + final MultiValueMap params = new LinkedMultiValueMap<>(); + + if (name == null || name.isEmpty() || value == null) { + return params; + } + + if(collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + if (value instanceof Map) { + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + for (final Entry entry : valuesMap.entrySet()) { + params.add(entry.getKey(), parameterToString(entry.getValue())); + } + return params; + } + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(name, parameterToString(value)); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + if (collectionFormat.equals(CollectionFormat.MULTI)) { + for (Object item : valueCollection) { + params.add(name, parameterToString(item)); + } + return params; + } + + List values = new ArrayList<>(); + for(Object o : valueCollection) { + values.add(parameterToString(o)); + } + params.add(name, collectionFormat.collectionToString(values)); + + return params; + } + + /** + * Check if the given {@code String} is a JSON MIME. + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(String mediaType) { + // "* / *" is default to JSON + if ("*/*".equals(mediaType)) { + return true; + } + + try { + return isJsonMime(MediaType.parseMediaType(mediaType)); + } catch (InvalidMediaTypeException e) { + } + return false; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(MediaType mediaType) { + return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*(\\+json|ndjson)[;]?\\s*$")); + } + + /** + * Check if the given {@code String} is a Problem JSON MIME (RFC-7807). + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents Problem JSON, false otherwise + */ + public boolean isProblemJsonMime(String mediaType) { + return "application/problem+json".equalsIgnoreCase(mediaType); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return List The list of MediaTypes to use for the Accept header + */ + public List selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + MediaType mediaType = MediaType.parseMediaType(accept); + if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) { + return Collections.singletonList(mediaType); + } + } + return MediaType.parseMediaTypes(StringUtils.arrayToCommaDelimitedString(accepts)); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return MediaType The Content-Type header to use. If the given array is empty, null will be returned. + */ + public MediaType selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + for (String contentType : contentTypes) { + MediaType mediaType = MediaType.parseMediaType(contentType); + if (isJsonMime(mediaType)) { + return mediaType; + } + } + return MediaType.parseMediaType(contentTypes[0]); + } + + /** + * Select the body to use for the request + * + * @param obj the body object + * @param formParams the form parameters + * @param contentType the content type of the request + * @return Object the selected body + */ + protected Object selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { + boolean isForm = MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType) || MediaType.APPLICATION_FORM_URLENCODED.isCompatibleWith(contentType); + return isForm ? formParams : obj; + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param the return type to use + * @param path The sub-path of the HTTP URL + * @param method The request method + * @param pathParams The path parameters + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return The response body in chosen type + */ + public ResponseSpec invokeAPI(String path, HttpMethod method, Map pathParams, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final RestClient.RequestBodySpec requestBuilder = prepareRequest(path, method, pathParams, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); + return requestBuilder.retrieve(); + } + + /** + * Include queryParams in uriParams taking into account the paramName + * @param queryParams The query parameters + * @param uriParams The path parameters + * return templatized query string + */ + protected String generateQueryUri(MultiValueMap queryParams, Map uriParams) { + StringBuilder queryBuilder = new StringBuilder(); + queryParams.forEach((name, values) -> { + if (CollectionUtils.isEmpty(values)) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(name); + } else { + int valueItemCounter = 0; + for (Object value : values) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(name); + if (value != null) { + String templatizedKey = name + valueItemCounter++; + uriParams.put(templatizedKey, value.toString()); + queryBuilder.append('=').append("{").append(templatizedKey).append("}"); + } + } + } + }); + return queryBuilder.toString(); + } + + protected RestClient.RequestBodySpec prepareRequest(String path, HttpMethod method, Map pathParams, + MultiValueMap queryParams, Object body, HttpHeaders headerParams, + MultiValueMap cookieParams, MultiValueMap formParams, List accept, + MediaType contentType, String[] authNames) { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + String baseUrl = basePath; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseUrl = servers.get(serverIndex).URL(serverVariables); + } + + final UriComponentsBuilder builder = UriComponentsBuilder + .fromUriString(baseUrl) + .path(path); + + String finalUri = builder.build(false).toUriString(); + Map uriParams = new HashMap<>(); + uriParams.putAll(pathParams); + + if (queryParams != null && !queryParams.isEmpty()) { + //Include queryParams in uriParams taking into account the paramName + String queryUri = generateQueryUri(queryParams, uriParams); + //Append to finalUri the templatized query string like "?param1={param1Value}&....... + finalUri += "?" + queryUri; + } + + final RestClient.RequestBodySpec requestBuilder = restClient.method(method).uri(finalUri, uriParams); + + if (accept != null) { + requestBuilder.accept(accept.toArray(new MediaType[accept.size()])); + } + if(contentType != null) { + requestBuilder.contentType(contentType); + } + + addHeadersToRequest(headerParams, requestBuilder); + addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); + + if (MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType)) { + formParams.forEach( + (k, v) -> { + if (v instanceof java.util.ArrayList) { + Object o = v.get(0); + if (o != null && o.getClass().getEnumConstants() != null) { + v.set(0, o.toString()); + } + } + }); + } + + var selectedBody = selectBody(body, formParams, contentType); + if (selectedBody != null) { + requestBuilder.body(selectedBody); + } + + return requestBuilder; + } + + /** + * Add headers to the request that is being built + * @param headers The headers to add + * @param requestBuilder The current request + */ + protected void addHeadersToRequest(HttpHeaders headers, RestClient.RequestBodySpec requestBuilder) { + for (Entry> entry : headers.headerSet()) { + List values = entry.getValue(); + for(String value : values) { + if (value != null) { + requestBuilder.header(entry.getKey(), value); + } + } + } + } + + /** + * Add cookies to the request that is being built + * + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, RestClient.RequestBodySpec requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + /** + * Build cookie header. Keeps a single value per cookie (as per + * RFC6265 section 5.3). + * + * @param cookies map all cookies + * @return header string for cookies. + */ + protected String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + final String value = entry.getValue().get(entry.getValue().size() - 1); + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), value)); + delimiter = "; "; + } + return cookieValue.toString(); + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams The query parameters + * @param headerParams The header parameters + * @param cookieParams the cookie parameters + */ + protected void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RestClientException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param values The values of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(CollectionFormat collectionFormat, Collection values) { + // create the value based on the collection format + if (CollectionFormat.MULTI.equals(collectionFormat)) { + // not valid for path params + return parameterToString(values); + } + + // collectionFormat is assumed to be "csv" by default + if(collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + return collectionFormat.collectionToString(values); + } +} diff --git a/templates/libraries/restclient/README.mustache b/templates/libraries/restclient/README.mustache new file mode 100644 index 00000000..ec6244a8 --- /dev/null +++ b/templates/libraries/restclient/README.mustache @@ -0,0 +1,216 @@ +# {{artifactId}} + +{{appName}} + +- API version: {{appVersion}} +{{^hideGenerationTimestamp}} + +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} + +- Generator version: {{generatorVersion}} + +{{{appDescriptionWithNewLines}}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 17+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the '{{{artifactId}}}' jar has been published to maven central. + mavenLocal() // Needed if the '{{{artifactId}}}' jar has been published to the local maven repo. + } + + dependencies { + implementation "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import {{{invokerPackage}}}.*; +import {{{invokerPackage}}}.auth.*; +import {{{modelPackage}}}.*; +import {{{package}}}.{{{classname}}}; + +public class {{{classname}}}Example { + + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}}{{#isHttpSignature}} + // Configure HTTP signature authorization: {{{name}}} + HttpSignatureAuth {{{name}}} = (HttpSignatureAuth) defaultClient.getAuthentication("{{{name}}}"); + // All the HTTP signature parameters below should be customized to your environment. + // Configure the keyId + {{{name}}}.setKeyId("YOUR KEY ID"); + // Configure the signature algorithm + {{{name}}}.setSigningAlgorithm(SigningAlgorithm.HS2019); + // Configure the specific cryptographic algorithm + {{{name}}}.setAlgorithm(Algorithm.ECDSA_SHA256); + // Configure the cryptographic algorithm parameters, if applicable + {{{name}}}.setAlgorithmParameterSpec(null); + // Set the cryptographic digest algorithm. + {{{name}}}.setDigestAlgorithm("SHA-256"); + // Set the HTTP headers that should be included in the HTTP signature. + {{{name}}}.setHeaders(Arrays.asList("date", "host")); + // Set the private key used to sign the HTTP messages + {{{name}}}.setPrivateKey();{{/isHttpSignature}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (HttpStatusCodeException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getStatusCode().value()); + System.err.println("Reason: " + e.getResponseBodyAsString()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation for Models + +{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) +{{/model}}{{/models}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}} + +- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}} + +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} + +- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}} + +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/restclient/additional_properties.mustache b/templates/libraries/restclient/additional_properties.mustache new file mode 100644 index 00000000..8e718279 --- /dev/null +++ b/templates/libraries/restclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/restclient/api.mustache b/templates/libraries/restclient/api.mustache new file mode 100644 index 00000000..30b8b132 --- /dev/null +++ b/templates/libraries/restclient/api.mustache @@ -0,0 +1,221 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{package}}.{{classname}}") +{{/generateClientAsBean}} +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(new ApiClient()); + } + +{{#generateClientAsBean}} + @Autowired +{{/generateClientAsBean}} + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + {{#operation}} +{{#singleRequestParameter}}{{>single_request_parameter}}{{/singleRequestParameter}}{{^singleRequestParameter}}{{/singleRequestParameter}} + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + private ResponseSpec {{operationId}}RequestCreation({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientResponseException { + Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}} + {{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new RestClientResponseException("Missing the required parameter '{{paramName}}' when calling {{operationId}}", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + {{/required}} + {{/allParams}} + // create path and map variables + final Map pathParams = new HashMap<>(); + {{#hasPathParams}} + + {{#pathParams}} + pathParams.put("{{baseName}}", {{#collectionFormat}}apiClient.collectionPathParameterToString(ApiClient.CollectionFormat.valueOf("csv".toUpperCase()), {{/collectionFormat}}{{{paramName}}}{{#collectionFormat}}){{/collectionFormat}}); + {{/pathParams}} + {{/hasPathParams}} + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + {{#hasQueryParams}} + + {{#queryParams}} + {{#queryIsJsonMimeType}} + queryParams.putAll(apiClient.parameterToMultiValueMapJson({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/queryIsJsonMimeType}} + {{^queryIsJsonMimeType}} + {{#isExplode}} + {{#hasVars}} + {{#vars}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}.{{getter}}())); + {{/vars}} + {{/hasVars}} + {{^hasVars}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/hasVars}} + {{/isExplode}} + {{^isExplode}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/isExplode}} + {{/queryIsJsonMimeType}} + {{/queryParams}} + {{/hasQueryParams}} + {{#hasHeaderParams}} + + {{#headerParams}} + if ({{paramName}} != null) + headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}} + {{/-last}} + {{/headerParams}} + {{/hasHeaderParams}} + {{#hasCookieParams}} + + {{#cookieParams}} + cookieParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/cookieParams}} + {{/hasCookieParams}} + {{#hasFormParams}} + + {{#formParams}} + if ({{paramName}} != null) + formParams.add{{#collectionFormat}}All{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}); + {{/formParams}} + {{/hasFormParams}} + + final String[] localVarAccepts = { {{#hasProduces}} + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + {{/hasProduces}}}; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { {{#hasConsumes}} + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + {{/hasConsumes}}}; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}}ParameterizedTypeReference<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}> localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}} + return apiClient.invokeAPI("{{{path}}}", HttpMethod.{{httpMethod}}, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientResponseException { + {{#returnType}}ParameterizedTypeReference<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}> localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}} + {{#returnType}}return {{/returnType}}{{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).body(localVarReturnType); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientResponseException { + {{#returnType}}ParameterizedTypeReference<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}> localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};{{/returnType}} + return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).toEntity(localVarReturnType); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}} + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientResponseException { + return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/restclient/api_test.mustache b/templates/libraries/restclient/api_test.mustache new file mode 100644 index 00000000..e54a4ccc --- /dev/null +++ b/templates/libraries/restclient/api_test.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + */ + @Test + public void {{operationId}}Test() { + {{#allParams}} + {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; + {{/allParams}} + {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + {{/operation}}{{/operations}} +} \ No newline at end of file diff --git a/templates/libraries/restclient/auth/ApiKeyAuth.mustache b/templates/libraries/restclient/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..a5662c4a --- /dev/null +++ b/templates/libraries/restclient/auth/ApiKeyAuth.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if (location.equals("query")) { + queryParams.add(paramName, value); + } else if (location.equals("header")) { + headerParams.add(paramName, value); + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } + } +} diff --git a/templates/libraries/restclient/auth/Authentication.mustache b/templates/libraries/restclient/auth/Authentication.mustache new file mode 100644 index 00000000..70b1d105 --- /dev/null +++ b/templates/libraries/restclient/auth/Authentication.mustache @@ -0,0 +1,19 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and / or query parameters. + * + * @param queryParams The query parameters for the request + * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request + */ + void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); +} diff --git a/templates/libraries/restclient/auth/HttpBasicAuth.mustache b/templates/libraries/restclient/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..4ee90096 --- /dev/null +++ b/templates/libraries/restclient/auth/HttpBasicAuth.mustache @@ -0,0 +1,41 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/restclient/auth/HttpBearerAuth.mustache b/templates/libraries/restclient/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..93fe8732 --- /dev/null +++ b/templates/libraries/restclient/auth/HttpBearerAuth.mustache @@ -0,0 +1,59 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/restclient/auth/OAuth.mustache b/templates/libraries/restclient/auth/OAuth.mustache new file mode 100644 index 00000000..55b5da8e --- /dev/null +++ b/templates/libraries/restclient/auth/OAuth.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private Supplier tokenSupplier; + + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ + public String getAccessToken() { + return tokenSupplier.get(); + } + + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ + public void setAccessToken(String accessToken) { + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); + } +} diff --git a/templates/libraries/restclient/auth/OAuthFlow.mustache b/templates/libraries/restclient/auth/OAuthFlow.mustache new file mode 100644 index 00000000..759f354f --- /dev/null +++ b/templates/libraries/restclient/auth/OAuthFlow.mustache @@ -0,0 +1,7 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} \ No newline at end of file diff --git a/templates/libraries/restclient/build.gradle.mustache b/templates/libraries/restclient/build.gradle.mustache new file mode 100644 index 00000000..7addbad9 --- /dev/null +++ b/templates/libraries/restclient/build.gradle.mustache @@ -0,0 +1,159 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + archiveClassifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + mainClass = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + spring_web_version = "6.1.21" + jakarta_annotation_version = "2.1.1" + jodatime_version = "2.9.9" + junit_version = "5.10.2" +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.springframework:spring-web:$spring_web_version" + implementation "org.springframework:spring-context:$spring_web_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + implementation "joda-time:joda-time:$jodatime_version" + {{/joda}} + {{#withXml}} + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" + {{/withXml}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/templates/libraries/restclient/model.mustache b/templates/libraries/restclient/model.mustache new file mode 100644 index 00000000..108748f6 --- /dev/null +++ b/templates/libraries/restclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/restclient/pojo.mustache b/templates/libraries/restclient/pojo.mustache new file mode 100644 index 00000000..70b0c615 --- /dev/null +++ b/templates/libraries/restclient/pojo.mustache @@ -0,0 +1,625 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{{>permits}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/restclient/additional_properties}} + + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}}{{! prevent indent}} +{{/generateBuilders}} + +} diff --git a/templates/libraries/restclient/pom.mustache b/templates/libraries/restclient/pom.mustache new file mode 100644 index 00000000..f1d08cf5 --- /dev/null +++ b/templates/libraries/restclient/pom.mustache @@ -0,0 +1,365 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + false + true + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.4.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + 17 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.springframework + spring-web + ${spring-web-version} + + + org.springframework + spring-context + ${spring-web-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + com.fasterxml.jackson.jakarta.rs + jackson-jakarta-rs-json-provider + ${jackson-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + io.github.threeten-jaxb + threeten-jaxb-core + 1.2 + + {{/withXml}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + ${hibernate-validator-version} + + {{/performBeanValidation}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.9 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 6.1.21 + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + 2.1.1 + {{#joda}} + 2.9.9 + {{/joda}} + 3.0.2 + {{#performBeanValidation}} + 5.4.3.Final + {{/performBeanValidation}} + 5.10.2 + + diff --git a/templates/libraries/restclient/single_request_parameter.mustache b/templates/libraries/restclient/single_request_parameter.mustache new file mode 100644 index 00000000..94ee10c4 --- /dev/null +++ b/templates/libraries/restclient/single_request_parameter.mustache @@ -0,0 +1,110 @@ +{{#hasParams}} +{{^hasSingleParam}} + + {{^staticRequest}} + public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){} + {{/staticRequest}} + {{#staticRequest}} + public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasParams}} + {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request request = ({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request) o; + return {{#allParams}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{paramName}}, request.{{paramName}}()){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{paramName}}, request.{{paramName}}()){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/allParams}};{{/hasParams}}{{^hasParams}} + return true;{{/hasParams}} + {{/useReflectionEqualsHashCode}} + } + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#allParams}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{paramName}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{paramName}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{paramName}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/useReflectionEqualsHashCode}} + } + } + {{/staticRequest}} + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } +{{/hasSingleParam}} +{{/hasParams}} \ No newline at end of file diff --git a/templates/libraries/resteasy/ApiClient.mustache b/templates/libraries/resteasy/ApiClient.mustache new file mode 100644 index 00000000..7a3b64e3 --- /dev/null +++ b/templates/libraries/resteasy/ApiClient.mustache @@ -0,0 +1,773 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TimeZone; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import {{javaxPackage}}.ws.rs.client.Client; +import {{javaxPackage}}.ws.rs.client.ClientBuilder; +import {{javaxPackage}}.ws.rs.client.Entity; +import {{javaxPackage}}.ws.rs.client.Invocation; +import {{javaxPackage}}.ws.rs.client.WebTarget; +import {{javaxPackage}}.ws.rs.core.Form; +import {{javaxPackage}}.ws.rs.core.GenericEntity; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.core.MediaType; +import {{javaxPackage}}.ws.rs.core.Response; +import {{javaxPackage}}.ws.rs.core.Response.Status; + +import org.jboss.logging.Logger; +import org.jboss.resteasy.client.jaxrs.internal.ClientConfiguration; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput; +import org.jboss.resteasy.spi.ResteasyProviderFactory; + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "{{{basePath}}}"; + protected boolean debugging = false; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + + protected int statusCode; + protected Map> responseHeaders; + + protected DateFormat dateFormat; + + public ApiClient() { + json = new JSON(); + httpClient = buildHttpClient(debugging); + + this.dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT); + + // Use UTC as the default time zone. + this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + + this.json.setDateFormat((DateFormat) dateFormat.clone()); + + // Set default User-Agent. + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * @return the JSON utility class + */ + public JSON getJSON() { + return json; + } + + public Client getHttpClient() { + return httpClient; + } + + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Gets the status code of the previous request + * @return the status code of the previous request + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Gets the response headers of the previous request + * @return the response headers of the previous request + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return the authentications + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * @param username the username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password the password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * @param apiKey the API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix the API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken the access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent the User-Agent header value + * @return this {@code ApiClient} + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return this {@code ApiClient} + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return {@code true} if debugging is enabled for this API client + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return this {@code ApiClient} + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(debugging); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return the temporary folder path + * @see createTempFile + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return the date format used to parse/format date parameters + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat a date format used to parse/format date parameters + * @return this {@code ApiClient} + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * @param str a string to parse + * @return a {@code Date} object + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * @param date a {@code Date} object to format + * @return the {@code String} version of the {@code Date} object + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * @param param an object to format + * @return the {@code String} version of the object + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + Format to {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + + // create the params based on the collection format + if (collectionFormat.equals("multi")) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if (collectionFormat.equals("csv")) { + delimiter = ","; + } else if (collectionFormat.equals("ssv")) { + delimiter = " "; + } else if (collectionFormat.equals("tsv")) { + delimiter = "\t"; + } else if (collectionFormat.equals("pipes")) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * @param str a {@code String} to escape + * @return the escaped version of the {@code String} + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * @param obj the object to serialize + * @param formParams the form parameters + * @param contentType the content type + * @return an {@code Entity} + * @throws ApiException on failure to serialize + */ + public Entity serialize(Object obj, Map formParams, String contentType) throws ApiException { + Entity entity = null; + if (contentType.startsWith("multipart/form-data")) { + MultipartFormDataOutput multipart = new MultipartFormDataOutput(); + //MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + try { + multipart.addFormData(param.getKey(),new FileInputStream(file),MediaType.APPLICATION_OCTET_STREAM_TYPE, file.getName()); + } catch (FileNotFoundException e) { + throw new ApiException("Could not serialize multipart/form-data "+e.getMessage()); + } + } else { + multipart.addFormData(param.getKey(),param.getValue().toString(),MediaType.APPLICATION_OCTET_STREAM_TYPE); + } + } + GenericEntity genericEntity = new GenericEntity(multipart) { }; + entity = Entity.entity(genericEntity, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + entity = Entity.entity(obj, contentType); + } + return entity; + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * @param a Java type parameter + * @param response the response body to deserialize + * @param returnType a Java type to deserialize into + * @return a deserialized Java object + * @throws ApiException on failure to deserialize + */ + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.equals(File.class)) { + // Handle file downloading. + @SuppressWarnings("unchecked") + T file = (T) downloadFileFromResponse(response); + return file; + } + + String contentType = null; + List contentTypes = response.getHeaders().get("Content-Type"); + if (contentTypes != null && !contentTypes.isEmpty()) + contentType = String.valueOf(contentTypes.get(0)); + if (contentType == null) + throw new ApiException(500, "missing Content-Type in response"); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * @param response a response + * @return a file from the given response + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath()); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param a Java type parameter + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return The response body in type of string + * @throws ApiException if the invocation failed + */ + public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + // Not using `.target(this.basePath).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + WebTarget target = httpClient.target(this.basePath + path); + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), queryParam.getValue()); + } + } + } + + Invocation.Builder invocationBuilder = target.request().accept(accept); + + for (Entry headerParamsEntry : headerParams.entrySet()) { + String value = headerParamsEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(headerParamsEntry.getKey(), value); + } + } + + for (Entry defaultHeaderEntry: defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(defaultHeaderEntry.getKey())) { + String value = defaultHeaderEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(defaultHeaderEntry.getKey(), value); + } + } + } + + for (Entry cookieParamsEntry : cookieParams.entrySet()) { + String value = cookieParamsEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(cookieParamsEntry.getKey(), value); + } + } + + for (Entry defaultCookieEntry: defaultHeaderMap.entrySet()) { + if (!cookieParams.containsKey(defaultCookieEntry.getKey())) { + String value = defaultCookieEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(defaultCookieEntry.getKey(), value); + } + } + } + + Entity entity = serialize(body, formParams, contentType); + + try (Response response = invoke(invocationBuilder, method, entity)) { + statusCode = response.getStatusInfo().getStatusCode(); + responseHeaders = buildResponseHeaders(response); + + if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { + return null; + } else if (response.getStatusInfo().getFamily().equals(Status.Family.SUCCESSFUL)) { + if (returnType == null) + return null; + else + return deserialize(response, returnType); + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), + message, + buildResponseHeaders(response), + respBody); + } + } + } + + protected Response invoke(Invocation.Builder invocationBuilder, String method, Entity entity) throws ApiException { + Response response = null; + + if ("GET".equals(method)) { + response = invocationBuilder.get(); + } else if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + response = invocationBuilder.method("DELETE", entity); + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else if ("HEAD".equals(method)) { + response = invocationBuilder.head(); + } else if ("OPTIONS".equals(method)) { + response = invocationBuilder.options(); + } else if ("TRACE".equals(method)) { + response = invocationBuilder.trace(); + } else { + throw new ApiException(500, "unknown method type " + method); + } + + return response; + } + + /** + * Build the Client used to make HTTP requests. + */ + protected Client buildHttpClient(boolean debugging) { + final ClientConfiguration clientConfig = new ClientConfiguration(ResteasyProviderFactory.getInstance()); + clientConfig.register(json); + if(debugging){ + clientConfig.register(Logger.class); + } + return ClientBuilder.newClient(clientConfig); + } + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } +} diff --git a/templates/libraries/resteasy/JSON.mustache b/templates/libraries/resteasy/JSON.mustache new file mode 100644 index 00000000..5094d1b8 --- /dev/null +++ b/templates/libraries/resteasy/JSON.mustache @@ -0,0 +1,49 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.*; + +import java.text.DateFormat; + +import {{javaxPackage}}.ws.rs.ext.ContextResolver; + +{{>generatedAnnotation}} + +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + mapper.registerModule(new JavaTimeModule()); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat the date format to set + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } +} diff --git a/templates/libraries/resteasy/api.mustache b/templates/libraries/resteasy/api.mustache new file mode 100644 index 00000000..8d8dd28c --- /dev/null +++ b/templates/libraries/resteasy/api.mustache @@ -0,0 +1,113 @@ +package {{package}}; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +import {{javaxPackage}}.ws.rs.core.GenericType; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + /** + * {{summary}} + * {{notes}}{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}} + * @return a {@code {{{returnType}}}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}}{{/allParams}} + // create path and map variables + String localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + {{#queryParams}} + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/queryParams}} + + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/headerParams}} + + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + + {{#formParams}}if ({{paramName}} != null) + localVarFormParams.put("{{baseName}}", {{paramName}}); + {{/formParams}} + + final String[] localVarAccepts = { + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}} + GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + {{/returnType}}{{^returnType}} + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + {{/returnType}} + } + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/resteasy/build.gradle.mustache b/templates/libraries/resteasy/build.gradle.mustache new file mode 100644 index 00000000..de86eb0b --- /dev/null +++ b/templates/libraries/resteasy/build.gradle.mustache @@ -0,0 +1,130 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 23 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.6.3" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" + threetenbp_version = "2.9.10" + resteasy_version = "4.5.11.Final" + assertj_version = "3.23.1" + junit_version = "5.10.2" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.jboss.resteasy:resteasy-client:$resteasy_version" + implementation "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version" + implementation "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.assertj:assertj-core:$assertj_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} diff --git a/templates/libraries/resteasy/build.sbt.mustache b/templates/libraries/resteasy/build.sbt.mustache new file mode 100644 index 00000000..3b2b1086 --- /dev/null +++ b/templates/libraries/resteasy/build.sbt.mustache @@ -0,0 +1,26 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.22" % "compile", + "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final" % "compile", + "org.jboss.resteasy" % "resteasy-multipart-provider" % "4.5.11.Final" % "compile", + "org.jboss.resteasy" % "resteasy-jackson2-provider" % "4.5.11.Final" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.15.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.17.1" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.assertj" % "assertj-core" % "3.23.1" % "test", + "junit" % "junit" % "5.10.2" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/templates/libraries/resteasy/pom.mustache b/templates/libraries/resteasy/pom.mustache new file mode 100644 index 00000000..1b0dec8c --- /dev/null +++ b/templates/libraries/resteasy/pom.mustache @@ -0,0 +1,317 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + org.jboss.resteasy + resteasy-client + ${resteasy-version} + + + org.jboss.resteasy + resteasy-jaxrs-services + + + net.jcip + jcip-annotations + + + + + org.jboss.resteasy + resteasy-multipart-provider + ${resteasy-version} + + + com.sun.xml.bind + jaxb-impl + + + com.sun.mail + javax.mail + + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + io.github.threeten-jaxb + threeten-jaxb-core + 1.2 + + + {{/withXml}} + + org.jboss.resteasy + resteasy-jackson2-provider + ${resteasy-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + com.github.joschi.jackson + jackson-datatype-threetenbp + ${threetenbp-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + org.assertj + assertj-core + ${assertj-version} + test + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 4.7.6.Final + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#useJakartaEe}} + 2.1.1 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + {{/useJakartaEe}} + 2.9.10 + 1.0.0 + 3.23.1 + 5.10.2 + + diff --git a/templates/libraries/resttemplate/ApiClient.mustache b/templates/libraries/resttemplate/ApiClient.mustache new file mode 100644 index 00000000..52b5b27e --- /dev/null +++ b/templates/libraries/resttemplate/ApiClient.mustache @@ -0,0 +1,971 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +{{/withXml}} +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpRequest; +import org.springframework.http.HttpStatus; +import org.springframework.http.InvalidMediaTypeException; +import org.springframework.http.MediaType; +import org.springframework.http.RequestEntity; +import org.springframework.http.RequestEntity.BodyBuilder; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestExecution; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.http.client.ClientHttpResponse; +{{#withXml}} +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; +{{/withXml}} +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.HttpServerErrorException; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.DefaultUriBuilderFactory; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.ParseException; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TimeZone; +import java.util.function.Supplier; +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import {{invokerPackage}}.auth.Authentication; +{{#hasHttpBasicMethods}} +import {{invokerPackage}}.auth.HttpBasicAuth; +{{/hasHttpBasicMethods}} +{{#hasHttpBearerMethods}} +import {{invokerPackage}}.auth.HttpBearerAuth; +{{/hasHttpBearerMethods}} +{{#hasApiKeyMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{/hasApiKeyMethods}} +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{invokerPackage}}.ApiClient") +{{/generateClientAsBean}} +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + public enum CollectionFormat { + CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); + + protected final String separator; + + CollectionFormat(String separator) { + this.separator = separator; + } + + protected String collectionToString(Collection collection) { + return StringUtils.collectionToDelimitedString(collection, separator); + } + } + + protected boolean debugging = false; + + protected HttpHeaders defaultHeaders = new HttpHeaders(); + protected MultiValueMap defaultCookies = new LinkedMultiValueMap(); + + protected int maxAttemptsForRetry = {{maxAttemptsForRetry}}; + + protected long waitTimeMillis = {{waitTimeMillis}}; + + protected String basePath = "{{basePath}}"; + + protected RestTemplate restTemplate; + + protected Map authentications; + + protected DateFormat dateFormat; + + public ApiClient() { + this.restTemplate = buildRestTemplate(); + init(); + } + + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} + public ApiClient(RestTemplate restTemplate) { + this.restTemplate = restTemplate; + init(); + } + + protected void init() { + // Use RFC3339 format for date and datetime. + // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + this.dateFormat = new RFC3339DateFormat(); + + // Use UTC as the default time zone. + this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + + // Set default User-Agent. + setUserAgent("Java-SDK"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Get the current base path + * + * @return String the base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set the base path, which should include the host + * + * @param basePath the base path + * @return ApiClient this client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get the max attempts for retry + * + * @return int the max attempts + */ + public int getMaxAttemptsForRetry() { + return maxAttemptsForRetry; + } + + /** + * Set the max attempts for retry + * + * @param maxAttemptsForRetry the max attempts for retry + * @return ApiClient this client + */ + public ApiClient setMaxAttemptsForRetry(int maxAttemptsForRetry) { + this.maxAttemptsForRetry = maxAttemptsForRetry; + return this; + } + + /** + * Get the wait time in milliseconds + * + * @return long wait time in milliseconds + */ + public long getWaitTimeMillis() { + return waitTimeMillis; + } + + /** + * Set the wait time in milliseconds + * + * @param waitTimeMillis the wait time in milliseconds + * @return ApiClient this client + */ + public ApiClient setWaitTimeMillis(long waitTimeMillis) { + this.waitTimeMillis = waitTimeMillis; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map the currently configured authentication types + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + {{#hasHttpBearerMethods}} + /** + * Helper method to set access token for the first Bearer authentication. + * + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + {{/hasHttpBearerMethods}} + + {{#hasHttpBasicMethods}} + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + {{/hasHttpBasicMethods}} + + {{#hasApiKeyMethods}} + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey the API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{/hasApiKeyMethods}} + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + setAccessToken(() -> accessToken); + } + + /** + * Helper method to set the supplier of access tokens for OAuth2 authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setAccessToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent the user agent string + * @return ApiClient this client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param name The header's name + * @param value The header's value + * @return ApiClient this client + */ + public ApiClient addDefaultHeader(String name, String value) { + defaultHeaders.set(name, value); + return this; + } + + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + + public void setDebugging(boolean debugging) { + List currentInterceptors = this.restTemplate.getInterceptors(); + if (debugging) { + if (currentInterceptors == null) { + currentInterceptors = new ArrayList(); + } + ClientHttpRequestInterceptor interceptor = new ApiClientHttpRequestInterceptor(); + currentInterceptors.add(interceptor); + this.restTemplate.setInterceptors(currentInterceptors); + } else { + if (currentInterceptors != null && !currentInterceptors.isEmpty()) { + Iterator iter = currentInterceptors.iterator(); + while (iter.hasNext()) { + ClientHttpRequestInterceptor interceptor = iter.next(); + if (interceptor instanceof ApiClientHttpRequestInterceptor) { + iter.remove(); + } + } + this.restTemplate.setInterceptors(currentInterceptors); + } + } + this.debugging = debugging; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return boolean true if this client is enabled for debugging, false otherwise + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Get the date format used to parse/format date parameters. + * @return DateFormat format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str the string to parse + * @return the Date parsed from the string + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date the date to format + * @return the formatted date as string + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param the object to convert + * @return String the parameter represented as a String + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate( (Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param values The values of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(CollectionFormat collectionFormat, Collection values) { + // create the value based on the collection format + if (CollectionFormat.MULTI.equals(collectionFormat)) { + // not valid for path params + return parameterToString(values); + } + + // collectionFormat is assumed to be "csv" by default + if (collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + return collectionFormat.collectionToString(values); + } + + /** + * Converts a parameter to a {@link MultiValueMap} for use in REST requests + * + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMap(CollectionFormat collectionFormat, String name, Object value) { + final MultiValueMap params = new LinkedMultiValueMap(); + + if (name == null || name.isEmpty() || value == null) { + return params; + } + + if (collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + if (value instanceof Map) { + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + for (final Entry entry : valuesMap.entrySet()) { + params.add(entry.getKey(), parameterToString(entry.getValue())); + } + return params; + } + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(name, parameterToString(value)); + return params; + } + + if (valueCollection.isEmpty()) { + return params; + } + + if (collectionFormat.equals(CollectionFormat.MULTI)) { + for (Object item : valueCollection) { + params.add(name, parameterToString(item)); + } + return params; + } + + List values = new ArrayList(); + for (Object o : valueCollection) { + values.add(parameterToString(o)); + } + params.add(name, collectionFormat.collectionToString(values)); + + return params; + } + + /** + * Check if the given {@code String} is a JSON MIME. + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(String mediaType) { + // "* / *" is default to JSON + if ("*/*".equals(mediaType)) { + return true; + } + + try { + return isJsonMime(MediaType.parseMediaType(mediaType)); + } catch (InvalidMediaTypeException e) { + } + return false; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(MediaType mediaType) { + return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$")); + } + + /** + * Check if the given {@code String} is a Problem JSON MIME (RFC-7807). + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents Problem JSON, false otherwise + */ + public boolean isProblemJsonMime(String mediaType) { + return "application/problem+json".equalsIgnoreCase(mediaType); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return List The list of MediaTypes to use for the Accept header + */ + public List selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + MediaType mediaType = MediaType.parseMediaType(accept); + if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) { + return Collections.singletonList(mediaType); + } + } + return MediaType.parseMediaTypes(StringUtils.arrayToCommaDelimitedString(accepts)); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return MediaType The Content-Type header to use. If the given array is empty, JSON will be used. + */ + public MediaType selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return MediaType.APPLICATION_JSON; + } + for (String contentType : contentTypes) { + MediaType mediaType = MediaType.parseMediaType(contentType); + if (isJsonMime(mediaType)) { + return mediaType; + } + } + return MediaType.parseMediaType(contentTypes[0]); + } + + /** + * Select the body to use for the request + * + * @param obj the body object + * @param formParams the form parameters + * @param contentType the content type of the request + * @return Object the selected body + */ + protected Object selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { + boolean isForm = MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType) || MediaType.APPLICATION_FORM_URLENCODED.isCompatibleWith(contentType); + return isForm ? formParams : obj; + } + + /** + * Expand path template with variables + * + * @param pathTemplate path template with placeholders + * @param variables variables to replace + * @return path with placeholders replaced by variables + */ + public String expandPath(String pathTemplate, Map variables) { + return restTemplate.getUriTemplateHandler().expand(pathTemplate, variables).toString(); + } + + /** + * Include queryParams in uriParams taking into account the paramName + * + * @param queryParams The query parameters + * @param uriParams The path parameters + * return templatized query string + */ + public String generateQueryUri(MultiValueMap queryParams, Map uriParams) { + StringBuilder queryBuilder = new StringBuilder(); + queryParams.forEach((name, values) -> { + try { + final String encodedName = URLEncoder.encode(name.toString(), "UTF-8"); + if (CollectionUtils.isEmpty(values)) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(encodedName); + } else { + int valueItemCounter = 0; + for (Object value : values) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(encodedName); + if (value != null) { + String templatizedKey = encodedName + valueItemCounter++; + uriParams.put(templatizedKey, value.toString()); + queryBuilder.append('=').append("{").append(templatizedKey).append("}"); + } + } + } + } catch (UnsupportedEncodingException e) { + + } + }); + return queryBuilder.toString(); + + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param the return type to use + * @param path The sub-path of the HTTP URL + * @param method The request method + * @param pathParams The path parameters + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return ResponseEntity<T> The response of the chosen type + */ + public ResponseEntity invokeAPI(String path, HttpMethod method, Map pathParams, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + Map uriParams = new HashMap<>(); + uriParams.putAll(pathParams); + + String finalUri = path; + + if (queryParams != null && !queryParams.isEmpty()) { + //Include queryParams in uriParams taking into account the paramName + String queryUri = generateQueryUri(queryParams, uriParams); + //Append to finalUri the templatized query string like "?param1={param1Value}&....... + finalUri += "?" + queryUri; + } + String expandedPath = this.expandPath(finalUri, uriParams); + final UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(basePath).path(expandedPath); + + URI uri; + try { + uri = new URI(builder.build().toUriString()); + } catch (URISyntaxException ex) { + throw new RestClientException("Could not build URL: " + builder.toUriString(), ex); + } + + final BodyBuilder requestBuilder = RequestEntity.method(method, UriComponentsBuilder.fromUriString(basePath).toUriString() + finalUri, uriParams); + if (accept != null) { + requestBuilder.accept(accept.toArray(new MediaType[accept.size()])); + } + if (contentType != null) { + requestBuilder.contentType(contentType); + } + + addHeadersToRequest(headerParams, requestBuilder); + addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); + + RequestEntity requestEntity = requestBuilder.body(selectBody(body, formParams, contentType)); + + ResponseEntity responseEntity = null; + int attempts = 0; + while (attempts < maxAttemptsForRetry) { + try { + responseEntity = restTemplate.exchange(requestEntity, returnType); + break; + } catch (HttpServerErrorException | HttpClientErrorException ex) { + if (ex instanceof HttpServerErrorException + || ((HttpClientErrorException) ex) + .getStatusCode() + .equals(HttpStatus.TOO_MANY_REQUESTS)) { + attempts++; + if (attempts < maxAttemptsForRetry) { + try { + Thread.sleep(waitTimeMillis); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } else { + throw ex; + } + } else { + throw ex; + } + } + } + + if (responseEntity == null) { + throw new RestClientException("ResponseEntity is null"); + } + + if (responseEntity.getStatusCode().is2xxSuccessful()) { + return responseEntity; + } else { + // The error handler built into the RestTemplate should handle 400 and 500 series errors. + throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler"); + } + } + + /** + * Add headers to the request that is being built + * @param headers The headers to add + * @param requestBuilder The current request + */ + protected void addHeadersToRequest(HttpHeaders headers, BodyBuilder requestBuilder) { + {{#useJakartaEe}} + for (Entry> entry : headers.headerSet()) { + {{/useJakartaEe}} + {{^useJakartaEe}} + for (Entry> entry : headers.entrySet()) { + {{/useJakartaEe}} + List values = entry.getValue(); + for (String value : values) { + if (value != null) { + requestBuilder.header(entry.getKey(), value); + } + } + } + } + + /** + * Add cookies to the request that is being built + * + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, BodyBuilder requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + /** + * Build cookie header. Keeps a single value per cookie (as per + * RFC6265 section 5.3). + * + * @param cookies map all cookies + * @return header string for cookies. + */ + protected String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + final String value = entry.getValue().get(entry.getValue().size() - 1); + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), value)); + delimiter = "; "; + } + return cookieValue.toString(); + } + + /** + * Build the RestTemplate used to make HTTP requests. + * @return RestTemplate + */ + protected RestTemplate buildRestTemplate() { + {{#withXml}}List> messageConverters = new ArrayList>(); + messageConverters.add(new MappingJackson2HttpMessageConverter()); + XmlMapper xmlMapper = new XmlMapper(); + xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true); + {{#openApiNullable}} + xmlMapper.registerModule(new JsonNullableModule()); + {{/openApiNullable}} + messageConverters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + + RestTemplate restTemplate = new RestTemplate(messageConverters); + {{/withXml}}{{^withXml}}RestTemplate restTemplate = new RestTemplate();{{/withXml}} + // This allows us to read the response more than once - Necessary for debugging. + restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(restTemplate.getRequestFactory())); + + // disable default URL encoding + DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory(); + uriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.VALUES_ONLY); + restTemplate.setUriTemplateHandler(uriBuilderFactory); + return restTemplate; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams The query parameters + * @param headerParams The header parameters + */ + protected void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RestClientException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + protected class ApiClientHttpRequestInterceptor implements ClientHttpRequestInterceptor { + protected final Log log = LogFactory.getLog(ApiClientHttpRequestInterceptor.class); + + @Override + public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { + logRequest(request, body); + ClientHttpResponse response = execution.execute(request, body); + logResponse(response); + return response; + } + + protected void logRequest(HttpRequest request, byte[] body) throws UnsupportedEncodingException { + log.info("URI: " + request.getURI()); + log.info("HTTP Method: " + request.getMethod()); + log.info("HTTP Headers: " + headersToString(request.getHeaders())); + log.info("Request Body: " + new String(body, StandardCharsets.UTF_8)); + } + + protected void logResponse(ClientHttpResponse response) throws IOException { + log.info("HTTP Status Code: " + response.getStatusCode().value()); + log.info("Status Text: " + response.getStatusText()); + log.info("HTTP Headers: " + headersToString(response.getHeaders())); + log.info("Response Body: " + bodyToString(response.getBody())); + } + + protected String headersToString(HttpHeaders headers) { + if(headers == null || headers.isEmpty()) { + return ""; + } + StringBuilder builder = new StringBuilder(); + {{#useJakartaEe}} + for (Entry> entry : headers.headerSet()) { + {{/useJakartaEe}} + {{^useJakartaEe}} + for (Entry> entry : headers.entrySet()) { + {{/useJakartaEe}} + builder.append(entry.getKey()).append("=["); + for (String value : entry.getValue()) { + builder.append(value).append(","); + } + builder.setLength(builder.length() - 1); // Get rid of trailing comma + builder.append("],"); + } + builder.setLength(builder.length() - 1); // Get rid of trailing comma + return builder.toString(); + } + + protected String bodyToString(InputStream body) throws IOException { + StringBuilder builder = new StringBuilder(); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(body, StandardCharsets.UTF_8)); + String line = bufferedReader.readLine(); + while (line != null) { + builder.append(line).append(System.lineSeparator()); + line = bufferedReader.readLine(); + } + bufferedReader.close(); + return builder.toString(); + } + } +} diff --git a/templates/libraries/resttemplate/BaseApi.mustache b/templates/libraries/resttemplate/BaseApi.mustache new file mode 100644 index 00000000..fe54fcf7 --- /dev/null +++ b/templates/libraries/resttemplate/BaseApi.mustache @@ -0,0 +1,77 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import org.springframework.web.client.RestClientException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; + +{{>generatedAnnotation}} + +public abstract class BaseApi { + + protected ApiClient apiClient; + + public BaseApi() { + this(new ApiClient()); + } + + public BaseApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity invokeAPI(String url, HttpMethod method) throws RestClientException { + return invokeAPI(url, method, null, new ParameterizedTypeReference() {}); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity invokeAPI(String url, HttpMethod method, Object request) throws RestClientException { + return invokeAPI(url, method, request, new ParameterizedTypeReference() {}); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param returnType The return type. + * @return ResponseEntity in the specified type. + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity invokeAPI(String url, HttpMethod method, ParameterizedTypeReference returnType) throws RestClientException { + return invokeAPI(url, method, null, returnType); + } + + /** + * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests. + * @param url The URL for the request, either full URL or only the path. + * @param method The HTTP method for the request. + * @param request The request object. + * @param returnType The return type. + * @return ResponseEntity in the specified type. + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public abstract ResponseEntity invokeAPI(String url, HttpMethod method, Object request, ParameterizedTypeReference returnType) throws RestClientException; +} diff --git a/templates/libraries/resttemplate/additional_properties.mustache b/templates/libraries/resttemplate/additional_properties.mustache new file mode 100644 index 00000000..8e718279 --- /dev/null +++ b/templates/libraries/resttemplate/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/resttemplate/api.mustache b/templates/libraries/resttemplate/api.mustache new file mode 100644 index 00000000..eb0f4b50 --- /dev/null +++ b/templates/libraries/resttemplate/api.mustache @@ -0,0 +1,189 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.BaseApi; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{package}}.{{classname}}") +{{/generateClientAsBean}} +{{#operations}} +public class {{classname}} extends BaseApi { + + public {{classname}}() { + super(new ApiClient()); + } + + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} + public {{classname}}(ApiClient apiClient) { + super(apiClient); + } + + {{#operation}} + /** + * {{summary}} + * {{notes}} + {{#responses}} + *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{.}} + {{/returnType}} + * @throws RestClientException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + {{#returnType}} + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); + {{/returnType}} + {{^returnType}} + {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/returnType}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} + *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return ResponseEntity<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws RestClientException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public ResponseEntity<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}}{{/allParams}}{{#hasPathParams}} + // create path and map variables + final Map uriVariables = new HashMap();{{#pathParams}} + uriVariables.put("{{baseName}}", {{#collectionFormat}}apiClient.collectionPathParameterToString(ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase()), {{{paramName}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}{{/collectionFormat}});{{/pathParams}}{{/hasPathParams}} + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap();{{#hasQueryParams}} + + {{#queryParams}}{{#isExplode}}{{#hasVars}} + if ({{paramName}} != null) { + {{#vars}} localVarQueryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}.{{getter}}())); + {{/vars}}}{{/hasVars}}{{^hasVars}}localVarQueryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/hasVars}}{{/isExplode}}{{^isExplode}}localVarQueryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/isExplode}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}} + + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}} + {{/-last}}{{/headerParams}}{{/hasHeaderParams}}{{#hasCookieParams}} + + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}} + {{/-last}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}} + + {{#formParams}}if ({{paramName}} != null) + localVarFormParams.{{^collectionFormat}}add{{/collectionFormat}}{{#collectionFormat}}addAll{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{^-last}} + {{/-last}}{{/formParams}}{{/hasFormParams}} + + final String[] localVarAccepts = { {{#hasProduces}} + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + {{/hasProduces}} }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { {{#hasConsumes}} + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + {{/hasConsumes}} }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}}ParameterizedTypeReference<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}> localReturnType = new ParameterizedTypeReference<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {};{{/returnType}} + return apiClient.invokeAPI("{{{path}}}", HttpMethod.{{httpMethod}}, {{#hasPathParams}}uriVariables{{/hasPathParams}}{{^hasPathParams}}Collections.emptyMap(){{/hasPathParams}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + {{#-last}} + + @Override + public ResponseEntity invokeAPI(String url, HttpMethod method, Object request, ParameterizedTypeReference returnType) throws RestClientException { + String localVarPath = url.replace(apiClient.getBasePath(), ""); + Object localVarPostBody = request; + + final Map uriVariables = new HashMap(); + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { {{#hasProduces}} + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + {{/hasProduces}} }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { {{#hasConsumes}} + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + {{/hasConsumes}} }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + return apiClient.invokeAPI(localVarPath, method, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnType); + } + {{/-last}} + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/resttemplate/api_test.mustache b/templates/libraries/resttemplate/api_test.mustache new file mode 100644 index 00000000..e1a213c0 --- /dev/null +++ b/templates/libraries/resttemplate/api_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.web.client.RestClientException; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + * + * @throws RestClientException + * if the Api call fails + */ + @Test + void {{operationId}}Test() { + {{#allParams}} + {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; + {{/allParams}} + + {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + {{/operation}}{{/operations}} +} diff --git a/templates/libraries/resttemplate/auth/ApiKeyAuth.mustache b/templates/libraries/resttemplate/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..a5662c4a --- /dev/null +++ b/templates/libraries/resttemplate/auth/ApiKeyAuth.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if (location.equals("query")) { + queryParams.add(paramName, value); + } else if (location.equals("header")) { + headerParams.add(paramName, value); + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } + } +} diff --git a/templates/libraries/resttemplate/auth/Authentication.mustache b/templates/libraries/resttemplate/auth/Authentication.mustache new file mode 100644 index 00000000..70b1d105 --- /dev/null +++ b/templates/libraries/resttemplate/auth/Authentication.mustache @@ -0,0 +1,19 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and / or query parameters. + * + * @param queryParams The query parameters for the request + * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request + */ + void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); +} diff --git a/templates/libraries/resttemplate/auth/HttpBasicAuth.mustache b/templates/libraries/resttemplate/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..4ee90096 --- /dev/null +++ b/templates/libraries/resttemplate/auth/HttpBasicAuth.mustache @@ -0,0 +1,41 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/resttemplate/auth/HttpBearerAuth.mustache b/templates/libraries/resttemplate/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..93fe8732 --- /dev/null +++ b/templates/libraries/resttemplate/auth/HttpBearerAuth.mustache @@ -0,0 +1,59 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/resttemplate/auth/OAuth.mustache b/templates/libraries/resttemplate/auth/OAuth.mustache new file mode 100644 index 00000000..55b5da8e --- /dev/null +++ b/templates/libraries/resttemplate/auth/OAuth.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private Supplier tokenSupplier; + + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ + public String getAccessToken() { + return tokenSupplier.get(); + } + + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ + public void setAccessToken(String accessToken) { + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); + } +} diff --git a/templates/libraries/resttemplate/auth/OAuthFlow.mustache b/templates/libraries/resttemplate/auth/OAuthFlow.mustache new file mode 100644 index 00000000..759f354f --- /dev/null +++ b/templates/libraries/resttemplate/auth/OAuthFlow.mustache @@ -0,0 +1,7 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} \ No newline at end of file diff --git a/templates/libraries/resttemplate/build.gradle.mustache b/templates/libraries/resttemplate/build.gradle.mustache new file mode 100644 index 00000000..ca0ce4ca --- /dev/null +++ b/templates/libraries/resttemplate/build.gradle.mustache @@ -0,0 +1,188 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + {{#useJakartaEe}} + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + {{/useJakartaEe}} + {{^useJakartaEe}} + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + {{/useJakartaEe}} + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + archiveClassifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + {{#useJakartaEe}} + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + {{/useJakartaEe}} + {{^useJakartaEe}} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + {{/useJakartaEe}} + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + mainClass = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + {{#useJakartaEe}} + spring_web_version = "6.2.8" + jakarta_annotation_version = "2.1.1" + bean_validation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} + spring_web_version = "5.3.33" + jakarta_annotation_version = "1.3.5" + bean_validation_version = "2.0.2" + {{/useJakartaEe}} + jodatime_version = "2.9.9" + junit_version = "5.10.2" +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.springframework:spring-web:$spring_web_version" + implementation "org.springframework:spring-context:$spring_web_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{^useJakartaEe}} + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#useJakartaEe}} + implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + implementation "joda-time:joda-time:$jodatime_version" + {{/joda}} + {{#withXml}} + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" + implementation "io.github.threeten-jaxb:threeten-jaxb-core:1.2" + {{/withXml}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/templates/libraries/resttemplate/model.mustache b/templates/libraries/resttemplate/model.mustache new file mode 100644 index 00000000..108748f6 --- /dev/null +++ b/templates/libraries/resttemplate/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/resttemplate/pojo.mustache b/templates/libraries/resttemplate/pojo.mustache new file mode 100644 index 00000000..7d95c7bb --- /dev/null +++ b/templates/libraries/resttemplate/pojo.mustache @@ -0,0 +1,625 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/resttemplate/additional_properties}} + + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}}{{! prevent indent}} +{{/generateBuilders}} + +} diff --git a/templates/libraries/resttemplate/pom.mustache b/templates/libraries/resttemplate/pom.mustache new file mode 100644 index 00000000..96a9e07f --- /dev/null +++ b/templates/libraries/resttemplate/pom.mustache @@ -0,0 +1,387 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + false + true + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.4.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + {{#useJakartaEe}} + 17 + 17 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.8 + 1.8 + {{/useJakartaEe}} + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.springframework + spring-web + ${spring-web-version} + + + org.springframework + spring-context + ${spring-web-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{^useJakartaEe}} + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#useJakartaEe}} + + com.fasterxml.jackson.jakarta.rs + jackson-jakarta-rs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + io.github.threeten-jaxb + threeten-jaxb-core + 1.2 + + {{/withXml}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + ${hibernate-validator-version} + + {{/performBeanValidation}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.9 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#useJakartaEe}} + 6.2.8 + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 5.3.33 + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + {{#joda}} + 2.9.9 + {{/joda}} + {{#performBeanValidation}} + 5.4.3.Final + {{/performBeanValidation}} + 5.10.2 + + diff --git a/templates/libraries/retrofit2/ApiClient.mustache b/templates/libraries/retrofit2/ApiClient.mustache new file mode 100644 index 00000000..2ab157d2 --- /dev/null +++ b/templates/libraries/retrofit2/ApiClient.mustache @@ -0,0 +1,477 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +{{#gson}} +import com.google.gson.Gson; +import com.google.gson.JsonParseException; +import com.google.gson.JsonElement; +{{/gson}} +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.RequestBody; +import okhttp3.ResponseBody; +{{#hasOAuthMethods}} +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +{{/hasOAuthMethods}} +{{#joda}} +import org.joda.time.format.DateTimeFormatter; +{{/joda}} +import retrofit2.Converter; +import retrofit2.Retrofit; +{{#useRxJava2}} +import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; +{{/useRxJava2}} +{{#useRxJava3}} +import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory; +{{/useRxJava3}} +{{#gson}} +import retrofit2.converter.gson.GsonConverterFactory; +{{/gson}} +{{#jackson}} +import retrofit2.converter.jackson.JacksonConverterFactory; +{{/jackson}} +import retrofit2.converter.scalars.ScalarsConverterFactory; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +import {{invokerPackage}}.auth.OAuth.AccessTokenListener; +import {{invokerPackage}}.auth.OAuthFlow; +{{/hasOAuthMethods}} + +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.text.DateFormat; +{{#jsr310}} +import java.time.format.DateTimeFormatter; +{{/jsr310}} +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.HashMap; + +public class ApiClient { + + protected Map apiAuthorizations; + protected OkHttpClient.Builder okBuilder; + protected Retrofit.Builder adapterBuilder; + protected JSON json; + protected OkHttpClient okHttpClient; + + public ApiClient() { + apiAuthorizations = new LinkedHashMap(); + createDefaultAdapter(); + okBuilder = new OkHttpClient.Builder(); + } + + public ApiClient(OkHttpClient client){ + apiAuthorizations = new LinkedHashMap(); + createDefaultAdapter(); + okHttpClient = client; + } + + public ApiClient(String[] authNames) { + this(); + for(String authName : authNames) { + {{#hasAuthMethods}} + Interceptor auth = null; + {{#authMethods}}if ("{{name}}".equals(authName)) { + {{#isBasicBasic}} + auth = new HttpBasicAuth(); + {{/isBasicBasic}}{{#isBasicBearer}} + auth = new HttpBearerAuth("{{scheme}}"); + {{/isBasicBearer}} + {{#isApiKey}} + auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); + {{/isApiKey}} + {{#isOAuth}} + auth = new OAuth(OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, "{{{authorizationUrl}}}", "{{{tokenUrl}}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); + {{/isOAuth}} + } else {{/authMethods}}{ + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + } + if (auth != null) { + addAuthorization(authName, auth); + } + {{/hasAuthMethods}} + {{^hasAuthMethods}} + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + {{/hasAuthMethods}} + } + } + + /** + * Basic constructor for single auth name + * @param authName Authentication name + */ + public ApiClient(String authName) { + this(new String[]{authName}); + } + + /** + * Helper constructor for single api key + * @param authName Authentication name + * @param apiKey API key + */ + public ApiClient(String authName, String apiKey) { + this(authName); + this.setApiKey(apiKey); + } + + /** + * Helper constructor for single basic auth or password oauth2 + * @param authName Authentication name + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String username, String password) { + this(authName); + this.setCredentials(username, password); + } + + {{#hasOAuthMethods}} + /** + * Helper constructor for single password oauth2 + * @param authName Authentication name + * @param clientId Client ID + * @param secret Client Secret + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String clientId, String secret, String username, String password) { + this(authName); + this.getTokenEndPoint() + .setClientId(clientId) + .setClientSecret(secret) + .setUsername(username) + .setPassword(password); + } + + {{/hasOAuthMethods}} + public void createDefaultAdapter() { + json = new JSON(); + + String baseUrl = "{{{basePath}}}"; + if (!baseUrl.endsWith("/")) + baseUrl = baseUrl + "/"; + + adapterBuilder = new Retrofit + .Builder() + .baseUrl(baseUrl) + {{#useRxJava2}} + .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) + {{/useRxJava2}} + {{#useRxJava3}} + .addCallAdapterFactory(RxJava3CallAdapterFactory.create()) + {{/useRxJava3}} + .addConverterFactory(ScalarsConverterFactory.create()) + {{#jackson}} + .addConverterFactory(JacksonConverterFactory.create(json.getMapper())); + {{/jackson}} + {{#gson}} + .addConverterFactory(GsonCustomConverterFactory.create(json.getGson())); + {{/gson}} + } + + public S createService(Class serviceClass) { + if (okHttpClient != null) { + return adapterBuilder.client(okHttpClient).build().create(serviceClass); + } else { + return adapterBuilder.client(okBuilder.build()).build().create(serviceClass); + } + } + + public ApiClient setDateFormat(DateFormat dateFormat) { + this.json.setDateFormat(dateFormat); + return this; + } + + {{#gson}} + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + this.json.setSqlDateFormat(dateFormat); + return this; + } + + {{#joda}} + public ApiClient setDateTimeFormat(DateTimeFormatter dateFormat) { + this.json.setDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + this.json.setLocalDateFormat(dateFormat); + return this; + } + + {{/joda}} + {{#jsr310}} + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + this.json.setOffsetDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + this.json.setLocalDateFormat(dateFormat); + return this; + } + {{/jsr310}} + {{/gson}} + + + /** + * Helper method to configure the first api key found + * @param apiKey API key + * @return ApiClient + */ + public ApiClient setApiKey(String apiKey) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof ApiKeyAuth) { + ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; + keyAuth.setApiKey(apiKey); + return this; + } + } + return this; + } + + /** + * Helper method to set token for the first Http Bearer authentication found. + * @param bearerToken Bearer token + * @return ApiClient + */ + public ApiClient setBearerToken(String bearerToken) { + for (Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof HttpBearerAuth) { + ((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken); + return this; + } + } + return this; + } + + /** + * Helper method to configure the username/password for basic auth or password oauth + * @param username Username + * @param password Password + * @return ApiClient + */ + public ApiClient setCredentials(String username, String password) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof HttpBasicAuth) { + HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; + basicAuth.setCredentials(username, password); + return this; + } + {{#hasOAuthMethods}} + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); + return this; + } + {{/hasOAuthMethods}} + } + return this; + } + + {{#hasOAuthMethods}} + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getTokenRequestBuilder(); + } + } + return null; + } + + /** + * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Authentication request builder + */ + public AuthenticationRequestBuilder getAuthorizationEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getAuthenticationRequestBuilder(); + } + } + return null; + } + + /** + * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) + * @param accessToken Access token + * @return ApiClient + */ + public ApiClient setAccessToken(String accessToken) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.setAccessToken(accessToken); + return this; + } + } + return this; + } + + /** + * Helper method to configure the oauth accessCode/implicit flow parameters + * @param clientId Client ID + * @param clientSecret Client secret + * @param redirectURI Redirect URI + * @return ApiClient + */ + public ApiClient configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder() + .setClientId(clientId) + .setClientSecret(clientSecret) + .setRedirectURI(redirectURI); + oauth.getAuthenticationRequestBuilder() + .setClientId(clientId) + .setRedirectURI(redirectURI); + return this; + } + } + return this; + } + + /** + * Configures a listener which is notified when a new access token is received. + * @param accessTokenListener Access token listener + * @return ApiClient + */ + public ApiClient registerAccessTokenListener(AccessTokenListener accessTokenListener) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.registerAccessTokenListener(accessTokenListener); + return this; + } + } + return this; + } + {{/hasOAuthMethods}} + + /** + * Adds an authorization to be used by the client + * @param authName Authentication name + * @param authorization Authorization interceptor + * @return ApiClient + */ + public ApiClient addAuthorization(String authName, Interceptor authorization) { + if (apiAuthorizations.containsKey(authName)) { + throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); + } + apiAuthorizations.put(authName, authorization); + if(okBuilder == null){ + throw new RuntimeException("The ApiClient was created with a built OkHttpClient so it's not possible to add an authorization interceptor to it"); + } + okBuilder.addInterceptor(authorization); + + return this; + } + + public Map getApiAuthorizations() { + return apiAuthorizations; + } + + public ApiClient setApiAuthorizations(Map apiAuthorizations) { + this.apiAuthorizations = apiAuthorizations; + return this; + } + + public Retrofit.Builder getAdapterBuilder() { + return adapterBuilder; + } + + public ApiClient setAdapterBuilder(Retrofit.Builder adapterBuilder) { + this.adapterBuilder = adapterBuilder; + return this; + } + + public OkHttpClient.Builder getOkBuilder() { + return okBuilder; + } + + public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + okBuilder.addInterceptor(apiAuthorization); + } + } + + /** + * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit + * @param okClient An instance of OK HTTP client + */ + public void configureFromOkclient(OkHttpClient okClient) { + this.okBuilder = okClient.newBuilder(); + addAuthsToOkBuilder(this.okBuilder); + } +} + +{{#gson}} +/** + * This wrapper is to take care of this case: + * when the deserialization fails due to JsonParseException and the + * expected type is String, then just return the body string. + */ +class GsonResponseBodyConverterToString implements Converter { + protected final Gson gson; + protected final Type type; + + GsonResponseBodyConverterToString(Gson gson, Type type) { + this.gson = gson; + this.type = type; + } + + @Override public T convert(ResponseBody value) throws IOException { + String returned = value.string(); + try { + return gson.fromJson(returned, type); + } + catch (JsonParseException e) { + return (T) returned; + } + } +} + +class GsonCustomConverterFactory extends Converter.Factory +{ + protected final Gson gson; + protected final GsonConverterFactory gsonConverterFactory; + + public static GsonCustomConverterFactory create(Gson gson) { + return new GsonCustomConverterFactory(gson); + } + + protected GsonCustomConverterFactory(Gson gson) { + if (gson == null) + throw new NullPointerException("gson == null"); + this.gson = gson; + this.gsonConverterFactory = GsonConverterFactory.create(gson); + } + + @Override + public Converter responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { + if (type.equals(String.class)) + return new GsonResponseBodyConverterToString(gson, type); + else + return gsonConverterFactory.responseBodyConverter(type, annotations, retrofit); + } + + @Override + public Converter requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { + return gsonConverterFactory.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit); + } +} +{{/gson}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/CollectionFormats.mustache b/templates/libraries/retrofit2/CollectionFormats.mustache new file mode 100644 index 00000000..d63c8a86 --- /dev/null +++ b/templates/libraries/retrofit2/CollectionFormats.mustache @@ -0,0 +1,101 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Arrays; +import java.util.List; + +public class CollectionFormats { + + public static class CSVParams { + + protected List params; + + public CSVParams() { + } + + public CSVParams(List params) { + this.params = params; + } + + public CSVParams(String... params) { + this.params = Arrays.asList(params); + } + + public List getParams() { + return params; + } + + public void setParams(List params) { + this.params = params; + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), ","); + } + + } + + public static class SPACEParams extends SSVParams { + + } + + public static class SSVParams extends CSVParams { + + public SSVParams() { + } + + public SSVParams(List params) { + super(params); + } + + public SSVParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), " "); + } + } + + public static class TSVParams extends CSVParams { + + public TSVParams() { + } + + public TSVParams(List params) { + super(params); + } + + public TSVParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join( params.toArray(new String[0]), "\t"); + } + } + + public static class PIPESParams extends CSVParams { + + public PIPESParams() { + } + + public PIPESParams(List params) { + super(params); + } + + public PIPESParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), "|"); + } + } + +} diff --git a/templates/libraries/retrofit2/JSON.mustache b/templates/libraries/retrofit2/JSON.mustache new file mode 100644 index 00000000..2e986485 --- /dev/null +++ b/templates/libraries/retrofit2/JSON.mustache @@ -0,0 +1,443 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.joda.time.format.DateTimeFormatter; +import org.joda.time.format.DateTimeFormatterBuilder; +import org.joda.time.format.ISODateTimeFormat; +{{/joda}} + +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +{{#jsr310}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +{{/jsr310}} +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +public class JSON { + private Gson gson; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + {{#joda}} + private DateTimeTypeAdapter dateTimeTypeAdapter = new DateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/joda}} + {{#jsr310}} + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + {{/jsr310}} + + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + {{#models}}{{#model}}{{#discriminator}} .registerTypeSelector({{classname}}.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + {{#mappedModels}} + classByDiscriminatorValue.put("{{mappingName}}".toUpperCase(Locale.ROOT), {{modelName}}.class); + {{/mappedModels}} + classByDiscriminatorValue.put("{{classname}}".toUpperCase(Locale.ROOT), {{classname}}.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "{{{propertyName}}}")); + } + }) + {{/discriminator}}{{/model}}{{/models}} + ; + return fireBuilder.createGsonBuilder(); + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if(null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase(Locale.ROOT)); + if(null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + {{#joda}} + .registerTypeAdapter(DateTime.class, dateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + {{/joda}} + {{#jsr310}} + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + {{/jsr310}} + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; + } + + {{#joda}} + /** + * Gson TypeAdapter for Joda DateTime type + */ + public static class DateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public DateTimeTypeAdapter() { + this(new DateTimeFormatterBuilder() + .append(ISODateTimeFormat.dateTime().getPrinter(), ISODateTimeFormat.dateOptionalTimeParser().getParser()) + .toFormatter()); + } + + public DateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, DateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public DateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseDateTime(date); + } + } + } + + /** + * Gson TypeAdapter for Joda LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(ISODateTimeFormat.date()); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.print(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return formatter.parseLocalDate(date); + } + } + } + + public JSON setDateTimeFormat(DateTimeFormatter dateFormat) { + dateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + {{/joda}} + {{#jsr310}} + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + {{/jsr310}} + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() { + } + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() { + } + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } + +} diff --git a/templates/libraries/retrofit2/JSON_jackson.mustache b/templates/libraries/retrofit2/JSON_jackson.mustache new file mode 100644 index 00000000..c49cbd0f --- /dev/null +++ b/templates/libraries/retrofit2/JSON_jackson.mustache @@ -0,0 +1,264 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import {{javaxPackage}}.ws.rs.core.GenericType; +import {{javaxPackage}}.ws.rs.ext.ContextResolver; + +{{>generatedAnnotation}} + +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) + .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + {{#joda}} + .addModule(new JodaModule()) + {{/joda}} + {{#openApiNullable}} + .addModule(new JsonNullableModule()) + {{/openApiNullable}} + .build(); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet<>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap<>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/templates/libraries/retrofit2/README.mustache b/templates/libraries/retrofit2/README.mustache new file mode 100644 index 00000000..5e892a3f --- /dev/null +++ b/templates/libraries/retrofit2/README.mustache @@ -0,0 +1,38 @@ +# {{artifactId}} + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + {{groupId}} + {{artifactId}} + {{artifactVersion}} + compile + + +``` + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/libraries/retrofit2/api.mustache b/templates/libraries/retrofit2/api.mustache new file mode 100644 index 00000000..0b010551 --- /dev/null +++ b/templates/libraries/retrofit2/api.mustache @@ -0,0 +1,84 @@ +package {{package}}; + +import {{invokerPackage}}.CollectionFormats.*; + +{{#useRxJava2}} +import io.reactivex.Observable; +{{/useRxJava2}} +{{#useRxJava3}} +import io.reactivex.rxjava3.core.Observable; +{{/useRxJava3}} +{{^returnType}} +{{#useRxJava2}} +import io.reactivex.Completable; +{{/useRxJava2}} +{{#useRxJava3}} +import io.reactivex.rxjava3.core.Completable; +{{/useRxJava3}} +{{/returnType}} +{{#doNotUseRx}} +import retrofit2.Call; +{{/doNotUseRx}} +import retrofit2.http.*; + +import okhttp3.RequestBody; +import okhttp3.ResponseBody; +import okhttp3.MultipartBody; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +{{#operations}} +public interface {{classname}} { + {{#operation}} + /** + * {{summary}} + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} +{{/allParams}} + * @return {{^doNotUseRx}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{#formParams}} + {{#-first}} + {{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}} + {{/-first}} + {{/formParams}} + {{^formParams}} + {{#prioritizedContentTypes}} + {{#-first}} + @Headers({ + "Content-Type:{{{mediaType}}}" + }) + {{/-first}} + {{/prioritizedContentTypes}} + {{/formParams}} + @{{httpMethod}}("{{{path}}}") + {{^doNotUseRx}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} + {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} + );{{/-last}}{{/allParams}} + + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/retrofit2/api_test.mustache b/templates/libraries/retrofit2/api_test.mustache new file mode 100644 index 00000000..b84e6b17 --- /dev/null +++ b/templates/libraries/retrofit2/api_test.mustache @@ -0,0 +1,52 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +public class {{classname}}Test { + + private {{classname}} api; + + @BeforeEach + public void setup() { + api = new ApiClient().createService({{classname}}.class); + } + + {{#operations}} + {{#operation}} + /** + * {{summary}} + * + * {{notes}} + */ + @Test + public void {{operationId}}Test() { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + // TODO: test validations + } + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/retrofit2/auth/ApiKeyAuth.mustache b/templates/libraries/retrofit2/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..d87c2e4c --- /dev/null +++ b/templates/libraries/retrofit2/auth/ApiKeyAuth.mustache @@ -0,0 +1,74 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; + +public class ApiKeyAuth implements Interceptor { + private final String location; + private final String paramName; + + private String apiKey; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + @Override + public Response intercept(Chain chain) throws IOException { + String paramValue; + Request request = chain.request(); + + if ("query".equals(location)) { + String newQuery = request.url().uri().getQuery(); + paramValue = paramName + "=" + apiKey; + if (newQuery == null) { + newQuery = paramValue; + } else { + newQuery += "&" + paramValue; + } + + URI newUri; + try { + newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(), + request.url().uri().getPath(), newQuery, request.url().uri().getFragment()); + } catch (URISyntaxException e) { + throw new IOException(e); + } + + request = request.newBuilder().url(newUri.toURL()).build(); + } else if ("header".equals(location)) { + request = request.newBuilder() + .addHeader(paramName, apiKey) + .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); + } + return chain.proceed(request); + } +} diff --git a/templates/libraries/retrofit2/auth/HttpBasicAuth.mustache b/templates/libraries/retrofit2/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..ac034764 --- /dev/null +++ b/templates/libraries/retrofit2/auth/HttpBasicAuth.mustache @@ -0,0 +1,52 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.io.IOException; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.Credentials; + +public class HttpBasicAuth implements Interceptor { + + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setCredentials(String username, String password) { + this.username = username; + this.password = password; + } + + @Override + public Response intercept(Chain chain) throws IOException { + Request request = chain.request(); + + // If the request already have an authorization (eg. Basic auth), do nothing + if (request.header("Authorization") == null) { + String credentials = Credentials.basic(username, password); + request = request.newBuilder() + .addHeader("Authorization", credentials) + .build(); + } + return chain.proceed(request); + } +} diff --git a/templates/libraries/retrofit2/auth/HttpBearerAuth.mustache b/templates/libraries/retrofit2/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..764c8f21 --- /dev/null +++ b/templates/libraries/retrofit2/auth/HttpBearerAuth.mustache @@ -0,0 +1,44 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.io.IOException; + +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; + +public class HttpBearerAuth implements Interceptor { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public Response intercept(Chain chain) throws IOException { + Request request = chain.request(); + + // If the request already have an authorization (eg. Basic auth), do nothing + if (request.header("Authorization") == null && bearerToken != null) { + request = request.newBuilder() + .addHeader("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken) + .build(); + } + return chain.proceed(request); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } + +} diff --git a/templates/libraries/retrofit2/auth/OAuth.mustache b/templates/libraries/retrofit2/auth/OAuth.mustache new file mode 100644 index 00000000..6ea77b78 --- /dev/null +++ b/templates/libraries/retrofit2/auth/OAuth.mustache @@ -0,0 +1,187 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED; +import static java.net.HttpURLConnection.HTTP_FORBIDDEN; + +import java.io.IOException; +import java.util.Map; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; +import org.apache.oltu.oauth2.common.token.BasicOAuthToken; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Request.Builder; +import okhttp3.Response; + +public class OAuth implements Interceptor { + + public interface AccessTokenListener { + public void notify(BasicOAuthToken token); + } + + private volatile String accessToken; + private OAuthClient oauthClient; + + private TokenRequestBuilder tokenRequestBuilder; + private AuthenticationRequestBuilder authenticationRequestBuilder; + + private AccessTokenListener accessTokenListener; + + public OAuth( OkHttpClient client, TokenRequestBuilder requestBuilder ) { + this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = requestBuilder; + } + + public OAuth(TokenRequestBuilder requestBuilder ) { + this(new OkHttpClient(), requestBuilder); + } + + public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { + this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes)); + setFlow(flow); + authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl); + } + + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) + throws IOException { + + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already have an authorization (eg. Basic auth), do nothing + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // If first time, get the token + OAuthClientRequest oAuthRequest; + if (getAccessToken() == null) { + updateAccessToken(null); + } + + if (getAccessToken() != null) { + // Build the request + Builder rb = request.newBuilder(); + + String requestAccessToken = new String(getAccessToken()); + try { + oAuthRequest = new OAuthBearerClientRequest(request.url().toString()) + .setAccessToken(requestAccessToken) + .buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + for ( Map.Entry header : oAuthRequest.getHeaders().entrySet() ) { + rb.addHeader(header.getKey(), header.getValue()); + } + rb.url( oAuthRequest.getLocationUri()); + + //Execute the request + Response response = chain.proceed(rb.build()); + + // 401/403 most likely indicates that access token has expired. Unless it happens two times in a row. + if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept( chain, false ); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } else { + return chain.proceed(chain.request()); + } + } + + /* + * Returns true if the access token has been updated + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + if (accessTokenListener != null) { + accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken()); + } + return !getAccessToken().equals(requestAccessToken); + } else { + return false; + } + } catch (OAuthSystemException e) { + throw new IOException(e); + } catch (OAuthProblemException e) { + throw new IOException(e); + } + } + return true; + } + + public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + this.accessTokenListener = accessTokenListener; + } + + public synchronized String getAccessToken() { + return accessToken; + } + + public synchronized void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + public AuthenticationRequestBuilder getAuthenticationRequestBuilder() { + return authenticationRequestBuilder; + } + + public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) { + this.authenticationRequestBuilder = authenticationRequestBuilder; + } + +} diff --git a/templates/libraries/retrofit2/auth/OAuthOkHttpClient.mustache b/templates/libraries/retrofit2/auth/OAuthOkHttpClient.mustache new file mode 100644 index 00000000..5fe01318 --- /dev/null +++ b/templates/libraries/retrofit2/auth/OAuthOkHttpClient.mustache @@ -0,0 +1,74 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Request.Builder; +import okhttp3.Response; +import okhttp3.MediaType; +import okhttp3.RequestBody; + + +public class OAuthOkHttpClient implements HttpClient { + + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/json"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + public void shutdown() { + // Nothing to do here + } + +} diff --git a/templates/libraries/retrofit2/bodyParams.mustache b/templates/libraries/retrofit2/bodyParams.mustache new file mode 100644 index 00000000..97b03fcb --- /dev/null +++ b/templates/libraries/retrofit2/bodyParams.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}@retrofit2.http.Body {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/build.gradle.mustache b/templates/libraries/retrofit2/build.gradle.mustache new file mode 100644 index 00000000..1a8db344 --- /dev/null +++ b/templates/libraries/retrofit2/build.gradle.mustache @@ -0,0 +1,166 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + oltu_version = "1.0.1" + retrofit_version = "2.11.0" + {{#jackson}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + javax_ws_rs_api_version = "2.1.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + {{/jackson}} + {{#usePlayWS}} + play_version = "2.6.7" + {{/usePlayWS}} + jakarta_annotation_version = "1.3.5" + swagger_annotations_version = "1.5.22" + junit_version = "5.10.3" + {{#useRxJava2}} + rx_java_version = "2.1.1" + {{/useRxJava2}} + {{#useRxJava3}} + rx_java_version = "3.0.4" + {{/useRxJava3}} + {{#joda}} + jodatime_version = "2.9.9" + {{/joda}} + json_fire_version = "1.9.0" +} + +dependencies { + implementation "com.squareup.retrofit2:retrofit:$retrofit_version" + implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version" + implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" + {{#useRxJava2}} + implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' + implementation "io.reactivex.rxjava2:rxjava:$rx_java_version" + {{/useRxJava2}} + {{#useRxJava3}} + implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofit_version" + implementation "io.reactivex.rxjava3:rxjava:$rx_java_version" + {{/useRxJava3}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){ + exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common' + } + implementation "io.gsonfire:gson-fire:$json_fire_version" + {{#joda}} + implementation "joda-time:joda-time:$jodatime_version" + {{/joda}} + {{#usePlayWS}} + implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version" + {{/usePlayWS}} + {{#jackson}} + implementation "jakarta.validation:jakarta.validation-api:3.0.2" + implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "javax.ws.rs:javax.ws.rs-api:$javax_ws_rs_api_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{/jackson}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} diff --git a/templates/libraries/retrofit2/build.sbt.mustache b/templates/libraries/retrofit2/build.sbt.mustache new file mode 100644 index 00000000..c7113662 --- /dev/null +++ b/templates/libraries/retrofit2/build.sbt.mustache @@ -0,0 +1,43 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile", + "com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile", + {{^usePlayWS}} + "com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile", + {{/usePlayWS}} + {{#usePlayWS}} + "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile", + "com.squareup.retrofit2" % "converter-jackson" % "2.11.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile", + {{/usePlayWS}} + {{#useRxJava2}} + "com.squareup.retrofit2" % "adapter-rxjava2" % "2.11.0" % "compile", + "io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile", + {{/useRxJava2}} + {{#useRxJava3}} + "com.squareup.retrofit2" % "adapter-rxjava3" % "2.11.0" % "compile", + "io.reactivex.rxjava3" % "rxjava" % "3.0.4" % "compile", + {{/useRxJava3}} + "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", + {{#joda}} + "joda-time" % "joda-time" % "2.9.9" % "compile", + {{/joda}} + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "com.novocode" % "junit-interface" % "0.11" % "test" + ) + ) diff --git a/templates/libraries/retrofit2/formParams.mustache b/templates/libraries/retrofit2/formParams.mustache new file mode 100644 index 00000000..0456f449 --- /dev/null +++ b/templates/libraries/retrofit2/formParams.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{^isFile}}{{#isMultipart}}@retrofit2.http.Part{{/isMultipart}}{{^isMultipart}}@retrofit2.http.Field{{/isMultipart}}("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#isMultipart}}@retrofit2.http.Part{{/isMultipart}}{{^isMultipart}}@retrofit2.http.Field("{{baseName}}"){{/isMultipart}} MultipartBody.Part {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/formParams.mustache.save b/templates/libraries/retrofit2/formParams.mustache.save new file mode 100644 index 00000000..a3a3c16f --- /dev/null +++ b/templates/libraries/retrofit2/formParams.mustache.save @@ -0,0 +1 @@ +{{#isFormParam}}{{^isFile}}{{#isMultipart}}retrofit.http@retrofit2.http.Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}} okhttp3.MultipartBody.Part {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/headerParams.mustache b/templates/libraries/retrofit2/headerParams.mustache new file mode 100644 index 00000000..c7748f3b --- /dev/null +++ b/templates/libraries/retrofit2/headerParams.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}@retrofit2.http.Header("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/pathParams.mustache b/templates/libraries/retrofit2/pathParams.mustache new file mode 100644 index 00000000..8fe7c380 --- /dev/null +++ b/templates/libraries/retrofit2/pathParams.mustache @@ -0,0 +1 @@ +{{#isPathParam}}@retrofit2.http.Path("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/templates/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache b/templates/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..35d4f6d3 --- /dev/null +++ b/templates/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache @@ -0,0 +1,70 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; + +import java.util.Map; +import java.util.List; + +/** + * Holds ApiKey auth info + */ +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/templates/libraries/retrofit2/play24/ApiClient.mustache b/templates/libraries/retrofit2/play24/ApiClient.mustache new file mode 100644 index 00000000..9d64c334 --- /dev/null +++ b/templates/libraries/retrofit2/play24/ApiClient.mustache @@ -0,0 +1,148 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.*; + +import retrofit2.Retrofit; +import retrofit2.converter.scalars.ScalarsConverterFactory; +import retrofit2.converter.jackson.JacksonConverterFactory; +import com.fasterxml.jackson.databind.ObjectMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + +import play.libs.Json; +import play.libs.ws.WSClient; + +import {{invokerPackage}}.Play24CallAdapterFactory; +import {{invokerPackage}}.Play24CallFactory; + +import okhttp3.Interceptor; +import {{invokerPackage}}.auth.ApiKeyAuth; +import {{invokerPackage}}.auth.Authentication; + +/** + * API client + */ +public class ApiClient { + + /** Underlying HTTP-client */ + protected WSClient wsClient; + + /** Supported auths */ + protected Map authentications; + + /** API base path */ + protected String basePath = "{{{basePath}}}"; + + public ApiClient(WSClient wsClient) { + this(); + this.wsClient = wsClient; + } + + public ApiClient() { + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + // authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + } + + /** + * Creates a retrofit2 client for given API interface + */ + public S createService(Class serviceClass) { + if(!basePath.endsWith("/")) { + basePath = basePath + "/"; + } + + Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); + List extraQueryParams = new ArrayList<>(); + + for (String authName : authentications.keySet()) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); + } + + ObjectMapper mapper = Json.mapper(); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + + return new Retrofit.Builder() + .baseUrl(basePath) + .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(JacksonConverterFactory.create(mapper)) + .callFactory(new Play24CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) + .addCallAdapterFactory(new Play24CallAdapterFactory()) + .build() + .create(serviceClass); + } + + /** + * Helper method to set API base path + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set API key value for the first API key authentication. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + +} diff --git a/templates/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache b/templates/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache new file mode 100644 index 00000000..d6411f26 --- /dev/null +++ b/templates/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache @@ -0,0 +1,102 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import play.libs.F; +import retrofit2.*; + +import java.lang.annotation.Annotation; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.WildcardType; + +/** + * Creates {@link CallAdapter} instances that convert {@link Call} into {@link play.libs.F.Promise} + */ +public class Play24CallAdapterFactory extends CallAdapter.Factory { + + @Override + public CallAdapter get(Type returnType, Annotation[] annotations, Retrofit retrofit) { + if (!(returnType instanceof ParameterizedType)) { + return null; + } + + ParameterizedType type = (ParameterizedType) returnType; + if (type.getRawType() != F.Promise.class) { + return null; + } + + return createAdapter((ParameterizedType) returnType); + } + + private CallAdapter> createAdapter(ParameterizedType returnType) { + Type[] types = returnType.getActualTypeArguments(); + if (types.length != 1) { + throw new IllegalStateException("Must be exactly one type parameter"); + } + + Type resultType = types[0]; + Class rawTypeParam = getRawType(resultType); + + boolean includeResponse = false; + if (rawTypeParam == Response.class) { + if (!(resultType instanceof ParameterizedType)) { + throw new IllegalStateException("Response must be parameterized" + + " as Response"); + } + resultType = ((ParameterizedType) resultType).getActualTypeArguments()[0]; + includeResponse = true; + } + + return new ValueAdapter(resultType, includeResponse); + } + + /** + * Adapter that coverts values returned by API interface into CompletionStage + */ + private static final class ValueAdapter implements CallAdapter> { + + private final Type responseType; + private final boolean includeResponse; + + ValueAdapter(Type responseType, boolean includeResponse) { + this.responseType = responseType; + this.includeResponse = includeResponse; + } + + @Override + public Type responseType() { + return responseType; + } + + @Override + public F.Promise adapt(final Call call) { + final F.RedeemablePromise promise = F.RedeemablePromise.empty(); + + call.enqueue(new Callback() { + + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful()) { + if (includeResponse) { + promise.success((R) response); + } else { + promise.success(response.body()); + } + } else { + promise.failure(new HttpException(response)); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + promise.failure(t); + } + + }); + + return promise; + } + } + +} diff --git a/templates/libraries/retrofit2/play24/Play24CallFactory.mustache b/templates/libraries/retrofit2/play24/Play24CallFactory.mustache new file mode 100644 index 00000000..2808f262 --- /dev/null +++ b/templates/libraries/retrofit2/play24/Play24CallFactory.mustache @@ -0,0 +1,256 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.*; +import okio.AsyncTimeout; +import okio.Buffer; +import okio.BufferedSource; +import okio.Timeout; +import play.libs.F; +import play.libs.ws.WSClient; +import play.libs.ws.WSRequest; +import play.libs.ws.WSResponse; +import play.libs.ws.WSCookie; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Creates {@link Call} instances that invoke underlying {@link WSClient} + */ +public class Play24CallFactory implements okhttp3.Call.Factory { + + /** PlayWS http client */ + private final WSClient wsClient; + + /** Extra headers to add to request */ + private Map extraHeaders = new HashMap<>(); + + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + + /** Extra query parameters to add to request */ + private List extraQueryParams = new ArrayList<>(); + + public Play24CallFactory(WSClient wsClient) { + this.wsClient = wsClient; + } + + public Play24CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, + List extraQueryParams) { + this.wsClient = wsClient; + + this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); + this.extraQueryParams.addAll(extraQueryParams); + } + + @Override + public Call newCall(Request request) { + // add extra headers + Request.Builder rb = request.newBuilder(); + for (Map.Entry header : this.extraHeaders.entrySet()) { + rb.addHeader(header.getKey(), header.getValue()); + } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } + + // add extra query params + if (!this.extraQueryParams.isEmpty()) { + String newQuery = request.url().uri().getQuery(); + for (Pair queryParam : this.extraQueryParams) { + String param = String.format("%s=%s", queryParam.getName(), queryParam.getValue()); + if (newQuery == null) { + newQuery = param; + } else { + newQuery += "&" + param; + } + } + + URI newUri; + try { + newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(), + request.url().uri().getPath(), newQuery, request.url().uri().getFragment()); + rb.url(newUri.toURL()); + } catch (MalformedURLException | URISyntaxException e) { + throw new RuntimeException("Error while updating an url", e); + } + } + + return new PlayWSCall(wsClient, rb.build()); + } + + /** + * Call implementation that delegates to Play WS Client + */ + static class PlayWSCall implements Call { + + private final WSClient wsClient; + private WSRequest wsRequest; + + private final Request request; + private final AsyncTimeout timeout; + + public PlayWSCall(WSClient wsClient, Request request) { + this.wsClient = wsClient; + this.request = request; + this.timeout = new AsyncTimeout(); + } + + @Override + public Request request() { + return request; + } + + @Override + public Timeout timeout() { + return timeout; + } + + @Override + public void enqueue(final okhttp3.Callback responseCallback) { + final Call call = this; + final F.Promise promise = executeAsync(); + + promise.onRedeem(new F.Callback() { + + @Override + public void invoke(WSResponse wsResponse) throws Throwable { + responseCallback.onResponse(call, PlayWSCall.this.toWSResponse(wsResponse)); + } + + }); + + promise.onFailure(new F.Callback() { + + @Override + public void invoke(Throwable throwable) throws Throwable { + if (throwable instanceof IOException) { + responseCallback.onFailure(call, (IOException) throwable); + } else { + responseCallback.onFailure(call, new IOException(throwable)); + } + } + + }); + + } + + F.Promise executeAsync() { + try { + wsRequest = wsClient.url(request.url().uri().toString()); + addHeaders(wsRequest); + addCookies(wsRequest); + if (request.body() != null) { + addBody(wsRequest); + } + + return wsRequest.execute(request.method()); + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } + + private void addHeaders(WSRequest wsRequest) { + for(Map.Entry> entry : request.headers().toMultimap().entrySet()) { + List values = entry.getValue(); + for (String value : values) { + wsRequest.setHeader(entry.getKey(), value); + } + } + } + + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + + private void addBody(WSRequest wsRequest) throws IOException { + Buffer buffer = new Buffer(); + request.body().writeTo(buffer); + wsRequest.setBody(buffer.inputStream()); + wsRequest.setContentType(request.body().contentType().toString()); + } + + private Response toWSResponse(final WSResponse r) { + final Response.Builder builder = new Response.Builder(); + builder.request(request) + .code(r.getStatus()) + .body(new ResponseBody() { + + @Override + public MediaType contentType() { + return Optional.ofNullable(r.getHeader("Content-Type")) + .map(MediaType::parse) + .orElse(null); + } + + @Override + public long contentLength() { + return r.asByteArray().length; + } + + @Override + public BufferedSource source() { + return new Buffer().write(r.asByteArray()); + } + + }); + + for (Map.Entry> entry : r.getAllHeaders().entrySet()) { + for (String value : entry.getValue()) { + builder.addHeader(entry.getKey(), value); + } + } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } + + builder.protocol(Protocol.HTTP_1_1); + return builder.build(); + } + + @Override + public Response execute() throws IOException { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public void cancel() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public PlayWSCall clone() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public boolean isExecuted() { + return false; + } + + @Override + public boolean isCanceled() { + return false; + } + } +} diff --git a/templates/libraries/retrofit2/play24/api.mustache b/templates/libraries/retrofit2/play24/api.mustache new file mode 100644 index 00000000..f793699b --- /dev/null +++ b/templates/libraries/retrofit2/play24/api.mustache @@ -0,0 +1,63 @@ +package {{package}}; + +import {{invokerPackage}}.CollectionFormats.*; + +{{#useRxJava}}import rx.Observable;{{/useRxJava}} +{{#useRxJava2}}import io.reactivex.Observable;{{/useRxJava2}} +{{#doNotUseRx}}import retrofit2.Call;{{/doNotUseRx}} +import retrofit2.http.*; + +import okhttp3.RequestBody; +import okhttp3.ResponseBody; +import okhttp3.MultipartBody; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import play.libs.F; +import retrofit2.Response; + +{{#operations}} +public interface {{classname}} { + {{#operation}} + /** + * {{summary}} + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} +{{/allParams}} + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{#formParams}} + {{#-first}} + {{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}} + {{/-first}} + {{/formParams}} + {{^formParams}} + {{#prioritizedContentTypes}} + {{#-first}} + @Headers({ + "Content-Type:{{{mediaType}}}" + }) + {{/-first}} + {{/prioritizedContentTypes}} + {{/formParams}} + @{{httpMethod}}("{{{path}}}") + F.Promise> {{operationId}}({{^allParams}});{{/allParams}} + {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} + );{{/-last}}{{/allParams}} + + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/retrofit2/play25/ApiClient.mustache b/templates/libraries/retrofit2/play25/ApiClient.mustache new file mode 100644 index 00000000..3125404b --- /dev/null +++ b/templates/libraries/retrofit2/play25/ApiClient.mustache @@ -0,0 +1,147 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.*; + +import retrofit2.Retrofit; +import retrofit2.converter.scalars.ScalarsConverterFactory; +import retrofit2.converter.jackson.JacksonConverterFactory; +import com.fasterxml.jackson.databind.ObjectMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + +import play.libs.Json; +import play.libs.ws.WSClient; + +import {{invokerPackage}}.Play25CallAdapterFactory; +import {{invokerPackage}}.Play25CallFactory; + +import okhttp3.Interceptor; +import {{invokerPackage}}.auth.ApiKeyAuth; +import {{invokerPackage}}.auth.Authentication; + +/** + * API client + */ +public class ApiClient { + + /** Underlying HTTP-client */ + protected WSClient wsClient; + + /** Supported auths */ + protected Map authentications; + + /** API base path */ + protected String basePath = "{{{basePath}}}"; + + public ApiClient(WSClient wsClient) { + this(); + this.wsClient = wsClient; + } + + public ApiClient() { + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>();{{#authMethods}}{{#isBasicBasic}} + // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"query"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + } + + /** + * Creates a retrofit2 client for given API interface + */ + public S createService(Class serviceClass) { + if(!basePath.endsWith("/")) { + basePath = basePath + "/"; + } + + Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); + List extraQueryParams = new ArrayList<>(); + + for (String authName : authentications.keySet()) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); + } + + ObjectMapper mapper = Json.mapper(); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + + return new Retrofit.Builder() + .baseUrl(basePath) + .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(JacksonConverterFactory.create(mapper)) + .callFactory(new Play25CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) + .addCallAdapterFactory(new Play25CallAdapterFactory()) + .build() + .create(serviceClass); + } + + /** + * Helper method to set API base path + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set API key value for the first API key authentication. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + +} diff --git a/templates/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache b/templates/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache new file mode 100644 index 00000000..b431690f --- /dev/null +++ b/templates/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache @@ -0,0 +1,118 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.concurrent.CompletionStage; +import retrofit2.*; + +import java.lang.annotation.Annotation; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.WildcardType; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; +import java.util.function.Function; + +/** + * Creates {@link CallAdapter} instances that convert {@link Call} into {@link java.util.concurrent.CompletionStage} + */ +public class Play25CallAdapterFactory extends CallAdapter.Factory { + + private Function exceptionConverter = Function.identity(); + + public Play25CallAdapterFactory() { + } + + public Play25CallAdapterFactory( + Function exceptionConverter) { + this.exceptionConverter = exceptionConverter; + } + + @Override + public CallAdapter get(Type returnType, Annotation[] annotations, Retrofit retrofit) { + if (!(returnType instanceof ParameterizedType)) { + return null; + } + + ParameterizedType type = (ParameterizedType) returnType; + if (type.getRawType() != CompletionStage.class) { + return null; + } + + return createAdapter((ParameterizedType) returnType); + } + + private CallAdapter> createAdapter(ParameterizedType returnType) { + // Get CompletionStage type argument + Type[] types = returnType.getActualTypeArguments(); + if (types.length != 1) { + throw new IllegalStateException("Must be exactly one type parameter"); + } + + Type resultType = types[0]; + Class rawTypeParam = getRawType(resultType); + + boolean includeResponse = false; + if (rawTypeParam == Response.class) { + if (!(resultType instanceof ParameterizedType)) { + throw new IllegalStateException("Response must be parameterized" + + " as Response"); + } + resultType = ((ParameterizedType) resultType).getActualTypeArguments()[0]; + includeResponse = true; + } + + return new ValueAdapter(resultType, includeResponse, exceptionConverter); + } + + /** + * Adapter that coverts values returned by API interface into CompletionStage + */ + private static final class ValueAdapter implements CallAdapter> { + + private final Type responseType; + private final boolean includeResponse; + private Function exceptionConverter; + + ValueAdapter(Type responseType, boolean includeResponse, + Function exceptionConverter) { + this.responseType = responseType; + this.includeResponse = includeResponse; + this.exceptionConverter = exceptionConverter; + } + + @Override + public Type responseType() { + return responseType; + } + + @Override + public CompletionStage adapt(final Call call) { + final CompletableFuture promise = new CompletableFuture(); + + call.enqueue(new Callback() { + + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful()) { + if (includeResponse) { + promise.complete((R) response); + } else { + promise.complete(response.body()); + } + } else { + promise.completeExceptionally(exceptionConverter.apply(new HttpException(response))); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + promise.completeExceptionally(t); + } + + }); + + return promise; + } + } +} diff --git a/templates/libraries/retrofit2/play25/Play25CallFactory.mustache b/templates/libraries/retrofit2/play25/Play25CallFactory.mustache new file mode 100644 index 00000000..d7d27d2f --- /dev/null +++ b/templates/libraries/retrofit2/play25/Play25CallFactory.mustache @@ -0,0 +1,266 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.*; +import okio.AsyncTimeout; +import okio.Buffer; +import okio.BufferedSource; +import okio.Timeout; +import play.libs.ws.WSClient; +import play.libs.ws.WSRequest; +import play.libs.ws.WSResponse; +import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletionStage; + +/** + * Creates {@link Call} instances that invoke underlying {@link WSClient} + */ +public class Play25CallFactory implements okhttp3.Call.Factory { + + /** PlayWS http client */ + private final WSClient wsClient; + + /** Extra headers to add to request */ + private Map extraHeaders = new HashMap<>(); + + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + + /** Extra query parameters to add to request */ + private List extraQueryParams = new ArrayList<>(); + + /** Filters (interceptors) */ + private List filters = new ArrayList<>(); + + public Play25CallFactory(WSClient wsClient) { + this.wsClient = wsClient; + } + + public Play25CallFactory(WSClient wsClient, List filters) { + this.wsClient = wsClient; + this.filters.addAll(filters); + } + + public Play25CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, + List extraQueryParams) { + this.wsClient = wsClient; + + this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); + this.extraQueryParams.addAll(extraQueryParams); + } + + @Override + public Call newCall(Request request) { + // add extra headers + Request.Builder rb = request.newBuilder(); + for (Map.Entry header : this.extraHeaders.entrySet()) { + rb.addHeader(header.getKey(), header.getValue()); + } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } + + // add extra query params + if (!this.extraQueryParams.isEmpty()) { + String newQuery = request.url().uri().getQuery(); + for (Pair queryParam : this.extraQueryParams) { + String param = String.format("%s=%s", queryParam.getName(), queryParam.getValue()); + if (newQuery == null) { + newQuery = param; + } else { + newQuery += "&" + param; + } + } + + URI newUri; + try { + newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(), + request.url().uri().getPath(), newQuery, request.url().uri().getFragment()); + rb.url(newUri.toURL()); + } catch (MalformedURLException | URISyntaxException e) { + throw new RuntimeException("Error while updating an url", e); + } + } + + return new PlayWSCall(wsClient, this.filters, rb.build()); + } + + /** + * Call implementation that delegates to Play WS Client + */ + static class PlayWSCall implements Call { + + private final WSClient wsClient; + private WSRequest wsRequest; + private List filters; + + private final Request request; + private final AsyncTimeout timeout; + + public PlayWSCall(WSClient wsClient, List filters, Request request) { + this.wsClient = wsClient; + this.request = request; + this.filters = filters; + this.timeout = new AsyncTimeout(); + } + + @Override + public Request request() { + return request; + } + + @Override + public Timeout timeout() { + return timeout; + } + + @Override + public void enqueue(final okhttp3.Callback responseCallback) { + final Call call = this; + final CompletionStage promise = executeAsync(); + + promise.whenCompleteAsync((v, t) -> { + if (t != null) { + if (t instanceof IOException) { + responseCallback.onFailure(call, (IOException) t); + } else { + responseCallback.onFailure(call, new IOException(t)); + } + } else { + try { + responseCallback.onResponse(call, PlayWSCall.this.toWSResponse(v)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + }, play.libs.concurrent.HttpExecution.defaultContext()); + } + + CompletionStage executeAsync() { + try { + wsRequest = wsClient.url(request.url().uri().toString()); + addHeaders(wsRequest); + addCookies(wsRequest); + if (request.body() != null) { + addBody(wsRequest); + } + filters.stream().forEach(f -> wsRequest.withRequestFilter(f)); + + return wsRequest.execute(request.method()); + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } + + private void addHeaders(WSRequest wsRequest) { + for(Map.Entry> entry : request.headers().toMultimap().entrySet()) { + List values = entry.getValue(); + for (String value : values) { + wsRequest.setHeader(entry.getKey(), value); + } + } + } + + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + + private void addBody(WSRequest wsRequest) throws IOException { + Buffer buffer = new Buffer(); + request.body().writeTo(buffer); + wsRequest.setBody(buffer.inputStream()); + + MediaType mediaType = request.body().contentType(); + if (mediaType != null) { + wsRequest.setContentType(mediaType.toString()); + } + } + + private Response toWSResponse(final WSResponse r) { + final Response.Builder builder = new Response.Builder(); + builder.request(request) + .code(r.getStatus()) + .body(new ResponseBody() { + + @Override + public MediaType contentType() { + return Optional.ofNullable(r.getHeader("Content-Type")) + .map(MediaType::parse) + .orElse(null); + } + + @Override + public long contentLength() { + return r.asByteArray().length; + } + + @Override + public BufferedSource source() { + return new Buffer().write(r.asByteArray()); + } + + }); + + for (Map.Entry> entry : r.getAllHeaders().entrySet()) { + for (String value : entry.getValue()) { + builder.addHeader(entry.getKey(), value); + } + } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } + + + builder.protocol(Protocol.HTTP_1_1); + return builder.build(); + } + + @Override + public Response execute() throws IOException { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public void cancel() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public PlayWSCall clone() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public boolean isExecuted() { + return false; + } + + @Override + public boolean isCanceled() { + return false; + } + } +} diff --git a/templates/libraries/retrofit2/play25/api.mustache b/templates/libraries/retrofit2/play25/api.mustache new file mode 100644 index 00000000..de6a6f6d --- /dev/null +++ b/templates/libraries/retrofit2/play25/api.mustache @@ -0,0 +1,63 @@ +package {{package}}; + +import {{invokerPackage}}.CollectionFormats.*; + +{{#useRxJava}}import rx.Observable;{{/useRxJava}} +{{#useRxJava2}}import io.reactivex.Observable;{{/useRxJava2}} +{{#doNotUseRx}}import retrofit2.Call;{{/doNotUseRx}} +import retrofit2.http.*; + +import okhttp3.RequestBody; +import okhttp3.ResponseBody; +import okhttp3.MultipartBody; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.util.concurrent.*; +import retrofit2.Response; + +{{#operations}} +public interface {{classname}} { + {{#operation}} + /** + * {{summary}} + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} +{{/allParams}} + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{#formParams}} + {{#-first}} + {{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}} + {{/-first}} + {{/formParams}} + {{^formParams}} + {{#prioritizedContentTypes}} + {{#-first}} + @Headers({ + "Content-Type:{{{mediaType}}}" + }) + {{/-first}} + {{/prioritizedContentTypes}} + {{/formParams}} + @{{httpMethod}}("{{{path}}}") + CompletionStage> {{operationId}}({{^allParams}});{{/allParams}} + {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} + );{{/-last}}{{/allParams}} + + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/retrofit2/play26/ApiClient.mustache b/templates/libraries/retrofit2/play26/ApiClient.mustache new file mode 100644 index 00000000..4365b2aa --- /dev/null +++ b/templates/libraries/retrofit2/play26/ApiClient.mustache @@ -0,0 +1,216 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.io.File; +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; + +import com.fasterxml.jackson.databind.ObjectMapper; +import retrofit2.Converter; +import retrofit2.Retrofit; +import retrofit2.converter.scalars.ScalarsConverterFactory; +import retrofit2.converter.jackson.JacksonConverterFactory; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} + +import play.libs.Json; +import play.libs.ws.WSClient; + +import {{invokerPackage}}.Play26CallAdapterFactory; +import {{invokerPackage}}.Play26CallFactory; + +import okhttp3.Interceptor; +import okhttp3.ResponseBody; +import {{invokerPackage}}.auth.ApiKeyAuth; +import {{invokerPackage}}.auth.Authentication; + +/** + * API client + */ +public class ApiClient { + + /** Underlying HTTP-client */ + protected WSClient wsClient; + + /** Creates HTTP call instances */ + protected Play26CallFactory callFactory; + + /** Create {@link java.util.concurrent.CompletionStage} instances from HTTP calls */ + protected Play26CallAdapterFactory callAdapterFactory; + + /** Supported auths */ + protected Map authentications; + + /** API base path */ + protected String basePath = "{{{basePath}}}"; + + /** Default ObjectMapper */ + protected ObjectMapper defaultMapper; + + public ApiClient(WSClient wsClient) { + this(); + this.wsClient = wsClient; + } + + public ApiClient() { + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>();{{#authMethods}}{{#isBasicBasic}} + // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Creates a retrofit2 client for given API interface + */ + public S createService(Class serviceClass) { + if(!basePath.endsWith("/")) { + basePath = basePath + "/"; + } + + Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); + List extraQueryParams = new ArrayList<>(); + + for (String authName : authentications.keySet()) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); + } + + if (callFactory == null) { + callFactory = new Play26CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams); + } + if (callAdapterFactory == null) { + callAdapterFactory = new Play26CallAdapterFactory(); + } + if (defaultMapper == null) { + defaultMapper = Json.mapper(); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + defaultMapper.registerModule(jnm); + {{/openApiNullable}} + } + + return new Retrofit.Builder() + .baseUrl(basePath) + .addConverterFactory(new FileConverter()) + .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(JacksonConverterFactory.create(defaultMapper)) + .callFactory(callFactory) + .addCallAdapterFactory(callAdapterFactory) + .build() + .create(serviceClass); + } + + /** + * Helper method to set API base path + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set API key value for the first API key authentication. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set HTTP call instances factory + */ + public ApiClient setCallFactory(Play26CallFactory callFactory) { + this.callFactory = callFactory; + return this; + } + + /** + * Helper method to set {@link java.util.concurrent.CompletionStage} instances factory + */ + public ApiClient setCallAdapterFactory(Play26CallAdapterFactory callAdapterFactory) { + this.callAdapterFactory = callAdapterFactory; + return this; + } + + /** + * Helper method to set Jackson's {@link ObjectMapper} + */ + public ApiClient setObjectMapper(ObjectMapper mapper) { + this.defaultMapper = mapper; + return this; + } + + static class FileConverter extends Converter.Factory { + + @Override + public Converter responseBodyConverter(Type type, + Annotation[] annotations, Retrofit retrofit) { + + if (!File.class.getTypeName().equals(type.getTypeName())) { + return null; + } + + return new Converter() { + + @Override + public File convert(ResponseBody value) throws IOException { + + Path path = Files.createTempFile("retrofit-file", ".tmp"); + Files.write(path, value.bytes()); + return path.toFile(); + } + }; + } + } + +} diff --git a/templates/libraries/retrofit2/play26/Play26CallAdapterFactory.mustache b/templates/libraries/retrofit2/play26/Play26CallAdapterFactory.mustache new file mode 100644 index 00000000..2b7739fe --- /dev/null +++ b/templates/libraries/retrofit2/play26/Play26CallAdapterFactory.mustache @@ -0,0 +1,118 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.concurrent.CompletionStage; +import retrofit2.*; + +import java.lang.annotation.Annotation; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.WildcardType; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; +import java.util.function.Function; + +/** + * Creates {@link CallAdapter} instances that convert {@link Call} into {@link java.util.concurrent.CompletionStage} + */ +public class Play26CallAdapterFactory extends CallAdapter.Factory { + + private Function exceptionConverter = Function.identity(); + + public Play26CallAdapterFactory() { + } + + public Play26CallAdapterFactory( + Function exceptionConverter) { + this.exceptionConverter = exceptionConverter; + } + + @Override + public CallAdapter get(Type returnType, Annotation[] annotations, Retrofit retrofit) { + if (!(returnType instanceof ParameterizedType)) { + return null; + } + + ParameterizedType type = (ParameterizedType) returnType; + if (type.getRawType() != CompletionStage.class) { + return null; + } + + return createAdapter((ParameterizedType) returnType); + } + + private CallAdapter> createAdapter(ParameterizedType returnType) { + // Get CompletionStage type argument + Type[] types = returnType.getActualTypeArguments(); + if (types.length != 1) { + throw new IllegalStateException("Must be exactly one type parameter"); + } + + Type resultType = types[0]; + Class rawTypeParam = getRawType(resultType); + + boolean includeResponse = false; + if (rawTypeParam == Response.class) { + if (!(resultType instanceof ParameterizedType)) { + throw new IllegalStateException("Response must be parameterized" + + " as Response"); + } + resultType = ((ParameterizedType) resultType).getActualTypeArguments()[0]; + includeResponse = true; + } + + return new ValueAdapter(resultType, includeResponse, exceptionConverter); + } + + /** + * Adapter that coverts values returned by API interface into CompletionStage + */ + private static final class ValueAdapter implements CallAdapter> { + + private final Type responseType; + private final boolean includeResponse; + private Function exceptionConverter; + + ValueAdapter(Type responseType, boolean includeResponse, + Function exceptionConverter) { + this.responseType = responseType; + this.includeResponse = includeResponse; + this.exceptionConverter = exceptionConverter; + } + + @Override + public Type responseType() { + return responseType; + } + + @Override + public CompletionStage adapt(final Call call) { + final CompletableFuture promise = new CompletableFuture(); + + call.enqueue(new Callback() { + + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful()) { + if (includeResponse) { + promise.complete((R) response); + } else { + promise.complete(response.body()); + } + } else { + promise.completeExceptionally(exceptionConverter.apply(new HttpException(response))); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + promise.completeExceptionally(t); + } + + }); + + return promise; + } + } +} diff --git a/templates/libraries/retrofit2/play26/Play26CallFactory.mustache b/templates/libraries/retrofit2/play26/Play26CallFactory.mustache new file mode 100644 index 00000000..c309dee9 --- /dev/null +++ b/templates/libraries/retrofit2/play26/Play26CallFactory.mustache @@ -0,0 +1,296 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import okhttp3.*; +import okio.AsyncTimeout; +import okio.Buffer; +import okio.BufferedSource; +import okio.Timeout; +import play.libs.ws.WSClient; +import play.libs.ws.WSRequest; +import play.libs.ws.WSResponse; +import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; +import play.libs.ws.WSCookieBuilder; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.Executor; + +/** + * Creates {@link Call} instances that invoke underlying {@link WSClient} + */ +public class Play26CallFactory implements okhttp3.Call.Factory { + + /** PlayWS http client */ + private final WSClient wsClient; + + /** Extra headers to add to request */ + private Map extraHeaders = new HashMap<>(); + + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + + /** Extra query parameters to add to request */ + private List extraQueryParams = new ArrayList<>(); + + /** Filters (interceptors) */ + private List filters = new ArrayList<>(); + + /** Executor for WSClient */ + private Executor executor; + + public Play26CallFactory(WSClient wsClient) { + this.wsClient = wsClient; + } + + public Play26CallFactory(WSClient wsClient, List filters) { + this.wsClient = wsClient; + this.filters.addAll(filters); + } + + public Play26CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, + List extraQueryParams) { + this.wsClient = wsClient; + + this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); + this.extraQueryParams.addAll(extraQueryParams); + } + + public Play26CallFactory withExecutor(Executor executor) { + this.executor = executor; + return this; + } + + @Override + public Call newCall(Request request) { + // add extra headers + Request.Builder rb = request.newBuilder(); + for (Map.Entry header : this.extraHeaders.entrySet()) { + rb.addHeader(header.getKey(), header.getValue()); + } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } + + // add extra query params + if (!this.extraQueryParams.isEmpty()) { + String newQuery = request.url().uri().getQuery(); + for (Pair queryParam : this.extraQueryParams) { + String param = String.format("%s=%s", queryParam.getName(), queryParam.getValue()); + if (newQuery == null) { + newQuery = param; + } else { + newQuery += "&" + param; + } + } + + URI newUri; + try { + newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(), + request.url().uri().getPath(), newQuery, request.url().uri().getFragment()); + rb.url(newUri.toURL()); + } catch (MalformedURLException | URISyntaxException e) { + throw new RuntimeException("Error while updating an url", e); + } + } + + return new PlayWSCall(wsClient, this.executor, this.filters, rb.build()); + } + + /** + * Call implementation that delegates to Play WS Client + */ + static class PlayWSCall implements Call { + + private final WSClient wsClient; + private WSRequest wsRequest; + private List filters; + private Executor executor = java.util.concurrent.ForkJoinPool.commonPool(); + + private final Request request; + private final AsyncTimeout timeout; + + public PlayWSCall(WSClient wsClient, Executor executor, List filters, Request request) { + this.wsClient = wsClient; + this.request = request; + this.filters = filters; + this.timeout = new AsyncTimeout(); + + if (executor != null) { + this.executor = executor; + } + } + + @Override + public Request request() { + return request; + } + + @Override + public Timeout timeout() { + return timeout; + } + + @Override + public void enqueue(final okhttp3.Callback responseCallback) { + final Call call = this; + final CompletionStage promise = executeAsync(); + + promise.whenCompleteAsync((v, t) -> { + if (t != null) { + if (t instanceof IOException) { + responseCallback.onFailure(call, (IOException) t); + } else { + responseCallback.onFailure(call, new IOException(t)); + } + } else { + try { + responseCallback.onResponse(call, PlayWSCall.this.toWSResponse(v)); + } catch (Exception e) { + responseCallback.onFailure(call, new IOException(e)); + } + } + }, this.executor); + } + + CompletionStage executeAsync() { + try { + HttpUrl url = request.url(); + wsRequest = wsClient.url(url.scheme()+ "://" + url.host() + ":" + url.port() + url.encodedPath()); + url.queryParameterNames().forEach(queryParam -> { + wsRequest.addQueryParameter(queryParam, url.queryParameter(queryParam)); + }); + addHeaders(wsRequest); + addCookies(wsRequest); + if (request.body() != null) { + addBody(wsRequest); + } + filters.stream().forEach(f -> wsRequest.setRequestFilter(f)); + + return wsRequest.execute(request.method()); + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } + + private void addHeaders(WSRequest wsRequest) { + for(Map.Entry> entry : request.headers().toMultimap().entrySet()) { + List values = entry.getValue(); + for (String value : values) { + wsRequest.setHeader(entry.getKey(), value); + } + } + } + + private void addCookies(WSRequest wsRequest) { + for (final WSCookie cookie : getCookies()) { + wsRequest.addCookie(cookie); + } + } + + List getCookies() { + final List cookies = new ArrayList<>(); + for (final String cookieString : request.headers("Cookie")) { + for (String cookie : cookieString.split(";")) { + cookie = cookie.trim(); + final String[] nameAndValue = cookie.split("="); + if (nameAndValue.length != 2) { + continue; + } + cookies.add( + new WSCookieBuilder() + .setName(nameAndValue[0]) + .setValue(nameAndValue[1]) + .build() + ); + } + } + return cookies; + } + + private void addBody(WSRequest wsRequest) throws IOException { + MediaType mediaType = request.body().contentType(); + if (mediaType != null) { + wsRequest.setContentType(mediaType.toString()); + } + + Buffer buffer = new Buffer(); + request.body().writeTo(buffer); + wsRequest.setBody(buffer.inputStream()); + } + + private Response toWSResponse(final WSResponse r) { + final Response.Builder builder = new Response.Builder(); + builder.request(request) + .code(r.getStatus()) + .body(new ResponseBody() { + + @Override + public MediaType contentType() { + return r.getSingleHeader("Content-Type") + .map(MediaType::parse) + .orElse(null); + } + + @Override + public long contentLength() { + return r.asByteArray().length; + } + + @Override + public BufferedSource source() { + return new Buffer().write(r.asByteArray()); + } + }); + + for (Map.Entry> entry : r.getAllHeaders().entrySet()) { + for (String value : entry.getValue()) { + builder.addHeader(entry.getKey(), value); + } + } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } + + builder.message(r.getStatusText()); + builder.protocol(Protocol.HTTP_1_1); + return builder.build(); + } + + @Override + public Response execute() throws IOException { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public void cancel() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public PlayWSCall clone() { + throw new UnsupportedOperationException("Not supported"); + } + + @Override + public boolean isExecuted() { + return false; + } + + @Override + public boolean isCanceled() { + return false; + } + } +} diff --git a/templates/libraries/retrofit2/play26/api.mustache b/templates/libraries/retrofit2/play26/api.mustache new file mode 100644 index 00000000..7f7b9e2b --- /dev/null +++ b/templates/libraries/retrofit2/play26/api.mustache @@ -0,0 +1,71 @@ +package {{package}}; + +import {{invokerPackage}}.CollectionFormats.*; + +{{#useRxJava2}} +import io.reactivex.Observable; +{{/useRxJava2}} +{{#doNotUseRx}} +import retrofit2.Call; +{{/doNotUseRx}} +import retrofit2.http.*; + +import okhttp3.RequestBody; +import okhttp3.ResponseBody; +import okhttp3.MultipartBody; + +{{#imports}}import {{import}}; +{{/imports}} + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.util.concurrent.*; +import retrofit2.Response; + +{{#operations}} +public interface {{classname}} { + {{#operation}} + /** + * {{summary}} + * {{notes}} +{{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} +{{/allParams}} + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + {{#formParams}} + {{#-first}} + {{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}} + {{/-first}} + {{/formParams}} + {{^formParams}} + {{#prioritizedContentTypes}} + {{#-first}} + @Headers({ + "Content-Type:{{{mediaType}}}" + }) + {{/-first}} + {{/prioritizedContentTypes}} + {{/formParams}} + @{{httpMethod}}("{{{path}}}") + CompletionStage> {{operationId}}({{^allParams}});{{/allParams}} + {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} + );{{/-last}}{{/allParams}} + + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/retrofit2/pom.mustache b/templates/libraries/retrofit2/pom.mustache new file mode 100644 index 00000000..7f5d6b89 --- /dev/null +++ b/templates/libraries/retrofit2/pom.mustache @@ -0,0 +1,417 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + {{#gson}} + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + {{/gson}} + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + org.apache.oltu.oauth2 + common + + + + {{#gson}} + + io.gsonfire + gson-fire + ${gson-fire-version} + + {{/gson}} + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#useRxJava2}} + + io.reactivex.rxjava2 + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava2 + ${retrofit-version} + + {{/useRxJava2}} + {{#useRxJava3}} + + io.reactivex.rxjava3 + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava3 + ${retrofit-version} + + {{/useRxJava3}} + {{#jackson}} + + + com.squareup.retrofit2 + converter-jackson + ${retrofit-version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#withXml}} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + {{/withXml}} + {{#useBeanValidation}} + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + {{/useBeanValidation}} + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + + {{/jackson}} + {{#usePlayWS}} + + com.typesafe.play + play-ahc-ws_2.12 + ${play-version} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + {{/usePlayWS}} + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + 1.8 + ${java.version} + ${java.version} + {{#gson}} + 1.9.0 + {{/gson}} + 1.6.3 + {{#jackson}} + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + 2.1.1 + {{/jackson}} + {{#usePlayWS}} + 2.6.7 + {{/usePlayWS}} + 2.11.0 + {{#useRxJava2}} + 2.1.1 + {{/useRxJava2}} + {{#useRxJava3}} + 3.0.4 + {{/useRxJava3}} + {{#joda}} + 2.9.9 + {{/joda}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + 1.0.1 + 5.10.3 + + diff --git a/templates/libraries/retrofit2/queryParams.mustache b/templates/libraries/retrofit2/queryParams.mustache new file mode 100644 index 00000000..abb87510 --- /dev/null +++ b/templates/libraries/retrofit2/queryParams.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}@retrofit2.http.Query("{{baseName}}") {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/templates/libraries/vertx/ApiClient.mustache b/templates/libraries/vertx/ApiClient.mustache new file mode 100644 index 00000000..8d4043e4 --- /dev/null +++ b/templates/libraries/vertx/ApiClient.mustache @@ -0,0 +1,737 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import io.vertx.core.*; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.file.AsyncFile; +import io.vertx.core.file.FileSystem; +import io.vertx.core.file.OpenOptions; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.json.DecodeException; +import io.vertx.core.json.Json; +import io.vertx.core.json.JsonObject; +import io.vertx.ext.web.client.HttpRequest; +import io.vertx.ext.web.client.HttpResponse; +import io.vertx.ext.web.client.WebClient; +import io.vertx.ext.web.client.WebClientOptions; + +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} +import java.text.DateFormat; +import java.util.*; +import java.util.function.Consumer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static java.util.stream.Collectors.toMap; + +{{>generatedAnnotation}} + +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + + protected static final Pattern CONTENT_DISPOSITION_PATTERN = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + protected static final OpenOptions FILE_DOWNLOAD_OPTIONS = new OpenOptions().setCreate(true).setTruncateExisting(true); + + protected final Vertx vertx; + protected final JsonObject config; + protected final String identifier; + + protected MultiMap defaultHeaders = MultiMap.caseInsensitiveMultiMap(); + protected MultiMap defaultCookies = MultiMap.caseInsensitiveMultiMap(); + protected Map authentications; + protected String basePath = "{{{basePath}}}"; + protected DateFormat dateFormat; + protected ObjectMapper objectMapper; + protected String downloadsDir = ""; + protected int timeout = -1; + + public ApiClient(Vertx vertx, JsonObject config) { + Objects.requireNonNull(vertx, "Vertx must not be null"); + Objects.requireNonNull(config, "Config must not be null"); + + this.vertx = vertx; + + // Use RFC3339 format for date and datetime. + // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + this.dateFormat = new RFC3339DateFormat(); + + // Use UTC as the default time zone. + this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + + // Build object mapper + this.objectMapper = new ObjectMapper(); + this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + this.objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + this.objectMapper.registerModule(new JavaTimeModule()); + this.objectMapper.setDateFormat(dateFormat); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + this.objectMapper.registerModule(jnm); + {{/openApiNullable}} + + // Setup authentications (key: authentication name, value: authentication). + this.authentications = new HashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + this.authentications = Collections.unmodifiableMap(authentications); + + // Configurations + this.basePath = config.getString("basePath", this.basePath); + this.downloadsDir = config.getString("downloadsDir", this.downloadsDir); + this.config = config; + this.identifier = UUID.randomUUID().toString(); + this.timeout = config.getInteger("timeout", -1); + } + + public Vertx getVertx() { + return vertx; + } + + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + return this; + } + + public synchronized WebClient getWebClient() { + String webClientIdentifier = "web-client-" + identifier; + WebClient webClient = this.vertx.getOrCreateContext().get(webClientIdentifier); + if (webClient == null) { + webClient = buildWebClient(vertx, config); + this.vertx.getOrCreateContext().put(webClientIdentifier, webClient); + } + return webClient; + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + public String getDownloadsDir() { + return downloadsDir; + } + + public ApiClient setDownloadsDir(String downloadsDir) { + this.downloadsDir = downloadsDir; + return this; + } + + public MultiMap getDefaultHeaders() { + return defaultHeaders; + } + + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaders.add(key, value); + return this; + } + + public MultiMap getDefaultCookies() { + return defaultHeaders; + } + + public ApiClient addDefaultCookie(String key, String value) { + defaultCookies.add(key, value); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()) { + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + return params; + } + + String delimiter = ","; + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder(); + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + protected boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + protected String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + protected String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + public void sendBody(HttpRequest request, + Handler>> responseHandler, + Object body) { + if (body instanceof byte[]) { + Buffer buffer = Buffer.buffer((byte[]) body); + request.sendBuffer(buffer, responseHandler); + } else if (body instanceof AsyncFile) { + AsyncFile file = (AsyncFile) body; + request.sendStream(file, responseHandler); + } else { + try { + request.sendBuffer(Buffer.buffer(this.objectMapper.writeValueAsBytes(body)), responseHandler); + } catch (JsonProcessingException jsonProcessingException) { + responseHandler.handle(Future.failedFuture(jsonProcessingException)); + } + } + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accepts The request's Accept headers + * @param contentTypes The request's Content-Type headers + * @param authNames The authentications to apply + * @param authInfo The call specific auth override + * @param returnType The return type into which to deserialize the response + * @param resultHandler The asynchronous response handler + */ + public void invokeAPI(String path, String method, List queryParams, Object body, MultiMap headerParams, + MultiMap cookieParams, Map formParams, String[] accepts, String[] contentTypes, String[] authNames, AuthInfo authInfo, + TypeReference returnType, Handler> resultHandler) { + + updateParamsForAuth(authNames, authInfo, queryParams, headerParams, cookieParams); + + if (accepts != null && accepts.length > 0) { + headerParams.add(HttpHeaders.ACCEPT, selectHeaderAccept(accepts)); + } + + if (contentTypes != null) { + headerParams.add(HttpHeaders.CONTENT_TYPE, selectHeaderContentType(contentTypes)); + } + + HttpMethod httpMethod = HttpMethod.valueOf(method); + HttpRequest request = getWebClient().requestAbs(httpMethod, basePath + path); + request.timeout(this.timeout); + + if (httpMethod == HttpMethod.PATCH) { + request.putHeader("X-HTTP-Method-Override", "PATCH"); + } + + queryParams.forEach(entry -> { + if (entry.getValue() != null) { + request.addQueryParam(entry.getName(), entry.getValue()); + } + }); + + headerParams.forEach(entry -> { + if (entry.getValue() != null) { + request.putHeader(entry.getKey(), entry.getValue()); + } + }); + + defaultHeaders.forEach(entry -> { + if (entry.getValue() != null) { + request.putHeader(entry.getKey(), entry.getValue()); + } + }); + + final MultiMap cookies = MultiMap.caseInsensitiveMultiMap().addAll(cookieParams).addAll(defaultCookies); + request.putHeader("Cookie", buildCookieHeader(cookies)); + + Handler>> responseHandler = buildResponseHandler(returnType, resultHandler); + if (body != null) { + sendBody(request, responseHandler, body); + } else if (formParams != null && !formParams.isEmpty()) { + Map formMap = formParams.entrySet().stream().collect(toMap(Map.Entry::getKey, entry -> parameterToString(entry.getValue()))); + MultiMap form = MultiMap.caseInsensitiveMultiMap().addAll(formMap); + request.sendForm(form, responseHandler); + } else { + request.send(responseHandler); + } + } + + protected String buildCookieHeader(MultiMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry entry : cookies.entries()) { + if (entry.getValue() != null) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + protected String sanitizeFilename(String filename) { + return filename.replaceFirst("^.*[/\\\\]", ""); + } + + /** + * Create a filename from the given headers. + * When the headers have no "Content-Disposition" information, a random UUID name is generated. + * + * @param headers The HTTP response headers + * @return The filename + */ + protected String generateFilename(MultiMap headers) { + String filename = UUID.randomUUID().toString(); + String contentDisposition = headers.get("Content-Disposition"); + if (contentDisposition != null && !contentDisposition.isEmpty()) { + Matcher matcher = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + return filename; + } + + /** + * File Download handling. + * + * @param response The HTTP response + * @param handler The response handler + */ + protected void handleFileDownload(HttpResponse response, Handler> handler) { + FileSystem fs = getVertx().fileSystem(); + + String filename = generateFilename(response.headers()); + Consumer fileHandler = directory -> { + fs.open(directory + filename, FILE_DOWNLOAD_OPTIONS, asyncFileResult -> { + if (asyncFileResult.succeeded()) { + AsyncFile asyncFile = asyncFileResult.result(); + asyncFile.write(response.bodyAsBuffer()); + //noinspection unchecked + handler.handle(Future.succeededFuture((T) asyncFile)); + } else { + handler.handle(ApiException.fail(asyncFileResult.cause())); + } + }); + }; + + String dir = getDownloadsDir(); + if (dir != null && !dir.isEmpty()) { + fs.mkdirs(dir, mkdirResult -> { + String sanitizedFolder = dir.endsWith("/") ? dir : dir + "/"; + fileHandler.accept(sanitizedFolder); + }); + } else { + fileHandler.accept(""); + } + } + + /** + * Build a response handler for the HttpResponse. + * + * @param returnType The return type + * @param handler The response handler + * @return The HTTP response handler + */ + protected Handler>> buildResponseHandler(TypeReference returnType, + Handler> handler) { + return response -> { + AsyncResult result; + if (response.succeeded()) { + HttpResponse httpResponse = response.result(); + if (httpResponse.statusCode() / 100 == 2) { + if (httpResponse.statusCode() == 204 || returnType == null) { + result = Future.succeededFuture(null); + } else { + T resultContent = null; + if ("byte[]".equals(returnType.getType().toString())) { + resultContent = (T) httpResponse.body().getBytes(); + result = Future.succeededFuture(resultContent); + } else if (AsyncFile.class.equals(returnType.getType())) { + handleFileDownload(httpResponse, handler); + return; + } else { + try { + resultContent = this.objectMapper.readValue(httpResponse.bodyAsString(), returnType); + result = Future.succeededFuture(resultContent); + } catch (Exception e) { + result = ApiException.fail(new DecodeException("Failed to decode:" + e.getMessage(), e)); + } + } + } + } else { + result = ApiException.fail(httpResponse.statusMessage(), httpResponse.statusCode(), httpResponse.headers(), httpResponse.bodyAsString()); + } + } else if (response.cause() instanceof ApiException) { + result = Future.failedFuture(response.cause()); + } else { + result = ApiException.fail(500, response.cause() != null ? response.cause().getMessage() : null); + } + handler.handle(result); + }; + } + + /** + * Build the WebClient used to make HTTP requests. + * + * @param vertx Vertx + * @return WebClient + */ + protected WebClient buildWebClient(Vertx vertx, JsonObject config) { + + if (!config.containsKey("userAgent")) { + config.put("userAgent", "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + } + + return WebClient.create(vertx, new WebClientOptions(config)); + } + + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + */ + protected void updateParamsForAuth(String[] authNames, AuthInfo authInfo, List queryParams, MultiMap headerParams, MultiMap cookieParams) { + for (String authName : authNames) { + Authentication auth; + if (authInfo != null && authInfo.authentications.containsKey(authName)) { + auth = authInfo.authentications.get(authName); + } else { + auth = authentications.get(authName); + } + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + public static class AuthInfo { + + protected final Map authentications = new LinkedHashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + + public void add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String username, String password) { + HttpBasicAuth auth = new HttpBasicAuth(); + auth.setUsername(username); + auth.setPassword(password); + authentications.put("{{name}}", auth); + }{{/isBasicBasic}}{{#isBasicBearer}} + + public void add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String bearerToken) { + HttpBearerAuth auth = new + HttpBearerAuth("{{scheme}}"); + auth.setBearerToken(bearerToken); + authentications.put("{{name}}", auth); + }{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + + public void add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String apikey, String apiKeyPrefix) { + ApiKeyAuth auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}},"{{keyParamName}}"); + auth.setApiKey(apikey); + auth.setApiKeyPrefix(apiKeyPrefix); + authentications.put("{{name}}", auth); + }{{/isApiKey}}{{#isOAuth}} + + public void add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String accessToken) { + OAuth auth = new OAuth(); + auth.setAccessToken(accessToken); + authentications.put("{{name}}", auth); + }{{/isOAuth}}{{/authMethods}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + + public static AuthInfo for{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}(String username, String password) { + AuthInfo authInfo = new AuthInfo(); + authInfo.add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(username, password); + return authInfo; + }{{/isBasicBasic}}{{#isBasicBearer}} + + public static AuthInfo for{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String bearerToken) { + AuthInfo authInfo = new AuthInfo(); + authInfo.add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(bearerToken); + return authInfo; + }{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + + public static AuthInfo for{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String apikey, String apiKeyPrefix) { + AuthInfo authInfo = new AuthInfo(); + authInfo.add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(apikey, apiKeyPrefix); + return authInfo; + }{{/isApiKey}}{{#isOAuth}} + + public static AuthInfo for{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(String accessToken) { + AuthInfo authInfo = new AuthInfo(); + authInfo.add{{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication(accessToken); + return authInfo; + }{{/isOAuth}}{{/authMethods}} + } +} diff --git a/templates/libraries/vertx/Configuration.mustache b/templates/libraries/vertx/Configuration.mustache new file mode 100644 index 00000000..5f26ea84 --- /dev/null +++ b/templates/libraries/vertx/Configuration.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import io.vertx.core.Vertx; +import io.vertx.core.json.JsonObject; + +import java.util.Objects; + +public class Configuration { + public static final String VERSION = "{{{artifactVersion}}}"; + + private static ApiClient defaultApiClient = null; + + /** + * Setup the default API client. + * Will be used by API instances when a client is not provided. + * + * @return Default API client + */ + public synchronized static ApiClient setupDefaultApiClient(Vertx vertx, JsonObject config) { + defaultApiClient = new ApiClient(vertx, config); + return defaultApiClient; + } + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public synchronized static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public synchronized static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/templates/libraries/vertx/api.mustache b/templates/libraries/vertx/api.mustache new file mode 100644 index 00000000..6a069a77 --- /dev/null +++ b/templates/libraries/vertx/api.mustache @@ -0,0 +1,54 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; +{{#imports}}import {{import}}; +{{/imports}} +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +{{#supportVertxFuture}} +import io.vertx.core.Future; +import io.vertx.core.Promise; +{{/supportVertxFuture}} +import io.vertx.core.json.JsonObject; + +import java.util.*; + +public interface {{classname}} { + + {{#operations}} + {{#operation}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + void {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}Handler> handler); + + {{#supportVertxFuture}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + default Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){ + Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> promise = Promise.promise(); + {{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}promise); + return promise.future(); + } + + {{/supportVertxFuture}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + void {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler> handler); + + {{#supportVertxFuture}} + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + default Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo){ + Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> promise = Promise.promise(); + {{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, promise); + return promise.future(); + } + + {{/supportVertxFuture}} + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/vertx/apiException.mustache b/templates/libraries/vertx/apiException.mustache new file mode 100644 index 00000000..0445d1f0 --- /dev/null +++ b/templates/libraries/vertx/apiException.mustache @@ -0,0 +1,113 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Future; +import io.vertx.core.MultiMap; + +{{>generatedAnnotation}} + +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private static final long serialVersionUID = 1L; + + private int code = 0; + private MultiMap responseHeaders = null; + private String responseBody = null; + + + public static AsyncResult fail(int failureCode, String message) { + return Future.failedFuture(new ApiException(failureCode, message)); + } + + public static AsyncResult fail(Throwable throwable) { + return Future.failedFuture(new ApiException(throwable)); + } + + public static AsyncResult fail(String message) { + return Future.failedFuture(new ApiException(message)); + } + + public static AsyncResult fail(String message, Throwable throwable, int code, MultiMap responseHeaders) { + return Future.failedFuture(new ApiException(message, throwable, code, responseHeaders, null)); + } + + public static AsyncResult fail(String message, Throwable throwable, int code, MultiMap responseHeaders, String responseBody) { + return Future.failedFuture(new ApiException(message, throwable, code, responseHeaders, responseBody)); + } + + public static AsyncResult fail(String message, int code, MultiMap responseHeaders, String responseBody) { + return Future.failedFuture(new ApiException(message, (Throwable) null, code, responseHeaders, responseBody)); + } + + public static AsyncResult fail(int code, MultiMap responseHeaders, String responseBody) { + return Future.failedFuture(new ApiException((String) null, (Throwable) null, code, responseHeaders, responseBody)); + } + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, MultiMap responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, MultiMap responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, MultiMap responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, MultiMap responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, MultiMap responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public MultiMap getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/templates/libraries/vertx/apiImpl.mustache b/templates/libraries/vertx/apiImpl.mustache new file mode 100644 index 00000000..1b6f9ba1 --- /dev/null +++ b/templates/libraries/vertx/apiImpl.mustache @@ -0,0 +1,122 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.MultiMap; +import io.vertx.core.json.JsonObject; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.*; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}}Impl implements {{classname}} { + + private ApiClient apiClient; + + public {{classname}}Impl() { + this(null); + } + + public {{classname}}Impl(ApiClient apiClient) { + this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient(); + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @param resultHandler Asynchronous result handler + */ + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler> resultHandler) { + {{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}null, resultHandler); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}")); + return; + } + {{/required}}{{/allParams}} + // create path and map variables + String localVarPath = "{{{path}}}"{{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", encodeParameter({{{paramName}}}.toString())){{/pathParams}}; + + // query params + List localVarQueryParams = new ArrayList<>(); + {{#queryParams}} + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/queryParams}} + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.add("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/headerParams}} + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + {{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}}); + {{/formParams}} + + String[] localVarAccepts = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }; + String[] localVarContentTypes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }; + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + {{#returnType}} + TypeReference<{{{returnType}}}> localVarReturnType = new TypeReference<{{{returnType}}}>() {}; + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);{{/returnType}}{{^returnType}} + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);{{/returnType}} + } + {{/operation}} + + private String encodeParameter(String parameter) { + try { + return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return parameter; + } + } +} +{{/operations}} diff --git a/templates/libraries/vertx/api_test.mustache b/templates/libraries/vertx/api_test.mustache new file mode 100644 index 00000000..1469d11f --- /dev/null +++ b/templates/libraries/vertx/api_test.mustache @@ -0,0 +1,64 @@ +{{>licenseInfo}} +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import {{invokerPackage}}.Configuration; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonObject; +import io.vertx.core.Vertx; +import io.vertx.ext.unit.junit.VertxUnitRunner; +import io.vertx.ext.unit.junit.RunTestOnContext; +import io.vertx.ext.unit.TestContext; +import io.vertx.ext.unit.Async; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private {{classname}} api; + + @BeforeAll + public void setupApiClient() { + api = new {{classname}}Impl(); + } + + {{#operations}} + {{#operation}} + /** + * {{summary}} + * {{notes}} + * + * @param context Vertx test context for doing assertions + */ + @Test + public void {{operationId}}Test(TestContext testContext) { + Async async = testContext.async(); + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + api.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}result -> { + // TODO: test validations + async.complete(); + }); + } + {{/operation}} + {{/operations}} +} diff --git a/templates/libraries/vertx/auth/ApiKeyAuth.mustache b/templates/libraries/vertx/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..f89a627e --- /dev/null +++ b/templates/libraries/vertx/auth/ApiKeyAuth.mustache @@ -0,0 +1,67 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import io.vertx.core.MultiMap; + +import java.util.List; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.add(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.add(paramName, value); + } + } +} diff --git a/templates/libraries/vertx/auth/Authentication.mustache b/templates/libraries/vertx/auth/Authentication.mustache new file mode 100644 index 00000000..824a8750 --- /dev/null +++ b/templates/libraries/vertx/auth/Authentication.mustache @@ -0,0 +1,21 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import io.vertx.core.MultiMap; + +import java.util.List; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams); +} diff --git a/templates/libraries/vertx/auth/HttpBasicAuth.mustache b/templates/libraries/vertx/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..6f606b98 --- /dev/null +++ b/templates/libraries/vertx/auth/HttpBasicAuth.mustache @@ -0,0 +1,41 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import io.vertx.core.MultiMap; +import java.util.Base64; +import java.nio.charset.StandardCharsets; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.add("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/vertx/auth/HttpBearerAuth.mustache b/templates/libraries/vertx/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..52b284fa --- /dev/null +++ b/templates/libraries/vertx/auth/HttpBearerAuth.mustache @@ -0,0 +1,40 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import io.vertx.core.MultiMap; +import java.util.Base64; +import java.nio.charset.StandardCharsets; +import java.util.List; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { + if (bearerToken == null) { + return; + } + headerParams.add("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/templates/libraries/vertx/auth/OAuth.mustache b/templates/libraries/vertx/auth/OAuth.mustache new file mode 100644 index 00000000..caa21571 --- /dev/null +++ b/templates/libraries/vertx/auth/OAuth.mustache @@ -0,0 +1,29 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import io.vertx.core.MultiMap; + +import java.util.List; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { + if (accessToken != null) { + headerParams.add("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/templates/libraries/vertx/auth/OAuthFlow.mustache b/templates/libraries/vertx/auth/OAuthFlow.mustache new file mode 100644 index 00000000..002e9572 --- /dev/null +++ b/templates/libraries/vertx/auth/OAuthFlow.mustache @@ -0,0 +1,7 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/templates/libraries/vertx/build.gradle.mustache b/templates/libraries/vertx/build.gradle.mustache new file mode 100644 index 00000000..cd9e1908 --- /dev/null +++ b/templates/libraries/vertx/build.gradle.mustache @@ -0,0 +1,61 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +repositories { + mavenCentral() +} + +apply plugin: 'java' +apply plugin: 'maven-publish' + +sourceCompatibility = JavaVersion.VERSION_1_8 +targetCompatibility = JavaVersion.VERSION_1_8 + +publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } +} + +task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath +} + +ext { + swagger_annotations_version = "1.5.21" + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + vertx_version = "{{#supportVertxFuture}}4.0.0{{/supportVertxFuture}}{{^supportVertxFuture}}3.5.2{{/supportVertxFuture}}" + junit_version = "5.10.3" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "io.vertx:vertx-web-client:$vertx_version" + implementation "io.vertx:vertx-rx-java:$vertx_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testImplementation "io.vertx:vertx-unit:$vertx_version" +} diff --git a/templates/libraries/vertx/pom.mustache b/templates/libraries/vertx/pom.mustache new file mode 100644 index 00000000..fa116bbc --- /dev/null +++ b/templates/libraries/vertx/pom.mustache @@ -0,0 +1,320 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + io.vertx + vertx-rx-java + ${vertx-version} + + + io.vertx + vertx-web-client + ${vertx-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + io.vertx + vertx-unit + ${vertx-version} + test + + + + + UTF-8 + {{#supportVertxFuture}}4.0.0{{/supportVertxFuture}}{{^supportVertxFuture}}3.5.2{{/supportVertxFuture}} + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 2.17.1 + 2.17.1 + 0.2.6 + {{#useJakartaEe}} + 2.1.1 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + {{/useJakartaEe}} + 5.10.3 + + diff --git a/templates/libraries/vertx/rxApiImpl.mustache b/templates/libraries/vertx/rxApiImpl.mustache new file mode 100644 index 00000000..4d655b47 --- /dev/null +++ b/templates/libraries/vertx/rxApiImpl.mustache @@ -0,0 +1,88 @@ +package {{package}}.rxjava; + +{{#imports}}import {{import}}; +{{/imports}} +import {{invokerPackage}}.ApiClient; + +import java.util.*; + +import rx.Single; +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; + +{{>generatedAnnotation}} + +{{#operations}} +public class {{classname}} { + + private final {{package}}.{{classname}} delegate; + + public {{classname}}({{package}}.{{classname}} delegate) { + this.delegate = delegate; + } + + public {{package}}.{{classname}} getDelegate() { + return delegate; + } + + {{#operation}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @param resultHandler Asynchronous result handler + */ + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler> resultHandler) { + delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}resultHandler); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, resultHandler); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return Asynchronous result handler (RxJava Single) + */ + public Single<{{{returnType}}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}fut) + )); + } + + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single<{{{returnType}}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, fut) + )); + } + {{/operation}} + + public static {{classname}} newInstance({{package}}.{{classname}} arg) { + return arg != null ? new {{classname}}(arg) : null; + } +} +{{/operations}} diff --git a/templates/libraries/webclient/ApiClient.mustache b/templates/libraries/webclient/ApiClient.mustache new file mode 100644 index 00000000..9bc558f1 --- /dev/null +++ b/templates/libraries/webclient/ApiClient.mustache @@ -0,0 +1,805 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpRequest; +import org.springframework.http.HttpStatus; +import org.springframework.http.InvalidMediaTypeException; +import org.springframework.http.MediaType; +import org.springframework.http.RequestEntity; +import org.springframework.http.RequestEntity.BodyBuilder; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestExecution; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.http.client.ClientHttpResponse; +import org.springframework.http.client.reactive.ClientHttpRequest; +import org.springframework.http.codec.json.Jackson2JsonDecoder; +import org.springframework.http.codec.json.Jackson2JsonEncoder; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; +import org.springframework.web.client.RestClientException; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; +import org.springframework.web.reactive.function.client.ClientResponse; +import org.springframework.web.reactive.function.BodyInserter; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.ExchangeStrategies; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Flux; +import java.util.Optional; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.ParseException; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TimeZone; + +import {{javaxPackage}}.annotation.Nullable; + +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{invokerPackage}}.ApiClient") +{{/generateClientAsBean}} +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + public enum CollectionFormat { + CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); + + protected final String separator; + CollectionFormat(String separator) { + this.separator = separator; + } + + protected String collectionToString(Collection collection) { + return StringUtils.collectionToDelimitedString(collection, separator); + } + } + + protected static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate"; + + protected HttpHeaders defaultHeaders = new HttpHeaders(); + protected MultiValueMap defaultCookies = new LinkedMultiValueMap(); + + protected String basePath = "{{basePath}}"; + + protected final WebClient webClient; + protected final DateFormat dateFormat; + protected final ObjectMapper objectMapper; + + protected Map authentications; + + + public ApiClient() { + this.dateFormat = createDefaultDateFormat(); + this.objectMapper = createDefaultObjectMapper(this.dateFormat); + this.webClient = buildWebClient(this.objectMapper); + this.init(); + } + + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} + public ApiClient(WebClient webClient) { + this(Optional.ofNullable(webClient).orElseGet(() -> buildWebClient()), createDefaultDateFormat()); + } + + public ApiClient(ObjectMapper mapper, DateFormat format) { + this(buildWebClient(mapper.copy()), format); + } + + public ApiClient(WebClient webClient, ObjectMapper mapper, DateFormat format) { + this(Optional.ofNullable(webClient).orElseGet(() -> buildWebClient(mapper.copy())), format); + } + + protected ApiClient(WebClient webClient, DateFormat format) { + this.webClient = webClient; + this.dateFormat = format; + this.objectMapper = createDefaultObjectMapper(format); + this.init(); + } + + public static DateFormat createDefaultDateFormat() { + DateFormat dateFormat = new RFC3339DateFormat(); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + return dateFormat; + } + + public static ObjectMapper createDefaultObjectMapper(@Nullable DateFormat dateFormat) { + if (null == dateFormat) { + dateFormat = createDefaultDateFormat(); + } + ObjectMapper mapper = new ObjectMapper(); + mapper.setDateFormat(dateFormat); + mapper.registerModule(new JavaTimeModule()); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + return mapper; + } + + protected void init() { + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Build the WebClientBuilder used to make WebClient. + * @param mapper ObjectMapper used for serialize/deserialize + * @return WebClient + */ + public static WebClient.Builder buildWebClientBuilder(ObjectMapper mapper) { + ExchangeStrategies strategies = ExchangeStrategies + .builder() + .codecs(clientDefaultCodecsConfigurer -> { + clientDefaultCodecsConfigurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder(mapper, MediaType.APPLICATION_JSON)); + clientDefaultCodecsConfigurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder(mapper, MediaType.APPLICATION_JSON)); + }).build(); + WebClient.Builder webClientBuilder = WebClient.builder().exchangeStrategies(strategies); + return webClientBuilder; + } + + /** + * Build the WebClientBuilder used to make WebClient. + * @return WebClient + */ + public static WebClient.Builder buildWebClientBuilder() { + return buildWebClientBuilder(createDefaultObjectMapper(null)); + } + + /** + * Build the WebClient used to make HTTP requests. + * @param mapper ObjectMapper used for serialize/deserialize + * @return WebClient + */ + public static WebClient buildWebClient(ObjectMapper mapper) { + return buildWebClientBuilder(mapper).build(); + } + + /** + * Build the WebClient used to make HTTP requests. + * @return WebClient + */ + public static WebClient buildWebClient() { + return buildWebClientBuilder(createDefaultObjectMapper(null)).build(); + } + + /** + * Get the current base path + * @return String the base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set the base path, which should include the host + * @param basePath the base path + * @return ApiClient this client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return Map the currently configured authentication types + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * @param username the username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password the password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * @param apiKey the API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix the API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken the access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent the user agent string + * @return ApiClient this client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param name The header's name + * @param value The header's value + * @return ApiClient this client + */ + public ApiClient addDefaultHeader(String name, String value) { + if (defaultHeaders.containsKey(name)) { + defaultHeaders.remove(name); + } + defaultHeaders.add(name, value); + return this; + } + + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return DateFormat format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Parse the given string into Date object. + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Get the ObjectMapper used to make HTTP requests. + * @return ObjectMapper objectMapper + */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + /** + * Get the WebClient used to make HTTP requests. + * @return WebClient webClient + */ + public WebClient getWebClient() { + return webClient; + } + + /** + * Format the given parameter object into string. + * @param param the object to convert + * @return String the parameter represented as a String + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate( (Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection) param) { + if(b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Converts a parameter to a {@link MultiValueMap} containing Json-serialized values for use in REST requests + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the Json-serialized String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMapJson(CollectionFormat collectionFormat, String name, Object value) { + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + try { + return parameterToMultiValueMap(collectionFormat, name, objectMapper.writeValueAsString(value)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + List values = new ArrayList<>(); + for(Object o : valueCollection) { + try { + values.add(objectMapper.writeValueAsString(o)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + return parameterToMultiValueMap(collectionFormat, name, "[" + StringUtils.collectionToDelimitedString(values, collectionFormat.separator) + "]"); + } + + /** + * Converts a parameter to a {@link MultiValueMap} for use in REST requests + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMap(CollectionFormat collectionFormat, String name, Object value) { + final MultiValueMap params = new LinkedMultiValueMap(); + + if (name == null || name.isEmpty() || value == null) { + return params; + } + + if(collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + if (value instanceof Map) { + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + for (final Entry entry : valuesMap.entrySet()) { + params.add(entry.getKey(), parameterToString(entry.getValue())); + } + return params; + } + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(name, parameterToString(value)); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + if (collectionFormat.equals(CollectionFormat.MULTI)) { + for (Object item : valueCollection) { + params.add(name, parameterToString(item)); + } + return params; + } + + List values = new ArrayList(); + for(Object o : valueCollection) { + values.add(parameterToString(o)); + } + params.add(name, collectionFormat.collectionToString(values)); + + return params; + } + + /** + * Check if the given {@code String} is a JSON MIME. + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(String mediaType) { + // "* / *" is default to JSON + if ("*/*".equals(mediaType)) { + return true; + } + + try { + return isJsonMime(MediaType.parseMediaType(mediaType)); + } catch (InvalidMediaTypeException e) { + } + return false; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(MediaType mediaType) { + return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*(\\+json|ndjson)[;]?\\s*$")); + } + + /** + * Check if the given {@code String} is a Problem JSON MIME (RFC-7807). + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents Problem JSON, false otherwise + */ + public boolean isProblemJsonMime(String mediaType) { + return "application/problem+json".equalsIgnoreCase(mediaType); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return List The list of MediaTypes to use for the Accept header + */ + public List selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + MediaType mediaType = MediaType.parseMediaType(accept); + if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) { + return Collections.singletonList(mediaType); + } + } + return MediaType.parseMediaTypes(StringUtils.arrayToCommaDelimitedString(accepts)); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return MediaType The Content-Type header to use. If the given array is empty, null will be returned. + */ + public MediaType selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + for (String contentType : contentTypes) { + MediaType mediaType = MediaType.parseMediaType(contentType); + if (isJsonMime(mediaType)) { + return mediaType; + } + } + return MediaType.parseMediaType(contentTypes[0]); + } + + /** + * Select the body to use for the request + * @param obj the body object + * @param formParams the form parameters + * @param contentType the content type of the request + * @return Object the selected body + */ + protected BodyInserter selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { + if(MediaType.APPLICATION_FORM_URLENCODED.equals(contentType)) { + MultiValueMap map = new LinkedMultiValueMap<>(); + + formParams + .toSingleValueMap() + .entrySet() + .forEach(es -> map.add(es.getKey(), String.valueOf(es.getValue()))); + + return BodyInserters.fromFormData(map); + } else if(MediaType.MULTIPART_FORM_DATA.equals(contentType)) { + return BodyInserters.fromMultipartData(formParams); + } else { + return obj != null ? BodyInserters.fromValue(obj) : null; + } + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param the return type to use + * @param path The sub-path of the HTTP URL + * @param method The request method + * @param pathParams The path parameters + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return The response body in chosen type + */ + public ResponseSpec invokeAPI(String path, HttpMethod method, Map pathParams, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, pathParams, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); + return requestBuilder.retrieve(); + } + + /** + * Include queryParams in uriParams taking into account the paramName + * @param queryParams The query parameters + * @param uriParams The path parameters + * return templatized query string + */ + protected String generateQueryUri(MultiValueMap queryParams, Map uriParams) { + StringBuilder queryBuilder = new StringBuilder(); + queryParams.forEach((name, values) -> { + if (CollectionUtils.isEmpty(values)) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(name); + } else { + int valueItemCounter = 0; + for (Object value : values) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(name); + if (value != null) { + String templatizedKey = name + valueItemCounter++; + uriParams.put(templatizedKey, value.toString()); + queryBuilder.append('=').append("{").append(templatizedKey).append("}"); + } + } + } + }); + return queryBuilder.toString(); + } + + protected WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, Map pathParams, + MultiValueMap queryParams, Object body, HttpHeaders headerParams, + MultiValueMap cookieParams, MultiValueMap formParams, List accept, + MediaType contentType, String[] authNames) { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + final UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(basePath).path(path); + + String finalUri = builder.build(false).toUriString(); + Map uriParams = new HashMap<>(); + uriParams.putAll(pathParams); + + if (queryParams != null && !queryParams.isEmpty()) { + //Include queryParams in uriParams taking into account the paramName + String queryUri = generateQueryUri(queryParams, uriParams); + //Append to finalUri the templatized query string like "?param1={param1Value}&....... + finalUri += "?" + queryUri; + } + + final WebClient.RequestBodySpec requestBuilder = webClient.method(method).uri(finalUri, uriParams); + + if (accept != null) { + requestBuilder.accept(accept.toArray(new MediaType[accept.size()])); + } + if(contentType != null) { + requestBuilder.contentType(contentType); + } + + addHeadersToRequest(headerParams, requestBuilder); + addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); + + requestBuilder.attribute(URI_TEMPLATE_ATTRIBUTE, path); + + requestBuilder.body(selectBody(body, formParams, contentType)); + return requestBuilder; + } + + /** + * Add headers to the request that is being built + * @param headers The headers to add + * @param requestBuilder The current request + */ + protected void addHeadersToRequest(HttpHeaders headers, WebClient.RequestBodySpec requestBuilder) { + for (Entry> entry : headers.entrySet()) { + List values = entry.getValue(); + for(String value : values) { + if (value != null) { + requestBuilder.header(entry.getKey(), value); + } + } + } + } + + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, WebClient.RequestBodySpec requestBuilder) { + for (Entry> entry : cookies.entrySet()) { + List values = entry.getValue(); + for(String value : values) { + if (value != null) { + requestBuilder.cookie(entry.getKey(), value); + } + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams The query parameters + * @param headerParams The header parameters + * @param cookieParams the cookie parameters + */ + protected void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RestClientException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param values The values of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(CollectionFormat collectionFormat, Collection values) { + // create the value based on the collection format + if (CollectionFormat.MULTI.equals(collectionFormat)) { + // not valid for path params + return parameterToString(values); + } + + // collectionFormat is assumed to be "csv" by default + if(collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + return collectionFormat.collectionToString(values); + } +} diff --git a/templates/libraries/webclient/additional_properties.mustache b/templates/libraries/webclient/additional_properties.mustache new file mode 100644 index 00000000..8e718279 --- /dev/null +++ b/templates/libraries/webclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/templates/libraries/webclient/api.mustache b/templates/libraries/webclient/api.mustache new file mode 100644 index 00000000..7c8e4920 --- /dev/null +++ b/templates/libraries/webclient/api.mustache @@ -0,0 +1,223 @@ +package {{package}}; + +import {{invokerPackage}}.ApiClient; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Flux; + +{{>generatedAnnotation}} + +{{#generateClientAsBean}} +@Component("{{package}}.{{classname}}") +{{/generateClientAsBean}} +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(new ApiClient()); + } + +{{#generateClientAsBean}} + @Autowired +{{/generateClientAsBean}} + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + {{#operation}} +{{#singleRequestParameter}}{{>single_request_parameter}}{{/singleRequestParameter}}{{^singleRequestParameter}}{{/singleRequestParameter}} + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return {{.}} +{{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} +{{#isDeprecated}} + * @deprecated +{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + private ResponseSpec {{operationId}}RequestCreation({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}} + {{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new WebClientResponseException("Missing the required parameter '{{paramName}}' when calling {{operationId}}", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + {{/required}} + {{/allParams}} + // create path and map variables + final Map pathParams = new HashMap(); + {{#hasPathParams}} + + {{#pathParams}} + pathParams.put("{{baseName}}", {{#collectionFormat}}apiClient.collectionPathParameterToString(ApiClient.CollectionFormat.valueOf("csv".toUpperCase()), {{/collectionFormat}}{{{paramName}}}{{#collectionFormat}}){{/collectionFormat}}); + {{/pathParams}} + {{/hasPathParams}} + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + {{#hasQueryParams}} + + {{#queryParams}} + {{#queryIsJsonMimeType}} + queryParams.putAll(apiClient.parameterToMultiValueMapJson({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/queryIsJsonMimeType}} + {{^queryIsJsonMimeType}} + {{#isExplode}} + {{#hasVars}} + {{#vars}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}.{{getter}}())); + {{/vars}} + {{/hasVars}} + {{^hasVars}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/hasVars}} + {{/isExplode}} + {{^isExplode}} + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/isExplode}} + {{/queryIsJsonMimeType}} + {{/queryParams}} + {{/hasQueryParams}} + {{#hasHeaderParams}} + + {{#headerParams}} + if ({{paramName}} != null) + headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}} + {{/-last}} + {{/headerParams}} + {{/hasHeaderParams}} + {{#hasCookieParams}} + + {{#cookieParams}} + cookieParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + {{/cookieParams}} + {{/hasCookieParams}} + {{#hasFormParams}} + + {{#formParams}} + if ({{paramName}} != null) + formParams.add{{#collectionFormat}}All{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}); + {{/formParams}} + {{/hasFormParams}} + + final String[] localVarAccepts = { {{#hasProduces}} + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + {{/hasProduces}}}; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { {{#hasConsumes}} + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + {{/hasConsumes}}}; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}}ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}> localVarReturnType = new ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};{{/returnType}} + return apiClient.invokeAPI("{{{path}}}", HttpMethod.{{httpMethod}}, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return {{.}} +{{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + {{#returnType}}ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}> localVarReturnType = new ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};{{/returnType}} + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}{{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#vendorExtensions.x-webclient-return-except-list-of-string}}bodyToFlux{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}bodyToMono{{/vendorExtensions.x-webclient-return-except-list-of-string}}(localVarReturnType){{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}.block(){{/vendorExtensions.x-webclient-blocking}}; + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}}{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + {{#returnType}}ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}> localVarReturnType = new ParameterizedTypeReference<{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};{{/returnType}} + return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#vendorExtensions.x-webclient-return-except-list-of-string}}toEntityList{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}toEntity{{/vendorExtensions.x-webclient-return-except-list-of-string}}(localVarReturnType){{#vendorExtensions.x-webclient-blocking}}.block(){{/vendorExtensions.x-webclient-blocking}}; + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} +{{/allParams}} + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/operation}} +} +{{/operations}} diff --git a/templates/libraries/webclient/api_test.mustache b/templates/libraries/webclient/api_test.mustache new file mode 100644 index 00000000..e0a960d1 --- /dev/null +++ b/templates/libraries/webclient/api_test.mustache @@ -0,0 +1,47 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} +/** + * API tests for {{classname}} + */ +@Disabled +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + */ + @Test + public void {{operationId}}Test() { + // uncomment below to test the function + {{#allParams}} + //{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; + {{/allParams}} + //{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}; + + // TODO: test validations + } + {{/operation}}{{/operations}} +} diff --git a/templates/libraries/webclient/auth/ApiKeyAuth.mustache b/templates/libraries/webclient/auth/ApiKeyAuth.mustache new file mode 100644 index 00000000..a5662c4a --- /dev/null +++ b/templates/libraries/webclient/auth/ApiKeyAuth.mustache @@ -0,0 +1,65 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if (location.equals("query")) { + queryParams.add(paramName, value); + } else if (location.equals("header")) { + headerParams.add(paramName, value); + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } + } +} diff --git a/templates/libraries/webclient/auth/Authentication.mustache b/templates/libraries/webclient/auth/Authentication.mustache new file mode 100644 index 00000000..70b1d105 --- /dev/null +++ b/templates/libraries/webclient/auth/Authentication.mustache @@ -0,0 +1,19 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public interface Authentication { + /** + * Apply authentication settings to header and / or query parameters. + * + * @param queryParams The query parameters for the request + * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request + */ + void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); +} diff --git a/templates/libraries/webclient/auth/HttpBasicAuth.mustache b/templates/libraries/webclient/auth/HttpBasicAuth.mustache new file mode 100644 index 00000000..4ee90096 --- /dev/null +++ b/templates/libraries/webclient/auth/HttpBasicAuth.mustache @@ -0,0 +1,41 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/templates/libraries/webclient/auth/HttpBearerAuth.mustache b/templates/libraries/webclient/auth/HttpBearerAuth.mustache new file mode 100644 index 00000000..ca1f5368 --- /dev/null +++ b/templates/libraries/webclient/auth/HttpBearerAuth.mustache @@ -0,0 +1,38 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (bearerToken == null) { + return; + } + headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } + +} diff --git a/templates/libraries/webclient/auth/OAuth.mustache b/templates/libraries/webclient/auth/OAuth.mustache new file mode 100644 index 00000000..166475d1 --- /dev/null +++ b/templates/libraries/webclient/auth/OAuth.mustache @@ -0,0 +1,27 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +{{>generatedAnnotation}} + +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (accessToken != null) { + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); + } + } +} diff --git a/templates/libraries/webclient/auth/OAuthFlow.mustache b/templates/libraries/webclient/auth/OAuthFlow.mustache new file mode 100644 index 00000000..759f354f --- /dev/null +++ b/templates/libraries/webclient/auth/OAuthFlow.mustache @@ -0,0 +1,7 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} \ No newline at end of file diff --git a/templates/libraries/webclient/build.gradle.mustache b/templates/libraries/webclient/build.gradle.mustache new file mode 100644 index 00000000..cd72ef66 --- /dev/null +++ b/templates/libraries/webclient/build.gradle.mustache @@ -0,0 +1,182 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + + compileOptions { + {{#java17}} + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + {{/java17}} + {{^java17}} + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + {{/java17}} + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + archiveClassifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + {{#java17}} + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + {{/java17}} + {{^java17}} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + {{/java17}} + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + mainClass = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } + + task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.3" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + {{#useJakartaEe}} + spring_boot_version = "3.0.12" + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + reactor_version = "3.5.12" + reactor_netty_version = "1.2.8" + {{/useJakartaEe}} + {{^useJakartaEe}} + spring_boot_version = "2.7.17" + jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + reactor_version = "3.4.34" + reactor_netty_version = "1.2.8" + {{/useJakartaEe}} + jackson_version = "2.17.1" + jackson_databind_version = "2.17.1" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.6" + {{/openApiNullable}} + {{#joda}} + jodatime_version = "2.9.9" + {{/joda}} + junit_version = "5.10.2" +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "io.projectreactor:reactor-core:$reactor_version" + implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" + implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "joda-time:joda-time:$jodatime_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} diff --git a/templates/libraries/webclient/model.mustache b/templates/libraries/webclient/model.mustache new file mode 100644 index 00000000..108748f6 --- /dev/null +++ b/templates/libraries/webclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/libraries/webclient/pojo.mustache b/templates/libraries/webclient/pojo.mustache new file mode 100644 index 00000000..6f8c2cbc --- /dev/null +++ b/templates/libraries/webclient/pojo.mustache @@ -0,0 +1,625 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{{>permits}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/webclient/additional_properties}} + + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}}{{! prevent indent}} +{{/generateBuilders}} + +} diff --git a/templates/libraries/webclient/pom.mustache b/templates/libraries/webclient/pom.mustache new file mode 100644 index 00000000..4e573e42 --- /dev/null +++ b/templates/libraries/webclient/pom.mustache @@ -0,0 +1,192 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + {{#java17}} + 17 + 17 + {{/java17}} + {{^java17}} + 1.8 + 1.8 + {{/java17}} + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + io.projectreactor + reactor-core + ${reactor-version} + + + + + org.springframework.boot + spring-boot-starter-webflux + ${spring-boot-version} + + + + io.projectreactor.netty + reactor-netty-http + ${reactor-netty-version} + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 2.17.1 + 2.17.1 + {{#openApiNullable}} + 0.2.6 + {{/openApiNullable}} + {{#useJakartaEe}} + 3.0.12 + 2.1.1 + 3.5.12 + 1.2.8 + {{/useJakartaEe}} + {{^useJakartaEe}} + 2.7.17 + 1.3.5 + 3.4.34 + 1.2.8 + {{/useJakartaEe}} + 5.10.2 + {{#joda}} + 2.9.9 + {{/joda}} + + diff --git a/templates/libraries/webclient/single_request_parameter.mustache b/templates/libraries/webclient/single_request_parameter.mustache new file mode 100644 index 00000000..1ea323aa --- /dev/null +++ b/templates/libraries/webclient/single_request_parameter.mustache @@ -0,0 +1,106 @@ +{{#hasParams}} +{{^hasSingleParam}} + + public {{#staticRequest}}static {{/staticRequest}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{>nullable_var_annotations}} {{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{>nullable_var_annotations}} {{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasParams}} + {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request request = ({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request) o; + return {{#allParams}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{paramName}}, request.{{paramName}}()){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{paramName}}, request.{{paramName}}()){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/allParams}};{{/hasParams}}{{^hasParams}} + return true;{{/hasParams}} + {{/useReflectionEqualsHashCode}} + } + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#allParams}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{paramName}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{paramName}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{paramName}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/useReflectionEqualsHashCode}} + } + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + +{{/hasSingleParam}} +{{/hasParams}} \ No newline at end of file diff --git a/templates/licenseInfo.mustache b/templates/licenseInfo.mustache new file mode 100644 index 00000000..c66209f2 --- /dev/null +++ b/templates/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ diff --git a/templates/manifest.mustache b/templates/manifest.mustache new file mode 100644 index 00000000..f44bd07d --- /dev/null +++ b/templates/manifest.mustache @@ -0,0 +1,3 @@ + + + diff --git a/templates/maven.yml.mustache b/templates/maven.yml.mustache new file mode 100644 index 00000000..69ad4154 --- /dev/null +++ b/templates/maven.yml.mustache @@ -0,0 +1,31 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build {{{appName}}} + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 17, 21 ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + {{=< >=}} + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/templates/model.mustache b/templates/model.mustache new file mode 100644 index 00000000..55e6678d --- /dev/null +++ b/templates/model.mustache @@ -0,0 +1,68 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/modelEnum.mustache b/templates/modelEnum.mustache new file mode 100644 index 00000000..90cd7f8c --- /dev/null +++ b/templates/modelEnum.mustache @@ -0,0 +1,120 @@ +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +{{/jackson}} +{{#gson}} +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +{{/gson}} +{{#isUri}} +import java.net.URI; +{{/isUri}} + +/** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ +{{#gson}} +@JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) +{{/gson}} +{{#jsonb}} +@JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) +@JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) +{{/jsonb}} +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#allowableValues}}{{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + +{{#jackson}} + @JsonValue +{{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + +{{#jackson}} + @JsonCreator +{{/jackson}} + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } +{{#gson}} + + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + @Override + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} enumeration) throws IOException { + jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}); + } + + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}}{{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } +{{/gson}} +{{#jsonb}} + + public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { + @Override + public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} + } + } + + public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { + @Override + public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } +{{/jsonb}} +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +{{/supportUrlQuery}} +} diff --git a/templates/modelInnerEnum.mustache b/templates/modelInnerEnum.mustache new file mode 100644 index 00000000..401002a6 --- /dev/null +++ b/templates/modelInnerEnum.mustache @@ -0,0 +1,95 @@ + /** + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + */ +{{#gson}} + @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class) +{{/gson}} +{{#jsonb}} + @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) + @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) +{{/jsonb}} +{{#withXml}} + @XmlType(name="{{datatypeWithEnum}}") + @XmlEnum({{dataType}}.class) +{{/withXml}} + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}} + {{/enumVars}} + {{/allowableValues}} + + private {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + +{{#jackson}} + @JsonValue +{{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + +{{#jackson}} + @JsonCreator +{{/jackson}} + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } +{{#gson}} + + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { + @Override + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} enumeration) throws IOException { + jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}); + } + + @Override + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}} {{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + } + } +{{/gson}} +{{#jsonb}} + public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { + @Override + public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} + } + } + + public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { + @Override + public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } +{{/jsonb}} + } diff --git a/templates/model_doc.mustache b/templates/model_doc.mustache new file mode 100644 index 00000000..9a7fe146 --- /dev/null +++ b/templates/model_doc.mustache @@ -0,0 +1,4 @@ +{{#models}}{{#model}} + +{{#isEnum}}{{>enum_outer_doc}}{{/isEnum}}{{^isEnum}}{{>pojo_doc}}{{/isEnum}} +{{/model}}{{/models}} diff --git a/templates/model_test.mustache b/templates/model_test.mustache new file mode 100644 index 00000000..931a5da0 --- /dev/null +++ b/templates/model_test.mustache @@ -0,0 +1,43 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for {{classname}} + */ +class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/templates/nullable_var_annotations.mustache b/templates/nullable_var_annotations.mustache new file mode 100644 index 00000000..7dbaf402 --- /dev/null +++ b/templates/nullable_var_annotations.mustache @@ -0,0 +1 @@ +{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}} \ No newline at end of file diff --git a/templates/oneof_interface.mustache b/templates/oneof_interface.mustache new file mode 100644 index 00000000..eadcb26b --- /dev/null +++ b/templates/oneof_interface.mustache @@ -0,0 +1,6 @@ +{{>additionalOneOfTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +public {{>sealed}}interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}}{{>permits}}{ + {{#discriminator}} + public {{propertyType}} {{propertyGetter}}(); + {{/discriminator}} +} diff --git a/templates/openapi.mustache b/templates/openapi.mustache new file mode 100644 index 00000000..34fbb53f --- /dev/null +++ b/templates/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} diff --git a/templates/permits.mustache b/templates/permits.mustache new file mode 100644 index 00000000..af0c9e6e --- /dev/null +++ b/templates/permits.mustache @@ -0,0 +1 @@ +{{#useSealedOneOfInterfaces}}{{#vendorExtensions.x-is-one-of-interface}}{{#permits}}{{#-first}}permits {{/-first}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}} {{/-last}}{{/permits}}{{/vendorExtensions.x-is-one-of-interface}}{{/useSealedOneOfInterfaces}} \ No newline at end of file diff --git a/templates/pojo.mustache b/templates/pojo.mustache new file mode 100644 index 00000000..25974f2a --- /dev/null +++ b/templates/pojo.mustache @@ -0,0 +1,624 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{^isDiscriminator}} + {{>nullable_var_annotations}}{{! prevent indent}} + {{/isDiscriminator}} + {{#isDiscriminator}} + // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation + {{/isDiscriminator}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}}{{! prevent indent}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} + +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}}{{! prevent indent}} +{{/generateBuilders}} + +} diff --git a/templates/pojo_doc.mustache b/templates/pojo_doc.mustache new file mode 100644 index 00000000..bae0bc48 --- /dev/null +++ b/templates/pojo_doc.mustache @@ -0,0 +1,37 @@ +# {{#vendorExtensions.x-is-one-of-interface}}Interface {{/vendorExtensions.x-is-one-of-interface}}{{classname}} + +{{#description}}{{&description}} +{{/description}} +{{^vendorExtensions.x-is-one-of-interface}} + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +{{#vars}}|**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}**{{baseType}}{{#items}}<{{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}**Map<String, {{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}**{{dataType}}**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} | +{{/vars}} +{{#vars}}{{#isEnum}} + + +## Enum: {{datatypeWithEnum}} + +| Name | Value | +|---- | -----|{{#allowableValues}}{{#enumVars}} +| {{name}} | {{value}} |{{/enumVars}}{{/allowableValues}} +{{/isEnum}}{{/vars}} +{{#vendorExtensions.x-implements.0}} + +## Implemented Interfaces + +{{#vendorExtensions.x-implements}} +* {{{.}}} +{{/vendorExtensions.x-implements}} +{{/vendorExtensions.x-implements.0}} +{{/vendorExtensions.x-is-one-of-interface}} +{{#vendorExtensions.x-is-one-of-interface}} +## Implementing Classes + +{{#oneOf}} +* {{{.}}} +{{/oneOf}} +{{/vendorExtensions.x-is-one-of-interface}} diff --git a/templates/pom.mustache b/templates/pom.mustache new file mode 100644 index 00000000..56f96ae5 --- /dev/null +++ b/templates/pom.mustache @@ -0,0 +1,404 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + + com.sun.jersey + jersey-client + ${jersey-version} + + + com.sun.jersey.contribs + jersey-multipart + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{^useJakartaEe}} + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#useJakartaEe}} + + com.fasterxml.jackson.jakarta.rs + jackson-jakarta-rs-json-provider + ${jackson-version} + + {{/useJakartaEe}} + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + 5.4.1.Final + + {{/performBeanValidation}} + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + dev.failsafe + failsafe + ${failsafe-version} + + + dev.failsafe + failsafe-okhttp + ${failsafe-version} + + + + UTF-8 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 1.19.4 + 2.17.1 + 2.17.1 + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} + 1.0.0 + 5.10.2 + 1.10.0 + 3.3.1 + + diff --git a/templates/sealed.mustache b/templates/sealed.mustache new file mode 100644 index 00000000..8e5076b4 --- /dev/null +++ b/templates/sealed.mustache @@ -0,0 +1 @@ +{{#useSealedOneOfInterfaces}}{{#vendorExtensions.x-is-one-of-interface}}{{#permits.0}}sealed {{/permits.0}}{{/vendorExtensions.x-is-one-of-interface}}{{^permits.0}}{{#vendorExtensions.x-implements}}final {{/vendorExtensions.x-implements}}{{/permits.0}}{{/useSealedOneOfInterfaces}} \ No newline at end of file diff --git a/templates/settings.gradle.mustache b/templates/settings.gradle.mustache new file mode 100644 index 00000000..b8fd6c4c --- /dev/null +++ b/templates/settings.gradle.mustache @@ -0,0 +1 @@ +rootProject.name = "{{artifactId}}" \ No newline at end of file diff --git a/templates/toto.mustache b/templates/toto.mustache new file mode 100644 index 00000000..a6cf9aa8 --- /dev/null +++ b/templates/toto.mustache @@ -0,0 +1,5 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +YPPPPPPP diff --git a/templates/travis.mustache b/templates/travis.mustache new file mode 100644 index 00000000..1b6741c0 --- /dev/null +++ b/templates/travis.mustache @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/templates/typeInfoAnnotation.mustache b/templates/typeInfoAnnotation.mustache new file mode 100644 index 00000000..58bfed9c --- /dev/null +++ b/templates/typeInfoAnnotation.mustache @@ -0,0 +1,23 @@ +{{#jackson}} + +@JsonIgnoreProperties( + value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) +{{#discriminator.mappedModels}} +{{#-first}} +@JsonSubTypes({ +{{/-first}} + @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), +{{#-last}} +}) +{{/-last}} +{{/discriminator.mappedModels}} +{{/jackson}} +{{#jsonbPolymorphism}} +@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = { +{{/-first}} + @JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class), +{{#-last}} +}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}} \ No newline at end of file diff --git a/templates/xmlAnnotation.mustache b/templates/xmlAnnotation.mustache new file mode 100644 index 00000000..4f3b448c --- /dev/null +++ b/templates/xmlAnnotation.mustache @@ -0,0 +1,6 @@ +{{#withXml}} + +@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@XmlAccessorType(XmlAccessType.FIELD) +{{#jackson}} +@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}} \ No newline at end of file